If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Wodzu
Posts: 27 Joined: Wed May 07, 2014 5:41 pm
Post
by Wodzu » Wed Oct 15, 2014 11:21 pm
Hi,
I just want to make sure that there is no other way in Irrlicht for calculating normal other than this?
Code: Select all
core::plane3df(vertex[2],vertex[1],vertex[0]).Normal
I mean creating an object (plane3df) for calculating a normal seems a bit heavy for me. I know I could just write my own function but I wonder if there is such function by default in Irrlicht?
Thanks for your time.
CuteAlien
Admin
Posts: 9734 Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:
Post
by CuteAlien » Thu Oct 16, 2014 12:19 am
core::triangle3df has also a getNormal. Or you just copy the implementation: (pointB - pointA).crossProduct(pointC - pointA);
edit: (but stack objects are not expensive anyway, so don't worry too much)
Wodzu
Posts: 27 Joined: Wed May 07, 2014 5:41 pm
Post
by Wodzu » Thu Oct 16, 2014 10:03 am
Thanks for a quicky reply!
I just like to know all my possibilities:)
Thanks again.