Subject: using glVertex*() in a second coordinate frame
(I posted this question originally on comp.graphics.api.opengl but haven't
received any replies, and I believe it's general enough that it fits on this
newsgroup too. I'd appreciate any light you could shed on my problem.)
I have a scene with a first-person view. At a point in the room there is a
particle flying in a certain direction. I know the particle's origin in
world space, as well as the "axes" for the particle, also in world space.
These axes are mutually perpendicular, normalized, and correspond to a local
x,y and z
coordinate system for the particle. The particle is traveling along its
z-axis, in the negative direction.
I want to draw some surrounding geometry around this particle, using the
particle's axes and origin as the reference for the commands. So in other
words, when I say glVertex3f(1.0f,0.0f,0.0f) I want to place a vertex one
unit in the x-direction along the particle's x axis....not along the world
I've tried everything I can think of, which admittedly isn't much. Among
other things I've used gluLookAt() with the particle's origin values as the
first three parameters, an appropriate look at point for the second three
parameters, and the particle's y axis as the final three params. Nothing
I'm certainly not wedded to using gluLookAt(). Any method which would let
me draw my geometry around the particle's coordinate system is fine with me.
I'm open to any and all suggestions on what I can/should be doing and if you
have any code snippets, all the better. Thanks very much.
View All Messages in comp.graphics.algorithms
Re: using glVertex*() in a second coordinate frame
Copyright © 2006 WatermarkFactory.com. All Rights Reserved.