8 #ifndef __SIM_Isect_h__
9 #define __SIM_Isect_h__
70 int primId,
int eid,
fpreal u)
74 result.
myPEU.myPrimitiveId = primId;
75 result.
myPEU.myEdgeId = eid;
83 result.
myPUV.myPrimitiveId = primid;
92 result.
myPt.myPointId = pointid;
99 simIsectInfoType
type)
100 : myObjectId(obj_id), myPosition(position),
119 myObjectInfoA(objectInfoA),
120 myObjectInfoB(objectInfoB)
126 int obj_a,
int obj_b)
136 return (myObjectInfoA.myType == simIsectInfo::PRIM_UV &&
137 myObjectInfoB.myType == simIsectInfo::POINT) ||
138 (myObjectInfoB.myType == simIsectInfo::PRIM_UV &&
139 myObjectInfoA.myType == simIsectInfo::POINT);
143 return myObjectInfoA.myType == simIsectInfo::PRIM_EDGE_U &&
144 myObjectInfoB.myType == simIsectInfo::PRIM_EDGE_U;
bool isFaceVertex() const
This class defines various types of collisions.
UT_Vector3 myNormal
Direction object A needs to move to resolve the intersection.
struct SIM_Isect::simIsectInfo::@611::@615 myPt
SIM_Isect(const UT_Vector3 &normal, fpreal64 depth, const SIM_Time &time, const simIsectInfo &objectInfoA, const simIsectInfo &objectInfoB)
GT_API const UT_StringHolder time
This class provides standard PriorityQueue Comparison for SIM_Isect Class.
static simIsectInfo makeEdgeU(int obj_id, const UT_Vector3 &position, int primId, int eid, fpreal u)
Named constructors.
GLboolean GLboolean GLboolean GLboolean a
**But if you need a result
UT_Vector3 myPosition
World-space position of deepest point of intersection.
SIM_Isect(const UT_Vector3 &position, const UT_Vector3 &normal, const SIM_Time &time, fpreal64 depth, int obj_a, int obj_b)
UT_PriorityQueue< SIM_Isect *, SIM_IsectCompare, false > SIM_IsectPriorityQueue
simIsectInfo myObjectInfoB
Information about the point of intersection on object B.
struct SIM_Isect::simIsectInfo::@611::@613 myPEU
static simIsectInfo makePrimUV(int obj_id, const UT_Vector3 &position, int primid, fpreal u, fpreal v)
Named constructors.
int myObjectId
ID of object involved in the collision.
GLboolean GLboolean GLboolean b
GLint GLint GLsizei GLsizei GLsizei depth
SIM_Time myTime
Time of intersection.
struct SIM_Isect::simIsectInfo::@611::@614 myPUV
UT_Array< SIM_Isect > SIM_IsectArray
static simIsectInfo makePoint(int obj_id, const UT_Vector3 &position, int pointid)
Named constructors.
SIM_API const UT_StringHolder position
static simIsectInfo makeNone(int obj_id, const UT_Vector3 &position)
Named constructors.
fpreal64 myDepth
Depth of the intersection. The value is expected to be negative.
bool operator()(const SIM_Isect *a, const SIM_Isect *b) const
simIsectInfo myObjectInfoA
Information about the point of intersection on object A.