Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

CircularObstacle Class Reference

Circle/Sphere defined obstacle designated by a center point and a radius. More...

#include <PlannerObstacles.h>

Inheritance diagram for CircularObstacle:

Detailed Description

Circle/Sphere defined obstacle designated by a center point and a radius.

Definition at line 306 of file PlannerObstacles.h.

List of all members.

Public Member Functions

 CircularObstacle ()
 Default constructor.
 CircularObstacle (fmat::fmatReal x, fmat::fmatReal y, fmat::fmatReal r)
 point and radius
 CircularObstacle (const fmat::Column< 2 > &c, fmat::fmatReal r)
 point and radius
CircularObstacleoperator= (const CircularObstacle &o)
 Assignment, should not use plist::Dictionary version.
virtual bool collides (const fmat::SubVector< 2, const fmat::fmatReal > &point) const
 Test if the circle includes a specific point.
bool collides (const CircularObstacle &other) const
virtual fmat::Column< 2 > getSupport (const fmat::SubVector< 2, const fmat::fmatReal > &direction) const
virtual fmat::Column< 2 > getCenter () const
 get center point of obstacle
virtual fmat::fmatReal getRadius () const
virtual void setRadius (fmat::fmatReal r)
virtual void updatePosition (const fmat::SubVector< 2, const fmat::fmatReal > &newPos)
virtual void rotate (const fmat::SubVector< 2, const fmat::fmatReal > &origin, const fmat::SubMatrix< 2, 2, const fmat::fmatReal > &rot)
virtual BoundingBox2D getBoundingBox () const
 get boundaries of the current obstacle
virtual fmat::Column< 2 > gradient (const fmat::SubVector< 2, const fmat::fmatReal > &pt) const
virtual std::string toString () const
 return current value as a string
virtual void bloat (float amount)
 Increases the size of the obstacle in all directions by at least amount.
virtual void contract (float amount)
 Decreases the size of the obstacle in all directions by at least amount.
virtual void loadXML (xmlNode *node)
 This specialization looks for the SensorInfo::sensorType, then has the factory construct the correct subtype before loading the node into and returning that.
virtual void saveXML (xmlNode *node) const
 subclasses are expected to provide a working implementation
virtual CircularObstacleclone () const __attribute__((warn_unused_result))
 clone definition for CircularObstacle

Protected Attributes

fmat::Column< 2 > center
 Center of the obstacle.
fmat::fmatReal radius
 Radius of the obstacle.

Static Protected Attributes

static const std::string autoRegisterName = PlannerObstacle2D::getRegistry().registerType<CircularObstacle>("Circle")
 stores the class name used for polymorphic load/save

Constructor & Destructor Documentation

CircularObstacle::CircularObstacle (  ) 

Default constructor.

Definition at line 319 of file PlannerObstacles.h.

CircularObstacle::CircularObstacle ( fmat::fmatReal  x,
fmat::fmatReal  y,
fmat::fmatReal  r 
)

point and radius

Definition at line 323 of file PlannerObstacles.h.

CircularObstacle::CircularObstacle ( const fmat::Column< 2 > &  c,
fmat::fmatReal  r 
)

point and radius

Definition at line 327 of file PlannerObstacles.h.


Member Function Documentation

virtual void CircularObstacle::bloat ( float  amount  )  [virtual]

Increases the size of the obstacle in all directions by at least amount.

Definition at line 370 of file PlannerObstacles.h.

CircularObstacle * CircularObstacle::clone (  )  const [virtual]

clone definition for CircularObstacle

Reimplemented from plist::DictionaryOf< PO, Alloc >.

Definition at line 18 of file PlannerObstacles.cc.

bool CircularObstacle::collides ( const CircularObstacle other  )  const

Definition at line 376 of file PlannerObstacles.cc.

virtual bool CircularObstacle::collides ( const fmat::SubVector< 2, const fmat::fmatReal > &  point  )  const [virtual]

Test if the circle includes a specific point.

Definition at line 341 of file PlannerObstacles.h.

virtual void CircularObstacle::contract ( float  amount  )  [virtual]

Decreases the size of the obstacle in all directions by at least amount.

Definition at line 372 of file PlannerObstacles.h.

virtual BoundingBox2D CircularObstacle::getBoundingBox (  )  const [virtual]

get boundaries of the current obstacle

Implements PlannerObstacle< N >.

Definition at line 361 of file PlannerObstacles.h.

virtual fmat::Column<2> CircularObstacle::getCenter (  )  const [virtual]

get center point of obstacle

Implements PlannerObstacle< N >.

Definition at line 349 of file PlannerObstacles.h.

Referenced by ConvexPolyObstacle::collides(), RectangularObstacle::collides(), and rotate().

virtual fmat::fmatReal CircularObstacle::getRadius (  )  const [virtual]
fmat::Column< 2 > CircularObstacle::getSupport ( const fmat::SubVector< 2, const fmat::fmatReal > &  direction  )  const [virtual]

Definition at line 382 of file PlannerObstacles.cc.

fmat::Column< 2 > CircularObstacle::gradient ( const fmat::SubVector< 2, const fmat::fmatReal > &  pt  )  const [virtual]

Definition at line 362 of file PlannerObstacles.cc.

void CircularObstacle::loadXML ( xmlNode node  )  [virtual]

This specialization looks for the SensorInfo::sensorType, then has the factory construct the correct subtype before loading the node into and returning that.

From the name of node, will instantiate a new ObjectBase subclass to load it.

supports use of plist::ArrayOf<PlannerObstacle> for polymorphic load/save

The mapping from node names to actual instantiated types is:

If successful, returns a pointer to a newly allocated region, which the caller is responsible for freeing. If an error occurs, NULL is returned.

attempts to load a new T instance from the specified xmlNode

Reimplemented from plist::DictionaryBase.

Definition at line 386 of file PlannerObstacles.cc.

CircularObstacle& CircularObstacle::operator= ( const CircularObstacle o  ) 

Assignment, should not use plist::Dictionary version.

Definition at line 331 of file PlannerObstacles.h.

virtual void CircularObstacle::rotate ( const fmat::SubVector< 2, const fmat::fmatReal > &  origin,
const fmat::SubMatrix< 2, 2, const fmat::fmatReal > &  rot 
) [virtual]

Definition at line 356 of file PlannerObstacles.h.

void CircularObstacle::saveXML ( xmlNode node  )  const [virtual]

subclasses are expected to provide a working implementation

Reimplemented from plist::DictionaryBase.

Definition at line 398 of file PlannerObstacles.cc.

virtual void CircularObstacle::setRadius ( fmat::fmatReal  r  )  [virtual]

Definition at line 351 of file PlannerObstacles.h.

std::string CircularObstacle::toString (  )  const [virtual]

return current value as a string

Reimplemented from PlannerObstacle< N >.

Definition at line 370 of file PlannerObstacles.cc.

virtual void CircularObstacle::updatePosition ( const fmat::SubVector< 2, const fmat::fmatReal > &  newPos  )  [virtual]

Definition at line 353 of file PlannerObstacles.h.

Referenced by rotate().


Member Data Documentation

const std::string CircularObstacle::autoRegisterName = PlannerObstacle2D::getRegistry().registerType<CircularObstacle>("Circle") [static, protected]

stores the class name used for polymorphic load/save

Definition at line 309 of file PlannerObstacles.h.


The documentation for this class was generated from the following files:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:05 2016 by Doxygen 1.6.3