XVector * VecTransform(XVector * Out, XVector * v, XMatrix * Mats, float * Weights, int Num)
{
if(Out)
{
Out->x = 0.0f;
Out->y = 0.0f;
Out->z = 0.0f;
for(int i = 0; i [ Num; i++)
{
Out->x +=(v->x *Mats->_11 +
v->y *Mats->_12 +
…
</pre>
i get this error:
error C2819: type 'XVector' does not have an overloaded member 'operator ->'
now, the baffling part is that it does NOT happen on these lines:
Out->x = 0.0f;
Out->y = 0.0f;
Out->z = 0.0f;
only once its inside the for loop, then all of my classes' access are errors, vectors, matrices, quaternions, colors, whatever. but it only seems to happen once its inside the for loops/if blocks/some other level of scope. </i>
<SPAN CLASS=editedby>[edited by - billybob on January 19, 2003 10:37:56 PM]</SPAN>
<SPAN CLASS=editedby>[edited by - billybob on January 19, 2003 10:38:29 PM]</SPAN>
baffling compiler error
(i ommitted a bunch of code, since it doesn't mean anything, just the transformation of y and z)
maybe you should post the line that the error is on.
Anthony Whitaker[Boanerges Studios] :: [RZ2 Games] :: [Exigent Game Art] :: [Personal Site] :: [GraphicsDev.net]
every '->' in the for loop is that error
also, i replaced the 'i < Num' in the for loop with [ in an attempt to get rid of the italics, but it just went to the next '<'
[edited by - billybob on January 19, 2003 10:52:48 PM]
also, i replaced the 'i < Num' in the for loop with [ in an attempt to get rid of the italics, but it just went to the next '<'
[edited by - billybob on January 19, 2003 10:52:48 PM]
actually, it appears to only happen on arrays, using the []. but i used the same syntax in other functions (at least i''m 99% sure)
If I''m making the right assumptions about your code, youe problem is there because you''re dereferencing the array elements. You don''t need the * in front of *Mats.<br>
Check your code (first off, it didn''t come out to well):
Out->x +=(v->x *Mats->_11 + v->y *Mats->_12 +<br><br>Notice how you do… v->x, then do v->y… and by judging by what you''re trying to accomplish.. neither is correct.<br><br>Should read.. v.y, and v.x (unless you are actually using an array of pointers, which I doubt). This may be a similar problem in your Mats._11, and Mats._12 </i>
Out->x +=(v->x *Mats->_11 + v->y *Mats->_12 +<br><br>Notice how you do… v->x, then do v->y… and by judging by what you''re trying to accomplish.. neither is correct.<br><br>Should read.. v.y, and v.x (unless you are actually using an array of pointers, which I doubt). This may be a similar problem in your Mats._11, and Mats._12 </i>
quote: Original post by scaught
If I'm making the right assumptions about your code, youe problem is there because you're dereferencing the array elements. You don't need the * in front of *Mats.<br> <hr height=1 noshade></SPAN></BLOCKQUOTE> <br>thats a multiplication symbol, it looks like it because it took out my tab's to format it nicely<br><BLOCKQUOTE><SPAN CLASS=smallfont>quote:<hr HEIGHT=1 noshade><br>Check your code (first off, it didn't come out to well):<br>Out->x +=(v->x *Mats->_11 + v<i>->y *Mats->_12 +<br> <hr height=1 noshade></SPAN></BLOCKQUOTE> <br>it took out the from v->x because it thought it was an italics tag </i> <br><br>edit: lol, see now it took it out of the v->y because it thinks that is the next italics tag<br><br>most of this stuff is the forum mutilating my code<br><br><SPAN CLASS=editedby>[edited by - billybob on January 20, 2003 1:39:09 AM]</SPAN><br><br><SPAN CLASS=editedby>[edited by - billybob on January 20, 2003 1:41:47 AM]</SPAN>
quote: Original post by billybob
thats a multiplication symbol
That''s what I get for reading & replying to posts inbetween builds. Sorry.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement