mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 01:00:50 +02:00
remove warnings about unused variables
and remind us to impelement unit test for tetrahedron mass props
This commit is contained in:
parent
6bd857c4ea
commit
d1b977ec9e
1 changed files with 6 additions and 4 deletions
|
@ -104,15 +104,16 @@ void MeshInfoTests::testWithTetrahedronAsMesh(){
|
||||||
glm::vec3 p2(52.61236, 5.00000, -5.38580);
|
glm::vec3 p2(52.61236, 5.00000, -5.38580);
|
||||||
glm::vec3 p3(2.00000, 5.00000, 3.00000);
|
glm::vec3 p3(2.00000, 5.00000, 3.00000);
|
||||||
glm::vec3 centroid(15.92492, 0.782813, 3.72962);
|
glm::vec3 centroid(15.92492, 0.782813, 3.72962);
|
||||||
float volume = 1873.233236f;
|
/* TODO: actually test inertia/volume calculations here
|
||||||
float inertia_a = 43520.33257f;
|
//float volume = 1873.233236f;
|
||||||
//actual should be 194711.28938f. But for some reason it becomes 194711.296875 during
|
|
||||||
//runtime due to how floating points are stored.
|
//runtime due to how floating points are stored.
|
||||||
|
float inertia_a = 43520.33257f;
|
||||||
float inertia_b = 194711.289f;
|
float inertia_b = 194711.289f;
|
||||||
float inertia_c = 191168.76173f;
|
float inertia_c = 191168.76173f;
|
||||||
float inertia_aa = 4417.66150f;
|
float inertia_aa = 4417.66150f;
|
||||||
float inertia_bb = -46343.16662f;
|
float inertia_bb = -46343.16662f;
|
||||||
float inertia_cc = 11996.20119f;
|
float inertia_cc = 11996.20119f;
|
||||||
|
*/
|
||||||
std::cout << std::setprecision(12);
|
std::cout << std::setprecision(12);
|
||||||
vector<glm::vec3> vertices = { p0, p1, p2, p3 };
|
vector<glm::vec3> vertices = { p0, p1, p2, p3 };
|
||||||
vector<int> triangles = { 0, 2, 1, 0, 3, 2, 0, 1, 3, 1, 2, 3 };
|
vector<int> triangles = { 0, 2, 1, 0, 3, 2, 0, 1, 3, 1, 2, 3 };
|
||||||
|
@ -129,6 +130,7 @@ void MeshInfoTests::testWithTetrahedronAsMesh(){
|
||||||
p2 -= centroid;
|
p2 -= centroid;
|
||||||
p3 -= centroid;
|
p3 -= centroid;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MeshInfoTests::testWithCube(){
|
void MeshInfoTests::testWithCube(){
|
||||||
glm::vec3 p0(1.0, -1.0, -1.0);
|
glm::vec3 p0(1.0, -1.0, -1.0);
|
||||||
glm::vec3 p1(1.0, -1.0, 1.0);
|
glm::vec3 p1(1.0, -1.0, 1.0);
|
||||||
|
@ -232,4 +234,4 @@ void MeshInfoTests::runAllTests(){
|
||||||
testWithTetrahedronAsMesh();
|
testWithTetrahedronAsMesh();
|
||||||
testWithUnitCube();
|
testWithUnitCube();
|
||||||
testWithCube();
|
testWithCube();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue