[osg-users] [forum] How to get the normal of every triangle?
Voerman, L.
l.voerman at rug.nl
Thu Apr 19 04:55:57 PDT 2018
As the per primitive normal is not used by modern openGL, you probably will
have to calculate it yourself from the triangle vertices:
osg::Vec3 normal = (v1-v0)^(v2-v0);
normal.normalize();
Laurens.
ps.
I found your mail in my spam folder, probably due to the domain of your
mail adres and the very short message.
You might improve the answers you get by expanding your message by an
explanation of what you are trying to do, why you want to do that and what
the problem actually is.
On Mon, Mar 19, 2018 at 2:53 AM, Bingqian Wang <695186754 at qq.com> wrote:
> Hi,
>
> I know how can I get the vertex normal vector use NodeVisitor and
> Geometry->getNormalArray(),but how to get the normal of every triangle?
>
> Thank you very much!
>
> Cheers,
> Bingqian
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=73130#73130
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180419/88cbff60/attachment.html>
More information about the osg-users
mailing list