|
From: <he...@us...> - 2014-05-13 15:21:16
|
Revision: 373
http://sourceforge.net/p/simspark/svn/373
Author: hedayat
Date: 2014-05-13 15:21:12 +0000 (Tue, 13 May 2014)
Log Message:
-----------
Fix compatibility with recent Boost versions
Modified Paths:
--------------
branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp
branches/gui-bullet/spark/carbon/libraryloader.cpp
branches/gui-bullet/spark/carbon/simspark.cpp
branches/gui-bullet/spark/carbon/simulation.cpp
branches/gui-bullet/spark/carbon/simulationmanager.cpp
branches/gui-bullet/spark/carbon/sparkcommands.cpp
branches/gui-bullet/spark/carbon/sparkcontroller.cpp
branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.cpp
branches/gui-bullet/spark/carbon/sparkpropertymanager.cpp
branches/gui-bullet/spark/carbon/sparkpropertywidget.cpp
branches/gui-bullet/spark/carbon/sparksimulationthread.cpp
branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.cpp
branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe.cpp
branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.cpp
branches/gui-bullet/spark/guiplugin/setupframe/setupframe.cpp
branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.cpp
Modified: branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp
===================================================================
--- branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/rcssserver3d/guiplugin/soccercontrolframe/soccercontrolframe.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -270,10 +270,10 @@
}
SimSpark* spark = &*mSparkController->getSpark();
- boost::shared_ptr<GameControlServer> gameControl(shared_dynamic_cast<GameControlServer>(spark->GetCore()->Get(gameControlServer.toStdString())));
- boost::shared_ptr<GameStateAspect> gameState (shared_dynamic_cast<GameStateAspect> (spark->GetCore()->Get(gameStateAspect.toStdString())));
- boost::shared_ptr<SoccerRuleAspect> soccerRule (shared_dynamic_cast<SoccerRuleAspect> (spark->GetCore()->Get(soccerRuleAspect.toStdString())));
- boost::shared_ptr<BallStateAspect> ballState (shared_dynamic_cast<BallStateAspect> (spark->GetCore()->Get(ballStateAspect.toStdString())));
+ boost::shared_ptr<GameControlServer> gameControl(dynamic_pointer_cast<GameControlServer>(spark->GetCore()->Get(gameControlServer.toStdString())));
+ boost::shared_ptr<GameStateAspect> gameState (dynamic_pointer_cast<GameStateAspect> (spark->GetCore()->Get(gameStateAspect.toStdString())));
+ boost::shared_ptr<SoccerRuleAspect> soccerRule (dynamic_pointer_cast<SoccerRuleAspect> (spark->GetCore()->Get(soccerRuleAspect.toStdString())));
+ boost::shared_ptr<BallStateAspect> ballState (dynamic_pointer_cast<BallStateAspect> (spark->GetCore()->Get(ballStateAspect.toStdString())));
bool success = true;
if (!gameControl.get())
Modified: branches/gui-bullet/spark/carbon/libraryloader.cpp
===================================================================
--- branches/gui-bullet/spark/carbon/libraryloader.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/carbon/libraryloader.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -451,7 +451,7 @@
else
{
LOG_INFO() << "Failed to access export plugin function in library " << lib.mLibrary->fileName() << ": " << lib.mLibrary->errorString().toStdString().c_str();
- return false;
+ return 0;
}
//Set exported flag
Modified: branches/gui-bullet/spark/carbon/simspark.cpp
===================================================================
--- branches/gui-bullet/spark/carbon/simspark.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/carbon/simspark.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -281,7 +281,7 @@
std::string pathStr;
path.GetString(pathStr);
boost::shared_ptr<zeitgeist::Leaf> leaf(GetCore()->Get(pathStr));
- boost::shared_ptr<oxygen::Scene> scene = boost::shared_ptr<oxygen::Scene>(boost::shared_static_cast<oxygen::Scene>(leaf));
+ boost::shared_ptr<oxygen::Scene> scene = boost::shared_ptr<oxygen::Scene>(boost::static_pointer_cast<oxygen::Scene>(leaf));
boost::shared_ptr<oxygen::World> world;
boost::shared_ptr<oxygen::Space> space;
@@ -289,7 +289,7 @@
{
if (it->get()->GetName().compare("world") == 0)
{
- world = boost::shared_static_cast<oxygen::World>(*it);
+ world = boost::static_pointer_cast<oxygen::World>(*it);
scene->RemoveChildReference(*it);
break;
}
@@ -298,13 +298,13 @@
{
if (it->get()->GetName().compare("space") == 0)
{
- space = boost::shared_static_cast<oxygen::Space>(*it);
+ space = boost::static_pointer_cast<oxygen::Space>(*it);
scene->RemoveChildReference(*it);
break;
}
}
- //boost::shared_ptr<oxygen::GameControlServer> gc = boost::shared_static_cast<oxygen::GameControlServer>(GetCore()->Get("/sys/server/gamecontrol/"));
+ //boost::shared_ptr<oxygen::GameControlServer> gc = boost::static_pointer_cast<oxygen::GameControlServer>(GetCore()->Get("/sys/server/gamecontrol/"));
//boost::shared_ptr<zeitgeist::Leaf> gc_state = gc->GetChild("GameStateAspect");
//boost::shared_ptr<zeitgeist::Leaf> gc_ball = gc->GetChild("BallStateAspect");
//boost::shared_ptr<zeitgeist::Leaf> gc_rule = gc->GetChild("SoccerRuleAspect");
@@ -316,7 +316,7 @@
//gc_rule.reset();
//gc.reset();
- boost::shared_ptr<zeitgeist::Node> root = boost::shared_static_cast<zeitgeist::Node>(GetCore()->GetRoot());
+ boost::shared_ptr<zeitgeist::Node> root = boost::static_pointer_cast<zeitgeist::Node>(GetCore()->GetRoot());
boost::shared_ptr<zeitgeist::Leaf> root_leaf(GetCore()->GetRoot());
scene->UnlinkChildren();
Modified: branches/gui-bullet/spark/carbon/simulation.cpp
===================================================================
--- branches/gui-bullet/spark/carbon/simulation.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/carbon/simulation.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -279,7 +279,7 @@
{
//Do not stop the main spark server if not explicitly ordered to, reset it instead
skipServer = true;
- shared_dynamic_cast<SparkSimulationThread>(*it)->reset();
+ dynamic_pointer_cast<SparkSimulationThread>(*it)->reset();
}
else*/
{
@@ -706,7 +706,7 @@
}
- task = shared_ptr<SimulationTask>(shared_dynamic_cast<SimulationTask>(server));
+ task = shared_ptr<SimulationTask>(dynamic_pointer_cast<SimulationTask>(server));
}
else
{
@@ -742,7 +742,7 @@
if (taskDefinition->getType() == TaskDefinition::TT_SERVERTHREAD)
{
- emit serverCreated(shared_static_cast<ServerThread>(task));
+ emit serverCreated(static_pointer_cast<ServerThread>(task));
}
//If a existing spark server reinitialized, leave it paused. Otherwise initialize the task.
Modified: branches/gui-bullet/spark/carbon/simulationmanager.cpp
===================================================================
--- branches/gui-bullet/spark/carbon/simulationmanager.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/carbon/simulationmanager.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -658,7 +658,7 @@
QString abs = entries.at(i).absoluteFilePath();
LOG_DEBUG() << "Loading contained Setup Definition file " << abs;
- bool success = loadSimulationSetup(abs, false);
+ bool success = static_cast<bool>(loadSimulationSetup(abs, false));
if (!success)
LOG_WARNING() << "Loading contained Setup Definition " << abs << " failed.";
}
Modified: branches/gui-bullet/spark/carbon/sparkcommands.cpp
===================================================================
--- branches/gui-bullet/spark/carbon/sparkcommands.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/carbon/sparkcommands.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -121,7 +121,7 @@
}
boost::shared_ptr<oxygen::SceneImporter> sceneImporter =
- boost::shared_static_cast<oxygen::SceneImporter>(getController()->getSpark()->GetCore()->Get("sys/server/scene/RubySceneImporter"));
+ boost::static_pointer_cast<oxygen::SceneImporter>(getController()->getSpark()->GetCore()->Get("sys/server/scene/RubySceneImporter"));
sceneImporter->SetSceneDict(&oxygen::SceneDict::GetInstance());
if (sceneImporter.get() == 0)
{
Modified: branches/gui-bullet/spark/carbon/sparkcontroller.cpp
===================================================================
--- branches/gui-bullet/spark/carbon/sparkcontroller.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/carbon/sparkcontroller.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -301,7 +301,7 @@
//Initialize SimControl node and store weak ptr
boost::shared_ptr<zeitgeist::Leaf> leaf(
mSpark->GetCore()->CreateContext()->New("gui/GuiSimControl", "sys/server/simulation/GuiControl"));
- mSimControl = boost::weak_ptr<GuiSimControl>(boost::shared_dynamic_cast<GuiSimControl>(leaf));
+ mSimControl = boost::weak_ptr<GuiSimControl>(boost::dynamic_pointer_cast<GuiSimControl>(leaf));
//Init Command queue
initCommandQueue();
Modified: branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.cpp
===================================================================
--- branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/carbon/sparkpropertycontrolbasic.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -57,7 +57,7 @@
list.push_back(boost::shared_ptr<Property>(new Property(leaf, descriptor, NAME, QObject::tr(CAPTION), DATA, true, VALIDATOR, ##__VA_ARGS__)))
#define SET_VALUE(DATAPTR) setPropertyValueProtected(prop, DATAPTR)
-#define GET_VALUE(TYPE) boost::shared_static_cast<const TYPE>(prop.getTempValue())->mValue
+#define GET_VALUE(TYPE) boost::static_pointer_cast<const TYPE>(prop.getTempValue())->mValue
#define FORMAT_FLAG(VALUE, FLAG)\
QString((VALUE & FLAG) ? QString(#FLAG" ") : QString(""))
@@ -351,7 +351,7 @@
bool BasicControl::updateClass(TLeafPtr leaf, Property& prop) const
{
- const Class& cl = *shared_static_cast<Class>(leaf);
+ const Class& cl = *static_pointer_cast<Class>(leaf);
if (prop.getName().compare("GetBundle") == 0)
{
@@ -401,14 +401,14 @@
bool BasicControl::genBaseNode(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const
{
- boost::shared_ptr<BaseNode> baseNode = boost::shared_static_cast<BaseNode>(leaf);
+ boost::shared_ptr<BaseNode> baseNode = boost::static_pointer_cast<BaseNode>(leaf);
ADD_READ_PROPERTY("GetWorldBoundingBox", "WorldBoundingBox", new DAABB3());
return true;
}
bool BasicControl::updateBaseNode(TLeafPtr leaf, Property& prop) const
{
- boost::shared_ptr<BaseNode> baseNode = boost::shared_static_cast<BaseNode>(leaf);
+ boost::shared_ptr<BaseNode> baseNode = boost::static_pointer_cast<BaseNode>(leaf);
if (prop.getName().compare("GetWorldBoundingBox") == 0) {SET_VALUE(new DAABB3(baseNode->GetWorldBoundingBox()));}
else return false; //Getter not supported
return true;
@@ -425,7 +425,7 @@
bool BasicControl::genTransform(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const
{
- const Transform& trans = *shared_static_cast<Transform>(leaf);
+ const Transform& trans = *static_pointer_cast<Transform>(leaf);
ADD_READ_PROPERTY("GetChangedMark" , "ChangedMark", new DInt());
ADD_READWRITE_PROPERTY("GetLocalTransform", "LocalTransform", new DMat4x4(), Data::doubleMatrixValidator(), QObject::tr("Local transformation matrix"));
ADD_READWRITE_PROPERTY("GetWorldTransform", "WorldTransform", new DMat4x4(), Data::doubleMatrixValidator(), QObject::tr("World transformation matrix"));
@@ -434,7 +434,7 @@
bool BasicControl::updateTransform(TLeafPtr leaf, Property& prop) const
{
- const Transform& trans = *shared_static_cast<Transform>(leaf);
+ const Transform& trans = *static_pointer_cast<Transform>(leaf);
if (prop.getName().compare("GetChangedMark") == 0) {SET_VALUE(new DInt(trans.GetChangedMark()));}
else if (prop.getName().compare("GetLocalTransform") == 0) {SET_VALUE(new DMat4x4(trans.GetLocalTransform()));}
else if (prop.getName().compare("GetWorldTransform") == 0) {SET_VALUE(new DMat4x4(trans.GetWorldTransform()));}
@@ -444,7 +444,7 @@
bool BasicControl::applyChangeTransform(TLeafPtr leaf, Property& prop) const
{
- Transform& trans = *shared_static_cast<Transform>(leaf);
+ Transform& trans = *static_pointer_cast<Transform>(leaf);
//Supported setters
if (prop.getName().compare("GetLocalTransform") == 0) {trans.SetLocalTransform(GET_VALUE(DMat4x4));}
else if (prop.getName().compare("GetWorldTransform") == 0) {trans.SetWorldTransform(GET_VALUE(DMat4x4));}
@@ -457,7 +457,7 @@
bool BasicControl::genRigidBody(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const
{
- const RigidBody& body = *shared_static_cast<RigidBody>(leaf);
+ const RigidBody& body = *static_pointer_cast<RigidBody>(leaf);
ADD_READWRITE_PROPERTY("GetMass", "Mass", new DFloat (), Data::doubleValidator(0));
ADD_READWRITE_PROPERTY("GetVelocity", "Velocity", new DVector3f(), Data::vector3fValidator());
ADD_READWRITE_PROPERTY("GetAngularVelocity", "AngularVelocity", new DVector3f(), Data::vector3fValidator());
@@ -467,7 +467,7 @@
bool BasicControl::updateRigidBody(TLeafPtr leaf, Property& prop) const
{
- const RigidBody& body = *shared_static_cast<RigidBody>(leaf);
+ const RigidBody& body = *static_pointer_cast<RigidBody>(leaf);
if (prop.getName().compare("GetMass") == 0) {SET_VALUE(new DFloat (body.GetMass()) );}
else if (prop.getName().compare("GetVelocity") == 0) {SET_VALUE(new DVector3f(body.GetVelocity()) );}
else if (prop.getName().compare("GetAngularVelocity") == 0) {SET_VALUE(new DVector3f(body.GetAngularVelocity()));}
@@ -478,7 +478,7 @@
bool BasicControl::applyChangeRigidBody(TLeafPtr leaf, Property& prop) const
{
- RigidBody& body = *shared_static_cast<RigidBody>(leaf);
+ RigidBody& body = *static_pointer_cast<RigidBody>(leaf);
if (prop.getName().compare("GetMass") == 0) {body.SetMass (GET_VALUE(DFloat));}
else if (prop.getName().compare("GetVelocity") == 0) {body.SetVelocity (GET_VALUE(DVector3f));}
else if (prop.getName().compare("GetAngularVelocity") == 0) {body.SetAngularVelocity(GET_VALUE(DVector3f));}
@@ -527,7 +527,7 @@
bool BasicControl::updateJoint(TLeafPtr leaf, Property& prop) const
{
- const Joint& joint = *shared_static_cast<Joint>(leaf);
+ const Joint& joint = *static_pointer_cast<Joint>(leaf);
if (prop.getName().compare("FeedBackEnabled") == 0) {SET_VALUE(new DFloat(joint.FeedBackEnabled()));}
else
{
@@ -570,7 +570,7 @@
bool BasicControl::genHingeJoint(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const
{
- const HingeJoint& hinge = *shared_static_cast<HingeJoint>(leaf);
+ const HingeJoint& hinge = *static_pointer_cast<HingeJoint>(leaf);
ADD_READ_PROPERTY("GetAngle", "Angle", new DFloat()); //todo
ADD_READ_PROPERTY("GetAngleRate", "AngleRate", new DFloat()); //todo
return true;
@@ -578,7 +578,7 @@
bool BasicControl::updateHingeJoint(TLeafPtr leaf, Property& prop) const
{
- const HingeJoint& hinge = *shared_static_cast<HingeJoint>(leaf);
+ const HingeJoint& hinge = *static_pointer_cast<HingeJoint>(leaf);
if (prop.getName().compare("GetAngle") == 0) {SET_VALUE(new DFloat(hinge.GetAngle()));}
else if (prop.getName().compare("GetAngleRate") == 0) {SET_VALUE(new DFloat(hinge.GetAngleRate()));}
else return false; //Getter not supported
@@ -596,7 +596,7 @@
bool BasicControl::genUniversalJoint(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const
{
- const UniversalJoint& univ = *shared_static_cast<UniversalJoint>(leaf);
+ const UniversalJoint& univ = *static_pointer_cast<UniversalJoint>(leaf);
ADD_READ_PROPERTY("GetAngle(0)", "Angle(0)", new DFloat()); //todo
ADD_READ_PROPERTY("GetAngle(1)", "Angle(1)", new DFloat()); //todo
ADD_READ_PROPERTY("GetAngleRate(0)", "AngleRate(0)", new DFloat()); //todo
@@ -606,7 +606,7 @@
bool BasicControl::updateUniversalJoint(TLeafPtr leaf, Property& prop) const
{
- const UniversalJoint& univ = *shared_static_cast<UniversalJoint>(leaf);
+ const UniversalJoint& univ = *static_pointer_cast<UniversalJoint>(leaf);
if (prop.getName().compare("GetAngle(0)") == 0) {SET_VALUE(new DFloat(univ.GetAngle(Joint::AI_FIRST)));}
else if (prop.getName().compare("GetAngle(1)") == 0) {SET_VALUE(new DFloat(univ.GetAngle(Joint::AI_SECOND)));}
else if (prop.getName().compare("GetAngleRate(0)") == 0) {SET_VALUE(new DFloat(univ.GetAngleRate(Joint::AI_FIRST)));}
@@ -626,7 +626,7 @@
bool BasicControl::genContactJointHandler(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const
{
- const ContactJointHandler& cjh = *shared_static_cast<ContactJointHandler>(leaf);
+ const ContactJointHandler& cjh = *static_pointer_cast<ContactJointHandler>(leaf);
ADD_READ_PROPERTY ("GetContactMode", "ContactMode", new DString());
ADD_READWRITE_PROPERTY("GetBounceValue", "BounceValue", new DFloat(), Data::doubleValidator());
ADD_READWRITE_PROPERTY("GetMinBounceVel", "MinBounceVel", new DFloat(), Data::doubleValidator());
@@ -640,7 +640,7 @@
bool BasicControl::updateContactJointHandler(TLeafPtr leaf, Property& prop) const
{
- const ContactJointHandler& cjh = *shared_static_cast<ContactJointHandler>(leaf);
+ const ContactJointHandler& cjh = *static_pointer_cast<ContactJointHandler>(leaf);
if (prop.getName().compare("GetContactMode" ) == 0)
{
@@ -675,7 +675,7 @@
bool BasicControl::applyChangeContactJointHandler(TLeafPtr leaf, Property& prop) const
{
- ContactJointHandler& cjh = *shared_static_cast<ContactJointHandler>(leaf);
+ ContactJointHandler& cjh = *static_pointer_cast<ContactJointHandler>(leaf);
//Supported setters
if (prop.getName().compare("GetBounceValue") == 0) {cjh.SetBounceValue (GET_VALUE(DFloat));}
@@ -692,7 +692,7 @@
bool BasicControl::genWorld(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const
{
- const World& world = *shared_static_cast<World>(leaf);
+ const World& world = *static_pointer_cast<World>(leaf);
ADD_READWRITE_PROPERTY("GetGravity", "Gravity", new DVector3f(), Data::vector3fValidator(),
"Gravity Vector");
ADD_READWRITE_PROPERTY("GetERP", "ERP", new DFloat(), Data::doubleValidator(0.0, 1.0),
@@ -708,7 +708,7 @@
bool BasicControl::updateWorld(TLeafPtr leaf, Property& prop) const
{
- const World& world = *shared_static_cast<World>(leaf);
+ const World& world = *static_pointer_cast<World>(leaf);
if (prop.getName().compare("GetGravity") == 0) {SET_VALUE(new DVector3f(world.GetGravity()));}
else if (prop.getName().compare("GetERP") == 0) {SET_VALUE(new DFloat (world.GetERP()));}
else if (prop.getName().compare("GetCFM") == 0) {SET_VALUE(new DFloat (world.GetCFM()));}
@@ -718,7 +718,7 @@
bool BasicControl::applyChangeWorld(TLeafPtr leaf, Property& prop) const
{
- World& world = *shared_static_cast<World>(leaf);
+ World& world = *static_pointer_cast<World>(leaf);
if (prop.getName().compare("GetGravity") == 0) {world.SetGravity(GET_VALUE(DVector3f));}
else if (prop.getName().compare("GetERP") == 0) {world.SetERP (GET_VALUE(DFloat));}
else if (prop.getName().compare("GetCFM") == 0) {world.SetCFM (GET_VALUE(DFloat));}
@@ -731,14 +731,14 @@
bool BasicControl::genCollisionHandler(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const
{
- boost::shared_ptr<CollisionHandler> ch = shared_static_cast<CollisionHandler>(leaf);
+ boost::shared_ptr<CollisionHandler> ch = static_pointer_cast<CollisionHandler>(leaf);
ADD_READ_PROPERTY("IsSymmetricHandler", "SymmetricHandler", new DBool());
return true;
}
bool BasicControl::updateCollisionHandler(TLeafPtr leaf, Property& prop) const
{
- boost::shared_ptr<CollisionHandler> ch = shared_static_cast<CollisionHandler>(leaf);
+ boost::shared_ptr<CollisionHandler> ch = static_pointer_cast<CollisionHandler>(leaf);
if (prop.getName().compare("IsSymmetricHandler") == 0) {SET_VALUE(new DBool(ch->IsSymmetricHandler()));}
else return false; //Getter not supported
return true;
@@ -755,7 +755,7 @@
bool BasicControl::genDragController(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const
{
- const DragController& dc = *shared_static_cast<DragController>(leaf);
+ const DragController& dc = *static_pointer_cast<DragController>(leaf);
ADD_READWRITE_PROPERTY("GetLinearDrag", "LinearDrag", new DFloat(dc.GetLinearDrag()), Data::doubleValidator());
ADD_READWRITE_PROPERTY("GetAngularDrag", "AngularDrag", new DFloat(dc.GetAngularDrag()), Data::doubleValidator());
return true;
@@ -763,7 +763,7 @@
bool BasicControl::updateDragController(TLeafPtr leaf, Property& prop) const
{
- const DragController& dc = *shared_static_cast<DragController>(leaf);
+ const DragController& dc = *static_pointer_cast<DragController>(leaf);
if (prop.getName().compare("GetLinearDrag") == 0) {SET_VALUE(new DFloat(dc.GetLinearDrag()));}
else if (prop.getName().compare("GetAngularDrag") == 0) {SET_VALUE(new DFloat(dc.GetAngularDrag()));}
else return false; //Getter not supported
@@ -772,7 +772,7 @@
bool BasicControl::applyChangeDragController(TLeafPtr leaf, Property& prop) const
{
- DragController& dc = *shared_static_cast<DragController>(leaf);
+ DragController& dc = *static_pointer_cast<DragController>(leaf);
if (prop.getName().compare("GetLinearDrag") == 0) {dc.SetLinearDrag (GET_VALUE(DFloat));}
else if (prop.getName().compare("GetAngularDrag") == 0) {dc.SetAngularDrag(GET_VALUE(DFloat));}
else return false; //Setter not supported
@@ -784,7 +784,7 @@
bool BasicControl::genMaterialSolid(TLeafPtr leaf, const ClassDescriptor& descriptor, TProperties& list) const
{
- const MaterialSolid& mat = *shared_static_cast<MaterialSolid>(leaf);
+ const MaterialSolid& mat = *static_pointer_cast<MaterialSolid>(leaf);
ADD_READWRITE_PROPERTY("GetAmbient", "Ambient", new DRGBA(), Data::rgbaValidator());
ADD_READWRITE_PROPERTY("GetDiffuse", "Diffuse", new DRGBA(), Data::rgbaValidator());
ADD_READWRITE_PROPERTY("GetSpecular", "Specular", new DRGBA(), Data::rgbaValidator());
@@ -793,7 +793,7 @@
bool BasicControl::updateMaterialSolid(TLeafPtr leaf, Property& prop) const
{
- const MaterialSolid& mat = *shared_static_cast<MaterialSolid>(leaf);
+ const MaterialSolid& mat = *static_pointer_cast<MaterialSolid>(leaf);
if (prop.getName().compare("GetAmbient") == 0) {SET_VALUE(new DRGBA(mat.GetAmbient()));}
else if (prop.getName().compare("GetDiffuse") == 0) {SET_VALUE(new DRGBA(mat.GetDiffuse()));}
else if (prop.getName().compare("GetSpecular") == 0) {SET_VALUE(new DRGBA(mat.GetSpecular()));}
@@ -803,7 +803,7 @@
bool BasicControl::applyChangeMaterialSolid(TLeafPtr leaf, Property& prop) const
{
- MaterialSolid& mat = *shared_static_cast<MaterialSolid>(leaf);
+ MaterialSolid& mat = *static_pointer_cast<MaterialSolid>(leaf);
//Supported setters
if (prop.getName().compare("GetAmbient") == 0) {mat.SetAmbient (GET_VALUE(DRGBA));}
else if (prop.getName().compare("GetDiffuse") == 0) {mat.SetDiffuse (GET_VALUE(DRGBA));}
Modified: branches/gui-bullet/spark/carbon/sparkpropertymanager.cpp
===================================================================
--- branches/gui-bullet/spark/carbon/sparkpropertymanager.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/carbon/sparkpropertymanager.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -265,7 +265,7 @@
std::string basePath = "/classes/" + (*base_it);
//Convert base class string to class object
- boost::shared_ptr<zeitgeist::Class> base = shared_dynamic_cast<Class>
+ boost::shared_ptr<zeitgeist::Class> base = dynamic_pointer_cast<Class>
(spark->GetCore()->Get(basePath));
if (base.get() == 0)
Modified: branches/gui-bullet/spark/carbon/sparkpropertywidget.cpp
===================================================================
--- branches/gui-bullet/spark/carbon/sparkpropertywidget.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/carbon/sparkpropertywidget.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -339,20 +339,20 @@
case SparkProperty::DT_BOOL : //no edit window for bool
break;
case SparkProperty::DT_VEC3F :
- vec3 = &boost::shared_static_cast<const DVector3f>(prop->getCurrentValue())->mValue;
+ vec3 = &boost::static_pointer_cast<const DVector3f>(prop->getCurrentValue())->mValue;
((Vector3Widget*)mPropertyEditWidget)->setVector(vec3->x(), vec3->y(), vec3->z());
break;
case SparkProperty::DT_RGBA :
- rgba = &boost::shared_static_cast<const DRGBA>(prop->getCurrentValue())->mValue;
+ rgba = &boost::static_pointer_cast<const DRGBA>(prop->getCurrentValue())->mValue;
((Vector4Widget*)mPropertyEditWidget)->setVector(rgba->r(), rgba->g(), rgba->b(), rgba->a());
break;
case SparkProperty::DT_AABB3 :
- aabb3 = &boost::shared_static_cast<const DAABB3>(prop->getCurrentValue())->mValue;
+ aabb3 = &boost::static_pointer_cast<const DAABB3>(prop->getCurrentValue())->mValue;
((Vector2x3Widget*)mPropertyEditWidget)->getWidget1().setVector(aabb3->minVec.x(), aabb3->minVec.y(), aabb3->minVec.z());
((Vector2x3Widget*)mPropertyEditWidget)->getWidget2().setVector(aabb3->maxVec.x(), aabb3->maxVec.y(), aabb3->maxVec.z());
break;
case SparkProperty::DT_MAT4X4:
- mat = &boost::shared_static_cast<const DMat4x4>(prop->getCurrentValue())->mValue;
+ mat = &boost::static_pointer_cast<const DMat4x4>(prop->getCurrentValue())->mValue;
((MatrixWidget*)mPropertyEditWidget)->setMatrix(
mat->m[0], mat->m[4], mat->m[ 8], mat->m[12],
mat->m[1], mat->m[5], mat->m[ 9], mat->m[13],
Modified: branches/gui-bullet/spark/carbon/sparksimulationthread.cpp
===================================================================
--- branches/gui-bullet/spark/carbon/sparksimulationthread.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/carbon/sparksimulationthread.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -77,7 +77,7 @@
if (index == -1)
LOG_ERROR() << "Current thread not found in SimulationManagers thread list.";
else
- return boost::shared_static_cast<SparkSimulationThread>(manager->getThreadList().at(index));
+ return boost::static_pointer_cast<SparkSimulationThread>(manager->getThreadList().at(index));
}
else
{
Modified: branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.cpp
===================================================================
--- branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/guiplugin/monitorframe/monitorframe_sparkglrender.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -90,7 +90,7 @@
}
//Search camera
- mCamera = shared_dynamic_cast<Camera>
+ mCamera = dynamic_pointer_cast<Camera>
(mSpark->GetCore()->Get(mCameraPath));
if (mCamera.get() == 0)
@@ -100,7 +100,7 @@
}
//Search RenderServer
- mRenderServer = shared_dynamic_cast<RenderServer>
+ mRenderServer = dynamic_pointer_cast<RenderServer>
(mSpark->GetCore()->Get(mRenderServerPath));
if (mRenderServer.get() == 0)
@@ -110,7 +110,7 @@
}
//Search RenderControl node
- mRenderControl = shared_dynamic_cast<RenderControl>
+ mRenderControl = dynamic_pointer_cast<RenderControl>
(mSpark->GetCore()->Get(mRenderControlPath));
if (mRenderControl.get() == 0)
@@ -120,7 +120,7 @@
}
//Search SceneServer
- mSceneServer = shared_dynamic_cast<SceneServer>
+ mSceneServer = dynamic_pointer_cast<SceneServer>
(mSpark->GetCore()->Get(mSceneServerPath));
if (mSceneServer.get() == 0)
Modified: branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe.cpp
===================================================================
--- branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -211,8 +211,8 @@
{
if (thread->getTaskDefinition().isSpark())
{
- connect(boost::shared_static_cast<SparkSimulationThread>(thread).get(), SIGNAL(sparkRunning(SparkController*)), this, SLOT(updateSparkRunning(SparkController*)));
- connect(boost::shared_static_cast<SparkSimulationThread>(thread).get(), SIGNAL(sparkFinished(SparkController*)), this, SLOT(updateSparkFinished(SparkController*)));
+ connect(boost::static_pointer_cast<SparkSimulationThread>(thread).get(), SIGNAL(sparkRunning(SparkController*)), this, SLOT(updateSparkRunning(SparkController*)));
+ connect(boost::static_pointer_cast<SparkSimulationThread>(thread).get(), SIGNAL(sparkFinished(SparkController*)), this, SLOT(updateSparkFinished(SparkController*)));
}
}
@@ -222,7 +222,7 @@
if (task->getTaskDefinition().isSpark() && task->getTaskDefinition().isThread())
{
//Has scene graph
- return boost::shared_static_cast<SparkSimulationThread>(task)->getSparkController();
+ return boost::static_pointer_cast<SparkSimulationThread>(task)->getSparkController();
}
else
{
@@ -260,7 +260,7 @@
//We can only create scene graph widgets for tasks with scene graph
if (task->getTaskDefinition().getType() == TaskDefinition::TT_SERVERTHREAD)
{
- boost::shared_ptr<SparkSimulationThread> thread(boost::shared_static_cast<SparkSimulationThread>(task));
+ boost::shared_ptr<SparkSimulationThread> thread(boost::static_pointer_cast<SparkSimulationThread>(task));
//Create widget
SceneGraphFrameUtil::SceneGraphWidget* newWidget = new SceneGraphFrameUtil::SceneGraphWidget(thread, this);
@@ -475,7 +475,7 @@
if (getSparkController(currentTask).get() == controller)
{
//Update current view
- mSceneGraphWidgets.at(mCurrentTask)->updateDisplay(boost::shared_static_cast<SparkSimulationThread>(currentTask));
+ mSceneGraphWidgets.at(mCurrentTask)->updateDisplay(boost::static_pointer_cast<SparkSimulationThread>(currentTask));
}
//Init/update property frame
@@ -500,7 +500,7 @@
}
//Update scene graph
- mSceneGraphWidgets.at(mCurrentTask)->updateDisplay(boost::shared_static_cast<SparkSimulationThread>(updateTask));
+ mSceneGraphWidgets.at(mCurrentTask)->updateDisplay(boost::static_pointer_cast<SparkSimulationThread>(updateTask));
}
void SceneGraphFrame::updatePropertyFrame()
Modified: branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.cpp
===================================================================
--- branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/guiplugin/scenegraphframe/scenegraphframe_scenegraphwidget.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -376,7 +376,7 @@
if (leaf.get() == 0)
return false;
- boost::shared_ptr<oxygen::BaseNode> bn(boost::shared_dynamic_cast<oxygen::BaseNode>(leaf));
+ boost::shared_ptr<oxygen::BaseNode> bn(boost::dynamic_pointer_cast<oxygen::BaseNode>(leaf));
if (bn.get() == 0)
{
// Can only load in base nodes
@@ -493,7 +493,7 @@
return;
}
- boost::shared_ptr<oxygen::BaseNode> bn(boost::shared_dynamic_cast<oxygen::BaseNode>(leaf));
+ boost::shared_ptr<oxygen::BaseNode> bn(boost::dynamic_pointer_cast<oxygen::BaseNode>(leaf));
if (bn.get() == 0)
{
// Can only load in base nodes
Modified: branches/gui-bullet/spark/guiplugin/setupframe/setupframe.cpp
===================================================================
--- branches/gui-bullet/spark/guiplugin/setupframe/setupframe.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/guiplugin/setupframe/setupframe.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -1522,7 +1522,7 @@
{
mSaving = true;
- bool saved = mSimulationManager->saveSimulationSetup(mCurrentSetup);
+ bool saved = static_cast<bool>(mSimulationManager->saveSimulationSetup(mCurrentSetup));
mSaving = false;
if (!saved)
{
Modified: branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.cpp
===================================================================
--- branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.cpp 2014-05-13 14:54:02 UTC (rev 372)
+++ branches/gui-bullet/spark/guiplugin/simulationframe/simulationframe.cpp 2014-05-13 15:21:12 UTC (rev 373)
@@ -178,7 +178,7 @@
{
boost::shared_ptr<TaskDefinition> newDefinition(mSimulationManager->newTaskDefinition(TaskDefinition::mTypes[mChosenTask]));
- bool success = mSimulationManager->getSimulation()->addNewTask(*newDefinition);
+ bool success = static_cast<bool>(mSimulationManager->getSimulation()->addNewTask(*newDefinition));
if (!success)
LOG_INFO() << "Could not initialize task " << newDefinition->getName() << " (" << TaskDefinition::getTypeString(newDefinition->getType()) << ")";
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|