View Full Version : Visualizing STEP files with OpenGL

10-13-2006, 03:51 AM
Please Help,

I am a newbie to OpenGL but am very excited by the opportunities offered by this API. My boss gave me an assignment to try and decipher a "Standard for Exchange of Product Model data" (STEP file) so that it can be visualized.

As I said, I am a newbie and am looking for any help/hints. The first thing I hope someone can tell me is how to render a 3D Vector in OpenGL? In the STEP file I have a series of VECTORS (complete with orientation, length, and a cartesian_point) in 3D. I am using C++, so ANY simple code displaying a simple oriented vector in 3D would be GREAT.

Thanks in advance for any help/hints.

10-13-2006, 04:32 AM
Not really simple, but a good open-source package :

10-13-2006, 05:58 AM

Thank you for the information. However, is there a quick command/code in the OpenGL API to "draw" a simple line given a "direction/orientation" (x, y, and z), a vector length (say 1.e1), and a cartesian point (say, -2.5E0, 5.E0, and -1.E0)?

I know that this is probably pretty easy stuff, but I am completly new to OpenGL.


10-13-2006, 07:28 AM
you'll need to actually search the man pages (http://www.rush3d.com/reference/opengl-bluebook-1.0/) but here is a quick untested tutorial to begin with :

for ( each vector to draw ) {
glVertex(x,y,z); // start line
glVertex(x+dx,y+dy,z+dz); // end line
glEnd();dx,dy,dz being the direction.

10-13-2006, 07:36 AM

Thank you. This is exactly the information I needed.