diff --git a/r5dev/vphysics/physics_collide.cpp b/r5dev/vphysics/physics_collide.cpp index be0afa4c..bf51eb19 100644 --- a/r5dev/vphysics/physics_collide.cpp +++ b/r5dev/vphysics/physics_collide.cpp @@ -9,42 +9,3 @@ #include "mathlib/mathlib.h" //----------------------------------------------------------------------------- -// Purpose: Calculate the volume of a tetrahedron with these vertices -// Input : p0 - points of tetrahedron -// p1 - -// p2 - -// p3 - -// Output : float (volume in units^3) -//----------------------------------------------------------------------------- -static float TetrahedronVolume(const Vector3D& p0, const Vector3D& p1, const Vector3D& p2, const Vector3D& p3) -{ - Vector3D a, b, c, cross; - float volume = 1.0f / 6.0f; - - a = p1 - p0; - b = p2 - p0; - c = p3 - p0; - cross = CrossProduct(b, c); - - volume *= DotProduct(a, cross); - if (volume < 0) - return -volume; - return volume; -} - -//----------------------------------------------------------------------------- -// Purpose: Calculate a triangle area with these vertices -// Input : p0 - points of tetrahedron -// p1 - -// p2 - -// Output : float (area) -//----------------------------------------------------------------------------- -static float TriangleArea(const Vector3D& p0, const Vector3D& p1, const Vector3D& p2) -{ - Vector3D e0 = p1 - p0; - Vector3D e1 = p2 - p0; - Vector3D cross; - - CrossProduct(e0, e1, cross); - return 0.5f * cross.Length(); -}