add support for premade aabb in btStridingMeshInterface/btBvhTriangleMeshShape,
Thanks Roy Eltham, http://code.google.com/p/bullet/issues/detail?id=70
This commit is contained in:
@@ -51,14 +51,16 @@ ATTRIBUTE_ALIGNED16( class) btTriangleIndexVertexArray : public btStridingMeshIn
|
||||
{
|
||||
protected:
|
||||
IndexedMeshArray m_indexedMeshes;
|
||||
int m_pad[3];
|
||||
int m_pad[2];
|
||||
int m_hasAabb; // using int instead of bool to maintain alignment
|
||||
btVector3 m_aabbMin;
|
||||
btVector3 m_aabbMax;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||
|
||||
btTriangleIndexVertexArray()
|
||||
btTriangleIndexVertexArray() : m_hasAabb(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -103,6 +105,10 @@ public:
|
||||
virtual void preallocateVertices(int numverts){(void) numverts;}
|
||||
virtual void preallocateIndices(int numindices){(void) numindices;}
|
||||
|
||||
virtual bool hasPremadeAabb() const;
|
||||
virtual void setPremadeAabb(const btVector3& aabbMin, const btVector3& aabbMax );
|
||||
virtual void getPremadeAabb(btVector3* aabbMin, btVector3* aabbMax ) const;
|
||||
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user