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.
Request for better Striding support (WORD/ConvexHullShape)
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Thanks for the feedback! Feedback is good for improvements/development!
Would an additional constructor in ConvexHullShape (making a copy) useful for you? I'll add a second feature request.
Erwin
I'll check it out and add a feature request for WORD/short indices.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.
It is possible to use ConvexTriangleMeshShape, that takes a striding interface. For performance, a duplicate is probably better.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.
Would an additional constructor in ConvexHullShape (making a copy) useful for you? I'll add a second feature request.
Erwin
-
- Posts: 59
- Joined: Thu Aug 31, 2006 11:51 am
But if the model is concave? What will be if I pass cancave mesh to the ConvexTriangleMeshShape?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.
You copy it into internal buffer in any case:Erwin Coumans wrote: Would an additional constructor in ConvexHullShape (making a copy) useful for you? I'll add a second feature request.
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).
-
- Posts: 59
- Joined: Thu Aug 31, 2006 11:51 am
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...
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...