Support dynamic piece meshes.
This commit is contained in:
+5
-7
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user