mirror of
https://github.com/minetest/irrlicht.git
synced 2025-01-12 19:00:31 +01:00
Simplify aabbox3d::getSideCenters
Unnecessary computations in my last version git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6592 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
ea9a001808
commit
c7dddff71c
@ -180,14 +180,13 @@ class aabbox3d
|
||||
void getSideCenters(vector3d<T> *corners) const
|
||||
{
|
||||
const core::vector3d<T> middle = getCenter();
|
||||
const core::vector3d<T> diag = middle - MaxEdge;
|
||||
|
||||
corners[0].set(middle.X + diag.X, middle.Y, middle.Z);
|
||||
corners[1].set(middle.X - diag.X, middle.Y, middle.Z);
|
||||
corners[2].set(middle.X, middle.Y + diag.Y, middle.Z);
|
||||
corners[3].set(middle.X, middle.Y - diag.Y, middle.Z);
|
||||
corners[4].set(middle.X, middle.Y, middle.Z + diag.Z);
|
||||
corners[5].set(middle.X, middle.Y, middle.Z - diag.Z);
|
||||
corners[0].set(MinEdge.X, middle.Y, middle.Z);
|
||||
corners[1].set(MaxEdge.X, middle.Y, middle.Z);
|
||||
corners[2].set(middle.X, MinEdge.Y, middle.Z);
|
||||
corners[3].set(middle.X, MaxEdge.Y, middle.Z);
|
||||
corners[4].set(middle.X, middle.Y, MinEdge.Z);
|
||||
corners[5].set(middle.X, middle.Y, MaxEdge.Z);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user