C++ Java Unity
Java Reference
CylinderTarget Class Reference

Detailed Description

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.

Note: It is not possible to modify a CylinderTarget while its DataSet is active. See the DataSet class for more information.

Inheritance diagram for CylinderTarget:
ObjectTarget Trackable

Public Member Functions

boolean equals (Object obj)
 
float getSideLength ()
 Get the side length/height of the cylinder or cone that comprises this target, in meters. More...
 
boolean setSideLength (float sideLength)
 Apply a uniform scale to this target to set the side length/height of its cylinder/cone. More...
 
float getTopDiameter ()
 Get the top diameter of the cylinder target, in meters. More...
 
boolean setTopDiameter (float topDiameter)
 Apply a uniform scale to this target to set the top diameter of its cylinder/cone. More...
 
float getBottomDiameter ()
 Get the bottom diameter of the cylinder or cone that comprisese this target, in meters. More...
 
boolean setBottomDiameter (float bottomDiameter)
 Apply a uniform scale to this target to set the bottom diameter of its cylinder/cone. More...
 
- Public Member Functions inherited from ObjectTarget
boolean equals (Object obj)
 
String getUniqueTargetId ()
 Get the persistent system-wide unique id for this target. More...
 
Vec3F getSize ()
 Get the size of this target. More...
 
boolean setSize (Vec3F size)
 Apply a uniform scale to this target that makes it the given size. More...
 
boolean setMotionHint (int hint)
 Set the motion hint to indicate how the target moves in space. More...
 
int getMotionHint ()
 Get the motion hint of this target. More...
 
- Public Member Functions inherited from Trackable
Object getUserData ()
 
boolean setUserData (Object userData)
 
boolean equals (Object obj)
 
Type getType ()
 Get the Type for this instance (typically a subclass of Trackable). More...
 
boolean isOfType (Type type)
 Check whether this instance is of the given Type or any of its subclasses. More...
 
int getId ()
 Get a unique id for this Trackable. More...
 
String getName ()
 Get the name of this Trackable's name. More...
 

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

Member Function Documentation

boolean equals ( Object  obj)
static Type getClassType ( )
static

Get the Type for class "CylinderTarget".

float getSideLength ( )

Get the side length/height of the cylinder or cone that comprises this target, in meters.

boolean setSideLength ( float  sideLength)

Apply a uniform scale to this target to set the side length/height of its cylinder/cone.

Note: The top and bottom diameter will also be scaled to maintain uniform scaling.

Parameters
sideLengthThe desired side length (if this target is a cylinder) or height (if this target is a cone), in meters.
Returns
true on success, otherwise false.
float getTopDiameter ( )

Get the top diameter of the cylinder target, in meters.

boolean setTopDiameter ( float  topDiameter)

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.

Note: The side length and bottom diameter will also be scaled to maintain uniform scaling.

Parameters
topDiameterThe desired top diameter of the cylinder or cone, in meters.
Returns
true on success, otherwise false.
float getBottomDiameter ( )

Get the bottom diameter of the cylinder or cone that comprisese this target, in meters.

boolean setBottomDiameter ( float  bottomDiameter)

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.

Note: The side length and top diameter will be scaled to maintain uniform scaling.

Parameters
bottomDiameterThe desired bottom diameter of the cylinder or cone, in meters.
Returns
true on success, otherwise false.