ContRap-Libraries
Public Types | Public Member Functions

crp::GLSurface Class Reference

Class GLSurface represents a smooth surface in space given by a two-dimensional parametrization. More...

#include <glsurface.h>

Inheritance diagram for crp::GLSurface:
crp::GLPrimitive

Public Types

enum  ColorStyle {
  COLOR, X_VALUE, Y_VALUE, Z_VALUE,
  VALUES
}
 

Style of the surface coloring.

More...

Public Member Functions

 GLSurface (const GLVertex &position, GLSurfaceData *data=0)
 Constructor from the coordinates of the sphere and radius.
virtual ~GLSurface ()
 Destructor.
void make_display_list (int flags) const
 Draws the surface into an OpenGL display list.
GLSurfaceDataget_data ()
 Accessor to the data of the surface.
void set_color_style (ColorStyle value)
 Sets the color style.
void set_xsize (double value)
 Sets the extention of the parametrization along the first (X) parametrization component.
void set_ysize (double value)
 Sets the extention of the parametrization along the second (Y) parametrization component.
GLPrimitiveType get_type () const
 Type of the primitive.

Detailed Description

Class GLSurface represents a smooth surface in space given by a two-dimensional parametrization.

The form of the surface is given by a GLSurfaceData object.

The surface parametrization is defined over the interval [0,1] x [0,1] per default. You can adjust the size of the parametrization by calling the set size command.


Member Enumeration Documentation

Style of the surface coloring.

Enumerator:
COLOR 
X_VALUE 
Y_VALUE 
Z_VALUE 
VALUES 

Constructor & Destructor Documentation

crp::GLSurface::GLSurface ( const GLVertex position,
GLSurfaceData data = 0 
)

Constructor from the coordinates of the sphere and radius.

Parameters:
positionPosition of the primitive
dataSurface data object
virtual crp::GLSurface::~GLSurface ( ) [virtual]

Destructor.


Member Function Documentation

GLSurfaceData* crp::GLSurface::get_data ( ) [inline]

Accessor to the data of the surface.

Returns:
Reference to the data
GLPrimitiveType crp::GLSurface::get_type ( ) const [inline, virtual]

Type of the primitive.

Returns:
Type name of the primitive

Implements crp::GLPrimitive.

void crp::GLSurface::make_display_list ( int  flags) const [virtual]

Draws the surface into an OpenGL display list.

Parameters:
flagsStyle flags used to filter out drawing

Implements crp::GLPrimitive.

void crp::GLSurface::set_color_style ( ColorStyle  value) [inline]

Sets the color style.

Parameters:
valueNew color style
void crp::GLSurface::set_xsize ( double  value) [inline]

Sets the extention of the parametrization along the first (X) parametrization component.

Parameters:
valueNew X-size of the range
void crp::GLSurface::set_ysize ( double  value) [inline]

Sets the extention of the parametrization along the second (Y) parametrization component.

Parameters:
valueNew Y-size of the range

The documentation for this class was generated from the following file: