Merge branch 'EmmeKappaErre-ConcaveMeshDebug'
This commit is contained in:
commit
a130308551
|
@ -115,6 +115,28 @@ void ConcaveMeshShape::getTriangleVerticesNormals(uint subPart, uint triangleInd
|
||||||
triangleVertexArray->getTriangleVerticesNormals(triangleIndex, outVerticesNormals);
|
triangleVertexArray->getTriangleVerticesNormals(triangleIndex, outVerticesNormals);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return the indices of the three vertices of a given triangle in the array
|
||||||
|
void ConcaveMeshShape::getTriangleVerticesIndices(uint subPart, uint triangleIndex, uint* outVerticesIndices) const {
|
||||||
|
|
||||||
|
// Get the triangle vertex array of the current sub-part
|
||||||
|
TriangleVertexArray* triangleVertexArray = mTriangleMesh->getSubpart(subPart);
|
||||||
|
|
||||||
|
// Get the vertices normals of the triangle
|
||||||
|
triangleVertexArray->getTriangleVerticesIndices(triangleIndex, outVerticesIndices);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return the number of sub parts contained in this mesh
|
||||||
|
uint ConcaveMeshShape::getNbSubparts() const
|
||||||
|
{
|
||||||
|
return mTriangleMesh->getNbSubparts();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return the number of triangles in a sub part of the mesh
|
||||||
|
uint ConcaveMeshShape::getNbTriangles(uint subPart) const
|
||||||
|
{
|
||||||
|
assert(mTriangleMesh->getSubpart(subPart));
|
||||||
|
return mTriangleMesh->getSubpart(subPart)->getNbTriangles();
|
||||||
|
}
|
||||||
|
|
||||||
// Use a callback method on all triangles of the concave shape inside a given AABB
|
// Use a callback method on all triangles of the concave shape inside a given AABB
|
||||||
void ConcaveMeshShape::testAllTriangles(TriangleCallback& callback, const AABB& localAABB) const {
|
void ConcaveMeshShape::testAllTriangles(TriangleCallback& callback, const AABB& localAABB) const {
|
||||||
|
|
|
@ -155,12 +155,6 @@ class ConcaveMeshShape : public ConcaveShape {
|
||||||
/// Insert all the triangles into the dynamic AABB tree
|
/// Insert all the triangles into the dynamic AABB tree
|
||||||
void initBVHTree();
|
void initBVHTree();
|
||||||
|
|
||||||
/// Return the three vertices coordinates (in the array outTriangleVertices) of a triangle
|
|
||||||
void getTriangleVertices(uint subPart, uint triangleIndex, Vector3* outTriangleVertices) const;
|
|
||||||
|
|
||||||
/// Return the three vertex normals (in the array outVerticesNormals) of a triangle
|
|
||||||
void getTriangleVerticesNormals(uint subPart, uint triangleIndex, Vector3* outVerticesNormals) const;
|
|
||||||
|
|
||||||
/// Compute the shape Id for a given triangle of the mesh
|
/// Compute the shape Id for a given triangle of the mesh
|
||||||
uint computeTriangleShapeId(uint subPart, uint triangleIndex) const;
|
uint computeTriangleShapeId(uint subPart, uint triangleIndex) const;
|
||||||
|
|
||||||
|
@ -170,7 +164,7 @@ class ConcaveMeshShape : public ConcaveShape {
|
||||||
ConcaveMeshShape(TriangleMesh* triangleMesh, const Vector3& scaling = Vector3(1, 1, 1));
|
ConcaveMeshShape(TriangleMesh* triangleMesh, const Vector3& scaling = Vector3(1, 1, 1));
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
virtual ~ConcaveMeshShape() = default;
|
virtual ~ConcaveMeshShape() override = default;
|
||||||
|
|
||||||
/// Deleted copy-constructor
|
/// Deleted copy-constructor
|
||||||
ConcaveMeshShape(const ConcaveMeshShape& shape) = delete;
|
ConcaveMeshShape(const ConcaveMeshShape& shape) = delete;
|
||||||
|
@ -181,6 +175,21 @@ class ConcaveMeshShape : public ConcaveShape {
|
||||||
/// Return the scaling vector
|
/// Return the scaling vector
|
||||||
const Vector3& getScaling() const;
|
const Vector3& getScaling() const;
|
||||||
|
|
||||||
|
/// Return the number of sub parts contained in this mesh
|
||||||
|
uint getNbSubparts() const;
|
||||||
|
|
||||||
|
/// Return the number of triangles in a sub part of the mesh
|
||||||
|
uint getNbTriangles(uint subPart) const;
|
||||||
|
|
||||||
|
/// Return the indices of the three vertices of a given triangle in the array
|
||||||
|
void getTriangleVerticesIndices(uint subPart, uint triangleIndex, uint* outVerticesIndices) const;
|
||||||
|
|
||||||
|
/// Return the three vertices coordinates (in the array outTriangleVertices) of a triangle
|
||||||
|
void getTriangleVertices(uint subPart, uint triangleIndex, Vector3* outTriangleVertices) const;
|
||||||
|
|
||||||
|
/// Return the three vertex normals (in the array outVerticesNormals) of a triangle
|
||||||
|
void getTriangleVerticesNormals(uint subPart, uint triangleIndex, Vector3* outVerticesNormals) const;
|
||||||
|
|
||||||
/// Return the local bounds of the shape in x, y and z directions.
|
/// Return the local bounds of the shape in x, y and z directions.
|
||||||
virtual void getLocalBounds(Vector3& min, Vector3& max) const override;
|
virtual void getLocalBounds(Vector3& min, Vector3& max) const override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user