sch::S_Polyhedron Class Reference

#include <sch/S_Polyhedron/S_Polyhedron.h>

Inheritance diagram for sch::S_Polyhedron:
Collaboration diagram for sch::S_Polyhedron:

Public Member Functions

SCH_API S_Polyhedron (void)
 
SCH_API S_Polyhedron (const S_Polyhedron &)
 
virtual SCH_API ~S_Polyhedron (void)
 
const SCH_API S_Polyhedronoperator= (const S_Polyhedron &)
 
virtual SCH_API S_Polyhedronclone () const
 Returns a copy of this S_Object. More...
 
virtual SCH_API void constructFromFile (const std::string &filename)
 loads the polyhedron from a file. the file must be in the format of Qhull qconvex output, called with these options : \ "qconvex TI <input_filename> TO <output_filename> Qt o f" More...
 
virtual SCH_API void loadFromBinary (const std::string &filename)
 Load the object from a binary archive. More...
 
virtual SCH_API void saveToBinary (const std::string &filename)
 Save the object to a binary archive. More...
 
SCH_API void updateFastArrays ()
 updates the fast access arrays, must be called after each polyhedron modification More...
 
SCH_API Point3 naiveSupport (const Vector3 &v) const
 
SCH_API void updateVertexNeighbors ()
 updates the Neighborhood of the vertexes, must be called on polyhedron \which vertexes have no neighbors, or after calling clearNeighbors. More...
 
SCH_API void clearNeighbors ()
 clears the neighbors tables; More...
 
SCH_API void clear ()
 clears all the polyhedron; More...
 
SCH_API void deleteVertexesWithoutNeighbors ()
 deletes aal the vertexes that dont have neighbors; More...
 
SCH_API int getTrianglesNumber () const
 
SCH_API Polyhedron_algorithmsgetPolyhedronAlgorithm ()
 
template<class Archive >
void save (Archive &ar, const unsigned int) const
 
template<class Archive >
void load (Archive &ar, const unsigned int)
 
- Public Member Functions inherited from sch::S_ObjectNonNormalized
SCH_API S_ObjectNonNormalized (void)
 
SCH_API ~S_ObjectNonNormalized (void)
 
virtual SCH_API Point3 support (const Vector3 &v) const
 put the vector in objects coordinates, then calls l_support, without normalizing it More...
 
virtual SCH_API Point3 support (const Vector3 &v, int &LastFeature) const
 put the vector in objects coordinates, then calls l_support, without normalizing it More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 
- Public Member Functions inherited from sch::S_Object
SCH_API S_Object (void)
 
virtual SCH_API ~S_Object (void)
 
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
 
const S_ObjectTimeStampcheckStamp () const
 returns the current time stamp More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int)
 
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 Member Functions

virtual SCH_API Point3 l_Support (const Vector3 &v, int &lastFeature) const
 gives the support point for a given vector in local cordinates and a given last feature. MUST BE OVERLOADED. More...
 
virtual SCH_API S_ObjectType getType () const
 must be overloaded to return the type More...
 

Protected Attributes

Polyhedron_algorithms poly
 
- Protected Attributes inherited from sch::S_Object
S_ObjectTimeStamp stamp_
 
int stacks_
 
int slices_
 
Matrix3x3 mRot_
 
Vector3 trans_
 

Additional Inherited Members

- Public Types inherited from sch::S_Object
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...
 

Detailed Description

Examples
example2.cpp.

Constructor & Destructor Documentation

◆ S_Polyhedron() [1/2]

SCH_API sch::S_Polyhedron::S_Polyhedron ( void  )

◆ S_Polyhedron() [2/2]

SCH_API sch::S_Polyhedron::S_Polyhedron ( const S_Polyhedron )

◆ ~S_Polyhedron()

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

Member Function Documentation

◆ clear()

SCH_API void sch::S_Polyhedron::clear ( )

clears all the polyhedron;

◆ clearNeighbors()

SCH_API void sch::S_Polyhedron::clearNeighbors ( )

clears the neighbors tables;

◆ clone()

virtual SCH_API S_Polyhedron* sch::S_Polyhedron::clone ( ) const
virtual

Returns a copy of this S_Object.

Implements sch::S_Object.

◆ constructFromFile()

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

loads the polyhedron from a file. the file must be in the format of Qhull qconvex output, called with these options : \ "qconvex TI <input_filename> TO <output_filename> Qt o f"

Reimplemented from sch::S_Object.

Examples
example2.cpp.

◆ deleteVertexesWithoutNeighbors()

SCH_API void sch::S_Polyhedron::deleteVertexesWithoutNeighbors ( )

deletes aal the vertexes that dont have neighbors;

◆ getPolyhedronAlgorithm()

SCH_API Polyhedron_algorithms* sch::S_Polyhedron::getPolyhedronAlgorithm ( )
inline

◆ getTrianglesNumber()

SCH_API int sch::S_Polyhedron::getTrianglesNumber ( ) const

◆ getType()

virtual SCH_API S_ObjectType sch::S_Polyhedron::getType ( ) const
protectedvirtual

must be overloaded to return the type

Reimplemented from sch::S_Object.

◆ l_Support()

virtual SCH_API Point3 sch::S_Polyhedron::l_Support ( const Vector3 v,
int &  lastFeature 
) const
protectedvirtual

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.

Implements sch::S_Object.

◆ load()

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

◆ loadFromBinary()

virtual SCH_API void sch::S_Polyhedron::loadFromBinary ( const std::string &  filename)
virtual

Load the object from a binary archive.

Parameters
filenamepath to the binary archive

◆ naiveSupport()

SCH_API Point3 sch::S_Polyhedron::naiveSupport ( const Vector3 v) const

◆ operator=()

const SCH_API S_Polyhedron& sch::S_Polyhedron::operator= ( const S_Polyhedron )

◆ save()

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

◆ saveToBinary()

virtual SCH_API void sch::S_Polyhedron::saveToBinary ( const std::string &  filename)
virtual

Save the object to a binary archive.

Parameters
filenamepath to the binary archive

◆ updateFastArrays()

SCH_API void sch::S_Polyhedron::updateFastArrays ( )

updates the fast access arrays, must be called after each polyhedron modification

◆ updateVertexNeighbors()

SCH_API void sch::S_Polyhedron::updateVertexNeighbors ( )

updates the Neighborhood of the vertexes, must be called on polyhedron \which vertexes have no neighbors, or after calling clearNeighbors.

Member Data Documentation

◆ poly

Polyhedron_algorithms sch::S_Polyhedron::poly
protected

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