Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


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: 1288

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