diff --git a/plugins/3d/vrml/v1/vrml1_node.h b/plugins/3d/vrml/v1/vrml1_node.h index 155ab5931f..a82c725b2f 100644 --- a/plugins/3d/vrml/v1/vrml1_node.h +++ b/plugins/3d/vrml/v1/vrml1_node.h @@ -97,7 +97,7 @@ struct WRL1STATUS normbind = WRL1_BINDING::BIND_DEFAULT; coord = NULL; txmatrix = glm::scale( glm::mat4( 1.0 ), glm::vec3( 1.0 ) ); - order = ORD_UNKNOWN; + order = WRL1_ORDER::ORD_UNKNOWN; creaseLimit = 0.878f; return; } diff --git a/plugins/3d/vrml/v1/vrml1_shapehints.cpp b/plugins/3d/vrml/v1/vrml1_shapehints.cpp index cf655332d2..4162dda2f6 100644 --- a/plugins/3d/vrml/v1/vrml1_shapehints.cpp +++ b/plugins/3d/vrml/v1/vrml1_shapehints.cpp @@ -34,7 +34,7 @@ WRL1SHAPEHINTS::WRL1SHAPEHINTS( NAMEREGISTER* aDictionary ) : WRL1NODE( aDictionary ) { - m_order = ORD_UNKNOWN; + m_order = WRL1_ORDER::ORD_UNKNOWN; m_Type = WRL1_SHAPEHINTS; m_crease = 0.733f; // approx 42 degrees; this is larger than VRML spec. return; @@ -44,7 +44,7 @@ WRL1SHAPEHINTS::WRL1SHAPEHINTS( NAMEREGISTER* aDictionary ) : WRL1NODE( aDiction WRL1SHAPEHINTS::WRL1SHAPEHINTS( NAMEREGISTER* aDictionary, WRL1NODE* aParent ) : WRL1NODE( aDictionary ) { - m_order = ORD_UNKNOWN; + m_order = WRL1_ORDER::ORD_UNKNOWN; m_Type = WRL1_SHAPEHINTS; m_crease = 0.733f; // approx 42 degrees; this is larger than VRML spec. m_Parent = aParent; @@ -200,11 +200,11 @@ bool WRL1SHAPEHINTS::Read( WRLPROC& proc, WRL1BASE* aTopNode ) } if( !glob.compare( "UNKNOWN_ORDERING" ) ) - m_order = ORD_UNKNOWN; + m_order = WRL1_ORDER::ORD_UNKNOWN; else if( !glob.compare( "CLOCKWISE" ) ) - m_order = ORD_CLOCKWISE; + m_order = WRL1_ORDER::ORD_CLOCKWISE; else if( !glob.compare( "COUNTERCLOCKWISE" ) ) - m_order = ORD_CCW; + m_order = WRL1_ORDER::ORD_CCW; else { #if defined( DEBUG_VRML1 ) && ( DEBUG_VRML1 > 1 ) diff --git a/plugins/3d/vrml/v2/vrml2_faceset.cpp b/plugins/3d/vrml/v2/vrml2_faceset.cpp index abea5937e5..8f093dfb60 100644 --- a/plugins/3d/vrml/v2/vrml2_faceset.cpp +++ b/plugins/3d/vrml/v2/vrml2_faceset.cpp @@ -915,9 +915,9 @@ SGNODE* WRL2FACESET::TranslateToSG( SGNODE* aParent ) SGNODE* np = NULL; if( ccw ) - np = lShape.CalcShape( aParent, NULL, ORD_CCW, creaseLimit, true ); + np = lShape.CalcShape( aParent, NULL, WRL1_ORDER::ORD_CCW, creaseLimit, true ); else - np = lShape.CalcShape( aParent, NULL, ORD_CLOCKWISE, creaseLimit, true ); + np = lShape.CalcShape( aParent, NULL, WRL1_ORDER::ORD_CLOCKWISE, creaseLimit, true ); return np; } diff --git a/plugins/3d/vrml/wrlfacet.cpp b/plugins/3d/vrml/wrlfacet.cpp index 2864ad8040..fb0ba1e5bc 100644 --- a/plugins/3d/vrml/wrlfacet.cpp +++ b/plugins/3d/vrml/wrlfacet.cpp @@ -481,7 +481,7 @@ bool FACET::GetData( std::vector< WRLVEC3F >& aVertexList, std::vector< WRLVEC3F idx[2] = 2; WRLVEC3F tnorm; - if( aVertexOrder != ORD_CLOCKWISE ) + if( aVertexOrder != WRL1_ORDER::ORD_CLOCKWISE ) { aVertexList.push_back( vertices[idx[0]] ); aVertexList.push_back( vertices[idx[1]] ); @@ -492,7 +492,7 @@ bool FACET::GetData( std::vector< WRLVEC3F >& aVertexList, std::vector< WRLVEC3F aNormalsList.push_back( norms[idx[2]] ); } - if( aVertexOrder != ORD_CCW ) + if( aVertexOrder != WRL1_ORDER::ORD_CCW ) { aVertexList.push_back( vertices[idx[0]] ); aVertexList.push_back( vertices[idx[2]] ); @@ -529,14 +529,14 @@ bool FACET::GetData( std::vector< WRLVEC3F >& aVertexList, std::vector< WRLVEC3F if( perVC ) { - if( aVertexOrder != ORD_CLOCKWISE ) + if( aVertexOrder != WRL1_ORDER::ORD_CLOCKWISE ) { aColorsList.push_back( colors[idx[0]] ); aColorsList.push_back( colors[idx[1]] ); aColorsList.push_back( colors[idx[2]] ); } - if( aVertexOrder != ORD_CCW ) + if( aVertexOrder != WRL1_ORDER::ORD_CCW ) { aColorsList.push_back( colors[idx[0]] ); aColorsList.push_back( colors[idx[2]] ); @@ -545,14 +545,14 @@ bool FACET::GetData( std::vector< WRLVEC3F >& aVertexList, std::vector< WRLVEC3F } else { - if( aVertexOrder != ORD_CLOCKWISE ) + if( aVertexOrder != WRL1_ORDER::ORD_CLOCKWISE ) { aColorsList.push_back( colors[0] ); aColorsList.push_back( colors[0] ); aColorsList.push_back( colors[0] ); } - if( aVertexOrder != ORD_CCW ) + if( aVertexOrder != WRL1_ORDER::ORD_CCW ) { aColorsList.push_back( colors[0] ); aColorsList.push_back( colors[0] ); @@ -568,7 +568,7 @@ bool FACET::GetData( std::vector< WRLVEC3F >& aVertexList, std::vector< WRLVEC3F idx[1] = idx[2]; ++idx[2]; - if( aVertexOrder != ORD_CLOCKWISE ) + if( aVertexOrder != WRL1_ORDER::ORD_CLOCKWISE ) { aVertexList.push_back( vertices[idx[0]] ); aVertexList.push_back( vertices[idx[1]] ); @@ -579,7 +579,7 @@ bool FACET::GetData( std::vector< WRLVEC3F >& aVertexList, std::vector< WRLVEC3F aNormalsList.push_back( norms[idx[2]] ); } - if( aVertexOrder != ORD_CCW ) + if( aVertexOrder != WRL1_ORDER::ORD_CCW ) { aVertexList.push_back( vertices[idx[0]] ); aVertexList.push_back( vertices[idx[2]] ); @@ -608,14 +608,14 @@ bool FACET::GetData( std::vector< WRLVEC3F >& aVertexList, std::vector< WRLVEC3F { if( perVC ) { - if( aVertexOrder != ORD_CLOCKWISE ) + if( aVertexOrder != WRL1_ORDER::ORD_CLOCKWISE ) { aColorsList.push_back( colors[idx[0]] ); aColorsList.push_back( colors[idx[1]] ); aColorsList.push_back( colors[idx[2]] ); } - if( aVertexOrder != ORD_CCW ) + if( aVertexOrder != WRL1_ORDER::ORD_CCW ) { aColorsList.push_back( colors[idx[0]] ); aColorsList.push_back( colors[idx[2]] ); @@ -624,14 +624,14 @@ bool FACET::GetData( std::vector< WRLVEC3F >& aVertexList, std::vector< WRLVEC3F } else { - if( aVertexOrder != ORD_CLOCKWISE ) + if( aVertexOrder != WRL1_ORDER::ORD_CLOCKWISE ) { aColorsList.push_back( colors[0] ); aColorsList.push_back( colors[0] ); aColorsList.push_back( colors[0] ); } - if( aVertexOrder != ORD_CCW ) + if( aVertexOrder != WRL1_ORDER::ORD_CCW ) { aColorsList.push_back( colors[0] ); aColorsList.push_back( colors[0] ); diff --git a/plugins/3d/vrml/wrltypes.h b/plugins/3d/vrml/wrltypes.h index 29a129e32e..6ccfb8a276 100644 --- a/plugins/3d/vrml/wrltypes.h +++ b/plugins/3d/vrml/wrltypes.h @@ -107,7 +107,7 @@ enum class WRL1_BINDING BIND_END }; -enum WRL1_ORDER +enum class WRL1_ORDER { ORD_UNKNOWN = 0, ORD_CLOCKWISE, diff --git a/plugins/3d/vrml/x3d/x3d_ifaceset.cpp b/plugins/3d/vrml/x3d/x3d_ifaceset.cpp index ac066a8561..6463d1deab 100644 --- a/plugins/3d/vrml/x3d/x3d_ifaceset.cpp +++ b/plugins/3d/vrml/x3d/x3d_ifaceset.cpp @@ -344,9 +344,9 @@ SGNODE* X3DIFACESET::TranslateToSG( SGNODE* aParent ) SGNODE* np = NULL; if( ccw ) - np = lShape.CalcShape( aParent, NULL, ORD_CCW, creaseLimit, true ); + np = lShape.CalcShape( aParent, NULL, WRL1_ORDER::ORD_CCW, creaseLimit, true ); else - np = lShape.CalcShape( aParent, NULL, ORD_CLOCKWISE, creaseLimit, true ); + np = lShape.CalcShape( aParent, NULL, WRL1_ORDER::ORD_CLOCKWISE, creaseLimit, true ); return np; }