Jump to content

  • Log In with Google      Sign In   
  • Create Account

How can I scale a vector in Irrlicht?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 MARS_999   Members   -  Reputation: 1283

Like
0Likes
Like

Posted 05 June 2013 - 09:54 AM

I can't find anyway to scale a vector or vertex position in Irrlicht....

 

irr::core::matrix4 scale, translation;
        scale.setScale(.005f);
        for(int x = 0; x < vertex.size(); ++x)
        {
            translation.makeIdentity();
            translation.setTranslation(vertex[x].Pos);
            translation *=scale;
            vertex[x].Pos = translation.getTranslation();
        }

 

I need to shrink my image and not seeing anyway to do this.

 

drawIndexedTriangleFan()

 

I am calling that vs. using nodes....

 

Thanks!



Sponsor:

#2 FLeBlanc   Crossbones+   -  Reputation: 3109

Like
0Likes
Like

Posted 05 June 2013 - 10:38 AM

You don't need a matrix to scale or translate a vector. You just need to multiply by another vector, or add another vector.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS