enum class WRL2NODES
This commit is contained in:
parent
71c1be8de0
commit
57dbb7def0
|
@ -36,7 +36,7 @@ WRL2APPEARANCE::WRL2APPEARANCE() : WRL2NODE()
|
|||
material = NULL;
|
||||
texture = NULL;
|
||||
textureTransform = NULL;
|
||||
m_Type = WRL2_APPEARANCE;
|
||||
m_Type = WRL2NODES::WRL2_APPEARANCE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ WRL2APPEARANCE::WRL2APPEARANCE( WRL2NODE* aParent ) : WRL2NODE()
|
|||
material = NULL;
|
||||
texture = NULL;
|
||||
textureTransform = NULL;
|
||||
m_Type = WRL2_APPEARANCE;
|
||||
m_Type = WRL2NODES::WRL2_APPEARANCE;
|
||||
m_Parent = aParent;
|
||||
|
||||
if( NULL != m_Parent )
|
||||
|
@ -74,11 +74,11 @@ bool WRL2APPEARANCE::checkNodeType( WRL2NODES aType )
|
|||
{
|
||||
switch( aType )
|
||||
{
|
||||
case WRL2_MATERIAL:
|
||||
case WRL2_IMAGETEXTURE:
|
||||
case WRL2_PIXELTEXTURE:
|
||||
case WRL2_MOVIETEXTURE:
|
||||
case WRL2_TEXTURETRANSFORM:
|
||||
case WRL2NODES::WRL2_MATERIAL:
|
||||
case WRL2NODES::WRL2_IMAGETEXTURE:
|
||||
case WRL2NODES::WRL2_PIXELTEXTURE:
|
||||
case WRL2NODES::WRL2_MOVIETEXTURE:
|
||||
case WRL2NODES::WRL2_TEXTURETRANSFORM:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -94,7 +94,7 @@ bool WRL2APPEARANCE::isDangling( void )
|
|||
{
|
||||
// this node is dangling unless it has a parent of type WRL2_SHAPE
|
||||
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2_SHAPE )
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2NODES::WRL2_SHAPE )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -134,7 +134,7 @@ bool WRL2APPEARANCE::AddRefNode( WRL2NODE* aNode )
|
|||
return false;
|
||||
}
|
||||
|
||||
if( WRL2_MATERIAL == type )
|
||||
if( WRL2NODES::WRL2_MATERIAL == type )
|
||||
{
|
||||
if( NULL != material )
|
||||
{
|
||||
|
@ -154,7 +154,7 @@ bool WRL2APPEARANCE::AddRefNode( WRL2NODE* aNode )
|
|||
return WRL2NODE::AddRefNode( aNode );
|
||||
}
|
||||
|
||||
if( WRL2_TEXTURETRANSFORM == type )
|
||||
if( WRL2NODES::WRL2_TEXTURETRANSFORM == type )
|
||||
{
|
||||
if( NULL != textureTransform )
|
||||
{
|
||||
|
@ -226,7 +226,7 @@ bool WRL2APPEARANCE::AddChildNode( WRL2NODE* aNode )
|
|||
return false;
|
||||
}
|
||||
|
||||
if( WRL2_MATERIAL == type )
|
||||
if( WRL2NODES::WRL2_MATERIAL == type )
|
||||
{
|
||||
if( NULL != material )
|
||||
{
|
||||
|
@ -246,7 +246,7 @@ bool WRL2APPEARANCE::AddChildNode( WRL2NODE* aNode )
|
|||
return WRL2NODE::AddChildNode( aNode );
|
||||
}
|
||||
|
||||
if( WRL2_TEXTURETRANSFORM == type )
|
||||
if( WRL2NODES::WRL2_TEXTURETRANSFORM == type )
|
||||
{
|
||||
if( NULL != textureTransform )
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ SCENEGRAPH* LoadVRML( const wxString& aFileName, bool useInline );
|
|||
WRL2BASE::WRL2BASE() : WRL2NODE()
|
||||
{
|
||||
m_useInline = false;
|
||||
m_Type = WRL2_BASE;
|
||||
m_Type = WRL2NODES::WRL2_BASE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -538,28 +538,28 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
|
|||
//
|
||||
// items to be implemented:
|
||||
//
|
||||
case WRL2_APPEARANCE:
|
||||
case WRL2NODES::WRL2_APPEARANCE:
|
||||
|
||||
if( !readAppearance( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case WRL2_BOX:
|
||||
case WRL2NODES::WRL2_BOX:
|
||||
|
||||
if( !readBox( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case WRL2_COLOR:
|
||||
case WRL2NODES::WRL2_COLOR:
|
||||
|
||||
if( !readColor( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case WRL2_CONE:
|
||||
case WRL2NODES::WRL2_CONE:
|
||||
// XXX - IMPLEMENT
|
||||
if( !proc.DiscardNode() )
|
||||
{
|
||||
|
@ -588,14 +588,14 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
|
|||
|
||||
break;
|
||||
|
||||
case WRL2_COORDINATE:
|
||||
case WRL2NODES::WRL2_COORDINATE:
|
||||
|
||||
if( !readCoords( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case WRL2_CYLINDER:
|
||||
case WRL2NODES::WRL2_CYLINDER:
|
||||
// XXX - IMPLEMENT
|
||||
if( !proc.DiscardNode() )
|
||||
{
|
||||
|
@ -622,7 +622,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
|
|||
|
||||
break;
|
||||
|
||||
case WRL2_ELEVATIONGRID:
|
||||
case WRL2NODES::WRL2_ELEVATIONGRID:
|
||||
// XXX - IMPLEMENT
|
||||
if( !proc.DiscardNode() )
|
||||
{
|
||||
|
@ -651,7 +651,7 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
|
|||
|
||||
break;
|
||||
|
||||
case WRL2_EXTRUSION:
|
||||
case WRL2NODES::WRL2_EXTRUSION:
|
||||
// XXX - IMPLEMENT
|
||||
if( !proc.DiscardNode() )
|
||||
{
|
||||
|
@ -678,49 +678,49 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
|
|||
|
||||
break;
|
||||
|
||||
case WRL2_INDEXEDFACESET:
|
||||
case WRL2NODES::WRL2_INDEXEDFACESET:
|
||||
|
||||
if( !readFaceSet( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case WRL2_INDEXEDLINESET:
|
||||
case WRL2NODES::WRL2_INDEXEDLINESET:
|
||||
|
||||
if( !readLineSet( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case WRL2_POINTSET:
|
||||
case WRL2NODES::WRL2_POINTSET:
|
||||
|
||||
if( !readPointSet( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case WRL2_MATERIAL:
|
||||
case WRL2NODES::WRL2_MATERIAL:
|
||||
|
||||
if( !readMaterial( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case WRL2_NORMAL:
|
||||
case WRL2NODES::WRL2_NORMAL:
|
||||
|
||||
if( !readNorms( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case WRL2_SHAPE:
|
||||
case WRL2NODES::WRL2_SHAPE:
|
||||
|
||||
if( !readShape( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case WRL2_SPHERE:
|
||||
case WRL2NODES::WRL2_SPHERE:
|
||||
// XXX - IMPLEMENT
|
||||
if( !proc.DiscardNode() )
|
||||
{
|
||||
|
@ -747,22 +747,22 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
|
|||
|
||||
break;
|
||||
|
||||
case WRL2_SWITCH:
|
||||
case WRL2NODES::WRL2_SWITCH:
|
||||
|
||||
if( !readSwitch( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case WRL2_TRANSFORM:
|
||||
case WRL2_GROUP:
|
||||
case WRL2NODES::WRL2_TRANSFORM:
|
||||
case WRL2NODES::WRL2_GROUP:
|
||||
|
||||
if( !readTransform( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case WRL2_INLINE:
|
||||
case WRL2NODES::WRL2_INLINE:
|
||||
|
||||
if( !readInline( proc, aParent, aNode ) )
|
||||
return false;
|
||||
|
@ -772,42 +772,42 @@ bool WRL2BASE::ReadNode( WRLPROC& proc, WRL2NODE* aParent, WRL2NODE** aNode )
|
|||
//
|
||||
// items not implemented or for optional future implementation:
|
||||
//
|
||||
case WRL2_ANCHOR:
|
||||
case WRL2_AUDIOCLIP:
|
||||
case WRL2_BACKGROUND:
|
||||
case WRL2_BILLBOARD:
|
||||
case WRL2_COLLISION:
|
||||
case WRL2_COLORINTERPOLATOR:
|
||||
case WRL2_COORDINATEINTERPOLATOR:
|
||||
case WRL2_CYLINDERSENSOR:
|
||||
case WRL2_DIRECTIONALLIGHT:
|
||||
case WRL2_FOG:
|
||||
case WRL2_FONTSTYLE:
|
||||
case WRL2_IMAGETEXTURE:
|
||||
case WRL2_LOD:
|
||||
case WRL2_MOVIETEXTURE:
|
||||
case WRL2_NAVIGATIONINFO:
|
||||
case WRL2_NORMALINTERPOLATOR:
|
||||
case WRL2_ORIENTATIONINTERPOLATOR:
|
||||
case WRL2_PIXELTEXTURE:
|
||||
case WRL2_PLANESENSOR:
|
||||
case WRL2_POINTLIGHT:
|
||||
case WRL2_POSITIONINTERPOLATOR:
|
||||
case WRL2_PROXIMITYSENSOR:
|
||||
case WRL2_SCALARINTERPOLATOR:
|
||||
case WRL2_SCRIPT:
|
||||
case WRL2_SOUND:
|
||||
case WRL2_SPHERESENSOR:
|
||||
case WRL2_SPOTLIGHT:
|
||||
case WRL2_TEXT:
|
||||
case WRL2_TEXTURECOORDINATE:
|
||||
case WRL2_TEXTURETRANSFORM:
|
||||
case WRL2_TIMESENSOR:
|
||||
case WRL2_TOUCHSENSOR:
|
||||
case WRL2_VIEWPOINT:
|
||||
case WRL2_VISIBILITYSENSOR:
|
||||
case WRL2_WORLDINFO:
|
||||
case WRL2_INVALID:
|
||||
case WRL2NODES::WRL2_ANCHOR:
|
||||
case WRL2NODES::WRL2_AUDIOCLIP:
|
||||
case WRL2NODES::WRL2_BACKGROUND:
|
||||
case WRL2NODES::WRL2_BILLBOARD:
|
||||
case WRL2NODES::WRL2_COLLISION:
|
||||
case WRL2NODES::WRL2_COLORINTERPOLATOR:
|
||||
case WRL2NODES::WRL2_COORDINATEINTERPOLATOR:
|
||||
case WRL2NODES::WRL2_CYLINDERSENSOR:
|
||||
case WRL2NODES::WRL2_DIRECTIONALLIGHT:
|
||||
case WRL2NODES::WRL2_FOG:
|
||||
case WRL2NODES::WRL2_FONTSTYLE:
|
||||
case WRL2NODES::WRL2_IMAGETEXTURE:
|
||||
case WRL2NODES::WRL2_LOD:
|
||||
case WRL2NODES::WRL2_MOVIETEXTURE:
|
||||
case WRL2NODES::WRL2_NAVIGATIONINFO:
|
||||
case WRL2NODES::WRL2_NORMALINTERPOLATOR:
|
||||
case WRL2NODES::WRL2_ORIENTATIONINTERPOLATOR:
|
||||
case WRL2NODES::WRL2_PIXELTEXTURE:
|
||||
case WRL2NODES::WRL2_PLANESENSOR:
|
||||
case WRL2NODES::WRL2_POINTLIGHT:
|
||||
case WRL2NODES::WRL2_POSITIONINTERPOLATOR:
|
||||
case WRL2NODES::WRL2_PROXIMITYSENSOR:
|
||||
case WRL2NODES::WRL2_SCALARINTERPOLATOR:
|
||||
case WRL2NODES::WRL2_SCRIPT:
|
||||
case WRL2NODES::WRL2_SOUND:
|
||||
case WRL2NODES::WRL2_SPHERESENSOR:
|
||||
case WRL2NODES::WRL2_SPOTLIGHT:
|
||||
case WRL2NODES::WRL2_TEXT:
|
||||
case WRL2NODES::WRL2_TEXTURECOORDINATE:
|
||||
case WRL2NODES::WRL2_TEXTURETRANSFORM:
|
||||
case WRL2NODES::WRL2_TIMESENSOR:
|
||||
case WRL2NODES::WRL2_TOUCHSENSOR:
|
||||
case WRL2NODES::WRL2_VIEWPOINT:
|
||||
case WRL2NODES::WRL2_VISIBILITYSENSOR:
|
||||
case WRL2NODES::WRL2_WORLDINFO:
|
||||
case WRL2NODES::WRL2_INVALID:
|
||||
default:
|
||||
|
||||
proc.GetFilePosData( line, column );
|
||||
|
@ -1202,7 +1202,7 @@ SGNODE* WRL2BASE::TranslateToSG( SGNODE* aParent )
|
|||
|
||||
switch( type )
|
||||
{
|
||||
case WRL2_SHAPE:
|
||||
case WRL2NODES::WRL2_SHAPE:
|
||||
// wrap the shape in a transform
|
||||
do
|
||||
{
|
||||
|
@ -1218,9 +1218,9 @@ SGNODE* WRL2BASE::TranslateToSG( SGNODE* aParent )
|
|||
|
||||
break;
|
||||
|
||||
case WRL2_TRANSFORM:
|
||||
case WRL2_SWITCH:
|
||||
case WRL2_INLINE:
|
||||
case WRL2NODES::WRL2_TRANSFORM:
|
||||
case WRL2NODES::WRL2_SWITCH:
|
||||
case WRL2NODES::WRL2_INLINE:
|
||||
|
||||
if( NULL != (*sC)->TranslateToSG( topNode.GetRawPtr() ) )
|
||||
test = true;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
WRL2BOX::WRL2BOX() : WRL2NODE()
|
||||
{
|
||||
m_Type = WRL2_BOX;
|
||||
m_Type = WRL2NODES::WRL2_BOX;
|
||||
size.x = 2.0;
|
||||
size.y = 2.0;
|
||||
size.z = 2.0;
|
||||
|
@ -44,7 +44,7 @@ WRL2BOX::WRL2BOX() : WRL2NODE()
|
|||
|
||||
WRL2BOX::WRL2BOX( WRL2NODE* aParent ) : WRL2NODE()
|
||||
{
|
||||
m_Type = WRL2_BOX;
|
||||
m_Type = WRL2NODES::WRL2_BOX;
|
||||
m_Parent = aParent;
|
||||
size.x = 2.0;
|
||||
size.y = 2.0;
|
||||
|
@ -71,7 +71,7 @@ bool WRL2BOX::isDangling( void )
|
|||
{
|
||||
// this node is dangling unless it has a parent of type WRL2_SHAPE
|
||||
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2_SHAPE )
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2NODES::WRL2_SHAPE )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
|
||||
WRL2COLOR::WRL2COLOR() : WRL2NODE()
|
||||
{
|
||||
m_Type = WRL2_COLOR;
|
||||
m_Type = WRL2NODES::WRL2_COLOR;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
WRL2COLOR::WRL2COLOR( WRL2NODE* aParent ) : WRL2NODE()
|
||||
{
|
||||
m_Type = WRL2_COLOR;
|
||||
m_Type = WRL2NODES::WRL2_COLOR;
|
||||
m_Parent = aParent;
|
||||
|
||||
if( NULL != m_Parent )
|
||||
|
@ -63,7 +63,7 @@ bool WRL2COLOR::isDangling( void )
|
|||
{
|
||||
// this node is dangling unless it has a parent of type WRL2_INDEXEDFACESET
|
||||
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2_INDEXEDFACESET )
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2NODES::WRL2_INDEXEDFACESET )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
|
||||
WRL2COORDS::WRL2COORDS() : WRL2NODE()
|
||||
{
|
||||
m_Type = WRL2_COORDINATE;
|
||||
m_Type = WRL2NODES::WRL2_COORDINATE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
WRL2COORDS::WRL2COORDS( WRL2NODE* aParent ) : WRL2NODE()
|
||||
{
|
||||
m_Type = WRL2_COORDINATE;
|
||||
m_Type = WRL2NODES::WRL2_COORDINATE;
|
||||
m_Parent = aParent;
|
||||
|
||||
if( NULL != m_Parent )
|
||||
|
@ -63,7 +63,7 @@ bool WRL2COORDS::isDangling( void )
|
|||
{
|
||||
// this node is dangling unless it has a parent of type WRL2_INDEXEDFACESET
|
||||
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2_INDEXEDFACESET )
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2NODES::WRL2_INDEXEDFACESET )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
WRL2FACESET::WRL2FACESET() : WRL2NODE()
|
||||
{
|
||||
setDefaults();
|
||||
m_Type = WRL2_INDEXEDFACESET;
|
||||
m_Type = WRL2NODES::WRL2_INDEXEDFACESET;
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ WRL2FACESET::WRL2FACESET() : WRL2NODE()
|
|||
WRL2FACESET::WRL2FACESET( WRL2NODE* aParent ) : WRL2NODE()
|
||||
{
|
||||
setDefaults();
|
||||
m_Type = WRL2_INDEXEDFACESET;
|
||||
m_Type = WRL2NODES::WRL2_INDEXEDFACESET;
|
||||
m_Parent = aParent;
|
||||
|
||||
if( NULL != m_Parent )
|
||||
|
@ -100,10 +100,10 @@ bool WRL2FACESET::checkNodeType( WRL2NODES aType )
|
|||
|
||||
switch( aType )
|
||||
{
|
||||
case WRL2_COLOR:
|
||||
case WRL2_COORDINATE:
|
||||
case WRL2_NORMAL:
|
||||
case WRL2_TEXTURECOORDINATE:
|
||||
case WRL2NODES::WRL2_COLOR:
|
||||
case WRL2NODES::WRL2_COORDINATE:
|
||||
case WRL2NODES::WRL2_NORMAL:
|
||||
case WRL2NODES::WRL2_TEXTURECOORDINATE:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -119,7 +119,7 @@ bool WRL2FACESET::isDangling( void )
|
|||
{
|
||||
// this node is dangling unless it has a parent of type WRL2_SHAPE
|
||||
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2_SHAPE )
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2NODES::WRL2_SHAPE )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -159,7 +159,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode )
|
|||
return false;
|
||||
}
|
||||
|
||||
if( WRL2_COLOR == type )
|
||||
if( WRL2NODES::WRL2_COLOR == type )
|
||||
{
|
||||
if( NULL != color )
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode )
|
|||
return WRL2NODE::AddRefNode( aNode );
|
||||
}
|
||||
|
||||
if( WRL2_COORDINATE == type )
|
||||
if( WRL2NODES::WRL2_COORDINATE == type )
|
||||
{
|
||||
if( NULL != coord )
|
||||
{
|
||||
|
@ -199,7 +199,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode )
|
|||
return WRL2NODE::AddRefNode( aNode );
|
||||
}
|
||||
|
||||
if( WRL2_NORMAL == type )
|
||||
if( WRL2NODES::WRL2_NORMAL == type )
|
||||
{
|
||||
if( NULL != normal )
|
||||
{
|
||||
|
@ -219,7 +219,7 @@ bool WRL2FACESET::AddRefNode( WRL2NODE* aNode )
|
|||
return WRL2NODE::AddRefNode( aNode );
|
||||
}
|
||||
|
||||
if( WRL2_TEXTURECOORDINATE != type )
|
||||
if( WRL2NODES::WRL2_TEXTURECOORDINATE != type )
|
||||
{
|
||||
#ifdef DEBUG_VRML2
|
||||
do {
|
||||
|
@ -285,7 +285,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode )
|
|||
return false;
|
||||
}
|
||||
|
||||
if( WRL2_COLOR == type )
|
||||
if( WRL2NODES::WRL2_COLOR == type )
|
||||
{
|
||||
if( NULL != color )
|
||||
{
|
||||
|
@ -305,7 +305,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode )
|
|||
return WRL2NODE::AddChildNode( aNode );
|
||||
}
|
||||
|
||||
if( WRL2_COORDINATE == type )
|
||||
if( WRL2NODES::WRL2_COORDINATE == type )
|
||||
{
|
||||
if( NULL != coord )
|
||||
{
|
||||
|
@ -325,7 +325,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode )
|
|||
return WRL2NODE::AddChildNode( aNode );
|
||||
}
|
||||
|
||||
if( WRL2_NORMAL == type )
|
||||
if( WRL2NODES::WRL2_NORMAL == type )
|
||||
{
|
||||
if( NULL != normal )
|
||||
{
|
||||
|
@ -345,7 +345,7 @@ bool WRL2FACESET::AddChildNode( WRL2NODE* aNode )
|
|||
return WRL2NODE::AddChildNode( aNode );
|
||||
}
|
||||
|
||||
if( WRL2_TEXTURECOORDINATE != type )
|
||||
if( WRL2NODES::WRL2_TEXTURECOORDINATE != type )
|
||||
{
|
||||
#ifdef DEBUG_VRML2
|
||||
do {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
WRL2INLINE::WRL2INLINE() : WRL2NODE()
|
||||
{
|
||||
m_VRML2Base = NULL;
|
||||
m_Type = WRL2_INLINE;
|
||||
m_Type = WRL2NODES::WRL2_INLINE;
|
||||
m_Parent = NULL;
|
||||
|
||||
return;
|
||||
|
@ -44,7 +44,7 @@ WRL2INLINE::WRL2INLINE() : WRL2NODE()
|
|||
WRL2INLINE::WRL2INLINE( WRL2NODE* aParent ) : WRL2NODE()
|
||||
{
|
||||
m_VRML2Base = NULL;
|
||||
m_Type = WRL2_INLINE;
|
||||
m_Type = WRL2NODES::WRL2_INLINE;
|
||||
m_Parent = aParent;
|
||||
|
||||
if( NULL != m_Parent )
|
||||
|
@ -73,7 +73,7 @@ bool WRL2INLINE::isDangling( void )
|
|||
|
||||
bool WRL2INLINE::Read( WRLPROC& proc, WRL2BASE* aTopNode )
|
||||
{
|
||||
if( aTopNode == NULL || aTopNode->GetNodeType() != WRL2_BASE )
|
||||
if( aTopNode == NULL || aTopNode->GetNodeType() != WRL2NODES::WRL2_BASE )
|
||||
return false;
|
||||
|
||||
m_VRML2Base = aTopNode;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
WRL2LINESET::WRL2LINESET() : WRL2NODE()
|
||||
{
|
||||
setDefaults();
|
||||
m_Type = WRL2_INDEXEDLINESET;
|
||||
m_Type = WRL2NODES::WRL2_INDEXEDLINESET;
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ WRL2LINESET::WRL2LINESET() : WRL2NODE()
|
|||
WRL2LINESET::WRL2LINESET( WRL2NODE* aParent ) : WRL2NODE()
|
||||
{
|
||||
setDefaults();
|
||||
m_Type = WRL2_INDEXEDLINESET;
|
||||
m_Type = WRL2NODES::WRL2_INDEXEDLINESET;
|
||||
m_Parent = aParent;
|
||||
|
||||
if( NULL != m_Parent )
|
||||
|
@ -87,8 +87,8 @@ bool WRL2LINESET::checkNodeType( WRL2NODES aType )
|
|||
|
||||
switch( aType )
|
||||
{
|
||||
case WRL2_COLOR:
|
||||
case WRL2_COORDINATE:
|
||||
case WRL2NODES::WRL2_COLOR:
|
||||
case WRL2NODES::WRL2_COORDINATE:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -104,7 +104,7 @@ bool WRL2LINESET::isDangling( void )
|
|||
{
|
||||
// this node is dangling unless it has a parent of type WRL2_SHAPE
|
||||
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2_SHAPE )
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2NODES::WRL2_SHAPE )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -144,7 +144,7 @@ bool WRL2LINESET::AddRefNode( WRL2NODE* aNode )
|
|||
return false;
|
||||
}
|
||||
|
||||
if( WRL2_COLOR == type )
|
||||
if( WRL2NODES::WRL2_COLOR == type )
|
||||
{
|
||||
if( NULL != color )
|
||||
{
|
||||
|
@ -164,7 +164,7 @@ bool WRL2LINESET::AddRefNode( WRL2NODE* aNode )
|
|||
return WRL2NODE::AddRefNode( aNode );
|
||||
}
|
||||
|
||||
if( WRL2_COORDINATE == type )
|
||||
if( WRL2NODES::WRL2_COORDINATE == type )
|
||||
{
|
||||
if( NULL != coord )
|
||||
{
|
||||
|
@ -221,7 +221,7 @@ bool WRL2LINESET::AddChildNode( WRL2NODE* aNode )
|
|||
return false;
|
||||
}
|
||||
|
||||
if( WRL2_COLOR == type )
|
||||
if( WRL2NODES::WRL2_COLOR == type )
|
||||
{
|
||||
if( NULL != color )
|
||||
{
|
||||
|
@ -241,7 +241,7 @@ bool WRL2LINESET::AddChildNode( WRL2NODE* aNode )
|
|||
return WRL2NODE::AddChildNode( aNode );
|
||||
}
|
||||
|
||||
if( WRL2_COORDINATE == type )
|
||||
if( WRL2NODES::WRL2_COORDINATE == type )
|
||||
{
|
||||
if( NULL != coord )
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
WRL2MATERIAL::WRL2MATERIAL() : WRL2NODE()
|
||||
{
|
||||
setDefaults();
|
||||
m_Type = WRL2_MATERIAL;
|
||||
m_Type = WRL2NODES::WRL2_MATERIAL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ WRL2MATERIAL::WRL2MATERIAL() : WRL2NODE()
|
|||
WRL2MATERIAL::WRL2MATERIAL( WRL2NODE* aParent ) : WRL2NODE()
|
||||
{
|
||||
setDefaults();
|
||||
m_Type = WRL2_MATERIAL;
|
||||
m_Type = WRL2NODES::WRL2_MATERIAL;
|
||||
m_Parent = aParent;
|
||||
|
||||
if( NULL != m_Parent )
|
||||
|
@ -85,9 +85,9 @@ void WRL2MATERIAL::setDefaults( void )
|
|||
|
||||
bool WRL2MATERIAL::isDangling( void )
|
||||
{
|
||||
// this node is dangling unless it has a parent of type WRL2_APPEARANCE
|
||||
// this node is dangling unless it has a parent of type WRL2NODES::WRL2_APPEARANCE
|
||||
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2_APPEARANCE )
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2NODES::WRL2_APPEARANCE )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -46,7 +46,7 @@ WRL2NODE::WRL2NODE()
|
|||
{
|
||||
m_sgNode = NULL;
|
||||
m_Parent = NULL;
|
||||
m_Type = WRL2_END;
|
||||
m_Type = WRL2NODES::WRL2_END;
|
||||
|
||||
if( badNames.empty() )
|
||||
{
|
||||
|
@ -68,60 +68,60 @@ WRL2NODE::WRL2NODE()
|
|||
|
||||
if( nodenames.empty() )
|
||||
{
|
||||
nodenames.insert( NODEITEM( "Anchor", WRL2_ANCHOR ) );
|
||||
nodenames.insert( NODEITEM( "Appearance", WRL2_APPEARANCE ) );
|
||||
nodenames.insert( NODEITEM( "Audioclip", WRL2_AUDIOCLIP ) );
|
||||
nodenames.insert( NODEITEM( "Background", WRL2_BACKGROUND ) );
|
||||
nodenames.insert( NODEITEM( "Billboard", WRL2_BILLBOARD ) );
|
||||
nodenames.insert( NODEITEM( "Box", WRL2_BOX ) );
|
||||
nodenames.insert( NODEITEM( "Collision", WRL2_COLLISION ) );
|
||||
nodenames.insert( NODEITEM( "Color", WRL2_COLOR ) );
|
||||
nodenames.insert( NODEITEM( "ColorInterpolator", WRL2_COLORINTERPOLATOR ) );
|
||||
nodenames.insert( NODEITEM( "Cone", WRL2_CONE ) );
|
||||
nodenames.insert( NODEITEM( "Coordinate", WRL2_COORDINATE ) );
|
||||
nodenames.insert( NODEITEM( "CoordinateInterpolator", WRL2_COORDINATEINTERPOLATOR ) );
|
||||
nodenames.insert( NODEITEM( "Cylinder", WRL2_CYLINDER ) );
|
||||
nodenames.insert( NODEITEM( "CylinderSensor", WRL2_CYLINDERSENSOR ) );
|
||||
nodenames.insert( NODEITEM( "DirectionalLight", WRL2_DIRECTIONALLIGHT ) );
|
||||
nodenames.insert( NODEITEM( "ElevationGrid", WRL2_ELEVATIONGRID ) );
|
||||
nodenames.insert( NODEITEM( "Extrusion", WRL2_EXTRUSION ) );
|
||||
nodenames.insert( NODEITEM( "Fog", WRL2_FOG ) );
|
||||
nodenames.insert( NODEITEM( "FontStyle", WRL2_FONTSTYLE ) );
|
||||
nodenames.insert( NODEITEM( "Group", WRL2_GROUP ) );
|
||||
nodenames.insert( NODEITEM( "ImageTexture", WRL2_IMAGETEXTURE ) );
|
||||
nodenames.insert( NODEITEM( "IndexedFaceSet", WRL2_INDEXEDFACESET ) );
|
||||
nodenames.insert( NODEITEM( "IndexedLineSet", WRL2_INDEXEDLINESET ) );
|
||||
nodenames.insert( NODEITEM( "Inline", WRL2_INLINE ) );
|
||||
nodenames.insert( NODEITEM( "LOD", WRL2_LOD ) );
|
||||
nodenames.insert( NODEITEM( "Material", WRL2_MATERIAL ) );
|
||||
nodenames.insert( NODEITEM( "MovieTexture", WRL2_MOVIETEXTURE ) );
|
||||
nodenames.insert( NODEITEM( "NavigationInfo", WRL2_NAVIGATIONINFO ) );
|
||||
nodenames.insert( NODEITEM( "Normal", WRL2_NORMAL ) );
|
||||
nodenames.insert( NODEITEM( "NormalInterpolator", WRL2_NORMALINTERPOLATOR ) );
|
||||
nodenames.insert( NODEITEM( "OrientationInterpolator", WRL2_ORIENTATIONINTERPOLATOR ) );
|
||||
nodenames.insert( NODEITEM( "PixelTexture", WRL2_PIXELTEXTURE ) );
|
||||
nodenames.insert( NODEITEM( "PlaneSensor", WRL2_PLANESENSOR ) );
|
||||
nodenames.insert( NODEITEM( "PointLight", WRL2_POINTLIGHT ) );
|
||||
nodenames.insert( NODEITEM( "PointSet", WRL2_POINTSET ) );
|
||||
nodenames.insert( NODEITEM( "PositionInterpolator", WRL2_POSITIONINTERPOLATOR ) );
|
||||
nodenames.insert( NODEITEM( "ProximitySensor", WRL2_PROXIMITYSENSOR ) );
|
||||
nodenames.insert( NODEITEM( "ScalarInterpolator", WRL2_SCALARINTERPOLATOR ) );
|
||||
nodenames.insert( NODEITEM( "Script", WRL2_SCRIPT ) );
|
||||
nodenames.insert( NODEITEM( "Shape", WRL2_SHAPE ) );
|
||||
nodenames.insert( NODEITEM( "Sound", WRL2_SOUND ) );
|
||||
nodenames.insert( NODEITEM( "Sphere", WRL2_SPHERE ) );
|
||||
nodenames.insert( NODEITEM( "SphereSensor", WRL2_SPHERESENSOR ) );
|
||||
nodenames.insert( NODEITEM( "SpotLight", WRL2_SPOTLIGHT ) );
|
||||
nodenames.insert( NODEITEM( "Switch", WRL2_SWITCH ) );
|
||||
nodenames.insert( NODEITEM( "Text", WRL2_TEXT ) );
|
||||
nodenames.insert( NODEITEM( "TextureCoordinate", WRL2_TEXTURECOORDINATE ) );
|
||||
nodenames.insert( NODEITEM( "TextureTransform", WRL2_TEXTURETRANSFORM ) );
|
||||
nodenames.insert( NODEITEM( "TimeSensor", WRL2_TIMESENSOR ) );
|
||||
nodenames.insert( NODEITEM( "TouchSensor", WRL2_TOUCHSENSOR ) );
|
||||
nodenames.insert( NODEITEM( "Transform", WRL2_TRANSFORM ) );
|
||||
nodenames.insert( NODEITEM( "ViewPoint", WRL2_VIEWPOINT ) );
|
||||
nodenames.insert( NODEITEM( "VisibilitySensor", WRL2_VISIBILITYSENSOR ) );
|
||||
nodenames.insert( NODEITEM( "WorldInfo", WRL2_WORLDINFO ) );
|
||||
nodenames.insert( NODEITEM( "Anchor", WRL2NODES::WRL2_ANCHOR ) );
|
||||
nodenames.insert( NODEITEM( "Appearance", WRL2NODES::WRL2_APPEARANCE ) );
|
||||
nodenames.insert( NODEITEM( "Audioclip", WRL2NODES::WRL2_AUDIOCLIP ) );
|
||||
nodenames.insert( NODEITEM( "Background", WRL2NODES::WRL2_BACKGROUND ) );
|
||||
nodenames.insert( NODEITEM( "Billboard", WRL2NODES::WRL2_BILLBOARD ) );
|
||||
nodenames.insert( NODEITEM( "Box", WRL2NODES::WRL2_BOX ) );
|
||||
nodenames.insert( NODEITEM( "Collision", WRL2NODES::WRL2_COLLISION ) );
|
||||
nodenames.insert( NODEITEM( "Color", WRL2NODES::WRL2_COLOR ) );
|
||||
nodenames.insert( NODEITEM( "ColorInterpolator", WRL2NODES::WRL2_COLORINTERPOLATOR ) );
|
||||
nodenames.insert( NODEITEM( "Cone", WRL2NODES::WRL2_CONE ) );
|
||||
nodenames.insert( NODEITEM( "Coordinate", WRL2NODES::WRL2_COORDINATE ) );
|
||||
nodenames.insert( NODEITEM( "CoordinateInterpolator", WRL2NODES::WRL2_COORDINATEINTERPOLATOR ) );
|
||||
nodenames.insert( NODEITEM( "Cylinder", WRL2NODES::WRL2_CYLINDER ) );
|
||||
nodenames.insert( NODEITEM( "CylinderSensor", WRL2NODES::WRL2_CYLINDERSENSOR ) );
|
||||
nodenames.insert( NODEITEM( "DirectionalLight", WRL2NODES::WRL2_DIRECTIONALLIGHT ) );
|
||||
nodenames.insert( NODEITEM( "ElevationGrid", WRL2NODES::WRL2_ELEVATIONGRID ) );
|
||||
nodenames.insert( NODEITEM( "Extrusion", WRL2NODES::WRL2_EXTRUSION ) );
|
||||
nodenames.insert( NODEITEM( "Fog", WRL2NODES::WRL2_FOG ) );
|
||||
nodenames.insert( NODEITEM( "FontStyle", WRL2NODES::WRL2_FONTSTYLE ) );
|
||||
nodenames.insert( NODEITEM( "Group", WRL2NODES::WRL2_GROUP ) );
|
||||
nodenames.insert( NODEITEM( "ImageTexture", WRL2NODES::WRL2_IMAGETEXTURE ) );
|
||||
nodenames.insert( NODEITEM( "IndexedFaceSet", WRL2NODES::WRL2_INDEXEDFACESET ) );
|
||||
nodenames.insert( NODEITEM( "IndexedLineSet", WRL2NODES::WRL2_INDEXEDLINESET ) );
|
||||
nodenames.insert( NODEITEM( "Inline", WRL2NODES::WRL2_INLINE ) );
|
||||
nodenames.insert( NODEITEM( "LOD", WRL2NODES::WRL2_LOD ) );
|
||||
nodenames.insert( NODEITEM( "Material", WRL2NODES::WRL2_MATERIAL ) );
|
||||
nodenames.insert( NODEITEM( "MovieTexture", WRL2NODES::WRL2_MOVIETEXTURE ) );
|
||||
nodenames.insert( NODEITEM( "NavigationInfo", WRL2NODES::WRL2_NAVIGATIONINFO ) );
|
||||
nodenames.insert( NODEITEM( "Normal", WRL2NODES::WRL2_NORMAL ) );
|
||||
nodenames.insert( NODEITEM( "NormalInterpolator", WRL2NODES::WRL2_NORMALINTERPOLATOR ) );
|
||||
nodenames.insert( NODEITEM( "OrientationInterpolator", WRL2NODES::WRL2_ORIENTATIONINTERPOLATOR ) );
|
||||
nodenames.insert( NODEITEM( "PixelTexture", WRL2NODES::WRL2_PIXELTEXTURE ) );
|
||||
nodenames.insert( NODEITEM( "PlaneSensor", WRL2NODES::WRL2_PLANESENSOR ) );
|
||||
nodenames.insert( NODEITEM( "PointLight", WRL2NODES::WRL2_POINTLIGHT ) );
|
||||
nodenames.insert( NODEITEM( "PointSet", WRL2NODES::WRL2_POINTSET ) );
|
||||
nodenames.insert( NODEITEM( "PositionInterpolator", WRL2NODES::WRL2_POSITIONINTERPOLATOR ) );
|
||||
nodenames.insert( NODEITEM( "ProximitySensor", WRL2NODES::WRL2_PROXIMITYSENSOR ) );
|
||||
nodenames.insert( NODEITEM( "ScalarInterpolator", WRL2NODES::WRL2_SCALARINTERPOLATOR ) );
|
||||
nodenames.insert( NODEITEM( "Script", WRL2NODES::WRL2_SCRIPT ) );
|
||||
nodenames.insert( NODEITEM( "Shape", WRL2NODES::WRL2_SHAPE ) );
|
||||
nodenames.insert( NODEITEM( "Sound", WRL2NODES::WRL2_SOUND ) );
|
||||
nodenames.insert( NODEITEM( "Sphere", WRL2NODES::WRL2_SPHERE ) );
|
||||
nodenames.insert( NODEITEM( "SphereSensor", WRL2NODES::WRL2_SPHERESENSOR ) );
|
||||
nodenames.insert( NODEITEM( "SpotLight", WRL2NODES::WRL2_SPOTLIGHT ) );
|
||||
nodenames.insert( NODEITEM( "Switch", WRL2NODES::WRL2_SWITCH ) );
|
||||
nodenames.insert( NODEITEM( "Text", WRL2NODES::WRL2_TEXT ) );
|
||||
nodenames.insert( NODEITEM( "TextureCoordinate", WRL2NODES::WRL2_TEXTURECOORDINATE ) );
|
||||
nodenames.insert( NODEITEM( "TextureTransform", WRL2NODES::WRL2_TEXTURETRANSFORM ) );
|
||||
nodenames.insert( NODEITEM( "TimeSensor", WRL2NODES::WRL2_TIMESENSOR ) );
|
||||
nodenames.insert( NODEITEM( "TouchSensor", WRL2NODES::WRL2_TOUCHSENSOR ) );
|
||||
nodenames.insert( NODEITEM( "Transform", WRL2NODES::WRL2_TRANSFORM ) );
|
||||
nodenames.insert( NODEITEM( "ViewPoint", WRL2NODES::WRL2_VIEWPOINT ) );
|
||||
nodenames.insert( NODEITEM( "VisibilitySensor", WRL2NODES::WRL2_VISIBILITYSENSOR ) );
|
||||
nodenames.insert( NODEITEM( "WorldInfo", WRL2NODES::WRL2_WORLDINFO ) );
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -294,14 +294,14 @@ bool WRL2NODE::SetName( const std::string& aName )
|
|||
|
||||
const char* WRL2NODE::GetNodeTypeName( WRL2NODES aNodeType ) const
|
||||
{
|
||||
if( aNodeType < WRL2_BASE || aNodeType >= WRL2_END )
|
||||
if( aNodeType < WRL2NODES::WRL2_BASE || aNodeType >= WRL2NODES::WRL2_END )
|
||||
return "*INVALID_TYPE*";
|
||||
|
||||
if( aNodeType == WRL2_BASE )
|
||||
if( aNodeType == WRL2NODES::WRL2_BASE )
|
||||
return "*VIRTUAL_BASE*";
|
||||
|
||||
NODEMAP::iterator it = nodenames.begin();
|
||||
advance( it, (aNodeType - WRL2_BEGIN) );
|
||||
advance( it, (static_cast<int>( aNodeType ) - static_cast<int>( WRL2NODES::WRL2_BEGIN ) ) );
|
||||
|
||||
return it->first.c_str();
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ WRL2NODES WRL2NODE::getNodeTypeID( const std::string& aNodeName )
|
|||
if( nodenames.end() != it )
|
||||
return it->second;
|
||||
|
||||
return WRL2_INVALID;
|
||||
return WRL2NODES::WRL2_INVALID;
|
||||
}
|
||||
|
||||
|
||||
|
@ -379,7 +379,7 @@ bool WRL2NODE::AddChildNode( WRL2NODE* aNode )
|
|||
if( aNode == NULL )
|
||||
return false;
|
||||
|
||||
if( aNode->GetNodeType() == WRL2_BASE )
|
||||
if( aNode->GetNodeType() == WRL2NODES::WRL2_BASE )
|
||||
{
|
||||
#ifdef DEBUG_VRML2
|
||||
do {
|
||||
|
@ -429,7 +429,7 @@ bool WRL2NODE::AddRefNode( WRL2NODE* aNode )
|
|||
return false;
|
||||
}
|
||||
|
||||
if( aNode->GetNodeType() == WRL2_BASE )
|
||||
if( aNode->GetNodeType() == WRL2NODES::WRL2_BASE )
|
||||
{
|
||||
#ifdef DEBUG_VRML2
|
||||
do {
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
|
||||
WRL2NORMS::WRL2NORMS() : WRL2NODE()
|
||||
{
|
||||
m_Type = WRL2_NORMAL;
|
||||
m_Type = WRL2NODES::WRL2_NORMAL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
WRL2NORMS::WRL2NORMS( WRL2NODE* aParent ) : WRL2NODE()
|
||||
{
|
||||
m_Type = WRL2_NORMAL;
|
||||
m_Type = WRL2NODES::WRL2_NORMAL;
|
||||
m_Parent = aParent;
|
||||
|
||||
if( NULL != m_Parent )
|
||||
|
@ -63,7 +63,7 @@ bool WRL2NORMS::isDangling( void )
|
|||
{
|
||||
// this node is dangling unless it has a parent of type WRL2_INDEXEDFACESET
|
||||
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2_INDEXEDFACESET )
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2NODES::WRL2_INDEXEDFACESET )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
WRL2POINTSET::WRL2POINTSET() : WRL2NODE()
|
||||
{
|
||||
setDefaults();
|
||||
m_Type = WRL2_POINTSET;
|
||||
m_Type = WRL2NODES::WRL2_POINTSET;
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ WRL2POINTSET::WRL2POINTSET() : WRL2NODE()
|
|||
WRL2POINTSET::WRL2POINTSET( WRL2NODE* aParent ) : WRL2NODE()
|
||||
{
|
||||
setDefaults();
|
||||
m_Type = WRL2_POINTSET;
|
||||
m_Type = WRL2NODES::WRL2_POINTSET;
|
||||
m_Parent = aParent;
|
||||
|
||||
if( NULL != m_Parent )
|
||||
|
@ -86,8 +86,8 @@ bool WRL2POINTSET::checkNodeType( WRL2NODES aType )
|
|||
|
||||
switch( aType )
|
||||
{
|
||||
case WRL2_COLOR:
|
||||
case WRL2_COORDINATE:
|
||||
case WRL2NODES::WRL2_COLOR:
|
||||
case WRL2NODES::WRL2_COORDINATE:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -103,7 +103,7 @@ bool WRL2POINTSET::isDangling( void )
|
|||
{
|
||||
// this node is dangling unless it has a parent of type WRL2_SHAPE
|
||||
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2_SHAPE )
|
||||
if( NULL == m_Parent || m_Parent->GetNodeType() != WRL2NODES::WRL2_SHAPE )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -143,7 +143,7 @@ bool WRL2POINTSET::AddRefNode( WRL2NODE* aNode )
|
|||
return false;
|
||||
}
|
||||
|
||||
if( WRL2_COLOR == type )
|
||||
if( WRL2NODES::WRL2_COLOR == type )
|
||||
{
|
||||
if( NULL != color )
|
||||
{
|
||||
|
@ -163,7 +163,7 @@ bool WRL2POINTSET::AddRefNode( WRL2NODE* aNode )
|
|||
return WRL2NODE::AddRefNode( aNode );
|
||||
}
|
||||
|
||||
if( WRL2_COORDINATE == type )
|
||||
if( WRL2NODES::WRL2_COORDINATE == type )
|
||||
{
|
||||
if( NULL != coord )
|
||||
{
|
||||
|
@ -220,7 +220,7 @@ bool WRL2POINTSET::AddChildNode( WRL2NODE* aNode )
|
|||
return false;
|
||||
}
|
||||
|
||||
if( WRL2_COLOR == type )
|
||||
if( WRL2NODES::WRL2_COLOR == type )
|
||||
{
|
||||
if( NULL != color )
|
||||
{
|
||||
|
@ -240,7 +240,7 @@ bool WRL2POINTSET::AddChildNode( WRL2NODE* aNode )
|
|||
return WRL2NODE::AddChildNode( aNode );
|
||||
}
|
||||
|
||||
if( WRL2_COORDINATE == type )
|
||||
if( WRL2NODES::WRL2_COORDINATE == type )
|
||||
{
|
||||
if( NULL != coord )
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@ WRL2SHAPE::WRL2SHAPE() : WRL2NODE()
|
|||
{
|
||||
appearance = NULL;
|
||||
geometry = NULL;
|
||||
m_Type = WRL2_SHAPE;
|
||||
m_Type = WRL2NODES::WRL2_SHAPE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ WRL2SHAPE::WRL2SHAPE( WRL2NODE* aParent ) : WRL2NODE()
|
|||
{
|
||||
appearance = NULL;
|
||||
geometry = NULL;
|
||||
m_Type = WRL2_SHAPE;
|
||||
m_Type = WRL2NODES::WRL2_SHAPE;
|
||||
m_Parent = aParent;
|
||||
|
||||
if( NULL != m_Parent )
|
||||
|
@ -78,8 +78,8 @@ bool WRL2SHAPE::isDangling( void )
|
|||
// WRL2_SWITCH
|
||||
|
||||
if( NULL == m_Parent
|
||||
|| ( m_Parent->GetNodeType() != WRL2_TRANSFORM
|
||||
&& m_Parent->GetNodeType() != WRL2_SWITCH ) )
|
||||
|| ( m_Parent->GetNodeType() != WRL2NODES::WRL2_TRANSFORM
|
||||
&& m_Parent->GetNodeType() != WRL2NODES::WRL2_SWITCH ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -119,7 +119,7 @@ bool WRL2SHAPE::AddRefNode( WRL2NODE* aNode )
|
|||
return false;
|
||||
}
|
||||
|
||||
if( WRL2_APPEARANCE == type )
|
||||
if( WRL2NODES::WRL2_APPEARANCE == type )
|
||||
{
|
||||
if( NULL != appearance )
|
||||
{
|
||||
|
@ -191,7 +191,7 @@ bool WRL2SHAPE::AddChildNode( WRL2NODE* aNode )
|
|||
return false;
|
||||
}
|
||||
|
||||
if( WRL2_APPEARANCE == type )
|
||||
if( WRL2NODES::WRL2_APPEARANCE == type )
|
||||
{
|
||||
if( NULL != appearance )
|
||||
{
|
||||
|
@ -234,17 +234,17 @@ bool WRL2SHAPE::checkNodeType( WRL2NODES aType )
|
|||
{
|
||||
switch( aType )
|
||||
{
|
||||
case WRL2_APPEARANCE:
|
||||
case WRL2_BOX:
|
||||
case WRL2_CONE:
|
||||
case WRL2_CYLINDER:
|
||||
case WRL2_ELEVATIONGRID:
|
||||
case WRL2_EXTRUSION:
|
||||
case WRL2_INDEXEDFACESET:
|
||||
case WRL2_INDEXEDLINESET:
|
||||
case WRL2_POINTSET:
|
||||
case WRL2_SPHERE:
|
||||
case WRL2_TEXT:
|
||||
case WRL2NODES::WRL2_APPEARANCE:
|
||||
case WRL2NODES::WRL2_BOX:
|
||||
case WRL2NODES::WRL2_CONE:
|
||||
case WRL2NODES::WRL2_CYLINDER:
|
||||
case WRL2NODES::WRL2_ELEVATIONGRID:
|
||||
case WRL2NODES::WRL2_EXTRUSION:
|
||||
case WRL2NODES::WRL2_INDEXEDFACESET:
|
||||
case WRL2NODES::WRL2_INDEXEDLINESET:
|
||||
case WRL2NODES::WRL2_POINTSET:
|
||||
case WRL2NODES::WRL2_SPHERE:
|
||||
case WRL2NODES::WRL2_TEXT:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -401,9 +401,9 @@ SGNODE* WRL2SHAPE::TranslateToSG( SGNODE* aParent )
|
|||
|
||||
switch( geomType )
|
||||
{
|
||||
case WRL2_INDEXEDLINESET:
|
||||
case WRL2_POINTSET:
|
||||
case WRL2_TEXT:
|
||||
case WRL2NODES::WRL2_INDEXEDLINESET:
|
||||
case WRL2NODES::WRL2_POINTSET:
|
||||
case WRL2NODES::WRL2_TEXT:
|
||||
return NULL;
|
||||
break;
|
||||
|
||||
|
@ -423,13 +423,13 @@ SGNODE* WRL2SHAPE::TranslateToSG( SGNODE* aParent )
|
|||
|
||||
bool vcolors = false;
|
||||
|
||||
if( WRL2_INDEXEDFACESET == geometry->GetNodeType() )
|
||||
if( WRL2NODES::WRL2_INDEXEDFACESET == geometry->GetNodeType() )
|
||||
vcolors = ((WRL2FACESET*)geometry)->HasColors();
|
||||
|
||||
// if there is no appearance, make use of the per vertex colors if available
|
||||
if( NULL == appearance )
|
||||
{
|
||||
if( WRL2_INDEXEDFACESET != geometry->GetNodeType() )
|
||||
if( WRL2NODES::WRL2_INDEXEDFACESET != geometry->GetNodeType() )
|
||||
return NULL;
|
||||
|
||||
if( !vcolors )
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
WRL2SWITCH::WRL2SWITCH() : WRL2NODE()
|
||||
{
|
||||
m_Type = WRL2_SWITCH;
|
||||
m_Type = WRL2NODES::WRL2_SWITCH;
|
||||
whichChoice = -1;
|
||||
|
||||
return;
|
||||
|
@ -41,7 +41,7 @@ WRL2SWITCH::WRL2SWITCH() : WRL2NODE()
|
|||
|
||||
WRL2SWITCH::WRL2SWITCH( WRL2NODE* aParent ) : WRL2NODE()
|
||||
{
|
||||
m_Type = WRL2_SWITCH;
|
||||
m_Type = WRL2NODES::WRL2_SWITCH;
|
||||
m_Parent = aParent;
|
||||
whichChoice = -1;
|
||||
|
||||
|
@ -230,7 +230,7 @@ bool WRL2SWITCH::AddRefNode( WRL2NODE* aNode )
|
|||
}
|
||||
|
||||
// take possession if the node is dangling WRL2_SHAPE
|
||||
if( WRL2_SHAPE == aNode->GetNodeType() && aNode->isDangling() )
|
||||
if( WRL2NODES::WRL2_SHAPE == aNode->GetNodeType() && aNode->isDangling() )
|
||||
{
|
||||
WRL2NODE* np = aNode->GetParent();
|
||||
|
||||
|
@ -371,10 +371,10 @@ SGNODE* WRL2SWITCH::TranslateToSG( SGNODE* aParent )
|
|||
|
||||
switch( type )
|
||||
{
|
||||
case WRL2_SHAPE:
|
||||
case WRL2_SWITCH:
|
||||
case WRL2_INLINE:
|
||||
case WRL2_TRANSFORM:
|
||||
case WRL2NODES::WRL2_SHAPE:
|
||||
case WRL2NODES::WRL2_SWITCH:
|
||||
case WRL2NODES::WRL2_INLINE:
|
||||
case WRL2NODES::WRL2_TRANSFORM:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
|
||||
WRL2TRANSFORM::WRL2TRANSFORM() : WRL2NODE()
|
||||
{
|
||||
m_Type = WRL2_TRANSFORM;
|
||||
m_Type = WRL2NODES::WRL2_TRANSFORM;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
WRL2TRANSFORM::WRL2TRANSFORM( WRL2NODE* aParent ) : WRL2NODE()
|
||||
{
|
||||
m_Type = WRL2_TRANSFORM;
|
||||
m_Type = WRL2NODES::WRL2_TRANSFORM;
|
||||
m_Parent = aParent;
|
||||
|
||||
if( NULL != m_Parent )
|
||||
|
@ -345,7 +345,7 @@ bool WRL2TRANSFORM::AddRefNode( WRL2NODE* aNode )
|
|||
|
||||
// take possession if the node is dangling WRL2_SHAPE
|
||||
|
||||
if( WRL2_SHAPE == aNode->GetNodeType() && aNode->isDangling() )
|
||||
if( WRL2NODES::WRL2_SHAPE == aNode->GetNodeType() && aNode->isDangling() )
|
||||
{
|
||||
WRL2NODE* np = aNode->GetParent();
|
||||
|
||||
|
@ -495,10 +495,10 @@ SGNODE* WRL2TRANSFORM::TranslateToSG( SGNODE* aParent )
|
|||
|
||||
switch( type )
|
||||
{
|
||||
case WRL2_SHAPE:
|
||||
case WRL2_SWITCH:
|
||||
case WRL2_INLINE:
|
||||
case WRL2_TRANSFORM:
|
||||
case WRL2NODES::WRL2_SHAPE:
|
||||
case WRL2NODES::WRL2_SWITCH:
|
||||
case WRL2NODES::WRL2_INLINE:
|
||||
case WRL2NODES::WRL2_TRANSFORM:
|
||||
|
||||
if( NULL != (*sC)->TranslateToSG( txNode.GetRawPtr() ) )
|
||||
test = true;
|
||||
|
|
|
@ -118,11 +118,11 @@ enum WRL1_ORDER
|
|||
// These are used to look up node names and to quickly
|
||||
// determine what routine to invoke to read a section of
|
||||
// a file.
|
||||
enum WRL2NODES
|
||||
enum class WRL2NODES
|
||||
{
|
||||
WRL2_BASE = 0, // not really a VRML node but we need a top level virtual node
|
||||
WRL2_BEGIN,
|
||||
WRL2_ANCHOR = WRL2_BEGIN,
|
||||
WRL2_ANCHOR = WRL2NODES::WRL2_BEGIN,
|
||||
WRL2_APPEARANCE,
|
||||
WRL2_AUDIOCLIP,
|
||||
WRL2_BACKGROUND,
|
||||
|
|
Loading…
Reference in New Issue