Basic gemoetric primitives and affine math functions on them. More...
#include <cmath>
#include <vector>
#include <string>
#include <limits>
#include <utility>
#include <cstdlib>
#include <cassert>
Go to the source code of this file.
Classes | |
class | RaveTransform< T > |
class | RaveTransformMatrix< T > |
class | OpenRAVE::geometry::RaveVector< T > |
Vector class containing 4 dimensions. More... | |
class | OpenRAVE::geometry::RaveTransform< T > |
Affine transformation parameterized with quaterions. More... | |
class | OpenRAVE::geometry::RaveTransformMatrix< T > |
Affine transformation parameterized with rotation matrices. Scales and shears are not supported. More... | |
class | OpenRAVE::geometry::ray< T > |
A ray defined by an origin and a direction. More... | |
class | OpenRAVE::geometry::aabb< T > |
An axis aligned bounding box. More... | |
class | OpenRAVE::geometry::OrientedBox< T > |
An oriented bounding box. More... | |
class | OpenRAVE::geometry::obb< T > |
An oriented bounding box. More... | |
class | OpenRAVE::geometry::triangle< T > |
A triangle defined by 3 points. More... | |
class | OpenRAVE::geometry::frustum< T > |
A pyramid with its vertex clipped. More... | |
class | OpenRAVE::geometry::RaveCameraIntrinsics< T > |
intrinsic parameters for a camera. More... | |
Namespaces | |
namespace | OpenRAVE |
The entire OpenRAVE library. | |
namespace | OpenRAVE::geometry |
Templated math and geometric functions. | |
Macros | |
#define | RAVE_DEPRECATED |
#define | MATH_ASSERT assert |
Functions | |
float | OpenRAVE::geometry::MATH_SQRT (float f) |
double | OpenRAVE::geometry::MATH_SQRT (double f) |
float | OpenRAVE::geometry::MATH_SIN (float f) |
double | OpenRAVE::geometry::MATH_SIN (double f) |
float | OpenRAVE::geometry::MATH_COS (float f) |
double | OpenRAVE::geometry::MATH_COS (double f) |
float | OpenRAVE::geometry::MATH_FABS (float f) |
double | OpenRAVE::geometry::MATH_FABS (double f) |
float | OpenRAVE::geometry::MATH_ACOS (float f) |
double | OpenRAVE::geometry::MATH_ACOS (double f) |
float | OpenRAVE::geometry::MATH_ASIN (float f) |
double | OpenRAVE::geometry::MATH_ASIN (double f) |
float | OpenRAVE::geometry::MATH_ATAN2 (float fy, float fx) |
double | OpenRAVE::geometry::MATH_ATAN2 (double fy, double fx) |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::operator* (float f, const RaveVector< T > &left) |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::operator* (double f, const RaveVector< T > &left) |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::quatFromAxisAngle (const RaveVector< T > &axis, T angle) |
Converts an axis-angle rotation into a quaternion. | |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::quatFromAxisAngle (const RaveVector< T > &axisangle) |
Converts an axis-angle rotation into a quaternion. | |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::quatFromMatrix (const RaveTransformMatrix< T > &rotation) |
Converts the rotation of a matrix into a quaternion. | |
template<typename T > | |
RaveTransformMatrix< T > | OpenRAVE::geometry::matrixFromQuat (const RaveVector< T > &quat) |
Converts a quaternion to a 3x3 matrix. | |
template<typename T > | |
void | OpenRAVE::geometry::matrixFromQuat (RaveTransformMatrix< T > &rotation, const RaveVector< T > &quat) |
Converts a quaternion to a 3x3 matrix. | |
template<typename T > | |
RaveTransformMatrix< T > | OpenRAVE::geometry::matrixFromAxisAngle (const RaveVector< T > &axis, T angle) |
Converts an axis-angle rotation to a 3x3 matrix. | |
template<typename T > | |
RaveTransformMatrix< T > | OpenRAVE::geometry::matrixFromAxisAngle (const RaveVector< T > &axisangle) |
Converts an axis-angle rotation to a 3x3 matrix. | |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::quatMultiply (const RaveVector< T > &quat0, const RaveVector< T > &quat1) |
Multiply two quaternions. | |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::quatInverse (const RaveVector< T > &quat) |
Inverted a quaternion rotation. | |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::quatSlerp (const RaveVector< T > &quat0, const RaveVector< T > &quat1, T t) |
Sphereical linear interpolation between two quaternions. | |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::dQSlerp (const RaveVector< T > &qa, const RaveVector< T > &_qb, T t) |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::quatRotate (const RaveVector< T > &q, const RaveVector< T > &t) |
transform a vector by a quaternion | |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::quatRotateDirection (const RaveVector< T > &sourcedir, const RaveVector< T > &targetdir) |
Return the minimal quaternion that orients sourcedir to targetdir. | |
template<typename T > | |
std::pair< T, RaveVector< T > > | OpenRAVE::geometry::normalizeAxisRotation (const RaveVector< T > &axis, const RaveVector< T > &quat) |
Find the rotation theta around axis such that rot(axis,theta) * q is closest to the identity rotation. | |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::axisAngleFromQuat (const RaveVector< T > &quat) |
Converts a quaternion into the axis-angle representation. | |
template<typename T > | |
RaveVector< T > | OpenRAVE::geometry::axisAngleFromMatrix (const RaveTransformMatrix< T > &rotation) |
Converts the rotation of a matrix into axis-angle representation. | |
template<typename T > | |
RaveTransformMatrix< T > | OpenRAVE::geometry::transformLookat (const RaveVector< T > &vlookat, const RaveVector< T > &vcamerapos, const RaveVector< T > &vcameraup) |
Returns a camera matrix that looks along a ray with a desired up vector. | |
template<typename T > | |
int | OpenRAVE::geometry::insideQuadrilateral (const RaveVector< T > &v, const RaveVector< T > &verts) |
Tests a point inside a 3D quadrilateral. | |
template<typename T > | |
int | OpenRAVE::geometry::insideTriangle (const RaveVector< T > v, const triangle< T > &tri) |
Tests a point insdie a 3D triangle. | |
template<typename T > | |
bool | OpenRAVE::geometry::RayAABBTest (const ray< T > &r, const aabb< T > &ab) |
Test collision of a ray with an axis aligned bounding box. | |
template<typename T > | |
bool | OpenRAVE::geometry::RayOBBTest (const ray< T > &r, const obb< T > &o) |
Test collision of a ray and an oriented bounding box. | |
template<typename T > | |
bool | OpenRAVE::geometry::IsOBBinFrustum (const obb< T > &o, const frustum< T > &fr) |
Test collision of an oriented bounding box and a frustum. | |
template<typename T , typename U > | |
bool | OpenRAVE::geometry::IsOBBinConvexHull (const obb< T > &o, const U &vplanes) |
Tests if an oriented bounding box is inside a 3D convex hull. | |
template<typename T > | |
bool | OpenRAVE::geometry::TriTriCollision (const RaveVector< T > &u1, const RaveVector< T > &u2, const RaveVector< T > &u3, const RaveVector< T > &v1, const RaveVector< T > &v2, const RaveVector< T > &v3, RaveVector< T > &contactpos, RaveVector< T > &contactnorm) |
Test collision if two 3D triangles.Assuming triangle vertices are declared counter-clockwise!! | |
template<typename T > | |
obb< T > | OpenRAVE::geometry::OBBFromAABB (const aabb< T > &ab, const RaveTransformMatrix< T > &t) |
Transform an axis aligned bounding box to an oriented bounding box. | |
template<typename T > | |
obb< T > | OpenRAVE::geometry::OBBFromAABB (const aabb< T > &ab, const RaveTransform< T > &t) |
Transform an axis aligned bounding box to an oriented bounding box. | |
template<typename T > | |
obb< T > | OpenRAVE::geometry::TransformOBB (const RaveTransform< T > &t, const obb< T > &o) |
Transforms an oriented bounding box. | |
template<typename T > | |
obb< T > | OpenRAVE::geometry::TransformOBB (const RaveTransformMatrix< T > &t, const obb< T > &o) |
Transforms an oriented bounding box. | |
template<typename T > | |
bool | OpenRAVE::geometry::AABBCollision (const aabb< T > &ab1, const aabb< T > &ab2) |
projects an obb along the world axes | |
Primitive Serialization functions. | |
Don't add new lines to the output << operators. Some applications use it to serialize the data to send across the network. | |
template<typename U > | |
std::ostream & | OpenRAVE::geometry::operator<< (std::ostream &O, const RaveVector< U > &v) |
template<typename U > | |
std::istream & | OpenRAVE::geometry::operator>> (std::istream &I, RaveVector< U > &v) |
template<typename U > | |
std::ostream & | OpenRAVE::geometry::operator<< (std::ostream &O, const RaveTransform< U > &v) |
template<typename U > | |
std::istream & | OpenRAVE::geometry::operator>> (std::istream &I, RaveTransform< U > &v) |
template<typename U > | |
std::ostream & | OpenRAVE::geometry::operator<< (std::ostream &O, const ray< U > &r) |
template<typename U > | |
std::istream & | OpenRAVE::geometry::operator>> (std::istream &I, ray< U > &r) |
template<typename U > | |
std::ostream & | OpenRAVE::geometry::operator<< (std::ostream &O, const RaveTransformMatrix< U > &v) |
serialize in column order! This is the format transformations are passed across the network | |
template<typename U > | |
std::istream & | OpenRAVE::geometry::operator>> (std::istream &I, RaveTransformMatrix< U > &v) |
de-serialize in column order! This is the format transformations are passed across the network | |
Distnace functions. | |
template<typename T > | |
T | OpenRAVE::geometry::DistVertexOBBSq (const RaveVector< T > &v, const obb< T > &o) |
The minimum distance form the vertex to the oriented bounding box. | |
Basic gemoetric primitives and affine math functions on them.
This file can be used stand-alone without openrave.h .
Definition in file geometry.h.
#define MATH_ASSERT assert |
Definition at line 39 of file geometry.h.
#define RAVE_DEPRECATED |
Definition at line 33 of file geometry.h.