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

OSCAR::Sphere Class Reference
[ObstacleAvoidance]

Define a spherical primitive for use in robot obstacle avoidance. More...

#include <Sphere.hpp>

Inheritance diagram for OSCAR::Sphere:

Inheritance graph
[legend]
List of all members.

Public Methods

 Sphere (const Vector3 &pt, double rd)
 Sphere (const Sphere &arg)
 Sphere ()
virtual Sphere * Clone () const
bool SetProperties (const Vector3 &pt, double rd)
Sphere & operator= (const Sphere &rhs)

Protected Methods

virtual bool createSolid ()

Detailed Description

A spherical primitive is a quadrilateral primitive that is defined by three points and a radius. The surface is defined by S = {dist = ||(p - p1)|| : dist = rad}.


Constructor & Destructor Documentation

OSCAR::Sphere::Sphere const Vector3   pt,
double    rd
 

Constructor Constructs a sphere object from a point (the center of the sphere w.r.t. the local frame) and a radius. Global points are automatically populated using an identity transformation matrix.

Parameters:
pt Location of sphere in the local frame
rd The radius of the sphere

OSCAR::Sphere::Sphere const Sphere &    arg
 

OSCAR::Sphere::Sphere  
 

Constructor Use for creating arrays of spheres. Note: The SetProperties(...) function must be called before any other function.


Member Function Documentation

virtual Sphere* OSCAR::Sphere::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::SkeletalPrimitive.

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

Reimplemented from OSCAR::Primitive.

Sphere& OSCAR::Sphere::operator= const Sphere &    rhs
 

bool OSCAR::Sphere::SetProperties const Vector3   pt,
double    rd
 

Update location and radius of the sphere. Update() is automatically called using the last Xform Update() was called with (defaults to identity if Update()has not been called).

Returns:
true
Parameters:
pt A point (w.r.t. the local frame) that locates the sphere
rd The radius of the sphere Use to change size or location of the sphere


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