🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How to get extents of a geometry?

Started by
1 comment, last by Endurion 3 years, 7 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?

Advertisement

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