enum class WRL1_ORDER
This commit is contained in:
parent
737a23f7e6
commit
130d64df48
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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] );
|
||||
|
|
|
@ -107,7 +107,7 @@ enum class WRL1_BINDING
|
|||
BIND_END
|
||||
};
|
||||
|
||||
enum WRL1_ORDER
|
||||
enum class WRL1_ORDER
|
||||
{
|
||||
ORD_UNKNOWN = 0,
|
||||
ORD_CLOCKWISE,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue