Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Where is a model's "anchor" point in OpenGL?

  1. #1
    Junior Member Regular Contributor
    Join Date
    Apr 2000
    Location
    Thunder Bay,ON,Canada
    Posts
    178

    Where is a model's "anchor" point in OpenGL?

    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
    -------------------------
    "Bad bad programmer! No Mountain Dew for you!"

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    562

    Re: Where is a model's "anchor" point in OpenGL?

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •