Renamed the osg::EarthSky to osg::ClearNode to make it more obvious what

role it has play and make it more relevant to non vis-sim applications.
This commit is contained in:
Robert Osfield
2002-08-19 11:42:37 +00:00
parent c72953d94b
commit b23a48a763
15 changed files with 71 additions and 96 deletions

View File

@@ -36,7 +36,7 @@
// UNSUPPORTED:
//
// - OSG Scene Graph Node Types:
// LightSource, Transform, Imposter, EarthSky,
// LightSource, Transform, Imposter, ClearNode,
// Switch - only active child written
// LOD - only most detailed child written
// Billboard - only static translation transform parenting child written,
@@ -2404,7 +2404,7 @@ class StateSetActionVisitor : public osg::NodeVisitor
void apply(osg::Switch& node) { NodeVisitor::apply(node); }
void apply(osg::LOD& node) { NodeVisitor::apply(node); }
void apply(osg::Impostor& node) { NodeVisitor::apply(node); }
void apply(osg::EarthSky& node) { NodeVisitor::apply(node); }
void apply(osg::ClearNode& node) { NodeVisitor::apply(node); }
const osg::StateSet &GetActiveStateSet()
@@ -2488,7 +2488,7 @@ class DXWriteVisitor : public StateSetActionVisitor
MessageBin &msg_bin;
enum NodeTypes { LOD, BILLBOARD, LIGHTSOURCE, TRANSFORM, SWITCH,
IMPOSTER, EARTHSKY };
IMPOSTER, CLEARNODE };
typedef std::map< NodeTypes, int > StringMap;
StringMap problem_nodes;
@@ -2612,8 +2612,8 @@ class DXWriteVisitor : public StateSetActionVisitor
{ problem_nodes[ TRANSFORM ]++; apply((osg::Group&)node); }
void apply(osg::Impostor& node)
{ problem_nodes[ IMPOSTER ]++; apply((osg::LOD&)node); }
void apply(osg::EarthSky& node)
{ problem_nodes[ EARTHSKY ]++; apply((osg::Group&)node); }
void apply(osg::ClearNode& node)
{ problem_nodes[ CLEARNODE ]++; apply((osg::Group&)node); }
void ReportProblems();
};
@@ -2652,8 +2652,8 @@ void DXWriteVisitor::ReportProblems()
msg_bin.Add( "WARNING: %d Imposter(s) found ... Skipped.\n",
smitr->second );
break;
case EARTHSKY :
msg_bin.Add( "WARNING: %d EarthSky(s) found ... Skipped.\n",
case CLEARNODE :
msg_bin.Add( "WARNING: %d ClearNode(s) found ... Skipped.\n",
smitr->second );
break;
}

View File

@@ -15,14 +15,6 @@ bool BlendFunc_matchModeStr(const char* str,int& mode);
const char* BlendFunc_getModeStr(int value);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_BlendFuncProxy
(
osgNew osg::BlendFunc,
"BlendFunc",
"Object StateAttribute BlendFunc",
&BlendFunc_readLocalData,
&BlendFunc_writeLocalData
);
RegisterDotOsgWrapperProxy g_TransparencyProxy
(
@@ -33,6 +25,15 @@ RegisterDotOsgWrapperProxy g_TransparencyProxy
&BlendFunc_writeLocalData
);
RegisterDotOsgWrapperProxy g_BlendFuncProxy
(
osgNew osg::BlendFunc,
"BlendFunc",
"Object StateAttribute BlendFunc",
&BlendFunc_readLocalData,
&BlendFunc_writeLocalData
);
bool BlendFunc_readLocalData(Object& obj, Input& fr)
{
bool iteratorAdvanced = false;

View File

@@ -1,4 +1,4 @@
#include "osg/EarthSky"
#include "osg/ClearNode"
#include "osgDB/Registry"
#include "osgDB/Input"
@@ -8,24 +8,34 @@ using namespace osg;
using namespace osgDB;
// forward declare functions to use later.
bool EarthSky_readLocalData(Object& obj, Input& fr);
bool EarthSky_writeLocalData(const Object& obj, Output& fw);
bool ClearNode_readLocalData(Object& obj, Input& fr);
bool ClearNode_writeLocalData(const Object& obj, Output& fw);
// register the read and write functions with the osgDB::Registry.
RegisterDotOsgWrapperProxy g_EarthSkyProxy
(
osgNew osg::EarthSky,
osgNew osg::ClearNode,
"EarthSky",
"Object Node EarthSky Group",
&EarthSky_readLocalData,
&EarthSky_writeLocalData
&ClearNode_readLocalData,
&ClearNode_writeLocalData
);
bool EarthSky_readLocalData(Object& obj, Input& fr)
RegisterDotOsgWrapperProxy g_ClearNodeProxy
(
osgNew osg::ClearNode,
"ClearNode",
"Object Node ClearNode Group",
&ClearNode_readLocalData,
&ClearNode_writeLocalData
);
bool ClearNode_readLocalData(Object& obj, Input& fr)
{
bool iteratorAdvanced = false;
EarthSky& es = static_cast<EarthSky&>(obj);
ClearNode& es = static_cast<ClearNode&>(obj);
if (fr.matchSequence("requiresClear"))
{
@@ -60,9 +70,9 @@ bool EarthSky_readLocalData(Object& obj, Input& fr)
}
bool EarthSky_writeLocalData(const Object& obj, Output& fw)
bool ClearNode_writeLocalData(const Object& obj, Output& fw)
{
const EarthSky& es = static_cast<const EarthSky&>(obj);
const ClearNode& es = static_cast<const ClearNode&>(obj);
fw.indent() << "requiresClear ";
if (es.getRequiresClear())

View File

@@ -12,7 +12,7 @@ CXXFILES =\
Depth.cpp\
DOFTransform.cpp\
Drawable.cpp\
EarthSky.cpp\
ClearNode.cpp\
Fog.cpp\
FrontFace.cpp\
Geode.cpp\