Game Development Reference
In-Depth Information
/** grabs the bounding box for the specified actor */
Actor.GetComponentsBoundingBox(CompBBox);
/** X1, Y1 */
BoundingBoxCoords[0].X = CompBBox.Min.X;
BoundingBoxCoords[0].Y = CompBBox.Min.Y;
BoundingBoxCoords[0].Z = CompBBox.Min.Z;
BoundingBoxCoords[0] =
Canvas.Project(BoundingBoxCoords[0]);
/** X2, Y1 */
BoundingBoxCoords[1].X = CompBBox.Max.X;
BoundingBoxCoords[1].Y = CompBBox.Min.Y;
BoundingBoxCoords[1].Z = CompBBox.Min.Z;
BoundingBoxCoords[1] =
Canvas.Project(BoundingBoxCoords[1]);
/** X1, Y2 */
BoundingBoxCoords[2].X = CompBBox.Min.X;
BoundingBoxCoords[2].Y = CompBBox.Max.Y;
BoundingBoxCoords[2].Z = CompBBox.Min.Z;
BoundingBoxCoords[2] =
Canvas.Project(BoundingBoxCoords[2]);
/** X2, Y2 */
BoundingBoxCoords[3].X = CompBBox.Max.X;
BoundingBoxCoords[3].Y = CompBBox.Max.Y;
BoundingBoxCoords[3].Z = CompBBox.Min.Z;
BoundingBoxCoords[3] =
Canvas.Project(BoundingBoxCoords[3]);
/**X1, Y1 */
BoundingBoxCoords[4].X = CompBBox.Min.X;
BoundingBoxCoords[4].Y = CompBBox.Min.Y;
BoundingBoxCoords[4].Z = CompBBox.Max.Z;
BoundingBoxCoords[4] =
Canvas.Project(BoundingBoxCoords[4]);
/** X2, Y1 */
BoundingBoxCoords[5].X = CompBBox.Max.X;
BoundingBoxCoords[5].Y = CompBBox.Min.Y;
BoundingBoxCoords[5].Z = CompBBox.Max.Z;
BoundingBoxCoords[5] =
Canvas.Project(BoundingBoxCoords[5]);
/** X1, Y2 */
BoundingBoxCoords[6].X = CompBBox.Min.X;
BoundingBoxCoords[6].Y = CompBBox.Max.Y;
BoundingBoxCoords[6].Z = CompBBox.Max.Z;
 
Search Nedrilad ::




Custom Search