Changed tabs to spaces
This commit is contained in:
@@ -136,44 +136,44 @@ struct CallbackOperator : public ObjectOperator
|
||||
|
||||
virtual void setPause(bool pause)
|
||||
{
|
||||
osg::AnimationPathCallback* apc = dynamic_cast<osg::AnimationPathCallback*>(_callback.get());
|
||||
osgUtil::TransformCallback* tc = dynamic_cast<osgUtil::TransformCallback*>(_callback.get());
|
||||
ss3d::AnimationMaterialCallback* amc = dynamic_cast<ss3d::AnimationMaterialCallback*>(_callback.get());
|
||||
if (apc)
|
||||
{
|
||||
osg::AnimationPathCallback* apc = dynamic_cast<osg::AnimationPathCallback*>(_callback.get());
|
||||
osgUtil::TransformCallback* tc = dynamic_cast<osgUtil::TransformCallback*>(_callback.get());
|
||||
ss3d::AnimationMaterialCallback* amc = dynamic_cast<ss3d::AnimationMaterialCallback*>(_callback.get());
|
||||
if (apc)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"apc->setPause("<<pause<<")"<<std::endl;
|
||||
apc->setPause(pause);
|
||||
}
|
||||
if (tc)
|
||||
{
|
||||
}
|
||||
if (tc)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"tc->setPause("<<pause<<")"<<std::endl;
|
||||
tc->setPause(pause);
|
||||
}
|
||||
if (amc)
|
||||
{
|
||||
}
|
||||
if (amc)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"amc->setPause("<<pause<<")"<<std::endl;
|
||||
amc->setPause(pause);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void reset()
|
||||
{
|
||||
osg::AnimationPathCallback* apc = dynamic_cast<osg::AnimationPathCallback*>(_callback.get());
|
||||
osgUtil::TransformCallback* tc = dynamic_cast<osgUtil::TransformCallback*>(_callback.get());
|
||||
ss3d::AnimationMaterialCallback* amc = dynamic_cast<ss3d::AnimationMaterialCallback*>(_callback.get());
|
||||
if (apc)
|
||||
{
|
||||
osg::AnimationPathCallback* apc = dynamic_cast<osg::AnimationPathCallback*>(_callback.get());
|
||||
osgUtil::TransformCallback* tc = dynamic_cast<osgUtil::TransformCallback*>(_callback.get());
|
||||
ss3d::AnimationMaterialCallback* amc = dynamic_cast<ss3d::AnimationMaterialCallback*>(_callback.get());
|
||||
if (apc)
|
||||
{
|
||||
apc->reset();
|
||||
apc->update(*_node);
|
||||
}
|
||||
if (tc)
|
||||
{
|
||||
}
|
||||
if (amc)
|
||||
{
|
||||
}
|
||||
if (tc)
|
||||
{
|
||||
}
|
||||
if (amc)
|
||||
{
|
||||
amc->reset();
|
||||
amc->update(*_node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ struct LayerAttributesOperator : public ObjectOperator
|
||||
|
||||
int result = system(itr->c_str());
|
||||
|
||||
osg::notify(osg::INFO)<<"system("<<*itr<<") result "<<result<<std::endl;
|
||||
osg::notify(osg::INFO)<<"system("<<*itr<<") result "<<result<<std::endl;
|
||||
|
||||
double timeForRun = osg::Timer::instance()->delta_s(startTick, osg::Timer::instance()->tick());
|
||||
|
||||
@@ -266,29 +266,28 @@ public:
|
||||
FindOperatorsVisitor(ActiveOperators::OperatorList& operatorList, osg::NodeVisitor::TraversalMode tm):
|
||||
osg::NodeVisitor(tm),
|
||||
_operatorList(operatorList) {}
|
||||
|
||||
void apply(osg::Node& node)
|
||||
{
|
||||
if (node.getStateSet()) process(node.getStateSet());
|
||||
|
||||
if (node.getUpdateCallback())
|
||||
{
|
||||
void apply(osg::Node& node)
|
||||
{
|
||||
if (node.getStateSet()) process(node.getStateSet());
|
||||
|
||||
if (node.getUpdateCallback())
|
||||
{
|
||||
_operatorList.insert(new CallbackOperator(&node, node.getUpdateCallback()));
|
||||
}
|
||||
}
|
||||
|
||||
LayerAttributes* la = dynamic_cast<LayerAttributes*>(node.getUserData());
|
||||
if (la)
|
||||
{
|
||||
_operatorList.insert(new LayerAttributesOperator(&node, la));
|
||||
}
|
||||
|
||||
|
||||
traverse(node);
|
||||
}
|
||||
|
||||
void apply(osg::Geode& node)
|
||||
{
|
||||
apply((osg::Node&)node);
|
||||
|
||||
for(unsigned int i=0;i<node.getNumDrawables();++i)
|
||||
{
|
||||
osg::Drawable* drawable = node.getDrawable(i);
|
||||
@@ -308,8 +307,8 @@ public:
|
||||
_operatorList.insert(new ImageStreamOperator(imageStream));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ActiveOperators::OperatorList& _operatorList;
|
||||
};
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
|
||||
struct PositionData
|
||||
{
|
||||
PositionData():
|
||||
PositionData():
|
||||
frame(SlideShowConstructor::SLIDE),
|
||||
position(0.0f,1.0f,0.0f),
|
||||
//position(0.5f,0.5f,0.0f),
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
rotate(0.0f,0.0f,0.0f,1.0f),
|
||||
rotation(0.0f,0.0f,1.0f,0.0f),
|
||||
absolute_path(false),
|
||||
inverse_path(false),
|
||||
inverse_path(false),
|
||||
path_time_offset(0.0),
|
||||
path_time_multiplier(1.0f),
|
||||
path_loop_mode(osg::AnimationPath::NO_LOOPING),
|
||||
@@ -155,23 +155,23 @@ public:
|
||||
return !animation_material_filename.empty() || !fade.empty();
|
||||
}
|
||||
|
||||
CoordinateFrame frame;
|
||||
osg::Vec3 position;
|
||||
osg::Vec3 scale;
|
||||
osg::Vec4 rotate;
|
||||
osg::Vec4 rotation;
|
||||
CoordinateFrame frame;
|
||||
osg::Vec3 position;
|
||||
osg::Vec3 scale;
|
||||
osg::Vec4 rotate;
|
||||
osg::Vec4 rotation;
|
||||
std::string animation_name;
|
||||
bool absolute_path;
|
||||
bool inverse_path;
|
||||
bool absolute_path;
|
||||
bool inverse_path;
|
||||
double path_time_offset;
|
||||
double path_time_multiplier;
|
||||
osg::AnimationPath::LoopMode path_loop_mode;
|
||||
std::string path;
|
||||
std::string path;
|
||||
double animation_material_time_offset;
|
||||
double animation_material_time_multiplier;
|
||||
ss3d::AnimationMaterial::LoopMode animation_material_loop_mode;
|
||||
std::string animation_material_filename;
|
||||
std::string fade;
|
||||
std::string animation_material_filename;
|
||||
std::string fade;
|
||||
};
|
||||
|
||||
struct ModelData
|
||||
@@ -206,24 +206,24 @@ public:
|
||||
|
||||
struct FontData
|
||||
{
|
||||
FontData():
|
||||
font("fonts/arial.ttf"),
|
||||
layout(osgText::Text::LEFT_TO_RIGHT),
|
||||
alignment(osgText::Text::LEFT_BASE_LINE),
|
||||
axisAlignment(osgText::Text::XZ_PLANE),
|
||||
characterSize(0.04f),
|
||||
maximumHeight(1.0f),
|
||||
maximumWidth(1.0f),
|
||||
color(1.0f,1.0f,1.0f,1.0f) {}
|
||||
|
||||
std::string font;
|
||||
osgText::Text::Layout layout;
|
||||
osgText::Text::AlignmentType alignment;
|
||||
osgText::Text::AxisAlignment axisAlignment;
|
||||
float characterSize;
|
||||
float maximumHeight;
|
||||
float maximumWidth;
|
||||
osg::Vec4 color;
|
||||
FontData():
|
||||
font("fonts/arial.ttf"),
|
||||
layout(osgText::Text::LEFT_TO_RIGHT),
|
||||
alignment(osgText::Text::LEFT_BASE_LINE),
|
||||
axisAlignment(osgText::Text::XZ_PLANE),
|
||||
characterSize(0.04f),
|
||||
maximumHeight(1.0f),
|
||||
maximumWidth(1.0f),
|
||||
color(1.0f,1.0f,1.0f,1.0f) {}
|
||||
|
||||
std::string font;
|
||||
osgText::Text::Layout layout;
|
||||
osgText::Text::AlignmentType alignment;
|
||||
osgText::Text::AxisAlignment axisAlignment;
|
||||
float characterSize;
|
||||
float maximumHeight;
|
||||
float maximumWidth;
|
||||
osg::Vec4 color;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user