How to access models in memory

Started by
0 comments, last by GameDev.net 17 years, 1 month ago
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
Advertisement
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

This topic is closed to new replies.

Advertisement