CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdGiIntersectionsCalculator Class Reference

#include <GiIntersectionsCalculator.h>

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

Public Member Functions

 OdGiIntersectionsCalculator ()
 
virtual ~OdGiIntersectionsCalculator ()
 
OdInt32 appendTriangleContainer (OdGiIntersectTrianglesVector *pContainer)
 
OdInt32 addTriangleToContainer (OdInt32 containerID, const OdGePoint3d *pTriangle)
 
OdInt32 addContainerToBeTested (OdInt32 containerID)
 
void computeIntersections (OdInt32 containerID, OdGeExtents3d &extents)
 
virtual void initializeCalculations (OdGeExtents3d &ext, OdInt32 nObjects)
 
virtual void finalizeCalculations ()
 
void intermediatefinalizeCalculations ()
 
void processTrianglesIntoSpaceTree (OdUInt32 objID, bool bOtherObjectsProcessed)
 
void processPathCalculation (OdUInt32 idObjTested)
 
const OdGeToltolerance () const
 
void setTolerance (const OdGeTol &tol)
 
bool & facesActive ()
 
bool getSpaceTreeRootExtents (OdGeExtents3d &ext)
 
OdUInt32 triangleContainerSize () const
 
OdUInt32 containerToBeTestedSize () const
 
void removeEdgeInfo (OdInt32 objID)
 
OdList< OdGiExtents3dSpaceChainPolyline * > & finalIntersectionPathes ()
 
OdArray< OdGiExtents3dSpacePoint * > * intersectionVertices ()
 
OdArray< OdGiEdgeForIntersectTest * > * intersectionEdges ()
 

Protected Member Functions

virtual bool notifyObjectPlacedAtNode (OdGiTriangleForIntersectTest *pTriang, int objectType, OdGiExtents3dSpaceNode_Gi *pNode)
 
void intersectTriangles (OdUInt32 idObjA, OdUInt32 trIdA, OdUInt32 idObjB, OdUInt32 trIdB, OdUInt32 idObjTested, const OdGeTol &tol)
 

Protected Attributes

OdGeTol m_tol
 
OdVector< bool, OdMemoryAllocator< bool > > m_vectTestedTriangles
 
OdUInt32Vector m_vectTestTriangles_objBoundary
 
OdUInt32Vector 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

This class implements triangles-based intersection calculation. Usage: 1) call initializeCalculations() 2) add triangles: 2.1) call appendTriangleContainer to obtain containerID 2.2) call addTriangleToContainer with obtained ID 3) specify containers that should be tested by calling addContainerToBeTested and call processPathCalculation for them 4) call computeIntersections to calculate intersections between specified container and all "should be tested" containers 5) use processPathCalculation() to obtain results

Library: Source code provided.

<group OdGi_Classes>

See also
<link gs_collision_detection, Work with Collision Detection>

Definition at line 148 of file GiIntersectionsCalculator.h.

Constructor & Destructor Documentation

◆ OdGiIntersectionsCalculator()

OdGiIntersectionsCalculator::OdGiIntersectionsCalculator ( )

Default constructor for the OdGiIntersectionsCalculator class.

◆ ~OdGiIntersectionsCalculator()

virtual OdGiIntersectionsCalculator::~OdGiIntersectionsCalculator ( )
inlinevirtual

Destructor for the OdGiIntersectionsCalculator class.

Definition at line 196 of file GiIntersectionsCalculator.h.

Member Function Documentation

◆ addContainerToBeTested()

OdInt32 OdGiIntersectionsCalculator::addContainerToBeTested ( OdInt32 containerID)

Adds specified triangle container to the "containers to be tested" list

◆ addTriangleToContainer()

OdInt32 OdGiIntersectionsCalculator::addTriangleToContainer ( OdInt32 containerID,
const OdGePoint3d * pTriangle )

Adds triangle to the specified triangle container

◆ appendTriangleContainer()

OdInt32 OdGiIntersectionsCalculator::appendTriangleContainer ( OdGiIntersectTrianglesVector * pContainer)

Appends specified triangle container to the containers list and returns it ID

◆ computeIntersections()

void OdGiIntersectionsCalculator::computeIntersections ( OdInt32 containerID,
OdGeExtents3d & extents )

Computes intersections between specified triangle container and "containers to be tested" list

◆ containerToBeTestedSize()

OdUInt32 OdGiIntersectionsCalculator::containerToBeTestedSize ( ) const
inline

Definition at line 239 of file GiIntersectionsCalculator.h.

◆ facesActive()

bool & OdGiIntersectionsCalculator::facesActive ( )
inline

Definition at line 233 of file GiIntersectionsCalculator.h.

◆ finalIntersectionPathes()

OdList< OdGiExtents3dSpaceChainPolyline * > & OdGiIntersectionsCalculator::finalIntersectionPathes ( )
inline

Definition at line 243 of file GiIntersectionsCalculator.h.

◆ finalizeCalculations()

virtual void OdGiIntersectionsCalculator::finalizeCalculations ( )
virtual

Reimplemented in OdGiCollisionDetector.

◆ getSpaceTreeRootExtents()

bool OdGiIntersectionsCalculator::getSpaceTreeRootExtents ( OdGeExtents3d & ext)

◆ initializeCalculations()

virtual void OdGiIntersectionsCalculator::initializeCalculations ( OdGeExtents3d & ext,
OdInt32 nObjects )
virtual

◆ intermediatefinalizeCalculations()

void OdGiIntersectionsCalculator::intermediatefinalizeCalculations ( )

◆ intersectionEdges()

OdArray< OdGiEdgeForIntersectTest * > * OdGiIntersectionsCalculator::intersectionEdges ( )
inline

Definition at line 245 of file GiIntersectionsCalculator.h.

◆ intersectionVertices()

OdArray< OdGiExtents3dSpacePoint * > * OdGiIntersectionsCalculator::intersectionVertices ( )
inline

Definition at line 244 of file GiIntersectionsCalculator.h.

◆ intersectTriangles()

void OdGiIntersectionsCalculator::intersectTriangles ( OdUInt32 idObjA,
OdUInt32 trIdA,
OdUInt32 idObjB,
OdUInt32 trIdB,
OdUInt32 idObjTested,
const OdGeTol & tol )
protected

◆ notifyObjectPlacedAtNode()

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

◆ processPathCalculation()

void OdGiIntersectionsCalculator::processPathCalculation ( OdUInt32 idObjTested)

◆ processTrianglesIntoSpaceTree()

void OdGiIntersectionsCalculator::processTrianglesIntoSpaceTree ( OdUInt32 objID,
bool bOtherObjectsProcessed )

◆ removeEdgeInfo()

void OdGiIntersectionsCalculator::removeEdgeInfo ( OdInt32 objID)

◆ setTolerance()

void OdGiIntersectionsCalculator::setTolerance ( const OdGeTol & tol)
inline

Specifies intersection tolerance

Parameters
tol[in] Intersection tolerance

Definition at line 229 of file GiIntersectionsCalculator.h.

◆ tolerance()

const OdGeTol & OdGiIntersectionsCalculator::tolerance ( ) const
inline

Retrives intersection tolerance

Returns
Returns intersection tolerance

Definition at line 224 of file GiIntersectionsCalculator.h.

◆ triangleContainerSize()

OdUInt32 OdGiIntersectionsCalculator::triangleContainerSize ( ) const
inline

Definition at line 237 of file GiIntersectionsCalculator.h.

Member Data Documentation

◆ m_b3dFacesActive

bool OdGiIntersectionsCalculator::m_b3dFacesActive
protected

Definition at line 177 of file GiIntersectionsCalculator.h.

◆ m_bSecondObjectProcessedInTree

bool OdGiIntersectionsCalculator::m_bSecondObjectProcessedInTree
protected

Definition at line 162 of file GiIntersectionsCalculator.h.

◆ m_containerTriangles

OdVector<OdGiIntersectTrianglesVector*> OdGiIntersectionsCalculator::m_containerTriangles
protected

Definition at line 165 of file GiIntersectionsCalculator.h.

◆ m_finalIntersectPathes

OdList<OdGiExtents3dSpaceChainPolyline*> OdGiIntersectionsCalculator::m_finalIntersectPathes
protected

Definition at line 176 of file GiIntersectionsCalculator.h.

◆ m_intersectEdges

OdArray<OdGiEdgeForIntersectTest*>* OdGiIntersectionsCalculator::m_intersectEdges
protected

Definition at line 173 of file GiIntersectionsCalculator.h.

◆ m_intersectVertices

OdArray<OdGiExtents3dSpacePoint*>* OdGiIntersectionsCalculator::m_intersectVertices
protected

Definition at line 172 of file GiIntersectionsCalculator.h.

◆ m_spaceTriangTree

OdGiExtents3dSpaceTree_Gi OdGiIntersectionsCalculator::m_spaceTriangTree
protected

Definition at line 168 of file GiIntersectionsCalculator.h.

◆ m_spaceVertexTree

OdGiExtents3dSpaceTree OdGiIntersectionsCalculator::m_spaceVertexTree
protected

Definition at line 169 of file GiIntersectionsCalculator.h.

◆ m_tol

OdGeTol OdGiIntersectionsCalculator::m_tol
protected

Definition at line 152 of file GiIntersectionsCalculator.h.

◆ m_vectTestedTriangles

OdVector<bool, OdMemoryAllocator<bool> > OdGiIntersectionsCalculator::m_vectTestedTriangles
protected

Definition at line 155 of file GiIntersectionsCalculator.h.

◆ m_vectTestTriangles_objBoundary

OdUInt32Vector OdGiIntersectionsCalculator::m_vectTestTriangles_objBoundary
protected

Definition at line 156 of file GiIntersectionsCalculator.h.

◆ m_vectToBeTestedObjects

OdUInt32Vector OdGiIntersectionsCalculator::m_vectToBeTestedObjects
protected

Definition at line 159 of file GiIntersectionsCalculator.h.


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