Blender V2.61 - r43446
|
#include "btInternalEdgeUtility.h"
#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
#include "BulletCollision/CollisionShapes/btTriangleShape.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
#include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h"
#include "LinearMath/btIDebugDraw.h"
Go to the source code of this file.
Classes | |
struct | btConnectivityProcessor |
Functions | |
static int | btGetHash (int partId, int triangleIndex) |
static btScalar | btGetAngle (const btVector3 &edgeA, const btVector3 &normalA, const btVector3 &normalB) |
void | btGenerateInternalEdgeInfo (btBvhTriangleMeshShape *trimeshShape, btTriangleInfoMap *triangleInfoMap) |
Call btGenerateInternalEdgeInfo to create triangle info, store in the shape 'userInfo'. | |
void | btNearestPointInLineSegment (const btVector3 &point, const btVector3 &line0, const btVector3 &line1, btVector3 &nearestPoint) |
bool | btClampNormal (const btVector3 &edge, const btVector3 &tri_normal_org, const btVector3 &localContactNormalOnB, btScalar correctedEdgeAngle, btVector3 &clampedLocalNormal) |
void | btAdjustInternalEdgeContacts (btManifoldPoint &cp, const btCollisionObject *colObj0, const btCollisionObject *colObj1, int partId0, int index0, int normalAdjustFlags) |
Changes a btManifoldPoint collision normal to the normal from the mesh. |
void btAdjustInternalEdgeContacts | ( | btManifoldPoint & | cp, |
const btCollisionObject * | trimeshColObj0, | ||
const btCollisionObject * | otherColObj1, | ||
int | partId0, | ||
int | index0, | ||
int | normalAdjustFlags = 0 |
||
) |
Changes a btManifoldPoint collision normal to the normal from the mesh.
Call the btFixMeshNormal to adjust the collision normal, using the triangle info map (generated using btGenerateInternalEdgeInfo) If this info map is missing, or the triangle is not store in this map, nothing will be done
Definition at line 453 of file btInternalEdgeUtility.cpp.
References BT_TRIANGLE_CONCAVE_DOUBLE_SIDED, BT_TRIANGLE_CONVEX_BACKFACE_MODE, BT_TRIANGLE_CONVEX_DOUBLE_SIDED, btClampNormal(), btGetHash(), btNearestPointInLineSegment(), MakeCursor::color, btHashMap< Key, Value >::find(), btTransform::getBasis(), btManifoldPoint::getPositionWorldOnB(), hash, len(), length(), btTriangleInfoMap::m_convexEpsilon, btManifoldPoint::m_distance1, btTriangleInfo::m_edgeV0V1Angle, btTriangleInfo::m_edgeV1V2Angle, btTriangleInfo::m_edgeV2V0Angle, btTriangleInfo::m_flags, btManifoldPoint::m_localPointB, btManifoldPoint::m_normalWorldOnB, btManifoldPoint::m_positionWorldOnA, btManifoldPoint::m_positionWorldOnB, quatRotate(), SIMD_2_PI, TRI_INFO_V0V1_CONVEX, TRI_INFO_V0V1_SWAP_NORMALB, TRI_INFO_V1V2_CONVEX, TRI_INFO_V1V2_SWAP_NORMALB, TRI_INFO_V2V0_CONVEX, TRI_INFO_V2V0_SWAP_NORMALB, and TRIANGLE_SHAPE_PROXYTYPE.
bool btClampNormal | ( | const btVector3 & | edge, |
const btVector3 & | tri_normal_org, | ||
const btVector3 & | localContactNormalOnB, | ||
btScalar | correctedEdgeAngle, | ||
btVector3 & | clampedLocalNormal | ||
) |
Definition at line 417 of file btInternalEdgeUtility.cpp.
References btGetAngle().
Referenced by btAdjustInternalEdgeContacts().
void btGenerateInternalEdgeInfo | ( | btBvhTriangleMeshShape * | trimeshShape, |
btTriangleInfoMap * | triangleInfoMap | ||
) |
Call btGenerateInternalEdgeInfo to create triangle info, store in the shape 'userInfo'.
Definition at line 315 of file btInternalEdgeUtility.cpp.
References BT_LARGE_FLOAT, btStridingMeshInterface::getLockedReadOnlyVertexIndexBase(), btStridingMeshInterface::getNumSubParts(), btStridingMeshInterface::getScaling(), btConnectivityProcessor::m_partIdA, btConnectivityProcessor::m_triangleIndexA, btConnectivityProcessor::m_triangleInfoMap, btConnectivityProcessor::m_triangleVerticesA, PHY_FLOAT, PHY_INTEGER, and PHY_SHORT.
static btScalar btGetAngle | ( | const btVector3 & | edgeA, |
const btVector3 & | normalA, | ||
const btVector3 & | normalB | ||
) | [static] |
Definition at line 42 of file btInternalEdgeUtility.cpp.
References angle(), and btAtan2().
Referenced by btClampNormal(), and btConnectivityProcessor::processTriangle().
static int btGetHash | ( | int | partId, |
int | triangleIndex | ||
) | [static] |
Definition at line 34 of file btInternalEdgeUtility.cpp.
References hash, and MAX_NUM_PARTS_IN_BITS.
Referenced by btAdjustInternalEdgeContacts(), and btConnectivityProcessor::processTriangle().
void btNearestPointInLineSegment | ( | const btVector3 & | point, |
const btVector3 & | line0, | ||
const btVector3 & | line1, | ||
btVector3 & | nearestPoint | ||
) |
Definition at line 391 of file btInternalEdgeUtility.cpp.
References dot().
Referenced by btAdjustInternalEdgeContacts().