In file graphics3D/MaterialSphere.h:

namespace yav class MaterialSphere : public Sphere, public Surface, public Data3D

Sphere surface

Inheritance:


Public Methods

virtual void setRadius (double r)
set new sphere radius
virtual void setCenter (const Vec3& c)
set new sphere radius
double getRadius (void) const
raise getRadius() ambigous method call
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
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 buildWireframe (void)
wireframe display list creation callback
virtual void buildSolid (void)
wireframe display list creation callback
virtual void setRedrawOrder (unsigned int order)
set object redraw order for transparency sorting

Public

constructors
MaterialSphere (Scene3D *scene = 0)
default sphere centered at 0 with 1
MaterialSphere (const Vec3& c, double r, Scene3D *scene = 0)
builds a new sphere
destructor
virtual ~MaterialSphere ()
empty

Protected Fields

GLUquadricObj* sphere
rendered object

Protected Methods

void initBoundingBox (void)
computes bounding box

Private Methods

void init (void)
common constructors code

Inherited from Sphere:

Public Methods

Vec3 getCenter(void) const

Protected Fields

Vec3 center
double radius

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)
virtual void buildFlat(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)

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

Documentation

Sphere surface
GLUquadricObj* sphere
rendered object

void initBoundingBox(void)
computes bounding box

constructors

MaterialSphere(Scene3D *scene = 0)
default sphere centered at 0 with 1.0 radius
Parameters:
scene - scene to build sphere in

MaterialSphere(const Vec3& c, double r, Scene3D *scene = 0)
builds a new sphere
Parameters:
c - new sphere center
r - new sphere radius
scene - scene to build sphere in

destructor

virtual ~MaterialSphere()
empty

virtual void setRadius(double r)
set new sphere radius
Parameters:
r - new radius (should be > 0)

virtual void setCenter(const Vec3& c)
set new sphere radius
Parameters:
r - new radius (should be > 0)

double getRadius(void) const
raise getRadius() ambigous method call

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

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 buildWireframe(void)
wireframe display list creation callback

virtual void buildSolid(void)
wireframe 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)

void init(void)
common constructors code


Direct child classes:
LightFantom

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