0025276: Visualization - Lighting is broken if some kinds of transformation applied...
authorduv <duv@opencascade.com>
Fri, 26 Sep 2014 10:41:51 +0000 (14:41 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 16 Oct 2014 10:58:33 +0000 (14:58 +0400)
commit7d9e854bdc7a70e1c2fc02b759256966da61a5cc
treef6bf24f1a40a50c9b4b5506c8e6aa8fed8da38aa
parentc60370656c3ff59732159cf2b12be992de1ebad8
0025276: Visualization - Lighting is broken if some kinds of transformation applied to a shape

In order to solve the problem, triangle vertices order is inverted in
mirrored mesh (triangulation). Mesh considered to be mirrored if its
transformation matrix determinant is less than 0.

To handle AIS object mirror transformations "Mirrored" flag stored in
OpenGl_Structure. If this flag is enabled, glFrontFace (GL_CW) applied
before the draw call.

New DRAW commands for visualization level transformations added.
src/Graphic3d/Graphic3d_Structure.cxx
src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_Context.hxx
src/OpenGl/OpenGl_Structure.cxx
src/OpenGl/OpenGl_Structure.hxx
src/OpenGl/OpenGl_View_2.cxx
src/StdPrs/StdPrs_ShadedShape.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
tests/bugs/vis/bug25276 [new file with mode: 0644]