octomap 1.5.0
|
This class represents a three-dimensional vector. More...
Public Member Functions | |
double | angleTo (const Vector3 &other) const |
Vector3 | cross (const Vector3 &other) const |
Three-dimensional vector (cross) product. | |
DEPRECATED (inline Vector3 unit() const ) | |
DEPRECATED (double norm2() const ) | |
double | distance (const Vector3 &other) const |
double | distanceXY (const Vector3 &other) const |
double | dot (const Vector3 &other) const |
double | norm () const |
Vector3 & | normalize () |
Vector3 | normalized () const |
float & | operator() (unsigned int i) |
const float & | operator() (unsigned int i) const |
Vector3 | operator* (float x) const |
void | operator*= (float x) |
Vector3 | operator+ (const Vector3 &other) const |
void | operator+= (const Vector3 &other) |
Vector3 | operator- () const |
Vector3 | operator- (const Vector3 &other) const |
void | operator-= (const Vector3 &other) |
void | operator/= (float x) |
Vector3 & | operator= (const Vector3 &other) |
Assignment operator. | |
bool | operator== (const Vector3 &other) const |
float & | pitch () |
const float & | pitch () const |
std::istream & | read (std::istream &s) |
std::istream & | readBinary (std::istream &s) |
const float & | roll () const |
float & | roll () |
Vector3 & | rotate_IP (double roll, double pitch, double yaw) |
Vector3 () | |
Default constructor. | |
Vector3 (float x, float y, float z) | |
Constructor. | |
Vector3 (const Vector3 &other) | |
Copy constructor. | |
std::ostream & | write (std::ostream &s) const |
std::ostream & | writeBinary (std::ostream &s) const |
const float & | x () const |
float & | x () |
float & | y () |
const float & | y () const |
float & | yaw () |
const float & | yaw () const |
const float & | z () const |
float & | z () |
Protected Attributes | |
float | data [3] |
This class represents a three-dimensional vector.
The three-dimensional vector can be used to represent a translation in three-dimensional space or to represent the attitude of an object using Euler angle.
octomath::Vector3::Vector3 | ( | ) | [inline] |
octomath::Vector3::Vector3 | ( | const Vector3 & | other | ) | [inline] |
octomath::Vector3::Vector3 | ( | float | x, |
float | y, | ||
float | z | ||
) | [inline] |
double octomath::Vector3::angleTo | ( | const Vector3 & | other | ) | const [inline] |
octomath::Vector3::DEPRECATED | ( | double norm2() | const | ) | [inline] |
References norm().
octomath::Vector3::DEPRECATED | ( | inline Vector3 unit() | const | ) | [inline] |
References normalized().
double octomath::Vector3::distance | ( | const Vector3 & | other | ) | const [inline] |
Referenced by octomap::MapCollection< MAPNODE >::castRay().
double octomath::Vector3::distanceXY | ( | const Vector3 & | other | ) | const [inline] |
double octomath::Vector3::dot | ( | const Vector3 & | other | ) | const [inline] |
double octomath::Vector3::norm | ( | ) | const [inline] |
References operator()().
Referenced by angleTo(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::computeRayKeys(), DEPRECATED(), and normalize().
Vector3& octomath::Vector3::normalize | ( | ) | [inline] |
References norm().
Referenced by normalized().
Vector3 octomath::Vector3::normalized | ( | ) | const [inline] |
References normalize().
Referenced by octomap::OccupancyOcTreeBase< NODE >::castRay(), and DEPRECATED().
const float& octomath::Vector3::operator() | ( | unsigned int | i | ) | const [inline] |
References data.
Referenced by norm(), pitch(), readBinary(), roll(), writeBinary(), x(), y(), yaw(), and z().
float& octomath::Vector3::operator() | ( | unsigned int | i | ) | [inline] |
References data.
bool octomath::Vector3::operator== | ( | const Vector3 & | other | ) | const [inline] |
const float& octomath::Vector3::pitch | ( | ) | const [inline] |
References operator()().
float& octomath::Vector3::pitch | ( | ) | [inline] |
References operator()().
Referenced by octomath::Quaternion::Quaternion().
std::istream & octomath::Vector3::read | ( | std::istream & | s | ) |
Referenced by octomath::Pose6D::read(), and octomap::ScanNode::readPoseASCII().
std::istream & octomath::Vector3::readBinary | ( | std::istream & | s | ) |
References operator()().
Referenced by octomap::Pointcloud::readBinary(), and octomath::Pose6D::readBinary().
float& octomath::Vector3::roll | ( | ) | [inline] |
References operator()().
Referenced by octomath::Quaternion::Quaternion().
const float& octomath::Vector3::roll | ( | ) | const [inline] |
References operator()().
Vector3 & octomath::Vector3::rotate_IP | ( | double | roll, |
double | pitch, | ||
double | yaw | ||
) |
Referenced by generateSphereTree(), and main().
std::ostream & octomath::Vector3::write | ( | std::ostream & | s | ) | const |
Referenced by octomath::Pose6D::write().
std::ostream & octomath::Vector3::writeBinary | ( | std::ostream & | s | ) | const |
References operator()().
Referenced by octomath::Pose6D::writeBinary().
float& octomath::Vector3::x | ( | ) | [inline] |
References operator()().
Referenced by octomap::MapCollection< MAPNODE >::castRay(), cross(), distance(), distanceXY(), dot(), generateSphereTree(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::getUnknownLeafCenters(), octomap::OccupancyOcTreeBase< NODE >::inBBX(), main(), operator*(), operator*=(), operator/=(), octomath::operator<<(), octomath::Quaternion::Quaternion(), rotate_IP(), and Vector3().
const float& octomath::Vector3::x | ( | ) | const [inline] |
References operator()().
const float& octomath::Vector3::y | ( | ) | const [inline] |
References operator()().
float& octomath::Vector3::y | ( | ) | [inline] |
References operator()().
Referenced by octomap::MapCollection< MAPNODE >::castRay(), cross(), distance(), distanceXY(), dot(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::getUnknownLeafCenters(), octomap::OccupancyOcTreeBase< NODE >::inBBX(), main(), octomath::operator<<(), octomath::Quaternion::Quaternion(), rotate_IP(), and Vector3().
const float& octomath::Vector3::yaw | ( | ) | const [inline] |
References operator()().
float& octomath::Vector3::yaw | ( | ) | [inline] |
References operator()().
Referenced by octomath::Quaternion::Quaternion().
float& octomath::Vector3::z | ( | ) | [inline] |
References operator()().
Referenced by octomap::MapCollection< MAPNODE >::castRay(), cross(), distance(), dot(), octomap::OcTreeBaseImpl< NODE, INTERFACE >::getUnknownLeafCenters(), octomap::OccupancyOcTreeBase< NODE >::inBBX(), main(), octomath::operator<<(), octomath::Quaternion::Quaternion(), rotate_IP(), and Vector3().
const float& octomath::Vector3::z | ( | ) | const [inline] |
References operator()().
float octomath::Vector3::data[3] [protected] |
Referenced by operator()(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), and Vector3().