28 m_useQuantizedAabbCompression(useQuantizedAabbCompression),
48 m_useQuantizedAabbCompression(useQuantizedAabbCompression),
106 virtual void processNode(
int nodeSubPart,
int nodeTriangleIndex)
109 const unsigned char *vertexbase;
113 const unsigned char *indexbase;
129 unsigned int* gfxbase = (
unsigned int*)(indexbase+nodeTriangleIndex*indexstride);
133 for (
int j=2;j>=0;j--)
135 int graphicsindex = indicestype==
PHY_SHORT?((
unsigned short*)gfxbase)[j]:gfxbase[j];
139 float* graphicsbase = (
float*)(vertexbase+graphicsindex*stride);
141 m_triangle[j] =
btVector3(graphicsbase[0]*meshScaling.
getX(),graphicsbase[1]*meshScaling.
getY(),graphicsbase[2]*meshScaling.
getZ());
145 double* graphicsbase = (
double*)(vertexbase+graphicsindex*stride);
152 m_callback->processTriangle(m_triangle,nodeSubPart,nodeTriangleIndex);
175 virtual void processNode(
int nodeSubPart,
int nodeTriangleIndex)
178 const unsigned char *vertexbase;
182 const unsigned char *indexbase;
198 unsigned int* gfxbase = (
unsigned int*)(indexbase+nodeTriangleIndex*indexstride);
202 for (
int j=2;j>=0;j--)
204 int graphicsindex = indicestype==
PHY_SHORT?((
unsigned short*)gfxbase)[j]:gfxbase[j];
208 float* graphicsbase = (
float*)(vertexbase+graphicsindex*stride);
210 m_triangle[j] =
btVector3(graphicsbase[0]*meshScaling.
getX(),graphicsbase[1]*meshScaling.
getY(),graphicsbase[2]*meshScaling.
getZ());
214 double* graphicsbase = (
double*)(vertexbase+graphicsindex*stride);
221 m_callback->processTriangle(m_triangle,nodeSubPart,nodeTriangleIndex);
256 virtual void processNode(
int nodeSubPart,
int nodeTriangleIndex)
258 const unsigned char *vertexbase;
262 const unsigned char *indexbase;
279 unsigned int* gfxbase = (
unsigned int*)(indexbase+nodeTriangleIndex*indexstride);
283 for (
int j=2;j>=0;j--)
286 int graphicsindex = indicestype==
PHY_SHORT?((
unsigned short*)gfxbase)[j]:indicestype==
PHY_INTEGER?gfxbase[j]:((
unsigned char*)gfxbase)[j];
289 #ifdef DEBUG_TRIANGLE_MESH
290 printf(
"%d ,",graphicsindex);
291 #endif //DEBUG_TRIANGLE_MESH
294 float* graphicsbase = (
float*)(vertexbase+graphicsindex*stride);
297 graphicsbase[0]*meshScaling.
getX(),
298 graphicsbase[1]*meshScaling.
getY(),
299 graphicsbase[2]*meshScaling.
getZ());
303 double* graphicsbase = (
double*)(vertexbase+graphicsindex*stride);
310 #ifdef DEBUG_TRIANGLE_MESH
311 printf(
"triangle vertices:%f,%f,%f\n",triangle[j].x(),triangle[j].y(),triangle[j].z());
312 #endif //DEBUG_TRIANGLE_MESH
315 m_callback->processTriangle(m_triangle,nodeSubPart,nodeTriangleIndex);
389 #ifdef BT_USE_DOUBLE_PRECISION
395 #endif //BT_USE_DOUBLE_PRECISION
399 #ifdef BT_USE_DOUBLE_PRECISION
405 #endif //BT_USE_DOUBLE_PRECISION
439 return "btTriangleMeshShapeData";