iso::space::SpaceShape Class Reference

#include <iso_space_shape.h>

Inherits iso::space::SpaceObject.

Inherited by iso::space::LineShape, iso::space::MeshShape, iso::space::SplineGroupShape, and iso::space::SplineShape.

Inheritance diagram for iso::space::SpaceShape:

Inheritance graph
[legend]
Collaboration diagram for iso::space::SpaceShape:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SpaceShape (geom::Geometry *pGeometry)
 create shape
 SpaceShape (geom::Geometry *pGeometry, unsigned int pDim)
 create shape
virtual ~SpaceShape ()
 destructor
geom::Geometry & geometry ()
 return geometry
void setGeometry (geom::Geometry *pGeometry)
 set geometry
const math::MatrixH< real > & translation () const
 return translation matrix
const math::MatrixH< real > & orientation () const
 return rotation matrix
const math::MatrixH< real > & scale () const
 return scale matrix
const math::MatrixH< real > & matrix () const
 return transformation matrix
const math::MatrixH< real > & o2wMatrix () const
 return object to world transformation matrix
const math::MatrixH< real > & w2oMatrix () const
 return world to object transformation matrix
math::Rectangle< realAABB () const
 return axis aligned bounding box (in world coordinates)
math::Rectangle< realocAABB () const
 return axis aligned bounding box (in object coordinates)
virtual void setPosition (const math::Vector< real > &pPosition)
 set shape object position
void setOrientation (real pAngle, const math::Vector< real > &pAxis)
 set orientation
void setOrientation (const math::Quaternion< real > &pOrientation)
 set orientation
void setScale (real pScale)
 set scale
void setScale (const math::Vector< real > &pScale)
 set scale
virtual void changePosition (const math::Vector< real > &pPosition)
 change position
void changeOrientation (real pAngle, const math::Vector< real > &pAxis)
 change orientation
void changeScale (real pScale)
 change scale
void changeScale (const math::Vector< real > &pScale)
 change scale
virtual void updateAABB ()
 update axis aligned bounding box
void closestPoint (const math::Vector< real > &pRefPoint, math::Vector< real > &pResPoint)
 return closest point
virtual base::String info (int pPropagationLevel=0) const
 obtain textual space shape information

Protected Member Functions

 SpaceShape ()
 default constructor
void updateMatrix ()
 update homogenous matrix

Protected Attributes

geom::Geometry * mGeometry
math::Rectangle< realmAABB
 shape geometry
math::MatrixH< realmRotation
 axis aligned bounding box
math::MatrixH< realmScale
 matrix representing only rotation
math::MatrixH< realmTranslation
 matrix representing only scale
math::MatrixH< realmInvTranslation
 matrix representing only translation
math::MatrixH< realmMatrix
 inverse of the previous translation matrix
math::MatrixH< realmInvMatrix
 homogenous transformation matrix: object coordinates to world coordinates
math::MatrixH< realmInvScaleMatrix
 homogenous transformation matrix: world coordinates to object coordinates

Friends

std::ostream & operator<< (std::ostream &pOstream, const SpaceShape &pShape)
 retrieve textual space shape info

Constructor & Destructor Documentation

SpaceShape::SpaceShape ( geom::Geometry *  pGeometry  ) 

create shape

Parameters:
pGeometry shape geometry

SpaceShape::SpaceShape ( geom::Geometry *  pGeometry,
unsigned int  pDim 
)

create shape

Parameters:
pGeometry shape geometry
pDim shape dimension

SpaceShape::~SpaceShape (  )  [virtual]

destructor

SpaceShape::SpaceShape (  )  [protected]

default constructor


Member Function Documentation

geom::Geometry & SpaceShape::geometry (  ) 

return geometry

Returns:
geometry

void SpaceShape::setGeometry ( geom::Geometry *  pGeometry  ) 

set geometry

Parameters:
pGeometry geometry
Remarks:
fails if new geometry has different dimension than previous geometry
replaces current geometry with new geometry

const math::MatrixH< space::real > & SpaceShape::translation (  )  const

return translation matrix

Returns:
translation matrix

const math::MatrixH< space::real > & SpaceShape::orientation (  )  const

return rotation matrix

Returns:
return rotation matrix

const math::MatrixH< space::real > & SpaceShape::scale (  )  const

return scale matrix

Returns:
return scale matrix

const math::MatrixH< space::real > & SpaceShape::matrix (  )  const

return transformation matrix

Returns:
transformation matrix

const math::MatrixH< space::real > & SpaceShape::o2wMatrix (  )  const

return object to world transformation matrix

Returns:
object to world transformation matrix

const math::MatrixH< space::real > & SpaceShape::w2oMatrix (  )  const

return world to object transformation matrix

Returns:
world to object transformation matrix

math::Rectangle< space::real > SpaceShape::AABB (  )  const

return axis aligned bounding box (in world coordinates)

math::Rectangle< space::real > SpaceShape::ocAABB (  )  const

return axis aligned bounding box (in object coordinates)

virtual void iso::space::SpaceShape::setPosition ( const math::Vector< real > &  pPosition  )  [virtual]

set shape object position

Parameters:
pPosition shape object position
Remarks:
fails if new position has wrong dimension

Reimplemented from iso::space::SpaceObject.

void SpaceShape::setOrientation ( real  pAngle,
const math::Vector< real > &  pAxis 
)

set orientation

Parameters:
pAngle angle of rotation (radians)
pAxis axis of rotation
Remarks:
fails if orientation vector has wrong dimension

void SpaceShape::setOrientation ( const math::Quaternion< real > &  pOrientation  ) 

set orientation

Parameters:
pOrientation orientation as quaternion

void SpaceShape::setScale ( real  pScale  ) 

set scale

Parameters:
pScale uniform scale value

void SpaceShape::setScale ( const math::Vector< real > &  pScale  ) 

set scale

Parameters:
pScale scale vector
Remarks:
fails if scale vector has wrong dimension

void SpaceShape::changePosition ( const math::Vector< real > &  pPosition  )  [virtual]

change position

Parameters:
pPosition shape object position
Remarks:
fails if new position has wrong dimension

Reimplemented from iso::space::SpaceObject.

void SpaceShape::changeOrientation ( real  pAngle,
const math::Vector< real > &  pAxis 
)

change orientation

Parameters:
pAngle angle of rotation (radians)
pAxis axis of rotation
Remarks:
fails if orientation vector has wrong dimension

void SpaceShape::changeScale ( real  pScale  ) 

change scale

Parameters:
pScale uniform scale value

void SpaceShape::changeScale ( const math::Vector< real > &  pScale  ) 

change scale

Parameters:
pScale scale vector
Remarks:
fails if scale vector has wrong dimension

void SpaceShape::updateAABB (  )  [virtual]

update axis aligned bounding box

Reimplemented in iso::space::LineShape, iso::space::MeshShape, iso::space::SplineGroupShape, and iso::space::SplineShape.

void SpaceShape::closestPoint ( const math::Vector< real > &  pRefPoint,
math::Vector< real > &  pResPoint 
)

return closest point

Parameters:
pRefPoint reference point (in world coordinates)
pResPoint result point (in world coordinates)
Remarks:
fails if dimension of reference and result points don't match dimension of shape

base::String SpaceShape::info ( int  pPropagationLevel = 0  )  const [virtual]

obtain textual space shape information

Parameters:
pPropagationLevel how far the propagation method proceeds through composite classes (-1: unlimited, 0: no proceeding, >0: limited proceeding)

Reimplemented from iso::space::SpaceObject.

void SpaceShape::updateMatrix (  )  [protected]

update homogenous matrix


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  pOstream,
const SpaceShape pShape 
) [friend]

retrieve textual space shape info

Parameters:
pOstream output text stream
pShape space shape


Member Data Documentation

geom::Geometry* iso::space::SpaceShape::mGeometry [protected]

math::Rectangle<real> iso::space::SpaceShape::mAABB [protected]

shape geometry

math::MatrixH<real> iso::space::SpaceShape::mRotation [protected]

axis aligned bounding box

math::MatrixH<real> iso::space::SpaceShape::mScale [protected]

matrix representing only rotation

math::MatrixH<real> iso::space::SpaceShape::mTranslation [protected]

matrix representing only scale

math::MatrixH<real> iso::space::SpaceShape::mInvTranslation [protected]

matrix representing only translation

math::MatrixH<real> iso::space::SpaceShape::mMatrix [protected]

inverse of the previous translation matrix

math::MatrixH<real> iso::space::SpaceShape::mInvMatrix [protected]

homogenous transformation matrix: object coordinates to world coordinates

math::MatrixH<real> iso::space::SpaceShape::mInvScaleMatrix [protected]

homogenous transformation matrix: world coordinates to object coordinates


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 14:08:16 2011 for iso_space by  doxygen 1.5.1