Advertisement

How to get extents of a geometry?

Started by December 04, 2020 01:18 AM
1 comment, last by Endurion 4 years, 2 months ago

I am trying to setup an Axes Aligned Bounding Box and the class Aabb has the following function.

void Ogre::Aabb::setExtents(const Vector3& min, const Vector3& max);

What I'd like to understand is, given a geometry that I read in, how would I calculate the extents of the geometry so that I can call this function?

Run through every vertex of your object and find the minimum and maximum position. E.g. smallest x,y,z and highest x,y,z.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

This topic is closed to new replies.

Advertisement