|
C3D Toolkit
Kernel - 118060, Vision - 2.15.0.1825
|
Collaboration diagram for Collision Detection:Classes | |
| struct | cdet_query |
| Data structure and callbacks for the collision search request. More... | |
| struct | cdet_collided_faces |
| The structure of the query to find collision faces. More... | |
| class | CdCollisionDetection |
| Collision search and distance measurement query utility. More... | |
| class | CdSceneIterator |
| Iterator for traversing objects of collision detector scene. More... | |
| struct | CdSceneIteratorRange |
| Iterator range of scene for support range-based for loop. More... | |
| struct | CDM_instance |
| The structure specifing the instance of geometric object (polygonal or boundary representation). More... | |
| struct | CDM_component |
| A component is a geometric union of bodies or polygonal objects which have their own local coordinate system. More... | |
| struct | CDM_ray |
| The structure defining the ray in the collision detector scene. More... | |
| struct | CDM_callback_table |
| The structure uniting collision detection callbacks. More... | |
Typedefs | |
| typedef const CdSceneItem * | cdet_item |
| Object from the set of collision detection. | |
| typedef CDM_result | cdet_result |
| Result code of collision queries. | |
| typedef const MtRefItem * | cdet_bvt_node |
| A node of the bounding volume tree. | |
| typedef std::pair< cdet_bvt_node, cdet_bvt_node > | cdet_bvt_pair |
| A pair of branches of the bounding volume subtree. | |
| typedef SPtr< MbItem >(* | CDM_item_registered) (cdet_app_item appItem) |
| Application item was registered in the scene. | |
| typedef void(* | CDM_item_unregistered) (cdet_app_item appItem) |
| Application item was unregistered in the scene. | |
| typedef bool(* | CDM_abort) () |
| Query to interrupt calculations. | |
Enumerations | |
| enum | CDM_result { } |
| Codes of collision detection or measuring query. More... | |
| enum | cdet_setting_result { CDM_PARAMETER_Applied = 1 , CDM_PARAMETER_NotChanged } |
| The result of changing the collision search settings. More... | |
Functions | |
| MbResultType | InterferenceSolids (MbSolid &solid1, MbSolid &solid2, std::vector< MbCurveEdge * > *edges, c3d::IndicesPairsVector *intersectedFaces, c3d::IndicesPairsVector *similarFaces, c3d::IndicesPairsVector *touchedFaces) |
| Calculation of intersections between solids using the boolean operations. More... | |
| cdet_bvt_pair | BvtSubNodes (cdet_item, cdet_bvt_node) |
| Get the left and the right branches of the bounding volume subtree. | |
| void | GetOrientedBox (cdet_item, cdet_bvt_node, MbMatrix3D &) |
| Transformation matrix yielding bounding parallelepiped from the unit cube. | |
| cdet_scene | CDM_CreateScene () |
| Create an empty collision detection scene. More... | |
| void | CDM_RemoveScene (cdet_scene scn) |
| Delete collision detection scene. More... | |
| cdet_item | CDM_AddComponent (cdet_scene scn, const CDM_component &comp) |
| Add a new component to the collision detector scene and set proximity parameters. More... | |
| cdet_item | CDM_AddInstance (cdet_scene scn, const CDM_instance &inst) |
| Add a solid with given placement to the collision detection scene. More... | |
| cdet_item | CDM_AddInstance (cdet_scene scn, cdet_item compItem, const CDM_instance &inst) |
| Add a new instance of a reused solid into the component of the collision detector. More... | |
| cdet_item | CDM_AddRay (cdet_scene scn, const CDM_ray &ray) |
| Add a ray to the collision detector scene. More... | |
| void | CDM_RemoveItem (cdet_scene scn, cdet_item scnItem) |
| Remove a geometric object from the scene of collision detector. More... | |
| void | CDM_Reposition (cdet_scene scn, cdet_item scnItem, const MbPlacement3D &place) |
| Change current position of a geometric object. More... | |
| cdet_result | CDM_CheckCollisions (cdet_scene scn, cdet_query &cdQuery) |
| Request a collision search between scene elements. More... | |
| cdet_result | CDM_CheckCollisions (cdet_scene scn) |
| Check collisions between geometric objects of the scene. More... | |
| cdet_app_item | CDM_AppItem (cdet_scene scn, cdet_item scnItem) |
| Get an application pointer by object descriptor of the collision detector scene. More... | |
| MbeConvResType | CDM_ExportToC3D (cdet_scene scn, const TCHAR *c3dFile) |
| Export collision detector scene into C3D model. More... | |
| CdSceneIteratorRange | CDM_SubItemsRange (cdet_scene scn, cdet_item scnItem) |
| Returns an iterator range over the elements of the given scene component (one level only). More... | |
| CdSceneIteratorRange | CDM_InDepthSubItems (cdet_scene scn, cdet_item scnItem) |
| Returns an iterator range with depth‑first traversal of the given scene component. More... | |
| CdSceneIteratorRange | CDM_SceneItems (cdet_scene scn) |
| Return the iterator range of all objects in the collision detector scene. | |
| void | CDM_ClearScene (cdet_scene scn) |
| Exclude all models from consideration. | |
Variables | |
| const cdet_item | CDET_NULL = nullptr |
| Empty object of the collision query set. | |
| const cdet_app_item | CDET_APP_NULL = nullptr |
| "Null object" of the client app. | |
| const cdet_bvt_node | CDET_BVT_NULL = nullptr |
| An empty bounding volume tree. | |
| enum CDM_result |
Codes of collision detection or measuring query.
| enum cdet_setting_result |
| MbResultType InterferenceSolids | ( | MbSolid & | solid1, |
| MbSolid & | solid2, | ||
| std::vector< MbCurveEdge * > * | edges, | ||
| c3d::IndicesPairsVector * | intersectedFaces, | ||
| c3d::IndicesPairsVector * | similarFaces, | ||
| c3d::IndicesPairsVector * | touchedFaces | ||
| ) |
Calculation of intersections between solids using the boolean operations.
Calculation of intersections between solids using the boolean operations.
| [in] | solid1 | - The first solid. |
| [in] | solid2 | - The second solid. |
| [out] | edges | - Intersection edges. |
| [out] | intersectedFaces | - The couples of indeses intersected faces of the solids, |
| [out] | touchedFaces | - The couples of indeses of contacted faces with oppositely directed normals. |
| [out] | similarFaces | - The couples of indeses of relating to similar faces that can be combined. |
| cdet_scene CDM_CreateScene | ( | ) |
Create an empty collision detection scene.
| void CDM_RemoveScene | ( | cdet_scene | scn | ) |
Delete collision detection scene.
This method releases memory from internal data structures maintaining the collision detector. The removed collision scene is invalidated after this call.
| [in] | scn | - Scene of the collision and proximity queries. |
| cdet_item CDM_AddComponent | ( | cdet_scene | scn, |
| const CDM_component & | comp | ||
| ) |
Add a new component to the collision detector scene and set proximity parameters.
| [in] | comp | - A component that is a geometric union of bodies or polygonal objects. It have its own local coordinate system. |
Component is able to unite solids into the rigid geometric sets.
| cdet_item CDM_AddInstance | ( | cdet_scene | scn, |
| const CDM_instance & | inst | ||
| ) |
Add a solid with given placement to the collision detection scene.
| [in] | inst | - The instance record of geometric object (polygonal or boundary representation). |
The same instance of the 'MbItem' class can be added to the scene as many times as necessary using this call. When the same geometric object is added multiple times, the collision detector creates only one search data structure (BVT). The memory and computation time resources spent to create this structure, are reused for all scene instances based on the same 'MbItem' object.
| cdet_item CDM_AddInstance | ( | cdet_scene | scn, |
| cdet_item | compItem, | ||
| const CDM_instance & | inst | ||
| ) |
Add a new instance of a reused solid into the component of the collision detector.
| [in] | compItem | - A component to witch the instance will belong. |
| [in] | inst | - The instance record of geometric object (polygonal or boundary representation). |
Add a ray to the collision detector scene.
| [in] | ray | - Geometric representation of ray. |
Remove a geometric object from the scene of collision detector.
| [in] | scnItem | - Decriptor of object in collision detector scene. |
| void CDM_Reposition | ( | cdet_scene | scn, |
| cdet_item | scnItem, | ||
| const MbPlacement3D & | place | ||
| ) |
Change current position of a geometric object.
| [in] | scnItem | - Decriptor of object in collision detector scene. |
| [in] | place | - The placement that the object takes in global space. |
| cdet_result CDM_CheckCollisions | ( | cdet_scene | scn, |
| cdet_query & | cdQuery | ||
| ) |
Request a collision search between scene elements.
The search for collisions between scene elements is performed according to the cdQuery structure, namely, pairs are checked both at the root level, including entire components, and at the level within a component. The client application has the ability to configure the query so as to search not for collisisons "all with all", but only between groups of objects.
| cdet_result CDM_CheckCollisions | ( | cdet_scene | scn | ) |
Check collisions between geometric objects of the scene.
| cdet_app_item CDM_AppItem | ( | cdet_scene | scn, |
| cdet_item | scnItem | ||
| ) |
Get an application pointer by object descriptor of the collision detector scene.
| [in] | scnItem | - Object descriptor in the collision detector scene. |
| MbeConvResType CDM_ExportToC3D | ( | cdet_scene | scn, |
| const TCHAR * | c3dFile | ||
| ) |
Export collision detector scene into C3D model.
| [in] | c3dFile | - The name of the file. |
| CdSceneIteratorRange CDM_SubItemsRange | ( | cdet_scene | scn, |
| cdet_item | scnItem | ||
| ) |
Returns an iterator range over the elements of the given scene component (one level only).
| [in] | scnItem | - Object of the collision detector scene. |
| CdSceneIteratorRange CDM_InDepthSubItems | ( | cdet_scene | scn, |
| cdet_item | scnItem | ||
| ) |
Returns an iterator range with depth‑first traversal of the given scene component.
| [in] | scnItem | - Object of the collision detector scene. |