Simbody
Public Member Functions

SimTK::DecorativeLine Class Reference

A line between two points. More...

#include <DecorativeGeometry.h>

Inheritance diagram for SimTK::DecorativeLine:

List of all members.

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)
 Request a particular rendering representation of this DecorativeGeometry object.
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)

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.


Constructor & Destructor Documentation

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

Member Function Documentation

DecorativeLine& SimTK::DecorativeLine::setBodyId ( int  ) [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 SimTK::DecorativeGeometry.

DecorativeLine& SimTK::DecorativeLine::setTransform ( const Transform X_BG) [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 SimTK::DecorativeGeometry.

DecorativeLine& SimTK::DecorativeLine::setResolution ( Real  ) [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. The number of faces in the displayed representation is roughly proportional to this value. 1.0 means to use the default resolution. Values less than 1.0 are lower resolution, and values greater than 1.0 are higher resolution. A value less than or equal to zero here is interpreted as an instruction to "use the default".

Reimplemented from SimTK::DecorativeGeometry.

DecorativeLine& SimTK::DecorativeLine::setScale ( Real  ) [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 SimTK::DecorativeGeometry.

DecorativeLine& SimTK::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 SimTK::DecorativeGeometry.

DecorativeLine& SimTK::DecorativeLine::setOpacity ( Real  ) [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 SimTK::DecorativeGeometry.

DecorativeLine& SimTK::DecorativeLine::setLineThickness ( Real  ) [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 SimTK::DecorativeGeometry.

DecorativeLine& SimTK::DecorativeLine::setRepresentation ( const Representation ) [inline]

Request a particular rendering representation of this DecorativeGeometry object.

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

Reimplemented from SimTK::DecorativeGeometry.

DecorativeLine& SimTK::DecorativeLine::setPoint1 ( const Vec3 p1)
DecorativeLine& SimTK::DecorativeLine::setPoint2 ( const Vec3 p2)
DecorativeLine& SimTK::DecorativeLine::setEndpoints ( const Vec3 p1,
const Vec3 p2 
)
const Vec3& SimTK::DecorativeLine::getPoint1 ( ) const
const Vec3& SimTK::DecorativeLine::getPoint2 ( ) const
SimTK::DecorativeLine::SimTK_PIMPL_DOWNCAST ( DecorativeLine  ,
DecorativeGeometry   
)

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines