Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

plist::Point Class Reference

A simple class for storing 3D points, will be serialized as an array and provides operator[], but you can also use the x, y, z fields directly if preferred. More...

#include <plistSpecialty.h>

Inheritance diagram for plist::Point:

Detailed Description

A simple class for storing 3D points, will be serialized as an array and provides operator[], but you can also use the x, y, z fields directly if preferred.

Definition at line 171 of file plistSpecialty.h.

List of all members.

Public Types

typedef PLISTREAL storage_t
 storage type for point (could make this a template, seems unnnecessary)

Public Member Functions

 Point ()
 constructor
 Point (storage_t x_, storage_t y_, storage_t z_)
 constructor with data point
 Point (const Point &p)
 copy constructor
template<class T >
 Point (const T &p)
 conversion from other point class (e.g. C array, fmat::Column, std::vector, etc.)
template<typename T >
PointimportFrom (const T &a)
 copies data from a via T::operator[] into (x, y, z), returns *this for convenience
template<typename T >
construct () const
 copies data from (x, y, z) into a T instance via T(x,y,z) constructor call
template<typename T >
exportTo () const
 copies data from (x, y, z) into a T instance via T::operator[]
template<typename T >
T & exportTo (T &a) const
 copies data from (x, y, z) into a via T::operator[], returns reference to a for convenience
void set (storage_t x_, storage_t y_, storage_t z_)
 sets x,y,z values
void saveXML (xmlNode *node) const
 subclasses are expected to provide a working implementation
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.

Public Attributes

plist::Primitive< storage_tx
 x coordinate
plist::Primitive< storage_ty
 y coordinate
plist::Primitive< storage_tz
 z coordinate

Protected Member Functions

void init ()
 add entries for data fields

Member Typedef Documentation

storage type for point (could make this a template, seems unnnecessary)

Reimplemented from plist::ArrayOf< plist::Primitive< PLISTREAL > >.

Definition at line 173 of file plistSpecialty.h.


Constructor & Destructor Documentation

plist::Point::Point (  ) 

constructor

Definition at line 176 of file plistSpecialty.h.

plist::Point::Point ( storage_t  x_,
storage_t  y_,
storage_t  z_ 
)

constructor with data point

Definition at line 178 of file plistSpecialty.h.

plist::Point::Point ( const Point p  ) 

copy constructor

This version is needed in addition to the templated 'copy constructor', gcc doesn't recognize, template instance as copy constructor, winds up creating another default copy constructor which doesn't init properly

Definition at line 183 of file plistSpecialty.h.

template<class T >
plist::Point::Point ( const T &  p  ) 

conversion from other point class (e.g. C array, fmat::Column, std::vector, etc.)

Definition at line 185 of file plistSpecialty.h.


Member Function Documentation

template<typename T >
T plist::Point::construct (  )  const

copies data from (x, y, z) into a T instance via T(x,y,z) constructor call

Definition at line 190 of file plistSpecialty.h.

template<typename T >
T& plist::Point::exportTo ( T &  a  )  const

copies data from (x, y, z) into a via T::operator[], returns reference to a for convenience

Definition at line 194 of file plistSpecialty.h.

template<typename T >
T plist::Point::exportTo (  )  const

copies data from (x, y, z) into a T instance via T::operator[]

Definition at line 192 of file plistSpecialty.h.

Referenced by ShapeSpaceCollisionCheckerBase< 3 >::createBodyObstacle(), LinkComponent::getOwnBB2D(), and LinkComponent::getOwnBB3D().

template<typename T >
Point& plist::Point::importFrom ( const T &  a  ) 

copies data from a via T::operator[] into (x, y, z), returns *this for convenience

Definition at line 188 of file plistSpecialty.h.

void plist::Point::init (  )  [protected]

add entries for data fields

Definition at line 226 of file plistSpecialty.h.

Referenced by Point().

void plist::Point::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::ArrayBase.

Definition at line 209 of file plistSpecialty.h.

void plist::Point::saveXML ( xmlNode node  )  const [virtual]

subclasses are expected to provide a working implementation

Reimplemented from plist::ArrayBase.

Definition at line 200 of file plistSpecialty.h.

void plist::Point::set ( storage_t  x_,
storage_t  y_,
storage_t  z_ 
)

sets x,y,z values

Definition at line 197 of file plistSpecialty.h.


Member Data Documentation


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

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