3using namespace yarp::math;
14 Taxel::Taxel(
const yarp::sig::Vector &_position,
const yarp::sig::Vector &_normal)
22 Taxel::Taxel(
const yarp::sig::Vector &_position,
const yarp::sig::Vector &_normal,
const int &_id)
71 yarp::sig::Vector
x(3,0.0),
z(3,0.0),
y(3,0.0);
78 y[0] = -
z[2]/
z[0];
y[2] = 1;
131 if (_Position.size()!=3)
142 if (_Normal.size()!=3)
153 if (_WRFPosition.size()!=3)
177 yDebug(
"ID %i \tPosition %s \tNormal %s \tWRFPosition %s \tpx %s",
ID,
180 yDebug(
"\tFrame of Reference \n%s",
FoR.toString(3,3).c_str());
183 yDebug(
"ID %i \tPosition %s \tNormal %s\n",
ID,
189 std::stringstream res;
190 res <<
"ID: " <<
ID <<
"\tPosition: "<<
Position.toString(3,3) <<
191 "\tNormal: "<<
Normal.toString(3,3);
195 res <<
"\tWRFPosition: " <<
WRFPosition.toString(3,3) <<
196 "\tPx: " <<
px.toString(3,3) <<
197 "\tFrame of Reference: \n" <<
FoR.toString(3,3) << std::endl;
Class that encloses everything relate to a Taxel, i.e.
void setFoR()
Compute and set the taxel's reference frame (from its position and its normal vector)
bool setPosition(const yarp::sig::Vector &_Position)
Sets the Position of the taxel in the limb's FoR.
yarp::sig::Vector getWRFPosition()
Gets the Position of the taxel in the root FoR.
yarp::sig::Vector WRFPosition
virtual std::string toString(int verbosity=0)
toString Method
yarp::sig::Vector Position
yarp::sig::Matrix getFoR()
Gets the Frame of Reference of the taxel.
bool setWRFPosition(const yarp::sig::Vector &_WRFPosition)
Sets the Position of the taxel in the root FoR.
virtual void print(int verbosity=0)
Print Method.
bool setPx(const yarp::sig::Vector &_px)
Sets the u,v position of the taxel in one of the eyes.
Taxel & operator=(const Taxel &_t)
Copy Operator.
int getID()
Gets the ID of the taxel.
bool setNormal(const yarp::sig::Vector &_Normal)
Sets the Normal of the taxel in the limb's FoR.
bool setID(int _ID)
Sets the ID of the taxel.
Taxel()
Default Constructor.
yarp::sig::Vector getNormal()
Gets the Normal of the taxel in the limb's FoR.
yarp::sig::Vector getPosition()
Gets the Position of the taxel in the limb's FoR.
yarp::sig::Vector getPx()
Gets the u,v position of the taxel in one of the eyes.
double cross(double x1, double x2)