In file graphics3D/Rectangle3D.h:

namespace yav class Rectangle3D : public Data3D, public Surface

class of a 3D rectangle that can be displayed with different rendering methods

Inheritance:


Public Methods

void textureRedraw ()
redraw with texture mapping
void buildFlat ()
create display list of flat display
void buildWireframe ()
create display list of wireframe display
void buildSolid ()
create display list of solid display
Vec3 getCenter () const
get the centroid of the rectangle
void getSize (double &length, double &width) const
get the two length sizes
Vec3 getVertex (const unsigned int i) const
get vertex nb i (i<4)
void getTextureScale (double &s, double &t) const
the texture scale coordinates
void setTextureScale (const double s, const double t)
the texture scale coordinates
virtual void translate (const Vec3& tr)
translates the object
virtual void rotate (const Rotation3D& rotation)
rotates the object
virtual void scale (const double scale)
scales the object
virtual void redraw (Camera3D *)
all graphics objects can be drawn
virtual void updateCenter (Vec3& center, unsigned int& n)
Returns the graphic object center and weight
virtual double updateRadius (const Vec3& center)
Returns the graphic object radius given its center
void flipNormals ()
change the normal direction for display
virtual double computeClosestDistance (DataTypes::MouseClick& mc) const
The routine that allows the camera to select an object by computing the distance of an object from its radial line
virtual void setRedrawOrder (unsigned int order)
set object redraw order for transparency sorting

Public

constructors
Rectangle3D (Scene3D *scene=0, const Vec3 &p1=Vec3(0, 0, 0), const Vec3 &p2=Vec3(1, 1, 0), const Vec3 &v1=Vec3(1, 0, 0), const Vec3 &v2=Vec3(0, 1, 0))
create a rectangle two diagonal points and its normal vector
destructor
~Rectangle3D ()
destroys display list

Private Fields

double sscale
the scale factor for the s and t texture coordinates
Vec3 point [4]
the four vertices of the rectangle
bool updateDisplayList
if the display should be updated
bool flipNormal
if the normal should be flipped for display

Inherited from Data3D:

Public Classes

struct MouseClick3D: public DataTypes MouseClick

Public Methods

unsigned int getRedrawOrder(void) const
void updateCenterAndRadius(void)

Public

constructor

Data3D(Scene3D *scene = 0, bool exclusive = false #ifdef GRAPHICS, unsigned int redrawOrder = 1 #endif )
builds a new Data3D

Protected Fields

unsigned int redrawOrder

Inherited from Surface:

Public Classes

struct Rendering
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
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
static const char* texture2DSynopsis
static const char* texture1DSynopsis

Public Methods

typedef void (Surface::*RedrawRenderingMode)(Camera3D *c)
Rendering* getRenderingFromOptionName(TclString n)
Rendering* getRenderingFromName(TclString n)
const Rendering* getRenderMode(void) const
virtual void setRendering(const TclString& name)
virtual void setRendering(Rendering *r)
SecondaryRenderingList* getSecondaryRenderingListFromOptionName(const TclString& t)
SecondaryRenderingList* getSecondaryRenderingListFromName(const TclString& t)
Rendering* getSecondaryRenderingFromOptionName(SecondaryRenderingList* srl, const TclString& n)
Rendering* getSecondaryRenderingFromOptionName(const TclString& l, const TclString& n)
Rendering* getSecondaryRenderingFromName(SecondaryRenderingList* srl, const TclString& n)
Rendering* getSecondaryRenderingFromName(const TclString& l, const TclString& n)
const Rendering* getSecondaryRenderMode(const SecondaryRenderingList* t) const
void setSecondaryRendering(const TclString& t, const TclString& n)
void setSecondaryRendering(SecondaryRenderingList* rt, Rendering *rm)
Color& getColor(void)
Material& getMaterial(void)
GLfloat getLineWidth(void) const
void setLineWidth(GLfloat width)
Texture2D::TextureMode getTexture2DMode()
Texture1D::TextureMode getTexture1DMode()
void setTexture2DMode(Texture2D::TextureMode tm)
void setTexture1DMode(Texture1D::TextureMode tm)
void setTexture2D(Texture2D *t)
void setTexture1D(Texture1D *t)
void setHighlightTexture(Texture2D *t)
Texture2D* getTexture2D() const
Texture1D* getTexture1D() const
Texture2D* getHighlightTexture() const
bool usingTexture2D() const
bool usingTexture1D() const
bool usingTextureHighlight() const
void setTexture2DUsage(const bool b)
void setTexture1DUsage(const bool b)
void setTextureHighlightUsage(const bool b)
bool replaceLighting() const
void setLightingTextureUsage(const bool b)
virtual void dying(const ObjectPointer<Texture2D>& obj)
virtual void dying(const ObjectPointer<Texture1D>& obj)
void surfaceChanged(void)
int renderCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
int renderOptionCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
int secondaryRenderCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
int secondaryRenderOptionCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
int texture2DCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
int texture1DCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
int highlightTextureCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
int useDisplayListsCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
int texture2DOptionCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
int texture1DOptionCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
int colorCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
int materialCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)

Protected Classes

enum RenderMode
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
Material mat
Color color
GLfloat width
GLuint wireframeList
GLuint solidList
GLuint flatList
ObjectPointer <Texture1D> texture1D
ObjectPointer <Texture2D> texture2D
ObjectPointer <Texture2D> highlightTexture
bool useTexture1D
bool useTexture2D
bool useTextureHighlight
bool textureReplaceLighting
Texture2D::TextureInterpolation texture2DInterpolation
Texture2D::TextureExtrapolation texture2DExtrapolation
Texture2D::TextureMode texture2DMode
Texture1D::TextureInterpolation texture1DInterpolation
Texture1D::TextureExtrapolation texture1DExtrapolation
Texture1D::TextureMode texture1DMode
double sTextureParameters[4]
double tTextureParameters[4]
std::list <Rendering *> renderingList
Rendering* selectedRendering
std::list <SecondaryRenderingList *> secondaryRenderingLists

Protected Methods

void buildWireframeDisplayList(void)
void buildFlatDisplayList(void)
void buildSolidDisplayList(void)
void callWireframeDisplayList(void)
void callFlatDisplayList(void)
void callSolidDisplayList(void)
void destroyWireframeDisplayList(void)
void destroyFlatDisplayList(void)
void destroySolidDisplayList(void)

Private Methods

void initRenderingList(void)
void destroyRenderingList(void)
void redrawBasic(Camera3D *cam, RenderMode rm)
void dummyRedraw(Camera3D *cam)
void wireframeRedraw(Camera3D *cam)
void flatRedraw(Camera3D *cam)
void gouraudRedraw(Camera3D *cam)
void wireGouraudRedraw(Camera3D *cam)
void hiddenRedraw(Camera3D *cam)
void transparentRedraw(Camera3D *cam)
void wireTransparentRedraw(Camera3D *cam)
void wireframeLinesRedraw(Camera3D *cam)
void wireframeHiddenRedraw(Camera3D *cam)
void solidFlatRedraw(Camera3D *cam)
void solidGouraudRedraw(Camera3D *cam)
void solidTransparentRedraw(Camera3D *cam)

Documentation

class of a 3D rectangle that can be displayed with different rendering methods
double sscale
the scale factor for the s and t texture coordinates

Vec3 point[4]
the four vertices of the rectangle

bool updateDisplayList
if the display should be updated

bool flipNormal
if the normal should be flipped for display

constructors

Rectangle3D(Scene3D *scene=0, const Vec3 &p1=Vec3(0, 0, 0), const Vec3 &p2=Vec3(1, 1, 0), const Vec3 &v1=Vec3(1, 0, 0), const Vec3 &v2=Vec3(0, 1, 0))
create a rectangle two diagonal points and its normal vector
Parameters:
scene - the 3D scene ehere the rectangle is stored
p1 - first diagonal point of the rectangle
p2 - first diagonal point of the rectangle
v1 - the direction of the first axis of the rectangle
v2 - the direction of the second axis of the rectangle

destructor

~Rectangle3D()
destroys display list

void textureRedraw()
redraw with texture mapping

void buildFlat()
create display list of flat display

void buildWireframe()
create display list of wireframe display

void buildSolid()
create display list of solid display

Vec3 getCenter() const
get the centroid of the rectangle

void getSize(double &length, double &width) const
get the two length sizes

Vec3 getVertex(const unsigned int i) const
get vertex nb i (i<4)

void getTextureScale(double &s, double &t) const
the texture scale coordinates

void setTextureScale(const double s, const double t)
the texture scale coordinates

virtual void translate(const Vec3& tr)
translates the object
Parameters:
tr - translation vector

virtual void rotate(const Rotation3D& rotation)
rotates the object
Parameters:
rotation - rotation matrix

virtual void scale(const double scale)
scales the object
Parameters:
scale - scale facto

virtual void redraw(Camera3D *)
all graphics objects can be drawn

virtual void updateCenter(Vec3& center, unsigned int& n)
Returns the graphic object center and weight. The weight is a measure of the number of primitives to allow barycentric computation of the whole scene center.
Parameters:
center - returned center
n - returned barycentric weight

virtual double updateRadius(const Vec3& center)
Returns the graphic object radius given its center

void flipNormals()
change the normal direction for display

virtual double computeClosestDistance(DataTypes::MouseClick& mc) const
The routine that allows the camera to select an object by computing the distance of an object from its radial line
Returns:
distance to line
Parameters:
mc - 3D line descriptor

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


This class has no child classes.

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