Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

How can I scale a vector in Irrlicht?

4: Adsense

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   

1620
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!



#2 FLeBlanc   Members   

3137
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.