Click here to Skip to main content
15,896,912 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: IID_IHTMLElement Failing Pin
Mark Salsbery16-Apr-07 10:26
Mark Salsbery16-Apr-07 10:26 
AnswerRe: IID_IHTMLElement Failing Pin
Stephen Hewitt16-Apr-07 14:23
Stephen Hewitt16-Apr-07 14:23 
GeneralRe: IID_IHTMLElement Failing [modified] Pin
Abhi Lahare16-Apr-07 19:51
Abhi Lahare16-Apr-07 19:51 
QuestionTBSTYLE_EX_DRAWDDARROWS Pin
bob1697216-Apr-07 5:50
bob1697216-Apr-07 5:50 
QuestionMBCS - Character range generation Pin
John R. Shaw16-Apr-07 5:36
John R. Shaw16-Apr-07 5:36 
AnswerRe: MBCS - Character range generation Pin
Michael Dunn16-Apr-07 9:57
sitebuilderMichael Dunn16-Apr-07 9:57 
GeneralRe: MBCS - Character range generation Pin
John R. Shaw16-Apr-07 12:28
John R. Shaw16-Apr-07 12:28 
Questionwhere are my attributes Pin
zqueezy16-Apr-07 5:33
zqueezy16-Apr-07 5:33 
hey I'm programming a moving model and wow it worked up to some degree.
Now I'm facing a problem that drives me MAD!
I split the model into nodes to traverse them. each node has different attributes:
<br />
class node<br />
{<br />
public:<br />
	Vector pos;<br />
	Vector rot;<br />
	Vector orot;<br />
	node *child;<br />
	node *sibling;<br />
<br />
	float animationStartTime;<br />
...<br />
};<br />

well actually thats not too important.
I'm traversing each node with a special function TraverseNodes:
<br />
void Model::TraverseNodes(node _node)<br />
{<br />
    glPushMatrix();<br />
		// animation-check:<br />
		if (_node.animated)<br />
			_node.animate(gettime);	// <--------- !!!! **** !!!!!	<br />
    <br />
		TransformNode(_node);<br />
		DrawNode(_node);<br />
<br />
		if (_node.child != 0) TraverseNodes(*_node.child);<br />
    glPopMatrix();<br />
}<br />

the marked line makes trouble! in this function I change the value of "float animationStartTime". It works the node's attribute is set correctly but when I leave the TraverseNodes-function the attribute of the node is reset (I can see it during debugging).
Why is the local variable changed (temporarily) but not overwritten?

thx in advance
AnswerRe: where are my attributes Pin
toxcct16-Apr-07 5:36
toxcct16-Apr-07 5:36 
GeneralRe: where are my attributes Pin
zqueezy16-Apr-07 5:46
zqueezy16-Apr-07 5:46 
GeneralRe: where are my attributes Pin
Hamid_RT16-Apr-07 9:28
Hamid_RT16-Apr-07 9:28 
GeneralRe: where are my attributes Pin
toxcct16-Apr-07 9:55
toxcct16-Apr-07 9:55 
AnswerRe: where are my attributes Pin
Mark Salsbery16-Apr-07 5:56
Mark Salsbery16-Apr-07 5:56 
GeneralRe: where are my attributes Pin
zqueezy16-Apr-07 6:09
zqueezy16-Apr-07 6:09 
QuestionHeart Beat Pin
nahitan16-Apr-07 4:52
nahitan16-Apr-07 4:52 
AnswerRe: Heart Beat Pin
pbraun16-Apr-07 5:46
pbraun16-Apr-07 5:46 
AnswerRe: Heart Beat Pin
Moak17-Apr-07 1:09
Moak17-Apr-07 1:09 
AnswerRe: Heart Beat Pin
cmk17-Apr-07 10:04
cmk17-Apr-07 10:04 
QuestionHerat Beat Pin
nahitan16-Apr-07 4:49
nahitan16-Apr-07 4:49 
GeneralRe: Herat Beat Pin
Moak13-Mar-08 14:51
Moak13-Mar-08 14:51 
QuestionWhat compilers do you use? Pin
Code232616-Apr-07 4:48
Code232616-Apr-07 4:48 
AnswerRe: What compilers do you use? Pin
toxcct16-Apr-07 5:19
toxcct16-Apr-07 5:19 
GeneralRe: What compilers do you use? Pin
Code232616-Apr-07 7:51
Code232616-Apr-07 7:51 
GeneralRe: What compilers do you use? Pin
Rajesh R Subramanian16-Apr-07 8:07
professionalRajesh R Subramanian16-Apr-07 8:07 
GeneralRe: What compilers do you use? Pin
Stephen Hewitt16-Apr-07 14:28
Stephen Hewitt16-Apr-07 14:28 

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.