24#ifndef _SO_DUAL_SCENE_COLLIDER_
25#define _SO_DUAL_SCENE_COLLIDER_
203 {
return m_isMultiThread; }
302 void updateMovingScene();
303 void triangleListBuilt(
int num_triangles)
const;
304 void leafBuilt(
int num_triangles)
const;
305 SbBool isSensitiveObject(
const SoPath *object_path)
const;
308 bool isStopIntersectionSearchRequested()
const
309 {
return m_stopSearchingforIntersection; }
311 void setStopIntersectionSearchRequested(
bool value)
312 { m_stopSearchingforIntersection = value; }
315 int getMaxParallelDepth()
const
316 {
return m_maxparallelDepth; }
321 SoCmStaticScene *m_staticScene;
322 SoCmMovingScene *m_movingScene;
328 int m_trianglePerStaticLeaf;
329 int m_trianglePerMovingLeaf;
330 SbBool m_staticSceneBeingBuilt;
331 double m_minEdgeLength;
332 bool m_stopSearchingforIntersection;
333 bool m_isMultiThread;
334 int m_maxparallelDepth;
#define TRUE
Possible value of SbBool.
#define FALSE
Possible value of SbBool.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class to check f...
virtual SbBool isSensitiveStaticObject(const SoPath *object_path) const
Tells if an object of the static scene is sensitive to collision detection or not.
void setMovingScene(SoPath *object, int max_triangles_per_leaf=0)
Specifies the scene that will be moved or transformed.
virtual SbBool checkCollision() const
Checks if the current moving scene collides with the static scene.
bool isMultiThreadEnabled() const
Returns true if multithreaded computation is enabled.
virtual void movingTriangleListBuilt(int num_triangles) const
Method called by setMovingScene() when the list of triangles in the moving scene is built.
void setMinEdgeLength(double minEdgeLength)
Specifies the minimum length of a triangle edge.
virtual void movingLeafBuilt(int num_triangles) const
Method called by setMovingScene() when a new leaf is stored in the moving tree.
virtual SbBool searchNextIntersection() const
Method called by checkCollision() for each pair of intersecting triangles found.
void getCommonPoints(SbVec3f &p0, SbVec3f &p1) const
Returns the coordinates of the two common points of the current pair of intersecting triangles.
double getMinEdgeLength() const
Returns the minimum length of a triangle edge.
SoDualSceneCollider()
Default constructor.
virtual ~SoDualSceneCollider()
virtual void staticLeafBuilt(int num_triangles) const
Method called by setStaticScene() when a new leaf is stored in the static tree.
virtual SbBool isSensitiveMovingObject(const SoPath *object_path) const
Tells if an object of the moving scene is sensitive to collision detection or not.
virtual void staticTriangleListBuilt(int num_triangles) const
Method called by setStaticScene() when the list of triangles in the static scene is built.
void activate(SoTransform *transform)
Specifies the transformation that will be watched.
const SoPath * getCollidingMovingPath() const
Returns the path in the moving scene of the current colliding shape.
void getCollidingStaticTriangle(SbVec3f &v0, SbVec3f &v1, SbVec3f &v2) const
Returns the coordinates of the current colliding triangle in the static scene.
const SoPath * getCollidingStaticPath() const
Returns the path in the static scene of the current colliding shape.
void enableMultiThread(bool enable)
Use multiple threads to compute intersections.
void setStaticScene(SoPath *scene, int max_triangles_per_leaf=0)
Specifies the scene the moving scene is interacting with.
void getCollidingMovingTriangle(SbVec3f &v0, SbVec3f &v1, SbVec3f &v2) const
Returns the coordinates of the current colliding triangle in the moving scene.
Base class for all group nodes.
Abstract base class for all database nodes.
Sensor class that can be attached to Open Inventor nodes.
Path that points to a list of hierarchical nodes.