Page 1 of 1
Posted: Wed Sep 06, 2006 7:34 am
by Jack
1) I found that WORD (PHY_SHORT) indexes are not implemented in
void StridingMeshInterface::InternalProcessAllTriangles(InternalTriangleIndexCallback* callback,const SimdVector3& aabbMin,const SimdVector3& aabbMax) const
I noticed that you love OpenGL. I do not know index format for OpenGL, but in DirectX indexes are WORDs in most cases.
2) ConvexHullShape::ConvexHullShape(SimdPoint3* points,int numPoints)
It would be great if ConvexHullShape additionally accepts STRIDE.
For example, I have a concave model. I want to pass model vertex buffer directly to ConvexHullShape, but I can not do it because there is no STRIDE param. Instead I need to create intermediate SimdPoint3 buffer, copy vertexes, pass it to ConvexHullShape, delete SimdPoint3 buffer.

Posted: Wed Sep 06, 2006 6:09 pm
by Erwin Coumans
Thanks for the feedback! Feedback is good for improvements/development!
Jack wrote:1) I found that WORD (PHY_SHORT) indexes are not implemented in
void StridingMeshInterface::InternalProcessAllTriangles(InternalTriangleIndexCallback* callback,const SimdVector3& aabbMin,const SimdVector3& aabbMax) const
I noticed that you love OpenGL. I do not know index format for OpenGL, but in DirectX indexes are WORDs in most cases.
I'll check it out and add a feature request for WORD/short indices.
2) ConvexHullShape::ConvexHullShape(SimdPoint3* points,int numPoints)
It would be great if ConvexHullShape additionally accepts STRIDE.
For example, I have a concave model. I want to pass model vertex buffer directly to ConvexHullShape, but I can not do it because there is no STRIDE param. Instead I need to create intermediate SimdPoint3 buffer, copy vertexes, pass it to ConvexHullShape, delete SimdPoint3 buffer.

It is possible to use ConvexTriangleMeshShape, that takes a striding interface. For performance, a duplicate is probably better.
Would an additional constructor in ConvexHullShape (making a copy) useful for you? I'll add a second feature request.
Erwin
Posted: Thu Sep 07, 2006 12:45 pm
by Jack
Erwin Coumans wrote:Thanks for the feedback! Feedback is good for improvements/development!
It is possible to use ConvexTriangleMeshShape, that takes a striding interface. For performance, a duplicate is probably better.
But if the model is concave? What will be if I pass cancave mesh to the ConvexTriangleMeshShape?
Erwin Coumans wrote:
Would an additional constructor in ConvexHullShape (making a copy) useful for you? I'll add a second feature request.
You copy it into internal buffer in any case:
ConvexHullShape ::ConvexHullShape (SimdPoint3* points,int numPoints)
{
m_points.resize(numPoints);
for (int i=0;i<numPoints;i++)
m_points
= points;
}
So, I think additional constructor is not necessary. Just third param with default value: Stride=sizeof(SimdPoint3).
Posted: Thu Sep 07, 2006 2:14 pm
by Jack
Continue with minor issues.
In "Memeory2.h". Correct new/delete overrides must be:
void*
__cdecl operator new(size_t sz) throw();
void*
__cdecl operator new[](size_t sz) throw();
void
__cdecl operator delete(void* m) throw();
void
__cdecl operator delete[](void* m) throw();
__cdecl is important if you compile Bullet with non-cdecl default calling convention. Otherwise there are compilation errors...