|
|
matrix stack
Hello all,
I'm trying to do something quite simple in an attempt to understand
the matrix stack better. I have a square inside a square and they are
both rotating. I want to make the inner square rotate faster so I call
glPushMatrix before its drawn apply a further rotation, draw the
square and then glPopMatrix. However all this does is affect the
angular position relative to the outer square which means that when
something has been pushed and popped, its lost. I'd like to know if
there's any way to work around this and also whether there are
function to create transformation matrices in variables to apply
myself when I want.
Thank you.
Kostas
|
|
0
|
|
|
|
Reply
|
skatoulas
|
12/3/2003 2:41:01 AM |
|
Kostas wrote:
> when something has been pushed and popped, its lost.
Correct.
> I'd like to know if
> there's any way to work around this
No, that's what push&pop is supposed to do.
Try incrementing the angle you pass to glRotate() at each pass.
--
<\___/> For email, remove my socks.
/ O O \
\_____/ FTB. Why isn't there mouse-flavored cat food?
|
|
0
|
|
|
|
Reply
|
fungus
|
12/3/2003 7:58:40 AM
|
|
|
1 Replies
109 Views
(page loaded in 0.052 seconds)
Similiar Articles: rewrite glRotate? - comp.graphics.api.openglBack to the matrix stack collapse; it is not problem you can very easily parallelize, first, it is serial like fragment program for one specific fragment for example, the ... glGetFloatv( GL_PROJECTION_MATRIX) doesnt' work! - comp.graphics ...Thus, if you started with an identity matrix, > you would get a good projection matrix. > > However, you need to explicitly say which matrix stack to use ... using gui slider to display 3d image stack - comp.soft-sys.matlab ...Display an 3-D MRI image (represented as a stack of 2D images). 2. Use a slider to ... images, I have already read the images from a series and stored them into a 3D matrix. glTranslate, glRotate - comp.graphics.api.openglEach of these functions multiplies the matrix currently on top of the matrix stack with the matrix represented by the command (see the documentation for these commands ... Fatal Error LNK 1104: Cannont Open File 'glut32.lib' - comp ...... nRange, nRange, -nRange*h/w, nRange*h/w, -nRange, nRange); else glOrtho (-nRange*w/h, nRange*w/h, -nRange, nRange, -nRange, nRange); // Reset Model view matrix stack ... How to eliminate Inf and NaN in array? - comp.soft-sys.matlab ...... the median value of an array. - comp.lang.fortran removing NaN values from a matrix - comp.soft ... MATLAB: How To Efficiently Remove NaN Elements from Matrix - Stack ... rendering objects so they are always in front of camera? - comp ...No, it just pushes the current matrix on the matrix stack. The matrix itself is not changed. hth -- jb (reply address in rot13, unscramble first) Array conversion to matrix - comp.soft-sys.matlabc# - Convert Array to Matrix - Stack Overflow I have an array of the length m*n, that stores a list of double element. How to convert it into a matrix of m*n? How to create basis DCT transform matrix - comp.soft-sys.matlab ...Why are lights moving? - comp.graphics.api.opengl In pseudocode, you need to do something like: Set the view transform Push the matrix stack ... I have seen moving average ... removing NaN values from a matrix - comp.soft-sys.matlab ...Changing value in a Matrix - comp.soft-sys.matlab removing NaN values from a matrix - comp.soft-sys.matlab ..... Remove NaN Elements from Matrix - Stack ... Matrix stack - ProcessingThe default matrix stack depth of 32 is adequate for most uses, but may not be adequate for deeply nested or recursive transforms. You'll know you've reached the ... Matrix Stacks (Direct3D 9)A matrix stack simplifies the construction of hierarchical models, in which complicated objects are constructed from a series of simpler objects. 7/16/2012 12:00:34 AM
|
|
|
|
|
|
|
|
|