DecorativeGeometry Class Reference

#include <DecorativeGeometry.h>

Inheritance diagram for DecorativeGeometry:

DecorativeBrick DecorativeCircle DecorativeCylinder DecorativeEllipsoid DecorativeFrame DecorativeLine DecorativeMesh DecorativeSphere DecorativeText

List of all members.


Detailed Description

This is an abstract handle class using the PIMPL design pattern to hide the private implementation.

This is effectively an abstract class although the virtual function table is hidden in the private part.

Public Types

enum  Representation { DrawPoints = 1, DrawWireframe = 2, DrawSurface = 3, DrawDefault = -1 }

Public Member Functions

 DecorativeGeometry ()
 ~DecorativeGeometry ()
 DecorativeGeometry (const DecorativeGeometry &)
DecorativeGeometryoperator= (const DecorativeGeometry &)
 DecorativeGeometry (const AnalyticGeometry &)
 Implicit conversion.
DecorativeGeometrysetBodyId (int)
 By default the geometry will be placed on ground.
DecorativeGeometrysetTransform (const Transform &X_BG)
 This transform shifts the generated polygons with respect to this object's local frame.
DecorativeGeometrysetResolution (Real)
 Each concrete DecorativeGeometry object is expected to have a default resolution that gets the point across but is cheap to draw and hence probably somewhat "chunky".
DecorativeGeometrysetScale (Real)
 Each concrete DecorativeGeometry object is expected to have a default size around "1", whatever that means for a particular object, and most objects also allow a user-specified size on construction.
int getBodyId () const
 Return the body to which this geometry is attached.
Real getResolution () const
 Return the current setting of the "resolution" factor.
const TransformgetTransform () const
 Return the current value of the object's transform.
Real getScale () const
 Return the current setting of the "scale" factor.
DecorativeGeometrysetColor (const Vec3 &rgb)
 Request a specific color for this DecorativeGeometry object.
DecorativeGeometrysetOpacity (Real)
 Request a level of transparency for this DecorativeGeometry.
DecorativeGeometrysetLineThickness (Real)
 Request an adjustment to the default rendering of lines and curves.
const Vec3getColor () const
Real getOpacity () const
Real getLineThickness () const
DecorativeGeometrysetFaceCamera (bool face)
 Set whether the geometry acts as a billboard, always rotating to face the camera.
bool getFaceCamera () const
 Get whether the geometry acts as a billboard, always rotating to face the camera.
DecorativeGeometrysetRepresentation (const Representation &)
 Request a particular rendering representation of this DecorativeGeometry object.
Representation getRepresentation () const
 returns drawing mode: -1 means "use default"; see above for others
void implementGeometry (DecorativeGeometryImplementation &) const
bool isOwnerHandle () const
bool isEmptyHandle () const
 DecorativeGeometry (class DecorativeGeometryRep *r)
bool hasRep () const
const DecorativeGeometryRep & getRep () const
DecorativeGeometryRep & updRep ()

Protected Attributes

DecorativeGeometryRep * rep


Member Enumeration Documentation

Enumerator:
DrawPoints 
DrawWireframe 
DrawSurface 
DrawDefault 


Constructor & Destructor Documentation

DecorativeGeometry (  )  [inline]

Implicit conversion.

DecorativeGeometry ( class DecorativeGeometryRep *  r  )  [inline, explicit]


Member Function Documentation

DecorativeGeometry& operator= ( const DecorativeGeometry  ) 

DecorativeGeometry& setBodyId ( int   ) 

By default the geometry will be placed on ground.

If you want it attached to another reference frame (body), say so here. The geometry should be rendered with respect to the indicated body frame; however, the interpretation of this integer Id is left to the implementation.

Reimplemented in DecorativeLine.

Referenced by DecorativeLine::setBodyId().

DecorativeGeometry& setTransform ( const Transform X_BG  ) 

This transform shifts the generated polygons with respect to this object's local frame.

Subsequent calls with other transforms simply replace the earlier one; they do not accumulate. The default transform is identity and you can call setTransform(Transform()) to put the transform back into its original state. This value affects the generated polygonal data.

Reimplemented in DecorativeLine.

Referenced by DecorativeLine::setTransform().

DecorativeGeometry& setResolution ( Real   ) 

Each concrete DecorativeGeometry object is expected to have a default resolution that gets the point across but is cheap to draw and hence probably somewhat "chunky".

The resolution parameter here scales that default up or down. A value less than or equal to zero here is interpreted as an instruction to "use the default". This value affects the generated polygonal data.

Reimplemented in DecorativeLine.

Referenced by DecorativeLine::setResolution().

DecorativeGeometry& setScale ( Real   ) 

Each concrete DecorativeGeometry object is expected to have a default size around "1", whatever that means for a particular object, and most objects also allow a user-specified size on construction.

The scale factor here applies to the object as the user built it, or to the default if the user didn't specify a size. The default scaling is 1, and any value less than or equal to zero here is interpreted as a request to "use the default". This value affects the generated polygonal data.

Reimplemented in DecorativeLine.

Referenced by DecorativeLine::setScale().

int getBodyId (  )  const

Return the body to which this geometry is attached.

The geometry's placement is interpreted relative to the body's frame.

Real getResolution (  )  const

Return the current setting of the "resolution" factor.

A return value of -1 means "use the default".

const Transform& getTransform (  )  const

Return the current value of the object's transform.

If none has been set this will be the identity transform. Note that this transform specifies how the polygons are placed with respect to the object's local frame.

Real getScale (  )  const

Return the current setting of the "scale" factor.

A return value of -1 means "use the default" (which is typically 1).

DecorativeGeometry& setColor ( const Vec3 rgb  ) 

Request a specific color for this DecorativeGeometry object.

This does NOT affect the generated geometry here. The default is that the color is determined elsewhere.

Reimplemented in DecorativeLine.

Referenced by DecorativeLine::setColor().

DecorativeGeometry& setOpacity ( Real   ) 

Request a level of transparency for this DecorativeGeometry.

This does NOT affect the generated geometry here. The default is that opacity is determined elsewhere.

Reimplemented in DecorativeLine.

Referenced by DecorativeLine::setOpacity().

DecorativeGeometry& setLineThickness ( Real   ) 

Request an adjustment to the default rendering of lines and curves.

This does NOT affect geometry generated here; it is a request passed on to the renderer which will probably pass it on to the hardware. A value less than or equal to zero here is interpreted as "use the default".

Reimplemented in DecorativeLine.

Referenced by DecorativeLine::setLineThickness().

const Vec3& getColor (  )  const

Real getOpacity (  )  const

Real getLineThickness (  )  const

DecorativeGeometry& setFaceCamera ( bool  face  ) 

Set whether the geometry acts as a billboard, always rotating to face the camera.

bool getFaceCamera (  )  const

Get whether the geometry acts as a billboard, always rotating to face the camera.

DecorativeGeometry& setRepresentation ( const Representation  ) 

Request a particular rendering representation of this DecorativeGeometry object.

The default is that the rendering representation choice is made elsewhere.

Reimplemented in DecorativeLine.

Referenced by DecorativeLine::setRepresentation().

Representation getRepresentation (  )  const

returns drawing mode: -1 means "use default"; see above for others

void implementGeometry ( DecorativeGeometryImplementation  )  const

bool isOwnerHandle (  )  const

bool isEmptyHandle (  )  const

bool hasRep (  )  const [inline]

const DecorativeGeometryRep& getRep (  )  const [inline]

DecorativeGeometryRep& updRep (  )  [inline]


Member Data Documentation

DecorativeGeometryRep* rep [protected]


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

Generated on Fri Sep 26 07:44:29 2008 for SimTKcore by  doxygen 1.5.6