44 bool ok = connection.
expectBlock(
reinterpret_cast<char*
>(&header),
sizeof(header));
68 bool ok = connection.
expectBlock(
reinterpret_cast<char*
>(&header),
sizeof(header));
92 bool ok = connection.
expectBlock(
reinterpret_cast<char*
>(&header),
sizeof(header));
118 connection.
appendBlock(
reinterpret_cast<char*
>(&header),
sizeof(header));
136 connection.
appendBlock(
reinterpret_cast<char*
>(&header),
sizeof(header));
154 connection.
appendBlock(
reinterpret_cast<char*
>(&header),
sizeof(header));
168 template <
typename T>
171 std::ostringstream stringStream;
172 stringStream.precision(precision);
173 stringStream.width(width);
174 stringStream << std::string(
"x:") << x << std::string(
" y:") << y;
175 return stringStream.str();
178 template <
typename T>
181 return T(sqrt(x*x + y*y));
185 template <
typename T>
190 template <
typename T>
198 template <
typename T>
205 template <
typename T>
209 T x = rhs.
x; T y = rhs.
y;
210 rhs.
x = T(lhs[0][0] * x + lhs[0][1] * y);
211 rhs.
y = T(lhs[1][0] * x + lhs[1][1] * y);
215 template <
typename T>
222 template <
typename T>
229 template <
typename T>
237 template <
typename T>
245 template <
typename T>
248 if (this->x == rhs.
x &&
255 template <
typename T>
258 if (this->x == rhs.
x &&
#define BOTTLE_TAG_FLOAT64
yarp::math::Vec2D< T > operator*(const yarp::sig::Matrix &lhs, yarp::math::Vec2D< T > rhs)
yarp::math::Vec2D< T > operator-(yarp::math::Vec2D< T > lhs, const yarp::math::Vec2D< T > &rhs)
yarp::math::Vec2D< T > operator+(yarp::math::Vec2D< T > lhs, const yarp::math::Vec2D< T > &rhs)
std::string toString(int precision=-1, int width=-1) const
Creates a string object containing a text representation of the object.
yarp::math::Vec2D< T > & operator-=(const yarp::math::Vec2D< T > &rhs)
bool operator==(const yarp::math::Vec2D< T > &rhs) const
T norm() const
Returns the Euclidean norm of the Vec2D, i.e.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write vector to a connection.
bool operator!=(const yarp::math::Vec2D< T > &rhs) const
yarp::math::Vec2D< T > & operator+=(const yarp::math::Vec2D< T > &rhs)
An interface for reading from a network connection.
virtual bool expectBlock(char *data, size_t len)=0
Read a block of data from the network connection.
virtual std::int32_t expectInt32()=0
Read a 32-bit integer from the network connection.
virtual bool convertTextMode()=0
Reads in a standard description in text mode, and converts it to a standard description in binary.
virtual std::int64_t expectInt64()=0
Read a 64-bit integer from the network connection.
virtual bool isError() const =0
virtual yarp::conf::float64_t expectFloat64()=0
Read a 64-bit floating point number from the network connection.
An interface for writing to a network connection.
virtual bool isError() const =0
virtual void appendInt64(std::int64_t data)=0
Send a representation of a 64-bit integer to the network connection.
virtual bool convertTextMode()=0
Converts a standard description in binary into a textual description, if the connection is in text-mo...
virtual void appendInt32(std::int32_t data)=0
Send a representation of a 32-bit integer to the network connection.
virtual void appendFloat64(yarp::conf::float64_t data)=0
Send a representation of a 64-bit floating point number to the network connection.
virtual void appendBlock(const char *data, size_t len)=0
Send a block of data to the network connection.
size_t cols() const
Return number of columns.
size_t rows() const
Return number of rows.
#define yCAssert(component, x)
#define YARP_LOG_COMPONENT(name,...)
std::int32_t NetInt32
Definition of the NetInt32 type.
The main, catch-all namespace for YARP.
#define YARP_END_PACK
Ends 1 byte packing for structs/classes.
#define YARP_BEGIN_PACK
Starts 1 byte packing for structs/classes.