star-3d

Surface structuring for efficient 3D geometric queries
git clone git://git.meso-star.fr/star-3d.git
Log | Files | Refs | README | LICENSE

commit bb74ffdcbf65d4670b2a4cdc05731417157151db
parent fa654009ccf2a4765e1bee3d550cb13dd404c108
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 10 Jan 2019 14:36:00 +0100

Flip mesh normals of Embree3 to match S3D convention

Diffstat:
Msrc/s3d_scene_view.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/s3d_scene_view.c b/src/s3d_scene_view.c @@ -220,6 +220,11 @@ hit_setup * the hit for the first and second triangle vertices */ hit->uv[1] = hit->uv[0]; hit->uv[0] = w; + + /* In Embree3 the normal orientation is flipped wrt to Star-3D convention */ + #if RTC_VERSION_MAJOR >= 3 + f3_minus(hit->normal, hit->normal); + #endif } /* Flip geometric normal with respect to the flip surface flag */