Robot: modernize C++: use default member init
This commit is contained in:
@@ -37,7 +37,6 @@ PROPERTY_SOURCE(Robot::RobotObject, App::GeoFeature)
|
||||
|
||||
|
||||
RobotObject::RobotObject()
|
||||
:block(false)
|
||||
{
|
||||
ADD_PROPERTY_TYPE(RobotVrmlFile ,(nullptr),"Robot definition" ,Prop_None,"Included file with the VRML representation of the robot");
|
||||
ADD_PROPERTY_TYPE(RobotKinematicFile,(nullptr),"Robot definition",Prop_None,"Included file with kinematic definition of the robot Axis");
|
||||
|
||||
@@ -76,7 +76,7 @@ protected:
|
||||
|
||||
Robot6Axis robot;
|
||||
|
||||
bool block;
|
||||
bool block{false};
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ using namespace KDL;
|
||||
//===========================================================================
|
||||
|
||||
Simulation::Simulation(const Robot::Trajectory &Trac,Robot::Robot6Axis &Rob)
|
||||
:Pos(0.0),Trac(Trac),Rob(Rob)
|
||||
:Trac(Trac),Rob(Rob)
|
||||
{
|
||||
// simulate a trajectory with only one waypoint make no sense!
|
||||
assert(Trac.getSize() > 1);
|
||||
|
||||
@@ -54,9 +54,9 @@ public:
|
||||
// apply the start axis angles and set to time 0. Restores the exact start position
|
||||
void reset();
|
||||
|
||||
double Pos;
|
||||
double Axis[6];
|
||||
double startAxis[6];
|
||||
double Pos{0.0};
|
||||
double Axis[6]{};
|
||||
double startAxis[6]{};
|
||||
|
||||
Trajectory Trac;
|
||||
Robot6Axis &Rob;
|
||||
|
||||
@@ -58,11 +58,7 @@ using namespace Base;
|
||||
|
||||
TYPESYSTEM_SOURCE(Robot::Trajectory , Base::Persistence)
|
||||
|
||||
Trajectory::Trajectory()
|
||||
:pcTrajectory(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
Trajectory::Trajectory() = default;
|
||||
|
||||
Trajectory::Trajectory(const Trajectory& Trac)
|
||||
:vpcWaypoints(Trac.vpcWaypoints.size()),pcTrajectory(nullptr)
|
||||
|
||||
@@ -77,7 +77,7 @@ protected:
|
||||
|
||||
std::vector<Waypoint*> vpcWaypoints;
|
||||
|
||||
KDL::Trajectory_Composite *pcTrajectory;
|
||||
KDL::Trajectory_Composite *pcTrajectory{nullptr};
|
||||
};
|
||||
|
||||
} //namespace Part
|
||||
|
||||
@@ -49,7 +49,6 @@ using namespace RobotGui;
|
||||
PROPERTY_SOURCE(RobotGui::ViewProviderRobotObject, Gui::ViewProviderGeometryObject)
|
||||
|
||||
ViewProviderRobotObject::ViewProviderRobotObject()
|
||||
: pcDragger(nullptr),toolShape(nullptr)
|
||||
{
|
||||
ADD_PROPERTY(Manipulator,(0));
|
||||
|
||||
|
||||
@@ -75,10 +75,10 @@ protected:
|
||||
//SoTransform * pcTcpTransform;
|
||||
|
||||
//SoTrackballDragger * pcDragger;
|
||||
SoJackDragger * pcDragger;
|
||||
SoJackDragger * pcDragger{nullptr};
|
||||
|
||||
// view provider of the toolshape if set
|
||||
Gui::ViewProvider *toolShape;
|
||||
Gui::ViewProvider *toolShape{nullptr};
|
||||
|
||||
// Pointers to the robot axis nodes in the VRML model
|
||||
SoVRMLTransform *Axis1Node;
|
||||
|
||||
Reference in New Issue
Block a user