Results 1 to 7 of 7

Thread: Variable meaning in OpenGL demo

  1. #1
    Member Newbie
    Join Date
    Jan 2004
    Posts
    49

    Variable meaning in OpenGL demo

    I have downloaded the Atlantis demo for investigate from the page below:
    http://www.opengl.org/developers/cod...mos/demos.html

    However, I got some problems on it. I don't know the meaning of the variables in the program since it doesn't has much comments.

    I have guessed some meaning of the variables in the program, please correct me if I am wrong and tell me the meaning that I miss.

    typedef struct _fishRec {
    float x, y, z; <-- position of the fish
    float phi; <-- don't know
    float theta; <-- pitch angle
    float psi; <-- yaw angle
    float v; <-- speed of the fish
    float xt, yt, zt; <-- don't know
    float htail, vtail; <-- don't know
    float dtheta; <-- don't know
    int spurt, attack; <-- frag for action
    } fishRec;

    Is there any information about this example or can some body give me some ideas about those variables. Thanks you.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    184

    Re: Variable meaning in OpenGL demo

    hmmm...maybe ask the author. phi may be rotation about Z axis (roll). xt, yt, zt may be position after a certain time. dtheta may be the timne since the last update (used to calculate xt, yt, zt). htail, vtail - no idea.

    b

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Variable meaning in OpenGL demo

    Also compile the program and watch the fish... will give you an idea of the movement.
    Also look at the data that is supplied to the structure.

    h/vtail maybe tail fin movement....


    Originally posted by Candy:
    I have downloaded the Atlantis demo for investigate from the page below:
    http://www.opengl.org/developers/cod...mos/demos.html

    However, I got some problems on it. I don't know the meaning of the variables in the program since it doesn't has much comments.

    I have guessed some meaning of the variables in the program, please correct me if I am wrong and tell me the meaning that I miss.

    typedef struct _fishRec {
    float x, y, z; <-- position of the fish
    float phi; <-- don't know
    float theta; <-- pitch angle
    float psi; <-- yaw angle
    float v; <-- speed of the fish
    float xt, yt, zt; <-- don't know
    float htail, vtail; <-- don't know
    float dtheta; <-- don't know
    int spurt, attack; <-- frag for action
    } fishRec;

    Is there any information about this example or can some body give me some ideas about those variables. Thanks you.

  4. #4
    Member Newbie
    Join Date
    Jan 2004
    Posts
    49

    Re: Variable meaning in OpenGL demo

    Thanks all of you.

    Originally posted by nexusone:
    Also compile the program and watch the fish... will give you an idea of the movement.
    Also look at the data that is supplied to the structure.

    h/vtail maybe tail fin movement....


    I tried to compile the program in VC++, but it was not success. Is that the source code can be compiled in sgi only?

    I also can't run the demo executable file, it beeps me that I need glut.dll, glu.dll, and opengl.dll.....Is that the exe file can't run in windows environment?

  5. #5
    Member Newbie
    Join Date
    Jan 2004
    Posts
    49

    Re: Variable meaning in OpenGL demo

    When I compile in VC++, I got the following error message. Is that something I go wrong? Please teach me, thanks you.

    --------------------Configuration: test2 - Win32 Debug--------------------
    Compiling...
    Atlantis.c
    Dolphin.c
    Shark.c
    Swim.c
    Whale.c
    Linking...
    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/test2.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

  6. #6
    Member Newbie
    Join Date
    Oct 2002
    Location
    Atlanta, Ga USA
    Posts
    42

    Re: Variable meaning in OpenGL demo

    Is it a GLUT demo? You are trying to compile a windows program but you have not declared WinMain in the program. The code compiles fine it's how you've set up the project that's wrong.

    If it uses glut than it has a main() function, so compile your project to be a Windows console application instead, and make sure to link in the glut libraries.

    Hope that helps.

  7. #7
    Member Newbie
    Join Date
    Jan 2004
    Posts
    49

    Re: Variable meaning in OpenGL demo

    Thx DaMangz, I am now able to run the program.

Similar Threads

  1. Can't draw a pixel , suspecting an OpenGL state variable
    By Whiteclaws in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 12-06-2013, 08:32 PM
  2. OpenGl 4.x : passing variable information
    By Reyien in forum OpenGL: User Software
    Replies: 1
    Last Post: 03-20-2012, 08:50 AM
  3. Meaning of one command in the function of OpenGL
    By openglam in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-23-2011, 09:01 PM
  4. Replies: 1
    Last Post: 03-17-2008, 02:06 PM
  5. Replies: 6
    Last Post: 05-15-2006, 05:59 PM

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