DecorativeLine Class Reference

#include <DecorativeGeometry.h>

Inheritance diagram for DecorativeLine:

DecorativeGeometry List of all members.

Detailed Description

A line between two points.

Note that the actual placement can be changed by the parent class transform & scale; here we are just generating the initial line in the geometry object's local frame.

There is a default constructor for this object but it is not much use unless followed by endpoint specifications. By default we produce a line going from (0,0,0) to (1,1,1) just so it will show up if you forget to set it to something meaningful. Having a default constructor allows us to have arrays of these objects.


Public Member Functions

 DecorativeLine (const Vec3 &p1=Vec3(0), const Vec3 &p2=Vec3(1))
DecorativeLinesetBodyId (int b)
 By default the geometry will be placed on ground.
DecorativeLinesetTransform (const Transform &X_BD)
 This transform shifts the generated polygons with respect to this object's local frame.
DecorativeLinesetResolution (Real r)
 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".
DecorativeLinesetScale (Real s)
 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.
DecorativeLinesetColor (const Vec3 &rgb)
 Request a specific color for this DecorativeGeometry object.
DecorativeLinesetOpacity (Real o)
 Request a level of transparency for this DecorativeGeometry.
DecorativeLinesetLineThickness (Real t)
 Request an adjustment to the default rendering of lines and curves.
DecorativeLinesetRepresentation (const Representation &r)
DecorativeLinesetPoint1 (const Vec3 &p1)
DecorativeLinesetPoint2 (const Vec3 &p2)
DecorativeLinesetEndpoints (const Vec3 &p1, const Vec3 &p2)
const Vec3getPoint1 () const
const Vec3getPoint2 () const
 SimTK_PIMPL_DOWNCAST (DecorativeLine, DecorativeGeometry)


Constructor & Destructor Documentation

DecorativeLine ( const Vec3 p1 = Vec3(0),
const Vec3 p2 = Vec3(1) 
) [explicit]


Member Function Documentation

const Vec3& getPoint1 (  )  const

const Vec3& getPoint2 (  )  const

DecorativeLine& setBodyId ( int  b  )  [inline]

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 from DecorativeGeometry.

DecorativeLine& setColor ( const Vec3 rgb  )  [inline]

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 from DecorativeGeometry.

DecorativeLine& setEndpoints ( const Vec3 p1,
const Vec3 p2 
)

DecorativeLine& setLineThickness ( Real  t  )  [inline]

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 from DecorativeGeometry.

DecorativeLine& setOpacity ( Real  o  )  [inline]

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 from DecorativeGeometry.

DecorativeLine& setPoint1 ( const Vec3 p1  ) 

DecorativeLine& setPoint2 ( const Vec3 p2  ) 

DecorativeLine& setRepresentation ( const Representation r  )  [inline]

DecorativeLine& setResolution ( Real  r  )  [inline]

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 from DecorativeGeometry.

DecorativeLine& setScale ( Real  s  )  [inline]

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 from DecorativeGeometry.

DecorativeLine& setTransform ( const Transform X_BD  )  [inline]

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 from DecorativeGeometry.

SimTK_PIMPL_DOWNCAST ( DecorativeLine  ,
DecorativeGeometry   
)


The documentation for this class was generated from the following file:
Generated on Thu Feb 28 01:34:35 2008 for SimTKcommon by  doxygen 1.4.7