A type of ObjectTarget that represents a cylindrical or conical object.
CylinderTarget extends ObjectTarget by adding convenience methods that call ObjectTarget::setSize() on your behalf with a size calculated by setting one of the three defining geometric parameters of a cone or cylinder (i.e. the side length, top diameter, or bottom diameter).
Scaling is always applied uniformly, so setting one parameter implicitly sets the other parameters to match.
Public Member Functions | |
virtual float | getSideLength () const =0 |
Get the side length/height of the cylinder or cone that comprises this target, in meters. More... | |
virtual bool | setSideLength (float sideLength)=0 |
Apply a uniform scale to this target to set the side length/height of its cylinder/cone. More... | |
virtual float | getTopDiameter () const =0 |
Get the top diameter of the cylinder target, in meters. More... | |
virtual bool | setTopDiameter (float topDiameter)=0 |
Apply a uniform scale to this target to set the top diameter of its cylinder/cone. More... | |
virtual float | getBottomDiameter () const =0 |
Get the bottom diameter of the cylinder or cone that comprisese this target, in meters. More... | |
virtual bool | setBottomDiameter (float bottomDiameter)=0 |
Apply a uniform scale to this target to set the bottom diameter of its cylinder/cone. More... | |
Public Member Functions inherited from ObjectTarget | |
virtual const char * | getUniqueTargetId () const =0 |
Get the persistent system-wide unique id for this target. More... | |
virtual Vec3F | getSize () const =0 |
Get the size of this target. More... | |
virtual bool | setSize (const Vec3F &size)=0 |
Apply a uniform scale to this target that makes it the given size. More... | |
virtual bool | setMotionHint (MOTION_HINT hint)=0 |
Set the motion hint to indicate how the target moves in space. More... | |
virtual MOTION_HINT | getMotionHint () const =0 |
Get the motion hint of this target. More... | |
Public Member Functions inherited from Trackable | |
virtual Type | getType () const =0 |
Get the Type for this instance (typically a subclass of Trackable). More... | |
virtual bool | isOfType (Type type) const =0 |
Check whether this instance is of the given Type or any of its subclasses. More... | |
virtual int | getId () const =0 |
Get a unique id for this Trackable. More... | |
virtual const char * | getName () const =0 |
Get the name of this Trackable's name. More... | |
virtual bool | setUserData (void *userData)=0 |
Set user data for this Trackable. More... | |
virtual void * | getUserData () const =0 |
Get the user data that was previously set using setUserData(). More... | |
virtual | ~Trackable () |
Static Public Member Functions | |
static Type | getClassType () |
Get the Type for class "CylinderTarget". More... | |
Static Public Member Functions inherited from ObjectTarget | |
static Type | getClassType () |
Get the Type for class "ObjectTarget". More... | |
Static Public Member Functions inherited from Trackable | |
static Type | getClassType () |
Get the Type of class 'Trackable'. More... | |
Additional Inherited Members | |
Public Types inherited from ObjectTarget | |
enum | MOTION_HINT { STATIC, ADAPTIVE } |
Target property that indicates how the target moves in space. More... | |
|
pure virtual |
Get the side length/height of the cylinder or cone that comprises this target, in meters.
|
pure virtual |
Apply a uniform scale to this target to set the side length/height of its cylinder/cone.
sideLength | The desired side length (if this target is a cylinder) or height (if this target is a cone), in meters. |
|
pure virtual |
Get the top diameter of the cylinder target, in meters.
|
pure virtual |
Apply a uniform scale to this target to set the top diameter of its cylinder/cone.
If this target represents a cylinder, setTopDiameter() and setBottomDiameter() will produce identical behaviour.
If this target represents a cone with top diameter = 0, it is not possible to apply a scale by changing the top diameter, so you should not call this function.
topDiameter | The desired top diameter of the cylinder or cone, in meters. |
|
pure virtual |
Get the bottom diameter of the cylinder or cone that comprisese this target, in meters.
|
pure virtual |
Apply a uniform scale to this target to set the bottom diameter of its cylinder/cone.
If this target represents a cylinder, setTopDiameter() and setBottomDiameter() will produce identical behaviour.
If this target represents a cone with bottom diameter = 0, it is not possible to apply a scale by changing the bottom diameter, so you should not call this function.
bottomDiameter | The desired bottom diameter of the cylinder or cone, in meters. |