Blender  V3.3
Enumerations | Functions
btInternalEdgeUtility.h File Reference
#include "LinearMath/btHashMap.h"
#include "LinearMath/btVector3.h"
#include "BulletCollision/CollisionShapes/btTriangleInfoMap.h"

Go to the source code of this file.

Enumerations

enum  btInternalEdgeAdjustFlags { BT_TRIANGLE_CONVEX_BACKFACE_MODE = 1 , BT_TRIANGLE_CONCAVE_DOUBLE_SIDED = 2 , BT_TRIANGLE_CONVEX_DOUBLE_SIDED = 4 }
 

Functions

void btGenerateInternalEdgeInfo (btBvhTriangleMeshShape *trimeshShape, btTriangleInfoMap *triangleInfoMap)
 Call btGenerateInternalEdgeInfo to create triangle info, store in the shape 'userInfo'. More...
 
void btGenerateInternalEdgeInfo (btHeightfieldTerrainShape *trimeshShape, btTriangleInfoMap *triangleInfoMap)
 
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. More...
 

Enumeration Type Documentation

◆ btInternalEdgeAdjustFlags

Enumerator
BT_TRIANGLE_CONVEX_BACKFACE_MODE 
BT_TRIANGLE_CONCAVE_DOUBLE_SIDED 
BT_TRIANGLE_CONVEX_DOUBLE_SIDED 

Definition at line 20 of file btInternalEdgeUtility.h.

Function Documentation

◆ btAdjustInternalEdgeContacts()

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.

◆ btGenerateInternalEdgeInfo() [1/2]

void btGenerateInternalEdgeInfo ( btBvhTriangleMeshShape trimeshShape,
btTriangleInfoMap triangleInfoMap 
)

◆ btGenerateInternalEdgeInfo() [2/2]

void btGenerateInternalEdgeInfo ( btHeightfieldTerrainShape trimeshShape,
btTriangleInfoMap triangleInfoMap 
)

Definition at line 406 of file btInternalEdgeUtility.cpp.

References BT_LARGE_FLOAT, and btVector3.