In file graphics3D/Surface.h:

namespace yav class Surface : public Owner<Texture2D>, public Owner<Texture1D>

any surface object

Inheritance:


Public Classes

struct Rendering
a data structure describing a given rendering mode
TclString renderingName
name of the rendering
TclString optionName
name of the option associated with the Tcl command -render
RedrawRenderingMode redraw
the function called for redrawing the surface
struct SecondaryRenderingList
a data structure describing a list of possible rendering modes, used for secondary rendering lists
TclString renderingListName
name of the rendering
TclString optionName
name of the option associated with the Tcl command -render type (mode)
std::list <Rendering *> renderingList
possible rendering modes associated to type
Rendering* selectedRendering
selected rendering mode

Public Fields

static const char* synopsis
-render option synopsis
static const char* texture2DSynopsis
-texture2DOption option synopsis
static const char* texture1DSynopsis
-texture1DOption option synopsis

Public Methods

typedef void(Surface::*RedrawRenderingMode) (Camera3D *c)
defines the type of member function that can be called when drawing a rendering mode
Rendering* getRenderingFromOptionName (TclString n)
returns a pointer to the rendering structure having Tcl option name n if no rendering has name n then returns 0
Rendering* getRenderingFromName (TclString n)
returns a pointer to the rendering structure having name n if no rendering has name n then returns 0
const Rendering* getRenderMode (void) const
returns current render mode
virtual void setRendering (const TclString& name)
set a rendering mode gven its name
virtual void setRendering (Rendering *r)
set a rendering mode
SecondaryRenderingList* getSecondaryRenderingListFromOptionName (const TclString& t)
returns a pointer to the secondary rendering list having Tcl option name t if no secondary rendering list has name n then returns 0
SecondaryRenderingList* getSecondaryRenderingListFromName (const TclString& t)
returns a pointer to the secondary rendering list having name t if no secondary rendering list has name n then returns 0
Rendering* getSecondaryRenderingFromOptionName (SecondaryRenderingList* srl, const TclString& n)
returns a pointer to the rendering mode having Tcl option name n, defined in the secondary rendering list srl if no rendering mode has name n then returns 0
Rendering* getSecondaryRenderingFromOptionName (const TclString& l, const TclString& n)
returns a pointer to the rendering mode having Tcl option name n, defined in the secondary rendering list having Tcl option name l if no rendering mode has name n then returns 0
Rendering* getSecondaryRenderingFromName (SecondaryRenderingList* srl, const TclString& n)
returns a pointer to the rendering mode having name n, defined in the secondary rendering list srl if no rendering mode has name n then returns 0
Rendering* getSecondaryRenderingFromName (const TclString& l, const TclString& n)
returns a pointer to the rendering mode having name n, defined in the secondary rendering list having name l if no rendering mode has name n then returns 0
const Rendering* getSecondaryRenderMode (const SecondaryRenderingList* t) const
returns current render mode in secondary rendering list t
void setSecondaryRendering (const TclString& t, const TclString& n)
set a rendering mode given its name in secondary rendering list t
void setSecondaryRendering (SecondaryRenderingList* rt, Rendering *rm)
set a rendering mode in secondary rendering list t
Color& getColor (void)
returns wireframe color
Material& getMaterial (void)
returns surface material
GLfloat getLineWidth (void) const
returns wireframe line width
void setLineWidth (GLfloat width)
set wireframe line width
Texture2D::TextureMode getTexture2DMode ()
get textureMode of the 2D texture
Texture1D::TextureMode getTexture1DMode ()
get textureMode of the 1D texture
void setTexture2DMode (Texture2D::TextureMode tm)
set textureMode of the 2D texture
void setTexture1DMode (Texture1D::TextureMode tm)
set textureMode of the 1D texture
void setTexture2D (Texture2D *t)
set 2D texture
void setTexture1D (Texture1D *t)
set 1D texture
void setHighlightTexture (Texture2D *t)
set highlight texture
Texture2D* getTexture2D () const
get 2D texture
Texture1D* getTexture1D () const
get 2D texture
Texture2D* getHighlightTexture () const
get highlight texture
bool usingTexture2D () const
if 2D texture should be used
bool usingTexture1D () const
if 2D texture should be used
bool usingTextureHighlight () const
if texture highlight should be used
void setTexture2DUsage (const bool b)
set the use of 2D texture mapping
void setTexture1DUsage (const bool b)
set the use of 2D texture mapping
void setTextureHighlightUsage (const bool b)
set the use of texture highlight
bool replaceLighting () const
if lighting should replace lighting or should be modulated with lighting
void setLightingTextureUsage (const bool b)
set the use of lighting vs texture mapping
virtual void dying (const ObjectPointer<Texture2D>& obj)
an 2D Texture is being destroyed
virtual void dying (const ObjectPointer<Texture1D>& obj)
a 1D Texture is being destroyed
void surfaceChanged (void)
delete display lists when surface changes
void redraw (Camera3D *cam)
redraw the surface
virtual void buildWireframe (void)
wireframe display list creation callback
virtual void buildSolid (void)
solid display list creation callback
virtual void buildFlat (void)
flat display list creation callback
virtual void setRedrawOrder (unsigned int order)
set object redraw order for transparency sorting
int renderCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-render TCL command
int renderOptionCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-renderOption TCL command
int secondaryRenderCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-secondaryRender TCL command
int secondaryRenderOptionCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-secondaryRenderOption TCL command
int texture2DCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-texture2D TCL command
int texture1DCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-texture1D TCL command
int highlightTextureCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-texture TCL command
int useDisplayListsCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-useDisplayList TCL command
int texture2DOptionCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-texture2DOption TCL command
int texture1DOptionCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-texture1DOption TCL command
int colorCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-color TCL command
int materialCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-material TCL command

Public

constructors
Surface ()
default (white) surface
Surface (const GLfloat *ambient, const GLfloat *diffuse, const GLfloat *specular, GLfloat shininess)
creates a new surface with given material
Surface (const Surface& org)
copy constructor
destructor

Protected Classes

enum RenderMode
display modes
RM_NONE
do not display
RM_WIREFRAME
display wireframe
RM_FLAT
display solid flat surface
RM_SOLID
display solid smoothed surface
RM_WIREFRAME_SOLID
display solid surface plus wireframe
RM_HIDDEN_LINES
display wireframe with hidden lines
RM_TRANSPARENCY
display transparent surface
RM_WIREFRAME_TRANSPARENCY
display transparent surface with wireframe mesh

Protected Fields

bool useFlat
wether we really need a specific flat display List
Material mat
surface material
Color color
wireframe color
GLfloat width
wireframe line width
GLuint wireframeList
wireframe display list
GLuint solidList
solid display list
GLuint flatList
flat display list
ObjectPointer <Texture1D> texture1D
a texture applied on the surface
ObjectPointer <Texture2D> texture2D
a texture applied on the surface
ObjectPointer <Texture2D> highlightTexture
a texture applied on the surface corresponding to the specular component
bool useTexture1D
if we should use texture mapping
bool useTexture2D
if we should use texture mapping
bool useTextureHighlight
if we should use texture highlighting instead of Gouraud specularity
bool textureReplaceLighting
if the texture map should replace lighting or being modulated with it
Texture2D::TextureInterpolation texture2DInterpolation
describe how to interpolate texture
Texture2D::TextureExtrapolation texture2DExtrapolation
describe how to extrapolate texture
Texture2D::TextureMode texture2DMode
describe how to apply the texture
Texture1D::TextureInterpolation texture1DInterpolation
describe how to interpolate texture
Texture1D::TextureExtrapolation texture1DExtrapolation
describe how to extrapolate texture
Texture1D::TextureMode texture1DMode
describe how to apply the texture
double sTextureParameters [4]
s texture parameter vector when using automatic texture coordinate generate with a plane
double tTextureParameters [4]
t texture parameter vector when using automatic texture coordinate generate with a plane
std::list <Rendering *> renderingList
the list of possible rendering for that surface */
Rendering* selectedRendering
the rendering mode that is currently used
std::list <SecondaryRenderingList *> secondaryRenderingLists
the list of secondary rendering lists for that surface */

Protected Methods

void buildWireframeDisplayList (void)
builds object's wireframe display list
void buildFlatDisplayList (void)
builds object's flat display list
void buildSolidDisplayList (void)
builds object's solid list
void callWireframeDisplayList (void)
call (and build if needed) object's wireframe display list
void callFlatDisplayList (void)
call (and build if needed) object's flat display list
void callSolidDisplayList (void)
call (and build if needed) object's solid display list
void destroyWireframeDisplayList (void)
destroy if needed object's wireframe display list
void destroyFlatDisplayList (void)
destroy if needed object's flat display list
void destroySolidDisplayList (void)
destroy if needed object's solid list

Private Methods

void initRenderingList (void)
initialize the list of rendering and select one rendering
void destroyRenderingList (void)
destroy the list of rendering
void redrawBasic (Camera3D *cam, RenderMode rm)
call surface display list for all pre-defined rendering modes
void dummyRedraw (Camera3D *cam)
redraw function for the "hide" rendering
void wireframeRedraw (Camera3D *cam)
redraw function for the "wireframe" rendering
void flatRedraw (Camera3D *cam)
redraw function for the "flat" rendering
void gouraudRedraw (Camera3D *cam)
redraw function for the "solid" rendering
void wireGouraudRedraw (Camera3D *cam)
redraw function for the "wireframesolid" rendering
void hiddenRedraw (Camera3D *cam)
redraw function for the "hidden" rendering
void transparentRedraw (Camera3D *cam)
redraw function for the "transparency" rendering
void wireTransparentRedraw (Camera3D *cam)
redraw function for the "wireframetransparency" rendering
void wireframeLinesRedraw (Camera3D *cam)
redraw function for the "wireframe" rendering
void wireframeHiddenRedraw (Camera3D *cam)
redraw function for the "hidden lines" rendering
void solidFlatRedraw (Camera3D *cam)
redraw function for the "flat" rendering
void solidGouraudRedraw (Camera3D *cam)
redraw function for the "solid" rendering
void solidTransparentRedraw (Camera3D *cam)
redraw function for the "transparency" rendering

Documentation

any surface object
typedef void (Surface::*RedrawRenderingMode)(Camera3D *c)
defines the type of member function that can be called when drawing a rendering mode

struct Rendering
a data structure describing a given rendering mode. It includes all necessary information for the Tcl interface

TclString renderingName
name of the rendering

TclString optionName
name of the option associated with the Tcl command -render

RedrawRenderingMode redraw
the function called for redrawing the surface

struct SecondaryRenderingList
a data structure describing a list of possible rendering modes, used for secondary rendering lists. It includes selected mode.

TclString renderingListName
name of the rendering

TclString optionName
name of the option associated with the Tcl command -render type (mode)

std::list <Rendering *> renderingList
possible rendering modes associated to type

Rendering* selectedRendering
selected rendering mode

enum RenderMode
display modes

RM_NONE
do not display

RM_WIREFRAME
display wireframe

RM_FLAT
display solid flat surface

RM_SOLID
display solid smoothed surface

RM_WIREFRAME_SOLID
display solid surface plus wireframe

RM_HIDDEN_LINES
display wireframe with hidden lines

RM_TRANSPARENCY
display transparent surface

RM_WIREFRAME_TRANSPARENCY
display transparent surface with wireframe mesh

bool useFlat
wether we really need a specific flat display List

Material mat
surface material

Color color
wireframe color

GLfloat width
wireframe line width

GLuint wireframeList
wireframe display list

GLuint solidList
solid display list

GLuint flatList
flat display list

ObjectPointer <Texture1D> texture1D
a texture applied on the surface

ObjectPointer <Texture2D> texture2D
a texture applied on the surface

ObjectPointer <Texture2D> highlightTexture
a texture applied on the surface corresponding to the specular component

bool useTexture1D
if we should use texture mapping

bool useTexture2D
if we should use texture mapping

bool useTextureHighlight
if we should use texture highlighting instead of Gouraud specularity

bool textureReplaceLighting
if the texture map should replace lighting or being modulated with it

Texture2D::TextureInterpolation texture2DInterpolation
describe how to interpolate texture

Texture2D::TextureExtrapolation texture2DExtrapolation
describe how to extrapolate texture

Texture2D::TextureMode texture2DMode
describe how to apply the texture

Texture1D::TextureInterpolation texture1DInterpolation
describe how to interpolate texture

Texture1D::TextureExtrapolation texture1DExtrapolation
describe how to extrapolate texture

Texture1D::TextureMode texture1DMode
describe how to apply the texture

double sTextureParameters[4]
s texture parameter vector when using automatic texture coordinate generate with a plane

double tTextureParameters[4]
t texture parameter vector when using automatic texture coordinate generate with a plane

void buildWireframeDisplayList(void)
builds object's wireframe display list

void buildFlatDisplayList(void)
builds object's flat display list

void buildSolidDisplayList(void)
builds object's solid list

void callWireframeDisplayList(void)
call (and build if needed) object's wireframe display list

void callFlatDisplayList(void)
call (and build if needed) object's flat display list

void callSolidDisplayList(void)
call (and build if needed) object's solid display list

void destroyWireframeDisplayList(void)
destroy if needed object's wireframe display list

void destroyFlatDisplayList(void)
destroy if needed object's flat display list

void destroySolidDisplayList(void)
destroy if needed object's solid list

std::list <Rendering *> renderingList
the list of possible rendering for that surface */

Rendering* selectedRendering
the rendering mode that is currently used

std::list <SecondaryRenderingList *> secondaryRenderingLists
the list of secondary rendering lists for that surface */

void initRenderingList(void)
initialize the list of rendering and select one rendering

void destroyRenderingList(void)
destroy the list of rendering

void redrawBasic(Camera3D *cam, RenderMode rm)
call surface display list for all pre-defined rendering modes
Parameters:
cam - camera being redrawn

void dummyRedraw(Camera3D *cam)
redraw function for the "hide" rendering

void wireframeRedraw(Camera3D *cam)
redraw function for the "wireframe" rendering

void flatRedraw(Camera3D *cam)
redraw function for the "flat" rendering

void gouraudRedraw(Camera3D *cam)
redraw function for the "solid" rendering

void wireGouraudRedraw(Camera3D *cam)
redraw function for the "wireframesolid" rendering

void hiddenRedraw(Camera3D *cam)
redraw function for the "hidden" rendering

void transparentRedraw(Camera3D *cam)
redraw function for the "transparency" rendering

void wireTransparentRedraw(Camera3D *cam)
redraw function for the "wireframetransparency" rendering

void wireframeLinesRedraw(Camera3D *cam)
redraw function for the "wireframe" rendering

void wireframeHiddenRedraw(Camera3D *cam)
redraw function for the "hidden lines" rendering

void solidFlatRedraw(Camera3D *cam)
redraw function for the "flat" rendering

void solidGouraudRedraw(Camera3D *cam)
redraw function for the "solid" rendering

void solidTransparentRedraw(Camera3D *cam)
redraw function for the "transparency" rendering

constructors

Surface()
default (white) surface

Surface(const GLfloat *ambient, const GLfloat *diffuse, const GLfloat *specular, GLfloat shininess)
creates a new surface with given material
Parameters:
ambient - surface ambient light reflexion 4 coefficients
diffuse - surface diffuse light reflexion 4 coefficients
specular - surface specular light reflexion 4 coefficients
shininess - surface shininess

Surface(const Surface& org)
copy constructor

destructor

Rendering* getRenderingFromOptionName(TclString n)
returns a pointer to the rendering structure having Tcl option name n if no rendering has name n then returns 0

Rendering* getRenderingFromName(TclString n)
returns a pointer to the rendering structure having name n if no rendering has name n then returns 0

const Rendering* getRenderMode(void) const
returns current render mode

virtual void setRendering(const TclString& name)
set a rendering mode gven its name

virtual void setRendering(Rendering *r)
set a rendering mode

SecondaryRenderingList* getSecondaryRenderingListFromOptionName(const TclString& t)
returns a pointer to the secondary rendering list having Tcl option name t if no secondary rendering list has name n then returns 0

SecondaryRenderingList* getSecondaryRenderingListFromName(const TclString& t)
returns a pointer to the secondary rendering list having name t if no secondary rendering list has name n then returns 0

Rendering* getSecondaryRenderingFromOptionName(SecondaryRenderingList* srl, const TclString& n)
returns a pointer to the rendering mode having Tcl option name n, defined in the secondary rendering list srl if no rendering mode has name n then returns 0

Rendering* getSecondaryRenderingFromOptionName(const TclString& l, const TclString& n)
returns a pointer to the rendering mode having Tcl option name n, defined in the secondary rendering list having Tcl option name l if no rendering mode has name n then returns 0

Rendering* getSecondaryRenderingFromName(SecondaryRenderingList* srl, const TclString& n)
returns a pointer to the rendering mode having name n, defined in the secondary rendering list srl if no rendering mode has name n then returns 0

Rendering* getSecondaryRenderingFromName(const TclString& l, const TclString& n)
returns a pointer to the rendering mode having name n, defined in the secondary rendering list having name l if no rendering mode has name n then returns 0

const Rendering* getSecondaryRenderMode(const SecondaryRenderingList* t) const
returns current render mode in secondary rendering list t

void setSecondaryRendering(const TclString& t, const TclString& n)
set a rendering mode given its name in secondary rendering list t

void setSecondaryRendering(SecondaryRenderingList* rt, Rendering *rm)
set a rendering mode in secondary rendering list t

Color& getColor(void)
returns wireframe color

Material& getMaterial(void)
returns surface material

GLfloat getLineWidth(void) const
returns wireframe line width

void setLineWidth(GLfloat width)
set wireframe line width
Parameters:
width - set new line width

Texture2D::TextureMode getTexture2DMode()
get textureMode of the 2D texture

Texture1D::TextureMode getTexture1DMode()
get textureMode of the 1D texture

void setTexture2DMode(Texture2D::TextureMode tm)
set textureMode of the 2D texture

void setTexture1DMode(Texture1D::TextureMode tm)
set textureMode of the 1D texture

void setTexture2D(Texture2D *t)
set 2D texture

void setTexture1D(Texture1D *t)
set 1D texture

void setHighlightTexture(Texture2D *t)
set highlight texture

Texture2D* getTexture2D() const
get 2D texture

Texture1D* getTexture1D() const
get 2D texture

Texture2D* getHighlightTexture() const
get highlight texture

bool usingTexture2D() const
if 2D texture should be used

bool usingTexture1D() const
if 2D texture should be used

bool usingTextureHighlight() const
if texture highlight should be used

void setTexture2DUsage(const bool b)
set the use of 2D texture mapping

void setTexture1DUsage(const bool b)
set the use of 2D texture mapping

void setTextureHighlightUsage(const bool b)
set the use of texture highlight

bool replaceLighting() const
if lighting should replace lighting or should be modulated with lighting

void setLightingTextureUsage(const bool b)
set the use of lighting vs texture mapping

virtual void dying(const ObjectPointer<Texture2D>& obj)
an 2D Texture is being destroyed
Parameters:
obj - element before destruction

virtual void dying(const ObjectPointer<Texture1D>& obj)
a 1D Texture is being destroyed
Parameters:
obj - element before destruction

void surfaceChanged(void)
delete display lists when surface changes

void redraw(Camera3D *cam)
redraw the surface

virtual void buildWireframe(void)
wireframe display list creation callback

virtual void buildSolid(void)
solid display list creation callback

virtual void buildFlat(void)
flat display list creation callback

virtual void setRedrawOrder(unsigned int order)
set object redraw order for transparency sorting
Parameters:
order - redraw order (should be 1 or 2)

int renderCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-render TCL command

int renderOptionCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-renderOption TCL command

int secondaryRenderCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-secondaryRender TCL command

int secondaryRenderOptionCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-secondaryRenderOption TCL command

int texture2DCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-texture2D TCL command

int texture1DCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-texture1D TCL command

int highlightTextureCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-texture TCL command

int useDisplayListsCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-useDisplayList TCL command

int texture2DOptionCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-texture2DOption TCL command

int texture1DOptionCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-texture1DOption TCL command

int colorCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-color TCL command

int materialCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-material TCL command

static const char* synopsis
-render option synopsis

static const char* texture2DSynopsis
-texture2DOption option synopsis

static const char* texture1DSynopsis
-texture1DOption option synopsis


Direct child classes:
Rectangle3D
MaterialSphere

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de