C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Utility for calculation of intersection and proximity parameters of solids. More...
#include <cdet_utility.h>
Public Member Functions | |
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 | AddMesh (const MbMesh &mesh, const MbPlacement3D &place, cdet_app_item appItem=CDET_APP_NULL, double gap=0.) |
Add a poligonal object with given 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... | |
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. | |
cdet_item | AddSolid (const MbSolid &, const MbPlacement3D &, cdet_app_item=CDET_APP_NULL, double gap=0.) |
Add a solid with a given placement. | |
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 (MbProximityParameters &) const |
Calculation of minimal distance between objects (see the function SetDistanceTracking) | |
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. | |
Utility for calculation of intersection and proximity parameters of solids.
Provides facilities of The Collision Detection to interact with the CAD application.
cdet_item MbCollisionDetectionUtility::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 MbCollisionDetectionUtility::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 MbCollisionDetectionUtility::AddMesh | ( | const MbMesh & | mesh, |
const MbPlacement3D & | place, | ||
cdet_app_item | appItem = CDET_APP_NULL , |
||
double | gap = 0. |
||
) |
Add a poligonal object with given placement to the collision detection set.
cdet_item MbCollisionDetectionUtility::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 MbCollisionDetectionUtility::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 #AddSolid by witch the instance is made. |
[in] | place | - The placement that the instance solid takes in global space. |
cdet_result MbCollisionDetectionUtility::CheckCollisions | ( | cdet_query & | ) |
Check collisions between geometric objects of the set.