|
C3D Toolkit
Kernel - 118069, Vision - 2.16.7.1844
|
Collision search and distance measurement query utility. More...
#include <cdet_utility.h>
Public Member Functions | |
| cdet_scene | Scene () const |
| Get a geometric search scene, which is served by the collision detection utility. | |
| cdet_item | AddItem (const MbSolid &solid, const MbPlacement3D &place, cdet_app_item appItem=CDET_APP_NULL) |
| Add a solid with given placement to the collision detection set. More... | |
| cdet_item | AddRay (const MbCartPoint3D &vertex, const MbVector3D &direction, const MbPlacement3D &place, cdet_app_item appItem=CDET_APP_NULL) |
| Add a ray with given vertex, direction and placement to the collision detection set. More... | |
| cdet_item | AddComponent (cdet_app_item) |
| Add a new component to track collisions and proximity parameters. More... | |
| cdet_item | AddInstance (cdet_item compItem, cdet_item solidItem, const MbPlacement3D &place) |
| Add a new instance of a reused solid into the component. More... | |
| cdet_item | AddInstance (cdet_item compItem, const MbItem *mbItem, const MbPlacement3D &place, cdet_app_item appItem=CDET_APP_NULL) |
| Add a new instance of a reused solid into the component. More... | |
| void | RemoveItem (cdet_item cdItem) |
| Remove a geometric object from the set of collision detection. | |
| void | Reposition (cdet_item, const MbPlacement3D &) |
| Change current position of a geometric object. | |
| cdet_result | CheckCollisions (cdet_query &) |
| Check collisions between geometric objects of the set. More... | |
| cdet_result | CheckCollisions () |
| Check collisions between geometric objects of the set. More... | |
| cdet_app_item | AppItem (cdet_item cdItem) const |
| Get an application pointer by descriptor of the collision detection set. | |
| CdSceneIteratorRange | SubItemsRange (cdet_item scnItem) const noexcept |
| Return the iterator range of the scene object/component in the collision detector. | |
| CdSceneIteratorRange | InDepthSubItems (cdet_item scnItem) const noexcept |
| Return the iterator range with in depth traversal for the scene object/component in the collision detector. | |
| CdSceneIteratorRange | SceneItems () const noexcept |
| Return the iterator range of all objects in the collision detector scene. | |
| cdet_setting_result | SetToleranceDelta (cdet_item cqItem, double delta) |
| Set the allowed deviation of the solid size inside or outside the shell. More... | |
| cdet_item | AddMesh (const MbMesh &mesh, const MbPlacement3D &place, cdet_app_item appItem=CDET_APP_NULL, double delta=0.) |
| void | RemoveSolid (cdet_item) |
| Remove a solid model or ray from a collision detector. | |
| size_t | Count () const |
| Get number of added solid models or rays. | |
| size_t | SolidIndex (cdet_item cItem) const |
| An index of solid model or ray registered in the detector. | |
| cdet_result | DistanceQuery (CdProximityParameters &) const |
| Calculation of minimal distance between objects (see the function SetDistanceTracking) | |
| cdet_result | DistanceQuery (cdet_item, cdet_item, CdProximityParameters &) const |
| Calculation of minimal distance between objects. | |
| void | FlushSolids () |
| Exclude all models from consideration. | |
| cdet_item | GetHRepSolid (const MbLumpAndFaces &) const |
| Get the hierarchical representation of the solid (CDET_NULL means that the solid is not in the list). | |
| void | SetTouchTolerance (double lTol) |
| Set the barrier for the difference between the touch and the intersection. | |
| void | SetApproxCollisionQuery (bool ff) |
| On/off approximated calculation of intersections of solids. | |
| void | SetApproxDistanceComputation (bool ff) |
| On/off approximated calculation of proximity parameters - by triangulation. | |
| void | SetDistanceTracking (const MbLumpAndFaces &, const MbLumpAndFaces &) |
| Assign the pair to track the distance between them. | |
| void | SetPlacement (size_t solIdx, const MbPlacement3D &) |
| Update current placement of solid or ray with index solIdx. | |
| MbeConvResType | ExportToC3D (const TCHAR *c3dFile) |
| Export collision detection scene into C3D model. | |
Collision search and distance measurement query utility.
Provides facilities of The Collision Detection to interact with the CAD application.
| cdet_item CdCollisionDetection::AddItem | ( | const MbSolid & | solid, |
| const MbPlacement3D & | place, | ||
| cdet_app_item | appItem = CDET_APP_NULL |
||
| ) |
Add a solid with given placement to the collision detection set.
| cdet_item CdCollisionDetection::AddRay | ( | const MbCartPoint3D & | vertex, |
| const MbVector3D & | direction, | ||
| const MbPlacement3D & | place, | ||
| cdet_app_item | appItem = CDET_APP_NULL |
||
| ) |
Add a ray with given vertex, direction and placement to the collision detection set.
| cdet_item CdCollisionDetection::AddComponent | ( | cdet_app_item | ) |
Add a new component to track collisions and proximity parameters.
Component is able to unite solids into the rigid geometric sets.
| cdet_item CdCollisionDetection::AddInstance | ( | cdet_item | compItem, |
| cdet_item | solidItem, | ||
| const MbPlacement3D & | place | ||
| ) |
Add a new instance of a reused solid into the component.
| [in] | compItem | - A component to witch the instance will belong. |
| [in] | solidItem | - An original solid added by the method AddItem by which the instance is made. |
| [in] | place | - The placement that the instance solid takes in global space. |
| cdet_item CdCollisionDetection::AddInstance | ( | cdet_item | compItem, |
| const MbItem * | mbItem, | ||
| const MbPlacement3D & | place, | ||
| cdet_app_item | appItem = CDET_APP_NULL |
||
| ) |
Add a new instance of a reused solid into the component.
| [in] | compItem | - A component to witch the instance will belong. |
| [in] | mbItem | - An original solid by which the instance is made. |
| [in] | place | - The placement that the instance solid takes in global space. |
| [in] | appItem | - User geometric item. |
| cdet_result CdCollisionDetection::CheckCollisions | ( | cdet_query & | ) |
Check collisions between geometric objects of the set.
| cdet_result CdCollisionDetection::CheckCollisions | ( | ) |
Check collisions between geometric objects of the set.
| cdet_setting_result CdCollisionDetection::SetToleranceDelta | ( | cdet_item | cqItem, |
| double | delta | ||
| ) |
Set the allowed deviation of the solid size inside or outside the shell.
| [in] | cqItem | - An scene instance as an object to check collisions with others. |
| [in] | delta | - The maximum deviation of a geometric object size from its nominal size. |
The delta value can be positive or negative, and defines the tolerance that affects the CheckCollisions result. A negative delta (delta < 0) defines the maximum interference depth with a solid to count a status "no collision". A positive delta (delta>0) defines the minimum distance to an object to count a status "no collision".
| cdet_item CdCollisionDetection::AddMesh | ( | const MbMesh & | mesh, |
| const MbPlacement3D & | place, | ||
| cdet_app_item | appItem = CDET_APP_NULL, |
||
| double | delta = 0. |
||
| ) |