The Vector3 class represents the generic vector containing 3 elements. Since it's commonly used to keep coordinate system related information, its elements are labeled by x, y, z. More...
#include <Types.hh>
Public Member Functions | |
Vector3 (const Vector3 &_v) | |
Copy constructor. More... | |
Vector3 (double _x=0.0, double _y=0.0, double _z=0.0) | |
Constructor. More... | |
Vector3 | Cross (const Vector3 &_pt) const |
Return the cross product of this vector and pt. More... | |
Vector3 | operator* (double _v) const |
Multiplication operator. More... | |
const Vector3 & | operator*= (double _v) |
Multiplication by a double. More... | |
Vector3 | operator+ (const Vector3 &_v) const |
Addition operator. More... | |
bool | operator== (const sdf::Vector3 &_pt) const |
Equal to operator. More... | |
Public Attributes | |
double | x |
x Data More... | |
double | y |
y Data More... | |
double | z |
z Data More... | |
Friends | |
std::ostream & | operator<< (std::ostream &_out, const Vector3 &_pt) |
Stream insertion operator. More... | |
std::istream & | operator>> (std::istream &_in, Vector3 &_pt) |
Stream extraction operator. More... | |
The Vector3 class represents the generic vector containing 3 elements. Since it's commonly used to keep coordinate system related information, its elements are labeled by x, y, z.
|
inline |
Copy constructor.
[in] | _v | a vector |
|
inline |
Constructor.
[in] | _x | value along x |
[in] | _y | value along y |
[in] | _z | value along z |
Return the cross product of this vector and pt.
Referenced by sdf::Quaternion::operator*().
|
inline |
Multiplication operator.
[in] | _v |
|
inline |
Multiplication by a double.
[in] | _v | A double |
|
inline |
Equal to operator.
[in] | _pt | The vector to compare against |
References sdf::equal(), x, y, and z.
|
friend |
|
friend |
Stream extraction operator.
_in | input stream |
_pt | vector3 to read values into |
double sdf::Vector3::x |
x Data
Referenced by sdf::Pose::CoordPositionAdd(), Cross(), sdf::Quaternion::GetAsEuler(), operator+(), operator==(), sdf::Quaternion::RotateVector(), and sdf::Quaternion::SetFromEuler().
double sdf::Vector3::y |
y Data
Referenced by sdf::Pose::CoordPositionAdd(), Cross(), sdf::Quaternion::GetAsEuler(), operator+(), operator==(), sdf::Quaternion::RotateVector(), and sdf::Quaternion::SetFromEuler().
double sdf::Vector3::z |
z Data
Referenced by sdf::Pose::CoordPositionAdd(), Cross(), sdf::Quaternion::GetAsEuler(), operator+(), operator==(), sdf::Quaternion::RotateVector(), and sdf::Quaternion::SetFromEuler().