Sign in to follow this  
flyjason

OpenGL How to access models in memory

Recommended Posts

Hi all, I'm a newbie to OpenGL. Actually, I am working on a project using ARToolKit (Link http://www.hitl.washington.edu/artoolkit/). ARToolKit encompasses OpenGL, therefore using OpenGL code is perfectly acceptable. Ok...ARToolKit can load an object (3d model...mine is in VRML format) and displays it (so you can see it obviously :) ). What I want now is to manipulate that object, like performing scaling and rotation. Later on, to add collision detection as well because I will have several objects. The thing is that I'm really behind schedule with my project and I need some quick help. So, I guess the loaded object is found somewhere in memory, and that I should be able to access it (possibly via a variable) so that I can perform some transformations. I don't know if I'm right here?? Anybody can help out here?? Thanks in advance. P.S: Perhaps putting up some code might help me better

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I don't anything about ARToolKit, but the model information is probably stored in such a way that you can't directly access the data.

However, with OpenGL, you usually modify matrices in order to perform the transformations you're trying to do. Look up glTranslatef, glRotatef, and glScalef in order to change how and where you're model will be displayed.

You may also want to look into the NeHe OpenGL tutorials. They'll undoubtedly answer most of your questions:

nehe.gamedev.net

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this