The Vector3 class represents the generic vector containing 3 elements. 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 |
|
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 |
|
inline |
|
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 |
double sdf::Vector3::y |
double sdf::Vector3::z |