From 1aecce2033db8fec5fe8c03ba826e9534499909c Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Wed, 3 Oct 2012 16:39:29 +0000 Subject: [PATCH] added IsCCW function --- vcg/space/triangle2.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vcg/space/triangle2.h b/vcg/space/triangle2.h index 95e936c7..f1da7768 100644 --- a/vcg/space/triangle2.h +++ b/vcg/space/triangle2.h @@ -133,6 +133,13 @@ void PointDistance(const CoordType & q, } } +///retutn true if the face is contuerclockwise oriented +bool IsCCW() +{ + ScalarType Area=(P(1)-P(0))^(P(2)-P(0)); + return (Area>0); +} + }; //end Class