Set AABB from center and radius
This commit is contained in:
parent
d81ee7b84a
commit
3b910491c3
@ -60,6 +60,20 @@ struct b3AABB3
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set this AABB from a center point and a radius vector.
|
||||||
|
void Set(const b3Vec3& center, const b3Vec3& r)
|
||||||
|
{
|
||||||
|
m_lower = center - r;
|
||||||
|
m_upper = center + r;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set this AABB from a center point and a radius value.
|
||||||
|
void Set(const b3Vec3& center, float32 radius)
|
||||||
|
{
|
||||||
|
b3Vec3 r(radius, radius, radius);
|
||||||
|
Set(center, r);
|
||||||
|
}
|
||||||
|
|
||||||
// Extend this AABB by a scalar.
|
// Extend this AABB by a scalar.
|
||||||
void Extend(float32 s)
|
void Extend(float32 s)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user