Modifications of pull request (move private methods to public)
This commit is contained in:
parent
e9ecbd5a61
commit
5b0227c5c5
@ -131,35 +131,13 @@ uint ConcaveMeshShape::getNbSubparts() const
|
|||||||
return mTriangleMesh->getNbSubparts();
|
return mTriangleMesh->getNbSubparts();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the number of triangles in a sub part
|
// Return the number of triangles in a sub part of the mesh
|
||||||
uint ConcaveMeshShape::getNbTriangles(uint subPart) const
|
uint ConcaveMeshShape::getNbTriangles(uint subPart) const
|
||||||
{
|
{
|
||||||
assert(mTriangleMesh->getSubpart(subPart));
|
assert(mTriangleMesh->getSubpart(subPart));
|
||||||
return mTriangleMesh->getSubpart(subPart)->getNbTriangles();
|
return mTriangleMesh->getSubpart(subPart)->getNbTriangles();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the triangle positions for a specific subpart and triangle index
|
|
||||||
void ConcaveMeshShape::getTriangleVertices(uint subPart, uint triangleIndex, Vector3* v1, Vector3* v2, Vector3* v3) const
|
|
||||||
{
|
|
||||||
assert(mTriangleMesh->getSubpart(subPart));
|
|
||||||
Vector3 outTriangleVertices[3];
|
|
||||||
getTriangleVertices(subPart, triangleIndex, &outTriangleVertices[0]);
|
|
||||||
*v1 = outTriangleVertices[0];
|
|
||||||
*v2 = outTriangleVertices[1];
|
|
||||||
*v3 = outTriangleVertices[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the triangle normals for a specific subpart and triangle index
|
|
||||||
void ConcaveMeshShape::getTriangleVerticesNormals(uint subPart, uint triangleIndex, Vector3* n1, Vector3* n2, Vector3* n3) const
|
|
||||||
{
|
|
||||||
assert(mTriangleMesh->getSubpart(subPart));
|
|
||||||
Vector3 outTriangleVerticesNormals[3];
|
|
||||||
getTriangleVerticesNormals(subPart, triangleIndex, &outTriangleVerticesNormals[0]);
|
|
||||||
*n1 = outTriangleVerticesNormals[0];
|
|
||||||
*n2 = outTriangleVerticesNormals[1];
|
|
||||||
*n3 = outTriangleVerticesNormals[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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,15 +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;
|
|
||||||
|
|
||||||
/// Return the indices of the three vertices of a given triangle in the array
|
|
||||||
void getTriangleVerticesIndices(uint subPart, uint triangleIndex, uint* outVerticesIndices) 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;
|
||||||
|
|
||||||
@ -173,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;
|
||||||
@ -187,14 +178,17 @@ class ConcaveMeshShape : public ConcaveShape {
|
|||||||
/// Return the number of sub parts contained in this mesh
|
/// Return the number of sub parts contained in this mesh
|
||||||
uint getNbSubparts() const;
|
uint getNbSubparts() const;
|
||||||
|
|
||||||
/// Return the number of triangles in a sub part
|
/// Return the number of triangles in a sub part of the mesh
|
||||||
uint getNbTriangles(uint subPart) const;
|
uint getNbTriangles(uint subPart) const;
|
||||||
|
|
||||||
/// Return the triangle positions for a specific subpart and triangle index
|
|
||||||
void getTriangleVertices(uint subPart, uint triangleIndex, Vector3* v1, Vector3* v2, Vector3* v3) const;
|
|
||||||
|
|
||||||
/// Return the triangle normals for a specific subpart and triangle index
|
/// Return the indices of the three vertices of a given triangle in the array
|
||||||
void getTriangleVerticesNormals(uint subPart, uint triangleIndex, Vector3* n1, Vector3* n2, Vector3* n3) const;
|
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