mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 18:16:45 +02:00
remove excess whitespace
This commit is contained in:
parent
dbfea6ec82
commit
a52ac3cc50
2 changed files with 11 additions and 11 deletions
|
@ -63,7 +63,7 @@ public:
|
||||||
void appendToPoints (const QVector<glm::vec3>& newPoints) { _points << newPoints; }
|
void appendToPoints (const QVector<glm::vec3>& newPoints) { _points << newPoints; }
|
||||||
|
|
||||||
float computeVolume() const;
|
float computeVolume() const;
|
||||||
|
|
||||||
/// Returns whether point is inside the shape
|
/// Returns whether point is inside the shape
|
||||||
/// For compound shapes it will only return whether it is inside the bounding box
|
/// For compound shapes it will only return whether it is inside the bounding box
|
||||||
bool contains(const glm::vec3& point) const;
|
bool contains(const glm::vec3& point) const;
|
||||||
|
|
|
@ -33,7 +33,7 @@ void MeshMassPropertiesTests::testParallelAxisTheorem() {
|
||||||
// verity we can compute the inertia tensor of a box in two different ways:
|
// verity we can compute the inertia tensor of a box in two different ways:
|
||||||
// (a) as one box
|
// (a) as one box
|
||||||
// (b) as a combination of two partial boxes.
|
// (b) as a combination of two partial boxes.
|
||||||
|
|
||||||
btScalar bigBoxX = 7.0f;
|
btScalar bigBoxX = 7.0f;
|
||||||
btScalar bigBoxY = 9.0f;
|
btScalar bigBoxY = 9.0f;
|
||||||
btScalar bigBoxZ = 11.0f;
|
btScalar bigBoxZ = 11.0f;
|
||||||
|
@ -62,9 +62,9 @@ void MeshMassPropertiesTests::testParallelAxisTheorem() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MeshMassPropertiesTests::testTetrahedron(){
|
void MeshMassPropertiesTests::testTetrahedron(){
|
||||||
// given the four vertices of a tetrahedron verify the analytic formula for inertia
|
// given the four vertices of a tetrahedron verify the analytic formula for inertia
|
||||||
// agrees with expected results
|
// agrees with expected results
|
||||||
|
|
||||||
// these numbers from the Tonon paper:
|
// these numbers from the Tonon paper:
|
||||||
btVector3 points[4];
|
btVector3 points[4];
|
||||||
points[0] = btVector3(8.33220f, -11.86875f, 0.93355f);
|
points[0] = btVector3(8.33220f, -11.86875f, 0.93355f);
|
||||||
|
@ -102,14 +102,14 @@ void MeshMassPropertiesTests::testTetrahedron(){
|
||||||
}
|
}
|
||||||
btMatrix3x3 inertia;
|
btMatrix3x3 inertia;
|
||||||
computeTetrahedronInertia(volume, points, inertia);
|
computeTetrahedronInertia(volume, points, inertia);
|
||||||
|
|
||||||
QCOMPARE_WITH_ABS_ERROR(volume, expectedVolume, acceptableRelativeError * volume);
|
QCOMPARE_WITH_ABS_ERROR(volume, expectedVolume, acceptableRelativeError * volume);
|
||||||
|
|
||||||
QCOMPARE_WITH_RELATIVE_ERROR(inertia, expectedInertia, acceptableRelativeError);
|
QCOMPARE_WITH_RELATIVE_ERROR(inertia, expectedInertia, acceptableRelativeError);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MeshMassPropertiesTests::testOpenTetrahedonMesh() {
|
void MeshMassPropertiesTests::testOpenTetrahedonMesh() {
|
||||||
// given the simplest possible mesh (open, with one triangle)
|
// given the simplest possible mesh (open, with one triangle)
|
||||||
// verify MeshMassProperties computes the right nubers
|
// verify MeshMassProperties computes the right nubers
|
||||||
|
|
||||||
// these numbers from the Tonon paper:
|
// these numbers from the Tonon paper:
|
||||||
|
@ -155,7 +155,7 @@ void MeshMassPropertiesTests::testOpenTetrahedonMesh() {
|
||||||
void MeshMassPropertiesTests::testClosedTetrahedronMesh() {
|
void MeshMassPropertiesTests::testClosedTetrahedronMesh() {
|
||||||
// given a tetrahedron as a closed mesh of four tiangles
|
// given a tetrahedron as a closed mesh of four tiangles
|
||||||
// verify MeshMassProperties computes the right nubers
|
// verify MeshMassProperties computes the right nubers
|
||||||
|
|
||||||
// these numbers from the Tonon paper:
|
// these numbers from the Tonon paper:
|
||||||
VectorOfPoints points;
|
VectorOfPoints points;
|
||||||
points.push_back(btVector3(8.33220f, -11.86875f, 0.93355f));
|
points.push_back(btVector3(8.33220f, -11.86875f, 0.93355f));
|
||||||
|
@ -186,7 +186,7 @@ void MeshMassPropertiesTests::testClosedTetrahedronMesh() {
|
||||||
|
|
||||||
// compute mass properties
|
// compute mass properties
|
||||||
MeshMassProperties mesh(points, triangles);
|
MeshMassProperties mesh(points, triangles);
|
||||||
|
|
||||||
// verify
|
// verify
|
||||||
QCOMPARE_WITH_ABS_ERROR(mesh._volume, expectedVolume, acceptableRelativeError * expectedVolume);
|
QCOMPARE_WITH_ABS_ERROR(mesh._volume, expectedVolume, acceptableRelativeError * expectedVolume);
|
||||||
QCOMPARE_WITH_ABS_ERROR(mesh._centerOfMass, expectedCenterOfMass, acceptableAbsoluteError);
|
QCOMPARE_WITH_ABS_ERROR(mesh._centerOfMass, expectedCenterOfMass, acceptableAbsoluteError);
|
||||||
|
@ -210,7 +210,7 @@ void MeshMassPropertiesTests::testClosedTetrahedronMesh() {
|
||||||
|
|
||||||
void MeshMassPropertiesTests::testBoxAsMesh() {
|
void MeshMassPropertiesTests::testBoxAsMesh() {
|
||||||
// verify that a mesh box produces the same mass properties as the analytic box.
|
// verify that a mesh box produces the same mass properties as the analytic box.
|
||||||
|
|
||||||
// build a box:
|
// build a box:
|
||||||
// /
|
// /
|
||||||
// y
|
// y
|
||||||
|
@ -265,7 +265,7 @@ void MeshMassPropertiesTests::testBoxAsMesh() {
|
||||||
MeshMassProperties mesh(points, triangles);
|
MeshMassProperties mesh(points, triangles);
|
||||||
|
|
||||||
// verify
|
// verify
|
||||||
|
|
||||||
QCOMPARE_WITH_ABS_ERROR(mesh._volume, expectedVolume, acceptableRelativeError * expectedVolume);
|
QCOMPARE_WITH_ABS_ERROR(mesh._volume, expectedVolume, acceptableRelativeError * expectedVolume);
|
||||||
QCOMPARE_WITH_ABS_ERROR(mesh._centerOfMass, expectedCenterOfMass, acceptableAbsoluteError);
|
QCOMPARE_WITH_ABS_ERROR(mesh._centerOfMass, expectedCenterOfMass, acceptableAbsoluteError);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue