Blender
V3.3
|
#include "btInternalEdgeUtility.h"
#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
#include "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h"
#include "BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h"
#include "BulletCollision/CollisionShapes/btTriangleShape.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
#include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h"
#include "LinearMath/btIDebugDraw.h"
#include "BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h"
Go to the source code of this file.
Classes | |
struct | btConnectivityProcessor |
struct | b3ProcessAllTrianglesHeightfield |
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'. More... | |
void | btGenerateInternalEdgeInfo (btHeightfieldTerrainShape *heightfieldShape, btTriangleInfoMap *triangleInfoMap) |
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 btCollisionObjectWrapper *colObj0Wrap, const btCollisionObjectWrapper *colObj1Wrap, int partId0, int index0, int normalAdjustFlags) |
Changes a btManifoldPoint collision normal to the normal from the mesh. More... | |
void btAdjustInternalEdgeContacts | ( | btManifoldPoint & | cp, |
const btCollisionObjectWrapper * | trimeshColObj0Wrap, | ||
const btCollisionObjectWrapper * | otherColObj1Wrap, | ||
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 486 of file btInternalEdgeUtility.cpp.
References blue, BT_LARGE_FLOAT, BT_TRIANGLE_CONCAVE_DOUBLE_SIDED, BT_TRIANGLE_CONVEX_BACKFACE_MODE, BT_TRIANGLE_CONVEX_DOUBLE_SIDED, btBvhTriangleMeshShape(), btClampNormal(), btFabs(), btGetHash(), btHeightfieldTerrainShape(), btNearestPointInLineSegment(), btScaledBvhTriangleMeshShape(), btTransform, btTriangleShape(), btVector3, color, btHashMap< Key, Value >::find(), getChildShape(), btCollisionObjectWrapper::getCollisionObject(), btCollisionObjectWrapper::getCollisionShape(), btManifoldPoint::getPositionWorldOnB(), btCollisionObjectWrapper::getWorldTransform(), green, hash, len, blender::math::length(), btTriangleInfoMap::m_convexEpsilon, btManifoldPoint::m_distance1, btTriangleInfo::m_edgeV0V1Angle, btTriangleInfo::m_edgeV1V2Angle, btTriangleInfo::m_edgeV2V0Angle, btTriangleInfo::m_flags, btManifoldPoint::m_localPointB, btTriangleInfoMap::m_maxEdgeAngleThreshold, btManifoldPoint::m_normalWorldOnB, btManifoldPoint::m_positionWorldOnA, btManifoldPoint::m_positionWorldOnB, quatRotate(), red, SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE, TERRAIN_SHAPE_PROXYTYPE, 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, TRIANGLE_MESH_SHAPE_PROXYTYPE, TRIANGLE_SHAPE_PROXYTYPE, v1, and v2.
bool btClampNormal | ( | const btVector3 & | edge, |
const btVector3 & | tri_normal_org, | ||
const btVector3 & | localContactNormalOnB, | ||
btScalar | correctedEdgeAngle, | ||
btVector3 & | clampedLocalNormal | ||
) |
Definition at line 452 of file btInternalEdgeUtility.cpp.
References btGetAngle(), btMatrix3x3, and btVector3.
Referenced by btAdjustInternalEdgeContacts().
void btGenerateInternalEdgeInfo | ( | btBvhTriangleMeshShape * | trimeshShape, |
btTriangleInfoMap * | triangleInfoMap | ||
) |
Call btGenerateInternalEdgeInfo to create triangle info, store in the shape 'userInfo'.
Definition at line 331 of file btInternalEdgeUtility.cpp.
References BT_LARGE_FLOAT, btAssert, btStridingMeshInterface, btVector3, btConnectivityProcessor::m_partIdA, btConnectivityProcessor::m_triangleIndexA, btConnectivityProcessor::m_triangleInfoMap, btConnectivityProcessor::m_triangleVerticesA, PHY_FLOAT, PHY_INTEGER, PHY_SHORT, PHY_UCHAR, stride, and type.
void btGenerateInternalEdgeInfo | ( | btHeightfieldTerrainShape * | heightfieldShape, |
btTriangleInfoMap * | triangleInfoMap | ||
) |
Definition at line 406 of file btInternalEdgeUtility.cpp.
References BT_LARGE_FLOAT, and btVector3.
|
static |
Definition at line 40 of file btInternalEdgeUtility.cpp.
References angle(), btAtan2(), and btVector3.
Referenced by btClampNormal(), and btConnectivityProcessor::processTriangle().
|
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 429 of file btInternalEdgeUtility.cpp.
References btVector3, blender::math::dot(), and point.
Referenced by btAdjustInternalEdgeContacts().