---
name: "CL_BezierSurface"
section: "3"
platform: "linux"
package: "clanlib0-common-dev"
version: "0.4.4-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/CL_BezierSurface"
---

# CL\_BezierSurface(3)

Class for Bezier surfaces

## NAME

CL\_BezierSurface - Class for Bezier surfaces

## DESCRIPTION

This class generates points on a Bezier surface from given control points

## CLASS MEMBERS

- **CL\_BezierSurface**(

  ```
  const CL_Vector *cp,
  int xs,
  int ys,
  int xsteps,
  int ysteps,
  bool stepping = true)
  ```

- virtual **~CL\_BezierSurface**()

  - virtual int **get\_xsteps**()

  - virtual int **get\_ysteps**()

  - virtual int **get\_xs**()

  - virtual int **get\_ys**()

  - virtual bool **get\_stepping**()

  - virtual void **set\_xsteps**(

  ```
  int xsteps)
  ```

- virtual void **set\_ysteps**(

  ```
  int ysteps)
  ```

- virtual void **set\_stepping**(

  ```
  bool stepping)
  ```

- virtual CL\_Vector\* **get\_surface**()

  - virtual CL\_Vector\* **get\_control\_points**()

  - CL\_Vector **operator \[\]**(

  ```
  int n)
  ```

## MEMBERS WITH DESCRIPTIONS

- **CL\_BezierSurface**(

  ```
  const CL_Vector *cp,
  int xs,
  int ys,
  int xsteps,
  int ysteps,
  bool stepping = true)
  ```

  ```
  Parameters:
  cp - an array of control points with size (16 * xs * ys)
  xs - number of surface segments on x direction
  ys - number of surface segments on y direction
  xsteps - number of points to generate on x direction
  ysteps - number of points to generate on x direction
  stepping - whether steps is the number of points per segment or per surface.
  ```

  ```
  Description:
  ```

  Constructor

- virtual **~CL\_BezierSurface**()

  ```
  Description:
  ```

  Destructor

- virtual int **get\_xsteps**()

  ```
  Description:
  ```

  Returns the number of steps

  ```
  Return value:
  ```

  number of steps

- virtual int **get\_ysteps**()

  ```
  Description:
  ```

  Returns the number of steps

  ```
  Return value:
  ```

  number of steps

- virtual int **get\_xs**()

  ```
  Description:
  ```

  Returns the number of surface segments

  ```
  Return value:
  ```

  number of surface segments

- virtual int **get\_ys**()

  ```
  Description:
  ```

  Returns the number of surface segments

  ```
  Return value:
  ```

  number of surface segments

- virtual bool **get\_stepping**()

  ```
  Parameters:
  segment - number of segment (-1 indicates whole surface)
  ```

  ```
  Description:
  ```

  Returns whether steps is the number of points per segment or per curve.Nak Nak - don't expect it to be implemented too soon...Returns the length of a segment (or the surface) virtual float get\_length(int segment = -1) const;

  ```
  Return value:
  ```

  stepping length of segment (or surface)

- virtual void **set\_xsteps**(

  ```
  int xsteps)
  ```

  ```
  Parameters:
  steps - number of steps
  ```

  ```
  Description:
  ```

  Sets the number of steps

- virtual void **set\_ysteps**(

  ```
  int ysteps)
  ```

  ```
  Parameters:
  steps - number of steps
  ```

  ```
  Description:
  ```

  Sets the number of steps

- virtual void **set\_stepping**(

  ```
  bool stepping)
  ```

  ```
  Parameters:
  stepping - whether steps is the number of points per segment or per curve.
  ```

  ```
  Description:
  ```

  Sets the stepping

- virtual CL\_Vector\* **get\_surface**()

  ```
  Description:
  ```

  Returns an array of xs \* xsteps \* ys \* ysteps CL\_Vectors -\> the surface

  ```
  Return value:
  ```

  the curve (xs \* xsteps \* ys \* ystepes CL\_Vectors)

- virtual CL\_Vector\* **get\_control\_points**()

  ```
  Description:
  ```

  Returns the 16 \* xs \* ys control points

  ```
  Return value:
  ```

  the 16 \* xs \* ys control points

- CL\_Vector **operator \[\]**(

  ```
  int n)
  ```

  ```
  Parameters:
  n - the vector to return (counting starts at 0)
  ```

  ```
  Description:
  ```

  Returns the n-th vector of the curve (\_doesn't\_ return a reference)

  ```
  Return value:
  ```

  the n-th vector of the curve (\_doesn't\_ return a reference)

## SEE ALSO

All ClanLib API classes can be found in **clanlib (3)**.

## AUTHORS

Originally written by Magnus Norddahl \<*mbn@dark.x.dtu.dk*\> and Martin Starch \<*starch@dark.x.dtu.dk*\>. ClanLib is now developed by the ClanLib Development team as an Open Source project.

The ClanLib man pages was created using the Perceps documentation system (another excellent piece of Open Source software, available at **http://somewhere.in.the.world.org**).

See **clanlib (3)** to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.
