vec3_t

This is a discussion on vec3_t within the A Brief History of Cprogramming.com forums, part of the Community Boards category; All throughout the source code of every ID software game, I see large amounts of references to a data type ...

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738

    Question vec3_t

    All throughout the source code of every ID software game, I see large amounts of references to a data type called vec3_t. I have searched through every single source file and cannot find the definition of this data type ANYWHERE. Does ANYONE know what this is?
    My Website

    "Circular logic is good because it is."

  2. #2
    Meow Pendragon's Avatar
    Join Date
    Sep 2001
    Location
    Swindon, UK
    Posts
    724
    In quake if I remember correctly it's to do with camera angles.
    Code:
    typedef float vec_t;
    
    typedef vec_t[3] vec3_t;
    vec_3t: "3 angles that describe the camera viewing direction in Quake and other games."

    A block structure from the code of Quake...
    Code:
    typedef struct {
                     long            blocksize;
                     vec3_t          angles;
                     char[blocksize] messages;
                   } block_t;



    I'm not sure if this is of any use?

    -Pendragon
    Last edited by Pendragon; 01-03-2002 at 08:07 PM.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21