Click here to Skip to main content
15,898,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: vs c++ Pin
_AnsHUMAN_ 19-Jul-06 0:21
_AnsHUMAN_ 19-Jul-06 0:21 
GeneralRe: vs c++ Pin
see me19-Jul-06 0:31
see me19-Jul-06 0:31 
AnswerRe: vs c++ Pin
Ștefan-Mihai MOGA19-Jul-06 0:35
professionalȘtefan-Mihai MOGA19-Jul-06 0:35 
Questionpush n pop matrix Pin
ooola rocks18-Jul-06 23:22
ooola rocks18-Jul-06 23:22 
AnswerRe: push n pop matrix Pin
toxcct18-Jul-06 23:54
toxcct18-Jul-06 23:54 
GeneralRe: push n pop matrix Pin
Steve S19-Jul-06 1:39
Steve S19-Jul-06 1:39 
AnswerRe: push n pop matrix Pin
Maximilien19-Jul-06 3:01
Maximilien19-Jul-06 3:01 
AnswerRe: push n pop matrix [modified] Pin
Rilhas21-Jul-06 12:44
Rilhas21-Jul-06 12:44 
I think you already gt a technical answer. A conceptual one could be:

One reason to push or pop matrices is to "accumulate" matrixes, or, in other words, make "hierarchical" transformations.

For example, if you are animating a robot arm, you may move the finger (relative to the point where it is attached to the wrist).

Then you push the matrix (to save it and "remember" its state) and move the wrist relative to the radio (and the finger should be transformed as well, since the wrist is attached to the radio, and the finger to the wrist).

Then you push the matrix again and move the radio relative to the elbow (and the finger and wrist should be transformed as well). And so on.

In the end you pop all the matrices and get the expected result (combined result).

The result is that these movements allow hierarchical relashionships. If it is programmed correctly, then when you rotate the shoulder joint then all the attached components (humerus, radio, wrist, and finger) will move as if they were all connected (as intended).

The advantage is that you don't have to compute all the individual movements relative to the world, because with push and pop they may be relative to each other. If the "parent" moves then all "childs" move.

Anyway, the programming of these tasks will appear reversed in OpenGL, so take this information as a simple and not so accurate conceptual explanation. Once you grasped the concept and its usefullness you should study the technical aspects and play a little with it (by making objects with hierarchical components, and see the efects of accumulating transformations).

I hope this helps,
Rilhas



-- modified at 18:45 Friday 21st July, 2006
QuestionHow to read data from a gridline Pin
vc++_fragrance18-Jul-06 22:45
vc++_fragrance18-Jul-06 22:45 
AnswerRe: How to read data from a gridline Pin
toogud18-Jul-06 23:13
toogud18-Jul-06 23:13 
QuestionRe: How to read data from a gridline Pin
toxcct18-Jul-06 23:37
toxcct18-Jul-06 23:37 
AnswerRe: How to read data from a gridline [modified] Pin
vc++_fragrance18-Jul-06 23:52
vc++_fragrance18-Jul-06 23:52 
AnswerRe: How to read data from a gridline Pin
Code_Zombie18-Jul-06 23:59
Code_Zombie18-Jul-06 23:59 
GeneralRe: How to read data from a gridline Pin
vc++_fragrance19-Jul-06 0:09
vc++_fragrance19-Jul-06 0:09 
GeneralRe: How to read data from a gridline Pin
toxcct19-Jul-06 0:26
toxcct19-Jul-06 0:26 
GeneralRe: How to read data from a gridline Pin
*Dreamz19-Jul-06 0:49
*Dreamz19-Jul-06 0:49 
GeneralRe: How to read data from a gridline Pin
vc++_fragrance19-Jul-06 2:08
vc++_fragrance19-Jul-06 2:08 
GeneralRe: How to read data from a gridline Pin
David Crow19-Jul-06 2:49
David Crow19-Jul-06 2:49 
QuestionHow to code the circle to move in vertical or horizontal direction? Pin
tillandran18-Jul-06 22:34
tillandran18-Jul-06 22:34 
AnswerRe: How to code the circle to move in vertical or horizontal direction? Pin
Cedric Moonen18-Jul-06 22:54
Cedric Moonen18-Jul-06 22:54 
AnswerRe: How to code the circle to move in vertical or horizontal direction? Pin
_AnsHUMAN_ 18-Jul-06 23:31
_AnsHUMAN_ 18-Jul-06 23:31 
AnswerRe: How to code the circle to move in vertical or horizontal direction? Pin
Hamid_RT19-Jul-06 2:28
Hamid_RT19-Jul-06 2:28 
QuestionSQL and Excel Pin
tanarnelinistit18-Jul-06 21:42
tanarnelinistit18-Jul-06 21:42 
AnswerRe: SQL and Excel Pin
Cedric Moonen18-Jul-06 21:48
Cedric Moonen18-Jul-06 21:48 
AnswerRe: SQL and Excel Pin
Ștefan-Mihai MOGA18-Jul-06 23:01
professionalȘtefan-Mihai MOGA18-Jul-06 23:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.