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

OSCAR::Plane Class Reference
[ObstacleAvoidance]

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

#include <Plane.hpp>

Inheritance diagram for OSCAR::Plane:

Inheritance graph
[legend]
List of all members.

Public Methods

 Plane (const Vector3 &bs, const Vector3 &pt1, const Vector3 &pt2, double th=0.0)
 Plane (const Plane &arg)
 Plane ()
virtual Plane * Clone () const
bool SetProperties (const Vector3 &bs, const Vector3 &pt1, const Vector3 &pt2, double th=0.0)
const Vector3GetR () const
const Vector3GetS () const
const Vector3GetN () const
bool Bounded () const
Plane & operator= (const Plane &rhs)

Private Methods

virtual bool updateInternalParameters ()
virtual bool createSolid ()

Private Attributes

Vector3 r
Vector3 n
Vector3 s
bool bounded

Detailed Description

A planar primitive is a quadrilateral primitive that is defined by three points and a radius. The surface is defined by S = {dist = ||(p - (p1 - base)*t1 + (p2 - base)*t2)|| : dist = rad}. In the case of a bounded primitive, the bounds of t1 and t2 are [0,1]; otherwise the primitive is considered unbounded and no restrictions are places on t1 or t2.


Constructor & Destructor Documentation

OSCAR::Plane::Plane const Vector3   bs,
const Vector3   pt1,
const Vector3   pt2,
double    th = 0.0
 

Constructor Constructs a plane from the planes base point, two of its corner points (all points w.r.t. the local frame) and the planes radius. Automatically populates the global using an identity transformation matrix.

Parameters:
bs Base corner point of the planar (quadrilateral) object in the world frame.
pt1 First corner point of the planar (quadrilateral) object in the world frame.
pt2 Second corner point of the planar (quadrilateral) object in the world frame.
th The half thickness (edge radius) of the planar ( quadrilateral) object. Default value is 0.0.

OSCAR::Plane::Plane const Plane &    arg
 

OSCAR::Plane::Plane  
 

Constructor Used to create arrays of Plane objects Note: SetProperties(...) must be called before any other function.


Member Function Documentation

bool OSCAR::Plane::Bounded   const
 

Determine if the planar object is a halfspace or quadrilateral. Planes are now always quadrilaterals, so this function should always return true.

Returns:
false - primitive is a halfspace; true - object is quadrilateral

virtual Plane* OSCAR::Plane::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::Plane::createSolid   [private, virtual]
 

Reimplemented from OSCAR::Primitive.

const Vector3& OSCAR::Plane::GetN   const
 

Returns a unit vector normal to the plane N is a unit normal obtained by crossing (pt1-base) with (pt2-base) and normalizing.

Returns:
The N vector

const Vector3& OSCAR::Plane::GetR   const
 

Returns a unit vector in the plane, parallel to (pt1 - base) R is a unit vector point from base to point1.

Returns:
The R vector value

const Vector3& OSCAR::Plane::GetS   const
 

Returns a unit vector in the plane, perpendicular to (pt1 - base) S is a unit normal that is orthogonal to both N and R, obtained by crossing N and R.

Returns:
The S vector value

Plane& OSCAR::Plane::operator= const Plane &    rhs
 

bool OSCAR::Plane::SetProperties const Vector3   bs,
const Vector3   pt1,
const Vector3   pt2,
double    th = 0.0
 

Update location (w.r.t. the local frame) and thickness of the plane. Update() is automatically called with the last Xform Update() was called with (identity if Update() has not been called).

Returns:
Returns 1.
Parameters:
bs Base corner point of the planar (quadrilateral) object in the local frame.
pt1 First corner point of the planar (quadrilateral) object in the local frame.
pt2 Second corner point of the planar (quadrilateral) object in the local frame.
th The half thickness (edge radius) of the planar ( quadrilateral) object. Default value is 0.0. Use to update size, shape, etc. of planar object

virtual bool OSCAR::Plane::updateInternalParameters   [private, virtual]
 

Reimplemented from OSCAR::SkeletalPrimitive.


Member Data Documentation

bool OSCAR::Plane::bounded [private]
 

Vector3 OSCAR::Plane::n [private]
 

Vector3 OSCAR::Plane::r [private]
 

Vector3 OSCAR::Plane::s [private]
 


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