CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
OdGiCollisionDetector Class Reference

#include <GiIntersectionsCalculator.h>

Inheritance diagram for OdGiCollisionDetector:
OdGiIntersectionsCalculator OdGiExtentsSpaceTreeCallback< OdGeExtents3d, OdGiTriangleForIntersectTest >

Classes

struct  DetectedCollision
 

Public Member Functions

 OdGiCollisionDetector ()
 
virtual ~OdGiCollisionDetector ()
 
void detectCollisions (OdInt64 containerID, const OdGeExtents3d &extents)
 
void getCollisions (OdList< OdInt64 > &result)
 
bool getCollisionDistance (OdInt64 collisionIndex, double &result) const
 
virtual void finalizeCalculations ()
 
void clearContainersToBeTested ()
 
void setIntersectionsOnly (bool b)
 
bool isIntersectionsOnly () const
 
void setClearance (double cl)
 
bool isClearance () const
 
double getClearance () const
 
void setCalcDistance (bool b)
 
bool getCalcDistance () const
 
void setCheckAll (bool b)
 
bool getCheckAll () const
 
- Public Member Functions inherited from OdGiIntersectionsCalculator
 OdGiIntersectionsCalculator ()
 
virtual ~OdGiIntersectionsCalculator ()
 
OdInt64 appendTriangleContainer (OdGiIntersectTrianglesVector *pContainer)
 
OdInt64 addTriangleToContainer (OdInt64 containerID, const OdGePoint3d *pTriangle)
 
OdInt64 addContainerToBeTested (OdInt64 containerID)
 
void computeIntersections (OdInt64 containerID, const OdGeExtents3d &extents)
 
virtual void initializeCalculations (OdGeExtents3d &ext, OdInt64 nObjects)
 
virtual void finalizeCalculations ()
 
void intermediatefinalizeCalculations ()
 
void processTrianglesIntoSpaceTree (OdInt64 objID, bool bOtherObjectsProcessed)
 
void processPathCalculation (OdUInt64 idObjTested)
 
const OdGeToltolerance () const
 
void setTolerance (const OdGeTol &tol)
 
bool & facesActive ()
 
bool getSpaceTreeRootExtents (OdGeExtents3d &ext)
 
OdUInt32 triangleContainerSize () const
 
OdUInt32 containerToBeTestedSize () const
 
void removeEdgeInfo (OdInt64 objID)
 
OdList< OdGiExtents3dSpaceChainPolyline * > & finalIntersectionPathes ()
 
OdArray< OdGiExtents3dSpacePoint * > * intersectionVertices ()
 
OdArray< OdGiEdgeForIntersectTest * > * intersectionEdges ()
 
virtual bool notifyObjectPlacedAtNode (OdGiTriangleForIntersectTest *, int, OdGiExtentsSpaceNode< OdGeExtents3d, OdGiTriangleForIntersectTest > *pNode)=0
 

Protected Types

enum  CollisionOption { kOption_IntersectionOnly = 1 , kOption_Clearance = 2 , kOption_CalcDistance = 4 , kOption_CheckAll = 8 }
 

Protected Member Functions

virtual bool notifyObjectPlacedAtNode (OdGiTriangleForIntersectTest *pTriang, int objectType, OdGiExtents3dSpaceNode_Gi *pNode)
 
void computeIntersections (OdInt64 containerID, const OdGeExtents3d &extents)
 
void processPathCalculation (OdUInt64 idObjTested)
 
void removeEdgeInfo (OdInt64 objID)
 
OdList< OdGiExtents3dSpaceChainPolyline * > & finalIntersectionPathes ()
 
OdArray< OdGiExtents3dSpacePoint * > * intersectionVertices ()
 
OdArray< OdGiEdgeForIntersectTest * > * intersectionEdges ()
 
bool collideTriangles (OdUInt64 idObjA, OdUInt64 trIdA, OdUInt64 idObjB, OdUInt64 trIdB, OdUInt64 idObjTested, const OdGeTol &tol)
 
OdUInt32 checkPointsPlacement (const OdGeVector3d *pPlaneNormalA, double D_A, const OdGePoint3d *pPointsTriangleB, const OdGeTol &tol)
 
- Protected Member Functions inherited from OdGiIntersectionsCalculator
virtual bool notifyObjectPlacedAtNode (OdGiTriangleForIntersectTest *pTriang, int objectType, OdGiExtents3dSpaceNode_Gi *pNode)
 
void intersectTriangles (OdUInt64 idObjA, OdUInt64 trIdA, OdUInt64 idObjB, OdUInt64 trIdB, OdUInt64 idObjTested, const OdGeTol &tol)
 

Protected Attributes

OdVector< DetectedCollision, OdMemoryAllocator< DetectedCollision > > m_vectCollidedContainers
 
DetectedCollisionm_vectCollidedContainersAsPtr
 
OdGePoint3d m_ptA
 
OdGePoint3d m_ptB
 
OdUInt8 m_options
 
double m_dClearance
 
- Protected Attributes inherited from OdGiIntersectionsCalculator
OdGeTol m_tol
 
OdVector< bool, OdMemoryAllocator< bool > > m_vectTestedTriangles
 
OdUInt64Vector m_vectTestTriangles_objBoundary
 
OdUInt64Vector m_vectToBeTestedObjects
 
bool m_bSecondObjectProcessedInTree
 
OdVector< OdGiIntersectTrianglesVector * > m_containerTriangles
 
OdGiExtents3dSpaceTree_Gi m_spaceTriangTree
 
OdGiExtents3dSpaceTree m_spaceVertexTree
 
OdArray< OdGiExtents3dSpacePoint * > * m_intersectVertices
 
OdArray< OdGiEdgeForIntersectTest * > * m_intersectEdges
 
OdList< OdGiExtents3dSpaceChainPolyline * > m_finalIntersectPathes
 
bool m_b3dFacesActive
 

Detailed Description

Definition at line 237 of file GiIntersectionsCalculator.h.

Member Enumeration Documentation

◆ CollisionOption

Enumerator
kOption_IntersectionOnly 
kOption_Clearance 
kOption_CalcDistance 
kOption_CheckAll 

Definition at line 356 of file GiIntersectionsCalculator.h.

Constructor & Destructor Documentation

◆ OdGiCollisionDetector()

OdGiCollisionDetector::OdGiCollisionDetector ( )

◆ ~OdGiCollisionDetector()

virtual OdGiCollisionDetector::~OdGiCollisionDetector ( )
inlinevirtual

Definition at line 241 of file GiIntersectionsCalculator.h.

Member Function Documentation

◆ checkPointsPlacement()

OdUInt32 OdGiCollisionDetector::checkPointsPlacement ( const OdGeVector3d pPlaneNormalA,
double  D_A,
const OdGePoint3d pPointsTriangleB,
const OdGeTol tol 
)
protected

◆ clearContainersToBeTested()

void OdGiCollisionDetector::clearContainersToBeTested ( )

◆ collideTriangles()

bool OdGiCollisionDetector::collideTriangles ( OdUInt64  idObjA,
OdUInt64  trIdA,
OdUInt64  idObjB,
OdUInt64  trIdB,
OdUInt64  idObjTested,
const OdGeTol tol 
)
protected

◆ computeIntersections()

void OdGiCollisionDetector::computeIntersections ( OdInt64  containerID,
const OdGeExtents3d extents 
)
inlineprotected

Definition at line 248 of file GiIntersectionsCalculator.h.

◆ detectCollisions()

void OdGiCollisionDetector::detectCollisions ( OdInt64  containerID,
const OdGeExtents3d extents 
)

◆ finalIntersectionPathes()

OdList< OdGiExtents3dSpaceChainPolyline * > & OdGiCollisionDetector::finalIntersectionPathes ( )
inlineprotected

Definition at line 251 of file GiIntersectionsCalculator.h.

◆ finalizeCalculations()

virtual void OdGiCollisionDetector::finalizeCalculations ( )
virtual

Reimplemented from OdGiIntersectionsCalculator.

◆ getCalcDistance()

bool OdGiCollisionDetector::getCalcDistance ( ) const
inline

Checks whether collision detection calculates collision distance.

Returns
true if collision detection calculates collision distance, false otherwise.

Definition at line 320 of file GiIntersectionsCalculator.h.

◆ getCheckAll()

bool OdGiCollisionDetector::getCheckAll ( ) const
inline

Checks whether collision detection checks all faces instead of detecting the first collision.

Returns
true if collision detection checks all faces, false otherwise.

Definition at line 333 of file GiIntersectionsCalculator.h.

◆ getClearance()

double OdGiCollisionDetector::getClearance ( ) const
inline

Retrieves a distance for the clearance mode when objects that are "too close" are detected as intersections.

Definition at line 307 of file GiIntersectionsCalculator.h.

◆ getCollisionDistance()

bool OdGiCollisionDetector::getCollisionDistance ( OdInt64  collisionIndex,
double &  result 
) const

Retrieves a collision distance at the specified index.

Parameters
collisionIndex[in] Index of a collision for which to get the distance.
result[out] Receives collision distance.
Returns
true if collision distance is sucessfully received. This method returns false if index exceeds the size of vector with collisions or if collision at the specified index is not detected.

◆ getCollisions()

void OdGiCollisionDetector::getCollisions ( OdList< OdInt64 > &  result)

◆ intersectionEdges()

OdArray< OdGiEdgeForIntersectTest * > * OdGiCollisionDetector::intersectionEdges ( )
inlineprotected

Definition at line 253 of file GiIntersectionsCalculator.h.

◆ intersectionVertices()

OdArray< OdGiExtents3dSpacePoint * > * OdGiCollisionDetector::intersectionVertices ( )
inlineprotected

Definition at line 252 of file GiIntersectionsCalculator.h.

◆ isClearance()

bool OdGiCollisionDetector::isClearance ( ) const
inline

Checks whether clearance mode for detecting collisions is enabled. This method detects collisions between intersectiong, touching and objects that are "too close".

Returns
true if clearance mode is enabled, false otherwise.

Definition at line 302 of file GiIntersectionsCalculator.h.

◆ isIntersectionsOnly()

bool OdGiCollisionDetector::isIntersectionsOnly ( ) const
inline

Checks whether only intersected objects are detected as collisions.

Returns
true if only intersected objects are detected as collisions, false otherwise.

Definition at line 285 of file GiIntersectionsCalculator.h.

◆ notifyObjectPlacedAtNode()

virtual bool OdGiCollisionDetector::notifyObjectPlacedAtNode ( OdGiTriangleForIntersectTest pTriang,
int  objectType,
OdGiExtents3dSpaceNode_Gi pNode 
)
protectedvirtual

Reimplemented from OdGiIntersectionsCalculator.

◆ processPathCalculation()

void OdGiCollisionDetector::processPathCalculation ( OdUInt64  idObjTested)
inlineprotected

Definition at line 249 of file GiIntersectionsCalculator.h.

◆ removeEdgeInfo()

void OdGiCollisionDetector::removeEdgeInfo ( OdInt64  objID)
inlineprotected

Definition at line 250 of file GiIntersectionsCalculator.h.

◆ setCalcDistance()

void OdGiCollisionDetector::setCalcDistance ( bool  b)
inline

Specifies whether collision detection should calculate collision distance.

Parameters
b[in] The flag that indicates that collision detection should calculate collision distance.

Definition at line 313 of file GiIntersectionsCalculator.h.

◆ setCheckAll()

void OdGiCollisionDetector::setCheckAll ( bool  b)
inline

Specifies whether collision detection should check all faces instead of detecting the first collision.

Parameters
b[in] If true, collision detection checks all faces instead of detecting the first collision.

Definition at line 326 of file GiIntersectionsCalculator.h.

◆ setClearance()

void OdGiCollisionDetector::setClearance ( double  cl)
inline

Specifies a distance for the clearance mode when objects that are "too close" are detected as intersections.

Parameters
cl[in] Clearance distance. Object which have less distance than this value are considered collided in the clearance mode.

Definition at line 291 of file GiIntersectionsCalculator.h.

◆ setIntersectionsOnly()

void OdGiCollisionDetector::setIntersectionsOnly ( bool  b)
inline

Specifies whether to detect collisions only when collided objects intersect.

Parameters
b[in] Flag that specifies whether to detect only intersecting objects. If true, touches are not detected.

Definition at line 278 of file GiIntersectionsCalculator.h.

Member Data Documentation

◆ m_dClearance

double OdGiCollisionDetector::m_dClearance
protected

Definition at line 365 of file GiIntersectionsCalculator.h.

◆ m_options

OdUInt8 OdGiCollisionDetector::m_options
protected

Definition at line 363 of file GiIntersectionsCalculator.h.

◆ m_ptA

OdGePoint3d OdGiCollisionDetector::m_ptA
protected

Definition at line 348 of file GiIntersectionsCalculator.h.

◆ m_ptB

OdGePoint3d OdGiCollisionDetector::m_ptB
protected

Definition at line 349 of file GiIntersectionsCalculator.h.

◆ m_vectCollidedContainers

OdVector<DetectedCollision, OdMemoryAllocator<DetectedCollision> > OdGiCollisionDetector::m_vectCollidedContainers
protected

Definition at line 345 of file GiIntersectionsCalculator.h.

◆ m_vectCollidedContainersAsPtr

DetectedCollision* OdGiCollisionDetector::m_vectCollidedContainersAsPtr
protected

Definition at line 347 of file GiIntersectionsCalculator.h.


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