23btConvexPolyhedron::btConvexPolyhedron()
26btConvexPolyhedron::~btConvexPolyhedron()
53 return m_v0 == other.m_v0 &&
m_v1 == other.m_v1;
70#ifdef TEST_INTERNAL_OBJECTS
71bool btConvexPolyhedron::testContainment()
const
73 for (
int p = 0; p < 8; p++)
93 for (
int i = 0; i <
m_faces.size(); i++)
105void btConvexPolyhedron::initialize()
109 for (
int i = 0; i <
m_faces.size(); i++)
113 for (
int j = 0; j < NbTris; j++)
148 edges.insert(vp, ed);
153#ifdef USE_CONNECTED_FACES
154 for (
int i = 0; i <
m_faces.size(); i++)
168 int connectedFace = (edptr->
m_face0 == i) ? edptr->
m_face1 : edptr->m_face0;
169 m_faces[i].m_connectedFaces[j] = connectedFace;
177void btConvexPolyhedron::initialize2()
181 for (
int i = 0; i <
m_faces.size(); i++)
187 for (
int j = 1; j <= NbTris; j++)
193 btVector3
Center = (p0 + p1 + p2) / 3.0f;
200#ifdef TEST_INTERNAL_OBJECTS
204 for (
int i = 0; i <
m_faces.size(); i++)
221 if (pt.x() < MinX) MinX = pt.x();
222 if (pt.x() > MaxX) MaxX = pt.x();
223 if (pt.y() < MinY) MinY = pt.y();
224 if (pt.y() > MaxY) MaxY = pt.y();
225 if (pt.z() < MinZ) MinZ = pt.z();
226 if (pt.z() > MaxZ) MaxZ = pt.z();
228 mC.setValue(MaxX + MinX, MaxY + MinY, MaxZ + MinZ);
229 mE.setValue(MaxX - MinX, MaxY - MinY, MaxZ - MinZ);
233 const int LargestExtent =
mE.maxAxis();
234 const btScalar Step = (
mE[LargestExtent] * 0.5f - r) / 1024.0f;
236 m_extents[LargestExtent] =
mE[LargestExtent] * 0.5f;
237 bool FoundBox =
false;
238 for (
int j = 0; j < 1024; j++)
256 const int e0 = (1 << LargestExtent) & 3;
257 const int e1 = (1 << e0) & 3;
259 for (
int j = 0; j < 1024; j++)
277void btConvexPolyhedron::project(
const btTransform& trans,
const btVector3& dir,
btScalar& minProj,
btScalar& maxProj, btVector3& witnesPtMin, btVector3& witnesPtMax)
const
282 for (
int i = 0; i < numVerts; i++)
297 if (minProj > maxProj)
300 btSwap(witnesPtMin, witnesPtMax);
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Normal
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
bool IsAlmostZero1(const btVector3 &v)
bool testContainment() const
btAlignedObjectArray< btFace > m_faces
btAlignedObjectArray< btVector3 > m_uniqueEdges
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
SIMD_FORCE_INLINE btScalar btFabs(btScalar x)
SIMD_FORCE_INLINE void btSwap(T &a, T &b)
btAlignedObjectArray< unsigned int > m_indices
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
SIMD_FORCE_INLINE int size() const
return the number of elements in the array
SIMD_FORCE_INLINE void push_back(const T &_Val)
ccl_device_inline float cross(const float2 a, const float2 b)
btInternalVertexPair(short int v0, short int v1)
bool equals(const btInternalVertexPair &other) const