16#if defined(_WIN32) || defined(__i386__)
17#define BT_USE_SSE_IN_API
31 m_unscaledPoints.resize(numPoints);
33 unsigned char* pointsAddress = (
unsigned char*)points;
35 for (
int i = 0; i < numPoints; i++)
39 pointsAddress += stride;
45void btConvexHullShape::setLocalScaling(
const btVector3& scaling)
53 m_unscaledPoints.push_back(
point);
58btVector3 btConvexHullShape::localGetSupportingVertexWithoutMargin(
const btVector3& vec)
const
64 if (0 < m_unscaledPoints.size())
74void btConvexHullShape::batchedUnitVectorGetSupportingVertexWithoutMargin(
const btVector3* vectors,
btVector3* supportVerticesOut,
int numVectors)
const
79 for (
int i = 0; i < numVectors; i++)
85 for (
int j = 0; j < numVectors; j++)
88 if (0 < m_unscaledPoints.size())
90 int i = (
int)vec.maxDot(&m_unscaledPoints[0], m_unscaledPoints.size(), newDot);
92 supportVerticesOut[j][3] = newDot;
116void btConvexHullShape::optimizeConvexHull()
119 conv.compute(&m_unscaledPoints[0].
getX(),
sizeof(
btVector3), m_unscaledPoints.size(), 0.f, 0.f);
121 m_unscaledPoints.resize(0);
122 for (
int i = 0; i < numVerts; i++)
124 m_unscaledPoints.push_back(conv.
vertices[i]);
130int btConvexHullShape::getNumVertices()
const
132 return m_unscaledPoints.size();
135int btConvexHullShape::getNumEdges()
const
137 return m_unscaledPoints.size();
142 int index0 = i % m_unscaledPoints.size();
143 int index1 = (i + 1) % m_unscaledPoints.size();
148void btConvexHullShape::getVertex(
int i,
btVector3& vtx)
const
153int btConvexHullShape::getNumPlanes()
const
171const char* btConvexHullShape::serialize(
void* dataBuffer,
btSerializer* serializer)
const
177 int numElem = m_unscaledPoints.size();
179#ifdef BT_USE_DOUBLE_PRECISION
194 for (
int i = 0; i < numElem; i++, memPtr++)
196 m_unscaledPoints[i].serialize(*memPtr);
204 return "btConvexHullShapeData";
213 int numVerts = m_unscaledPoints.size();
214 for (
int i = 0; i < numVerts; i++)
231 btVector3 localAxis = dir * trans.getBasis();
235 minProj = witnesPtMin.dot(dir);
236 maxProj = witnesPtMax.dot(dir);
239 if (minProj > maxProj)
242 btSwap(witnesPtMin, witnesPtMax);
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
SIMD_FORCE_INLINE btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &vec) const
btConvexShape Interface
virtual btVector3 localGetSupportingVertex(const btVector3 &vec) const
@ CONVEX_HULL_SHAPE_PROXYTYPE
virtual btScalar getMargin() const =0
virtual void recalculateLocalAabb()
SIMD_FORCE_INLINE btVector3 getScaledPoint(int i) const
btMatrix3x3 scaled(const btVector3 &s) const
Create a scaled copy of the matrix.
SIMD_FORCE_INLINE const btScalar & getX() const
Return the x value.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
SIMD_FORCE_INLINE void btSwap(T &a, T &b)
#define btVector3DataName
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 long maxDot(const btVector3 *array, long array_count, btScalar &dotOut) const
returns index of maximum dot product between this and vectors in array[]
SIMD_FORCE_INLINE int size() const
return the number of elements in the array
btAlignedObjectArray< btVector3 > vertices
The btPolyhedralConvexAabbCachingShape adds aabb caching to the btPolyhedralConvexShape.
virtual btChunk * allocate(size_t size, int numElements)=0
virtual void * getUniquePointer(void *oldPtr)=0
virtual void finalizeChunk(btChunk *chunk, const char *structType, int chunkCode, void *oldPtr)=0
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
btVector3DoubleData * m_unscaledPointsDoublePtr
btVector3FloatData * m_unscaledPointsFloatPtr
btConvexInternalShapeData m_convexInternalShapeData