PDA

View Full Version : Where is a model's "anchor" point in OpenGL?



TheGecko
11-14-2000, 10:33 AM
OK maybe the topic name wasn't that clear :P

What I want to know is what are the coordinates of the "anchor" point of a model. i.e. when I construct a model in OpenGL (using display lists or whatever) is the "anchor" point the model's local origin(0,0,0)?

I suck at trying to explain this so if you're not clear about it just ask :P

MikeC
11-14-2000, 11:33 AM
I think I get you, though it's more of a retained-mode API topic.

A vertex at the "anchor point" (0,0,0) will be drawn at the origin of the coordinate space defined by the current modelview matrix. Offsets to this "anchor point" are usually implemented in higher-level scenegraph APIs, either to minimize bounding radius for collision detection and culling or to set a "centre of gravity" for physics. OpenGL isn't interested in either of these things; if you want to do it yourself you'll either have to offset all your model vertices or (more efficiently) translate the modelview matrix before drawing your model.