Support dynamic piece meshes.

This commit is contained in:
leo
2016-02-19 17:53:54 +00:00
parent 55e7cd4bab
commit 510d190483
20 changed files with 296 additions and 264 deletions
+5 -7
View File
@@ -388,7 +388,7 @@ bool lcCamera::FileLoad(lcFile& file)
return true;
}
void lcCamera::CompareBoundingBox(float box[6])
void lcCamera::CompareBoundingBox(lcVector3& Min, lcVector3& Max)
{
const lcVector3 Points[2] =
{
@@ -399,12 +399,10 @@ void lcCamera::CompareBoundingBox(float box[6])
{
const lcVector3& Point = Points[i];
if (Point[0] < box[0]) box[0] = Point[0];
if (Point[1] < box[1]) box[1] = Point[1];
if (Point[2] < box[2]) box[2] = Point[2];
if (Point[0] > box[3]) box[3] = Point[0];
if (Point[1] > box[4]) box[4] = Point[1];
if (Point[2] > box[5]) box[5] = Point[2];
// TODO: this should check the entire mesh
Min = lcMin(Point, Min);
Max = lcMax(Point, Max);
}
}