sch::S_Object Class Referenceabstract

#include <sch/S_Object/S_Object.h>

Inheritance diagram for sch::S_Object:
Collaboration diagram for sch::S_Object:

Public Types

enum  S_ObjectType {
  TS_Object, TPolyhedron, TSTP_BV, TSphere,
  TBox, TSuperellipsoid, TSTP_BV_WithPolyhedron, TPoint,
  TCapsule, TCone, TCylinder
}
 type of a solid object. Don't use it to cast ! More...
 

Public Member Functions

virtual SCH_API Point3 l_Support (const Vector3 &v, int &lastFeature) const =0
 gives the support point for a given vector in local cordinates and a given last feature. MUST BE OVERLOADED. More...
 
virtual SCH_API S_Objectclone () const =0
 Returns a copy of this S_Object. More...
 
SCH_API S_Object (void)
 
virtual SCH_API ~S_Object (void)
 
virtual SCH_API Point3 support (const Vector3 &v) const =0
 put it in objects coordinates, then calls l_support. DO NOT OVERLOAD IT UNLESS YOU KNOW WHAT YOU ARE DOING (if you want to define the support function, overload l_support) More...
 
virtual SCH_API Point3 support (const Vector3 &v, int &LastFeature) const =0
 version of support with last feature optimization More...
 
virtual SCH_API void constructFromFile (const std::string &filename)
 
SCH_API void setOrientation (const Matrix3x3 &Rotation)
 
SCH_API void setOrientation (const Scalar &r00, const Scalar &r01, const Scalar &r02, const Scalar &r10, const Scalar &r11, const Scalar &r12, const Scalar &r20, const Scalar &r21, const Scalar &r22)
 
SCH_API void setOrientation (const Quaternion quaternion)
 
SCH_API void setOrientation (const Scalar &q0, const Scalar &q1, const Scalar &q2, const Scalar &q3)
 
SCH_API void setOrientation (const Scalar &yaw, const Scalar &pitch, const Scalar &roll)
 
SCH_API void setOrientation (const Scalar *const p)
 
SCH_API void setOrientation (const Scalar &angle, const Vector3 &axe)
 
SCH_API void setPosition (const Vector3 &v)
 Sets the position. More...
 
SCH_API void setPosition (const Scalar &x, const Scalar &y, const Scalar &z)
 
SCH_API void setPosition (const Scalar *const v)
 
SCH_API void setTransformation (const Matrix4x4 &transformation)
 Sets the transformation matrix. More...
 
SCH_API void addRotation (const Matrix3x3 &Rotation)
 composes the current orientation with a Rotation More...
 
SCH_API void addRotation (const Scalar &r00, const Scalar &r01, const Scalar &r02, const Scalar &r10, const Scalar &r11, const Scalar &r12, const Scalar &r20, const Scalar &r21, const Scalar &r22)
 
SCH_API void addRotation (const Quaternion quaternion)
 
SCH_API void addRotation (const Scalar &q0, const Scalar &q1, const Scalar &q2, const Scalar &q3)
 
SCH_API void addRotation (const Scalar &angle, const Vector3 &axe)
 
SCH_API void addRotation (const Scalar &yaw, const Scalar &pitch, const Scalar &roll)
 
SCH_API void addRotation (const Scalar *const p)
 
SCH_API void addScale (const Scalar &x, const Scalar &y, const Scalar &z)
 composes the current transfornation with a scale More...
 
SCH_API void addTransformation (const Matrix4x4 &transformation)
 composes the current transfornation with transformation matrix one More...
 
SCH_API void resetTransformation ()
 loads Identity More...
 
const SCH_API Vector3getPosition () const
 returns the position More...
 
const SCH_API Matrix3x3getOrientation () const
 returns the orientation as a rotation matrix More...
 
SCH_API void getTransformationMatrix (Scalar *S) const
 puts the transfomation matrix in a sclar array More...
 
int getSlices () const
 
int getStacks () const
 
virtual SCH_API S_ObjectType getType () const
 must be overloaded to return the type More...
 
const S_ObjectTimeStampcheckStamp () const
 returns the current time stamp More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 
Adds a translation
SCH_API void addTranslation (const Vector3 &v)
 
SCH_API void addTranslation (const Scalar *const v)
 
SCH_API void addTranslation (const Scalar &x, const Scalar &y, const Scalar &z)
 

Protected Attributes

S_ObjectTimeStamp stamp_
 
int stacks_
 
int slices_
 
Matrix3x3 mRot_
 
Vector3 trans_
 

Detailed Description

Examples
example1.cpp, and example2.cpp.

Member Enumeration Documentation

◆ S_ObjectType

type of a solid object. Don't use it to cast !

Enumerator
TS_Object 
TPolyhedron 
TSTP_BV 
TSphere 
TBox 
TSuperellipsoid 
TSTP_BV_WithPolyhedron 
TPoint 
TCapsule 
TCone 
TCylinder 

Constructor & Destructor Documentation

◆ S_Object()

SCH_API sch::S_Object::S_Object ( void  )

◆ ~S_Object()

virtual SCH_API sch::S_Object::~S_Object ( void  )
virtual

Member Function Documentation

◆ addRotation() [1/7]

SCH_API void sch::S_Object::addRotation ( const Matrix3x3 Rotation)

composes the current orientation with a Rotation

Examples
example0.cpp.

◆ addRotation() [2/7]

SCH_API void sch::S_Object::addRotation ( const Quaternion  quaternion)

◆ addRotation() [3/7]

SCH_API void sch::S_Object::addRotation ( const Scalar angle,
const Vector3 axe 
)

◆ addRotation() [4/7]

SCH_API void sch::S_Object::addRotation ( const Scalar q0,
const Scalar q1,
const Scalar q2,
const Scalar q3 
)

◆ addRotation() [5/7]

SCH_API void sch::S_Object::addRotation ( const Scalar r00,
const Scalar r01,
const Scalar r02,
const Scalar r10,
const Scalar r11,
const Scalar r12,
const Scalar r20,
const Scalar r21,
const Scalar r22 
)

◆ addRotation() [6/7]

SCH_API void sch::S_Object::addRotation ( const Scalar yaw,
const Scalar pitch,
const Scalar roll 
)

Euler ROLL PITCH YAW - AROUND X, Y THEN Z

◆ addRotation() [7/7]

SCH_API void sch::S_Object::addRotation ( const Scalar *const  p)

◆ addScale()

SCH_API void sch::S_Object::addScale ( const Scalar x,
const Scalar y,
const Scalar z 
)

composes the current transfornation with a scale

Examples
example0.cpp.

◆ addTransformation()

SCH_API void sch::S_Object::addTransformation ( const Matrix4x4 transformation)

composes the current transfornation with transformation matrix one

◆ addTranslation() [1/3]

SCH_API void sch::S_Object::addTranslation ( const Scalar x,
const Scalar y,
const Scalar z 
)

◆ addTranslation() [2/3]

SCH_API void sch::S_Object::addTranslation ( const Scalar *const  v)

◆ addTranslation() [3/3]

SCH_API void sch::S_Object::addTranslation ( const Vector3 v)

◆ checkStamp()

const S_ObjectTimeStamp & S_Object::checkStamp ( ) const
inline

returns the current time stamp

◆ clone()

virtual SCH_API S_Object* sch::S_Object::clone ( ) const
pure virtual

◆ constructFromFile()

virtual SCH_API void sch::S_Object::constructFromFile ( const std::string &  filename)
virtual

Reimplemented in sch::STP_BV, sch::S_Polyhedron, and sch::STP_BV_P.

◆ getOrientation()

const Matrix3x3 & S_Object::getOrientation ( ) const
inline

returns the orientation as a rotation matrix

◆ getPosition()

const Vector3 & S_Object::getPosition ( ) const
inline

returns the position

◆ getSlices()

int S_Object::getSlices ( ) const
inline

◆ getStacks()

int S_Object::getStacks ( ) const
inline

◆ getTransformationMatrix()

void S_Object::getTransformationMatrix ( Scalar S) const
inline

puts the transfomation matrix in a sclar array

◆ getType()

virtual SCH_API S_ObjectType sch::S_Object::getType ( ) const
virtual

◆ l_Support()

virtual SCH_API Point3 sch::S_Object::l_Support ( const Vector3 v,
int &  lastFeature 
) const
pure virtual

gives the support point for a given vector in local cordinates and a given last feature. MUST BE OVERLOADED.

Parameters
vdirection vector (normalized)
lastFeaturetells in which feature we were in last query, amd returns the new one. very important in spatio-temporal coherence
Returns
returns the support point.

Implemented in sch::STP_BV, sch::S_Polyhedron, sch::S_Cone, sch::S_Box, sch::S_Capsule, sch::S_Cylinder, sch::S_Sphere, sch::S_Point, sch::S_Superellipsoid, and sch::STP_BV_P.

◆ resetTransformation()

SCH_API void sch::S_Object::resetTransformation ( )

loads Identity

◆ serialize()

template<class Archive >
void sch::S_Object::serialize ( Archive &  ar,
const unsigned int   
)
inline

◆ setOrientation() [1/7]

SCH_API void sch::S_Object::setOrientation ( const Matrix3x3 Rotation)

◆ setOrientation() [2/7]

SCH_API void sch::S_Object::setOrientation ( const Quaternion  quaternion)

◆ setOrientation() [3/7]

SCH_API void sch::S_Object::setOrientation ( const Scalar angle,
const Vector3 axe 
)

◆ setOrientation() [4/7]

SCH_API void sch::S_Object::setOrientation ( const Scalar q0,
const Scalar q1,
const Scalar q2,
const Scalar q3 
)

◆ setOrientation() [5/7]

SCH_API void sch::S_Object::setOrientation ( const Scalar r00,
const Scalar r01,
const Scalar r02,
const Scalar r10,
const Scalar r11,
const Scalar r12,
const Scalar r20,
const Scalar r21,
const Scalar r22 
)

◆ setOrientation() [6/7]

SCH_API void sch::S_Object::setOrientation ( const Scalar yaw,
const Scalar pitch,
const Scalar roll 
)

Euler ROLL PITCH YAW - AROUND X, Y THEN Z

◆ setOrientation() [7/7]

SCH_API void sch::S_Object::setOrientation ( const Scalar *const  p)

◆ setPosition() [1/3]

SCH_API void sch::S_Object::setPosition ( const Scalar x,
const Scalar y,
const Scalar z 
)

◆ setPosition() [2/3]

SCH_API void sch::S_Object::setPosition ( const Scalar *const  v)

◆ setPosition() [3/3]

SCH_API void sch::S_Object::setPosition ( const Vector3 v)

Sets the position.

Examples
example0.cpp, example1.cpp, and example2.cpp.

◆ setTransformation()

SCH_API void sch::S_Object::setTransformation ( const Matrix4x4 transformation)

Sets the transformation matrix.

◆ support() [1/2]

virtual SCH_API Point3 sch::S_Object::support ( const Vector3 v) const
pure virtual

put it in objects coordinates, then calls l_support. DO NOT OVERLOAD IT UNLESS YOU KNOW WHAT YOU ARE DOING (if you want to define the support function, overload l_support)

Parameters
vdirection vector
Returns
returns the support point.

Implemented in sch::S_ObjectNonNormalized, and sch::S_ObjectNormalized.

◆ support() [2/2]

virtual SCH_API Point3 sch::S_Object::support ( const Vector3 v,
int &  LastFeature 
) const
pure virtual

version of support with last feature optimization

Parameters
vdirection vector
lastFeaturetells in which feature we were in last query, and returns the new one. very important in spatio-temporal coherence
Returns
returns the support point.

Implemented in sch::S_ObjectNonNormalized, and sch::S_ObjectNormalized.

Member Data Documentation

◆ mRot_

Matrix3x3 sch::S_Object::mRot_
protected

◆ slices_

int sch::S_Object::slices_
protected

◆ stacks_

int sch::S_Object::stacks_
protected

◆ stamp_

S_ObjectTimeStamp sch::S_Object::stamp_
protected

◆ trans_

Vector3 sch::S_Object::trans_
protected

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