Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OSCAR::Cone Class Reference
[ObstacleAvoidance]

A cone primitive used for modeling of objects in workcells The cone (in its local frame) will be symmetric about the y axis and its total height will be centered at y=0 with the tip of the cone at y=height/2. The cone can then be moved in its local from by specifying a local transform. More...

#include <Cone.hpp>

Inheritance diagram for OSCAR::Cone:

Inheritance graph
[legend]
List of all members.

Public Methods

 Cone (const double h, const double r, const Xform &inFrameTransform)
 Cone (const Cone &arg)
 Cone ()
virtual Cone * Clone () const
const vector< Vector3 > & GetPoints (ReferenceFrame globalOrLocal=Global) const
bool SetProperties (const double h, const double r, const Xform &inFrameTransform)
bool SetHeight (const double h)
bool SetRadius (const double r)
double GetHeight () const
double GetRadius () const
bool SetLocalTransform (const Xform &inFrameTransform)
const XformGetLocalTransform () const
virtual bool Update (const Xform &transform)
Cone & operator= (const Cone &rhs)

Protected Methods

bool populatePoints ()
bool TransformInternalToLocal ()
virtual bool createSolid ()

Protected Attributes

double height
double radius
Xform localTransform
std::vector< Vector3internalPoint
std::vector< Vector3point [2]

Detailed Description

Author:
Andrew Spencer


Constructor & Destructor Documentation

OSCAR::Cone::Cone const double    h,
const double    r,
const Xform   inFrameTransform
 

Constructor Constructs a Cone from a height, a base radius, and an inFrameTransform. This transform specifies the transformation of the cone away from it's default position (0,0,0) to it's correct position w.r.t. the local frame. All global information is automatically populated using an identity transformation matrix.

Parameters:
h height of the cone
r radius of the cone
inFrameTransform An Xform representing the transformation of the cone in its local frame.

OSCAR::Cone::Cone const Cone &    arg [inline]
 

Copy Constructor.

Parameters:
arg The cone obstacle to copy

OSCAR::Cone::Cone  
 

Constructor Use to make arrays of Cone objects. Note: SetProperties(...) must be called before any other function, and that the local transform defaults to the identity matrix.


Member Function Documentation

virtual Cone* OSCAR::Cone::Clone   const [virtual]
 

Clone this object.

Returns:
A pointer to the cloned object which MUST be deleted or there will be memory leak.

Implements OSCAR::Primitive.

virtual bool OSCAR::Cone::createSolid   [protected, virtual]
 

Reimplemented from OSCAR::Primitive.

double OSCAR::Cone::GetHeight   const [inline]
 

Get the height of the cone.

Returns:
height of the cone

const Xform& OSCAR::Cone::GetLocalTransform   const [inline]
 

Get the local frame transformation for the cone. Update() is automatically called using the last Xform Update() was called with (idenity if Update() has not been called).

Returns:
A reference to a const Xform which is the local frame transformation

const vector<Vector3>& OSCAR::Cone::GetPoints ReferenceFrame    globalOrLocal = Global const [inline]
 

GetPoints Gives the tip point and the center of the base point of the cone w.r.t. either the local frame of the global frame.

Parameters:
Reference globalOrLocal Indicates which set of points you want to return
Returns:
gives the base point of the cone (the center of the circular base) and the point of the tip, in either the cones local or global frame

double OSCAR::Cone::GetRadius   const [inline]
 

Get the radius of the cone.

Returns:
radius of the cone

Cone& OSCAR::Cone::operator= const Cone &    rhs
 

bool OSCAR::Cone::populatePoints   [protected]
 

bool OSCAR::Cone::SetHeight const double    h
 

Update the height of the cone.

Parameters:
h The height of the cone
Returns:
true

bool OSCAR::Cone::SetLocalTransform const Xform   inFrameTransform
 

Update the local frame transform of the cone.

Parameters:
inFrameTransform The new local frame transform (Xform) for the box
Returns:
true

bool OSCAR::Cone::SetProperties const double    h,
const double    r,
const Xform   inFrameTransform
 

Update the height and radius of the cone, and it's position in the local frame. Update() is automatically called using the last Xform it was called with (identity if Update() has not been called).

Returns:
true
Parameters:
h The height of the cone
r The radius of the cone
inFrameTransform The transformation for the box in its local frame.
Returns:
true

bool OSCAR::Cone::SetRadius const double    r
 

Update the radius of the cone.

Parameters:
r The radius of the cone
Returns:
true

bool OSCAR::Cone::TransformInternalToLocal   [protected]
 

virtual bool OSCAR::Cone::Update const Xform   transform [virtual]
 

Transform the points from the local frame to the global frame.

Parameters:
transform The Xform to use for the transformation
Returns:
true upon completion

Reimplemented from OSCAR::Primitive.


Member Data Documentation

double OSCAR::Cone::height [protected]
 

std::vector<Vector3> OSCAR::Cone::internalPoint [protected]
 

Xform OSCAR::Cone::localTransform [protected]
 

std::vector<Vector3> OSCAR::Cone::point[2] [protected]
 

double OSCAR::Cone::radius [protected]
 


The documentation for this class was generated from the following file:
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations