Results 1 to 3 of 3

Thread: Local versus world coords?

  1. #1
    Guest

    Local versus world coords?

    I don't understand something, I was hoping someone can explain what the difference is between local & world coords?

    I mean when people say world coords, are they talking about where the camera is looking at?

    If I move cube to -10,10,10, that is always world coords right?

    So then what are local coords of an object? Wouldn't it be the same as -10,10,10 for my cube?

  2. #2
    Member Contributor
    Join Date
    Jan 2001
    Location
    france
    Posts
    60

    Re: Local versus world coords?

    In your example, if world coordinates are -10, 10, 10 for the cube, in its local coords they become 0, 0, 0 because in local coord the object is the reference coord.

    So if there's another object at, world coords, 5, -5, -5, in the first object local coord system they become (5 - (-10)), (-5 - 10), (-5 - 10) == 15, -15, -15

    This may help for things like animation with hierarchy (pivot, bones, IK, etc).

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Dec 2007
    Posts
    1,077

    Re: Local versus world coords?

    You can define an own R3 (actually R4 in opengl) vector room for any object you want. The best is usually to set the origin to the center of the object. Then, you can apply a transformation from one to another vector room.
    The vector room for your object is the local
    room. The vector room for the world is the world room. The vector room for the eye is is view room. These 3 vector rooms are 3 dimensional in terms of coord data.

    The transformations usually done:
    local -> world -> eye

    The last vector room is the screen. It is obviously only 2 dimensional.

    eye -.-> screen

    -.-> can be any projection matrix from 3d to 2d, which are for example: perspective and orthogonal projection.

Similar Threads

  1. unable to translate from screen coords to world coords
    By etiennecouturie in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-28-2014, 06:04 AM
  2. Depth problem with translating screen coords to world coords
    By Bryan_dup1 in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 04-13-2006, 05:02 AM
  3. Text & object coords vs. world coords
    By GW in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 05-20-2004, 06:14 AM
  4. Local to World Coords
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-25-2003, 09:21 AM
  5. View coords to world coords problem
    By NoAntz in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 02-19-2002, 03:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean