Skip to content
Snippets Groups Projects
Commit cda6e922 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

added ctor for Vector3 and FramedVector3 accepting 3 floats + 1 string (in case of a FramedVector3)

parent 865c3d19
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,13 @@ namespace armarx
z = m(2,3);
}
Vector3::Vector3(::Ice::Float x, ::Ice::Float y, ::Ice::Float z)
{
this->x = x;
this->y = y;
this->z = z;
}
Vector3f Vector3::toEigen() const
{
Vector3f v;
......@@ -322,6 +329,12 @@ namespace armarx
this->frame = frame;
}
FramedVector3::FramedVector3(Ice::Float x, ::Ice::Float y, ::Ice::Float z, const std::string &frame) :
Vector3(x, y, z)
{
this->frame = frame;
}
string FramedVector3::getFrame() const
{
return frame;
......
......@@ -68,6 +68,7 @@ namespace armarx
Vector3();
Vector3(const Eigen::Vector3f &);
Vector3(const Eigen::Matrix4f &);
Vector3(::Ice::Float x, ::Ice::Float y, ::Ice::Float z);
virtual Eigen::Vector3f toEigen() const;
......@@ -370,6 +371,7 @@ namespace armarx
FramedVector3();
FramedVector3(const FramedVector3& source);
FramedVector3(const Eigen::Vector3f & vec, const std::string &frame );
FramedVector3(Ice::Float x, ::Ice::Float y, ::Ice::Float z, const std::string &frame);
std::string getFrame() const;
static FramedVector3Ptr ChangeFrame(const VirtualRobot::RobotPtr robot, const FramedVector3& framedVec, const std::string &newFrame);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment