Changes

Jump to: navigation, search

User:Dsventura

516 bytes added, 07:38, 31 March 2011
no edit summary
</pre>
The problem arose when I put multiple instances of XObject in design. Due to the static keyword, this variable would be shared among all of the animated objects. The first animation would run smoothly, while any animations added afterwords would be extremely slow. This is because this variable tells the function when the last time it drew the object's state along the animation time-line, and each object's time-line is different. To fix this, I made last time a data member and initialized it to 0 in the constructor.
<h3>Scene.cpp - ViewingFrustum()</h3>
I have no idea why, but I kept getting errors from these lines:
<pre>
float far = context->get(GF_FR_FAR);
float near = context->get(GF_FR_NEAR);
</pre>
All I did was remove these variables and put the values where they are used. In other words I did this:
<pre>
plane[0] = new Plane(heading, - n_p - context->get(GF_FR_NEAR));
plane[1] = new Plane(-heading, n_p + context->get(GF_FR_FAR) );
</pre>
Out of all the errors I've encountered, I have no explanation for this one :S
<h2>References</h2>
<h4>Panda Exporter (32-bit)</h4>
1
edit

Navigation menu