OGRE: Math

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Math
Core

## Classes
class | Ogre::Affine3
| Transform specialization for 3D Affine - encapsulating a 3x4 Matrix. More...
class | Ogre::Angle
| Wrapper class which identifies a value as the currently default angle type, as defined by Math::setAngleUnit. More...
class | Ogre::AxisAlignedBox
| A 3D box aligned with the x/y/z axes. More...
class | Ogre::Bitwise
| Class for manipulating bit patterns. More...
class | Ogre::ConvexBody
| Holds a solid representation of a convex body. More...
class | Ogre::Degree
| Wrapper class which indicates a given angle value is in Degrees. More...
class | Ogre::DualQuaternion
| Implementation of a dual quaternion, i.e. More...
class | Ogre::EdgeData
| This class contains the information required to describe the edge connectivity of a given set of vertices and indexes. More...
class | Ogre::EdgeListBuilder
| General utility class for building edge lists for geometry. More...
class | Ogre::Math
| Class to provide access to common mathematical functions. More...
class | Ogre::Matrix3
| A 3x3 matrix which can represent rotations around axes. More...
class | Ogre::Matrix4
| Transform specialization for projective - encapsulating a 4x4 Matrix. More...
class | Ogre::OptimisedUtil
| Utility class for provides optimised functions. More...
class | Ogre::Plane
| Defines a plane in 3D space. More...
class | Ogre::PlaneBoundedVolume
| Represents a convex volume bounded by planes. More...
class | Ogre::Polygon
| The class represents a polygon in 3D space. More...
class | Ogre::Quaternion
| Implementation of a Quaternion, i.e. More...
class | Ogre::Radian
| Wrapper class which indicates a given angle value is in Radians. More...
class | Ogre::Ray
| Representation of a ray in space, i.e. More...
class | Ogre::RotationalSpline
| This class interpolates orientations (rotations) along a spline using derivatives of quaternions. More...
class | Ogre::SimpleSpline
| A very simple spline class which implements the Catmull-Rom class of splines. More...
class | Ogre::Sphere
| A sphere primitive, mostly used for bounds checking. More...
class | Ogre::TangentSpaceCalc
| Class for calculating a tangent space basis. More...
class | Ogre::TransformBase< rows, T >
| Class encapsulating a standard 4x4 homogeneous matrix. More...
struct | Ogre::TransformBaseReal
class | Ogre::Vector< dims, T >
| Standard N-dimensional vector. More...
struct | Ogre::VectorBase< dims, T >
| helper class to implement legacy API. Notably x, y, z access More...
struct | Ogre::VectorBase< 2, Real >
struct | Ogre::VectorBase< 3, Real >
struct | Ogre::VectorBase< 4, Real >

## Typedefs
typedef std::vector< PlaneBoundedVolume > | Ogre::PlaneBoundedVolumeList
typedef std::vector< Plane > | Ogre::PlaneList
typedef std::pair< bool, Real > | Ogre::RayTestResult
| A pair structure where the first element indicates whether an intersection occurs.

## Functions
| Ogre::Radian::Radian (const Degree &d)
template<class T>
static void | Ogre::advanceRawPointer (const T *&ptr, ptrdiff_t offset)
| Advance the pointer with raw offset.
template<class T>
static void | Ogre::advanceRawPointer (T *&ptr, ptrdiff_t offset)
Radian | Ogre::VectorBase< 2, Real >::angleTo (const Vector2 &other) const
| Gets the oriented angle between 2 vectors.
static Vector3 | Ogre::Math::calculateBasicFaceNormal (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3)
| Calculate a face normal, no w-information.
static Vector3 | Ogre::Math::calculateBasicFaceNormalWithoutNormalize (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3)
| Calculate a face normal without normalize, no w-information.
static Vector4 | Ogre::Math::calculateFaceNormal (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3)
| Calculate a face normal, including the w component which is the offset from the origin.
static Vector4 | Ogre::Math::calculateFaceNormalWithoutNormalize (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3)
| Calculate a face normal without normalize, including the w component which is the offset from the origin.
Vector3 | Ogre::VectorBase< 3, Real >::crossProduct (const Vector3 &rkVector) const
| Calculates the cross-product of 2 vectors, i.e.
bool | Ogre::VectorBase< 3, Real >::directionEquals (const Vector3 &rhs, const Radian &tolerance) const
| Returns whether this vector is within a directional tolerance of another vector.
Quaternion | Ogre::VectorBase< 3, Real >::getRotationTo (const Vector3 &dest, const Vector3 &fallbackAxis=ZERO) const
| Gets the shortest arc quaternion to rotate this vector to the destination vector.
static bool | Ogre::Math::intersects (const Plane &plane, const AxisAlignedBox &box)
| Plane / box intersection test.
static RayTestResult | Ogre::Math::intersects (const Ray &ray, const Plane &plane)
| Ray / plane intersection.
static RayTestResult | Ogre::Math::intersects (const Ray &ray, const Sphere &sphere, bool discardInside=true)
| Ray / sphere intersection.
static bool | Ogre::Math::intersects (const Sphere &sphere, const Plane &plane)
| Sphere / plane intersection test.
static Matrix3 | Ogre::Math::lookRotation (const Vector3 &direction, const Vector3 &yaw)
| Create a rotation matrix from direction and yaw.
Vector2 | Ogre::VectorBase< 2, Real >::midPoint (const Vector2 &vec) const
| Returns a vector at a point half way between this and the passed in vector.
Vector3 | Ogre::VectorBase< 3, Real >::midPoint (const Vector3 &vec) const
| Returns a vector at a point half way between this and the passed in vector.
| Ogre::Angle::operator Degree () const
| Ogre::Angle::operator Radian () const
Affine3 | Ogre::operator* (const Affine3 &m, const Affine3 &m2)
Vector3 | Ogre::operator* (const Affine3 &m, const Vector3 &v)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Vector4 | Ogre::operator* (const Affine3 &m, const Vector4 &v)
Vector3 | Ogre::operator* (const Matrix3 &m, const Vector3 &v)
| Matrix * vector [3x3 * 3x1 = 3x1].
Matrix4 | Ogre::operator* (const Matrix4 &m, const Matrix4 &m2)
Vector3 | Ogre::operator* (const Matrix4 &m, const Vector3 &v)
| Vector transformation using '*'.
Vector4 | Ogre::operator* (const Matrix4 &m, const Vector4 &v)
Plane | Ogre::operator* (const Matrix4 &mat, const Plane &p)
Vector4 | Ogre::operator* (const Vector4 &v, const Matrix4 &mat)
Degree | Ogre::operator* (float a, const Degree &b)
Radian | Ogre::operator* (float a, const Radian &b)
Matrix4 | Ogre::operator+ (const Matrix4 &m, const Matrix4 &m2)
| Matrix addition.
Radian | Ogre::Radian::operator+ (const Degree &d) const
Radian & | Ogre::Radian::operator+= (const Degree &d)
Matrix4 | Ogre::operator- (const Matrix4 &m, const Matrix4 &m2)
| Matrix subtraction.
Radian | Ogre::Radian::operator- (const Degree &d) const
Radian & | Ogre::Radian::operator-= (const Degree &d)
Degree | Ogre::operator/ (float a, const Degree &b)
Radian | Ogre::operator/ (float a, const Radian &b)
Radian & | Ogre::Radian::operator= (const Degree &d)
Vector2 | Ogre::VectorBase< 2, Real >::perpendicular (void) const
| Generates a vector perpendicular to this vector (eg an 'up' vector).
Vector3 | Ogre::VectorBase< 3, Real >::perpendicular (void) const
| Generates a vector perpendicular to this vector (eg an 'up' vector).
bool | Ogre::VectorBase< 3, Real >::positionCloses (const Vector3 &rhs, Real tolerance=1e-03f) const
| Returns whether this vector is within a positional tolerance of another vector, also take scale of the vectors into account.
const Vector3 & | Ogre::VectorBase< 3, Real >::primaryAxis () const
| Extract the primary (dominant) axis from this direction vector.
Vector2 | Ogre::VectorBase< 2, Real >::randomDeviant (Radian angle) const
| Generates a new random vector which deviates from this vector by a given angle in a random direction.
Vector3 | Ogre::VectorBase< 3, Real >::randomDeviant (const Radian &angle, const Vector3 &up=ZERO) const
| Generates a new random vector which deviates from this vector by a given angle in a random direction.
template<class T>
static const T * | Ogre::rawOffsetPointer (const T *ptr, ptrdiff_t offset)
| Returns raw offsetted of the given pointer.
template<class T>
static T * | Ogre::rawOffsetPointer (T *ptr, ptrdiff_t offset)
Matrix4 | Ogre::TransformBaseReal::transpose () const
float | Ogre::Degree::valueAngleUnits () const
float | Ogre::Radian::valueAngleUnits () const
float | Ogre::Radian::valueDegrees () const
float | Ogre::Degree::valueRadians () const

## Detailed Description

## Typedef Documentation

## ◆ RayTestResult

typedef std::pair<bool, Real> Ogre::RayTestResult

A pair structure where the first element indicates whether an intersection occurs.

if true, the second element will indicate the distance along the ray at which it intersects. This can be converted to a point in space by calling Ray::getPoint().

## ◆ PlaneList

typedef std::vector<Plane> Ogre::PlaneList

## ◆ PlaneBoundedVolumeList

typedef std::vector<PlaneBoundedVolume> Ogre::PlaneBoundedVolumeList

## Function Documentation

## ◆ operator*() [1/11]

Radian Ogre::operator* | ( | float | a,
|  | const Radian & | b )
| inline

References Ogre::Radian::valueRadians().

## ◆ operator/() [1/2]

Radian Ogre::operator/ | ( | float | a,
|  | const Radian & | b )
| inline

References Ogre::Radian::valueRadians().

## ◆ operator*() [2/11]

Degree Ogre::operator* | ( | float | a,
|  | const Degree & | b )
| inline

References Ogre::Degree::valueDegrees().

## ◆ operator/() [2/2]

Degree Ogre::operator/ | ( | float | a,
|  | const Degree & | b )
| inline

References Ogre::Degree::valueDegrees().

## ◆ operator*() [3/11]

Vector3 Ogre::operator* | ( | const Matrix3 & | m,
|  | const Vector3 & | v )
| inline

Matrix * vector [3x3 * 3x1 = 3x1].

## ◆ operator*() [4/11]

Matrix4 Ogre::operator* | ( | const Matrix4 & | m,
|  | const Matrix4 & | m2 )
| inline

## ◆ operator+() [1/2]

Matrix4 Ogre::operator+ | ( | const Matrix4 & | m,
|  | const Matrix4 & | m2 )
| inline

Matrix addition.

## ◆ operator-() [1/2]

Matrix4 Ogre::operator- | ( | const Matrix4 & | m,
|  | const Matrix4 & | m2 )
| inline

Matrix subtraction.

## ◆ operator*() [5/11]

Affine3 Ogre::operator* | ( | const Affine3 & | m,
|  | const Affine3 & | m2 )
| inline

## ◆ operator*() [6/11]

Vector3 Ogre::operator* | ( | const Matrix4 & | m,
|  | const Vector3 & | v )
| inline

Vector transformation using '*'.

Transforms the given 3-D vector by the matrix, projecting the result back into w = 1.

Note
  This means that the initial w is considered to be 1.0, and then all the tree elements of the resulting 3-D vector are divided by the resulting w.

## ◆ operator*() [7/11]

Vector3 Ogre::operator* | ( | const Affine3 & | m,
|  | const Vector3 & | v )
| inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## ◆ operator*() [8/11]

Vector4 Ogre::operator* | ( | const Matrix4 & | m,
|  | const Vector4 & | v )
| inline

## ◆ operator*() [9/11]

Vector4 Ogre::operator* | ( | const Affine3 & | m,
|  | const Vector4 & | v )
| inline

## ◆ operator*() [10/11]

Vector4 Ogre::operator* | ( | const Vector4 & | v,
|  | const Matrix4 & | mat )
| inline

## ◆ rawOffsetPointer() [1/2]

template<class T>

const T * Ogre::rawOffsetPointer | ( | const T * | ptr,
|  | ptrdiff_t | offset )
| inlinestatic

Returns raw offsetted of the given pointer.

Note
  The offset are in bytes, no matter what type of the pointer.

References OGRE_FORCE_INLINE.

Referenced by advanceRawPointer(), and advanceRawPointer().

## ◆ rawOffsetPointer() [2/2]

template<class T>

T * Ogre::rawOffsetPointer | ( | T * | ptr,
|  | ptrdiff_t | offset )
| inlinestatic

References OGRE_FORCE_INLINE.

## ◆ advanceRawPointer() [1/2]

template<class T>

void Ogre::advanceRawPointer | ( | const T *& | ptr,
|  | ptrdiff_t | offset )
| inlinestatic

Advance the pointer with raw offset.

Note
  The offset are in bytes, no matter what type of the pointer.

References OGRE_FORCE_INLINE, and rawOffsetPointer().

## ◆ advanceRawPointer() [2/2]

template<class T>

void Ogre::advanceRawPointer | ( | T *& | ptr,
|  | ptrdiff_t | offset )
| inlinestatic

References OGRE_FORCE_INLINE, and rawOffsetPointer().

## ◆ operator*() [11/11]

Plane Ogre::operator* | ( | const Matrix4 & | mat,
|  | const Plane & | p )
| inline

References Ogre::Plane::d, Ogre::Matrix4::inverse(), Ogre::Plane::normal, Ogre::Vector< dims, T >::normalise(), and Ogre::TransformBaseReal::transpose().

## ◆ Radian()

Ogre::Radian::Radian | ( | const Degree & | d | ) |
| inline

References valueRadians().

## ◆ operator=()

Radian & Ogre::Radian::operator= | ( | const Degree & | d | ) |
| inline

References Radian(), and Ogre::Degree::valueRadians().

## ◆ operator+() [2/2]

Radian Ogre::Radian::operator+ | ( | const Degree & | d | ) | const
| inline

References Radian(), and Ogre::Degree::valueRadians().

## ◆ operator+=()

Radian & Ogre::Radian::operator+= | ( | const Degree & | d | ) |
| inline

References Radian(), and Ogre::Degree::valueRadians().

## ◆ operator-() [2/2]

Radian Ogre::Radian::operator- | ( | const Degree & | d | ) | const
| inline

References Radian(), and Ogre::Degree::valueRadians().

## ◆ operator-=()

Radian & Ogre::Radian::operator-= | ( | const Degree & | d | ) |
| inline

References Radian(), and Ogre::Degree::valueRadians().

## ◆ valueDegrees()

float Ogre::Radian::valueDegrees | ( |  | ) | const
| inline

References Ogre::Math::RadiansToDegrees().

Referenced by Ogre::Degree::operator+(), Ogre::Degree::operator+=(), Ogre::Degree::operator-(), Ogre::Degree::operator-=(), and Ogre::Degree::operator=().

## ◆ valueAngleUnits() [1/2]

float Ogre::Radian::valueAngleUnits | ( |  | ) | const
| inline

References Ogre::Math::RadiansToAngleUnits().

Referenced by Ogre::StringConverter::toString().

## ◆ valueRadians()

float Ogre::Degree::valueRadians | ( |  | ) | const
| inline

References Ogre::Math::DegreesToRadians().

Referenced by Ogre::Radian::operator+(), Ogre::Radian::operator+=(), Ogre::Radian::operator-(), Ogre::Radian::operator-=(), and Ogre::Radian::operator=().

## ◆ valueAngleUnits() [2/2]

float Ogre::Degree::valueAngleUnits | ( |  | ) | const
| inline

References Ogre::Math::DegreesToAngleUnits().

Referenced by Ogre::StringConverter::toString().

## ◆ operator Radian()

Ogre::Angle::operator Radian | ( |  | ) | const
| inline

References Ogre::Math::AngleUnitsToRadians().

## ◆ operator Degree()

Ogre::Angle::operator Degree | ( |  | ) | const
| inline

References Ogre::Math::AngleUnitsToDegrees().

## ◆ lookRotation()

Matrix3 Ogre::Math::lookRotation | ( | const Vector3 & | direction,
|  | const Vector3 & | yaw )
| inlinestatic

Create a rotation matrix from direction and yaw.

Parameters

  direction | the direction to look in. Must be normalised.
  yaw | the yaw axis to use

References Ogre::Matrix3::FromAxes(), and Ogre::Vector< dims, T >::normalisedCopy().

Referenced by makeViewMatrix().

## ◆ transpose()

Matrix4 Ogre::TransformBaseReal::transpose | ( |  | ) | const
| inline

Referenced by determinant(), and Ogre::operator*().

## ◆ intersects() [1/4]

bool Ogre::Math::intersects | ( | const Plane & | plane,
|  | const AxisAlignedBox & | box )
| inlinestatic

Plane / box intersection test.

References Ogre::Plane::BOTH_SIDE, and Ogre::Plane::getSide().

## ◆ intersects() [2/4]

RayTestResult Ogre::Math::intersects | ( | const Ray & | ray,
|  | const Plane & | plane )
| inlinestatic

Ray / plane intersection.

References Ogre::Ray::intersects().

Referenced by Ogre::AxisAlignedBox::intersects(), Ogre::AxisAlignedBox::intersects(), intersects(), intersects(), intersects(), Ogre::PlaneBoundedVolume::intersects(), Ogre::Ray::intersects(), Ogre::Ray::intersects(), Ogre::Sphere::intersects(), and pointInTri3D().

## ◆ intersects() [3/4]

RayTestResult Ogre::Math::intersects | ( | const Ray & | ray,
|  | const Sphere & | sphere,
|  | bool | discardInside = true )
| inlinestatic

Ray / sphere intersection.

References Ogre::Ray::intersects().

## ◆ intersects() [4/4]

bool Ogre::Math::intersects | ( | const Sphere & | sphere,
|  | const Plane & | plane )
| inlinestatic

Sphere / plane intersection test.

Remarks
  NB just do a plane.getDistance(sphere.getCenter()) for more detail!

References Ogre::Sphere::intersects().

## ◆ midPoint() [1/2]

Vector2 Ogre::VectorBase< 2, Real >::midPoint | ( | const Vector2 & | vec | ) | const
| inline

Returns a vector at a point half way between this and the passed in vector.

References VectorBase(), x, and y.

## ◆ randomDeviant() [1/2]

Vector2 Ogre::VectorBase< 2, Real >::randomDeviant | ( | Radian | angle | ) | const
| inline

Generates a new random vector which deviates from this vector by a given angle in a random direction.

This method assumes that the random number generator has already been seeded appropriately.

Parameters

  angle | The angle at which to deviate in radians

Returns
  A random vector which deviates from this vector by angle. This vector will not be normalised, normalise it if you wish afterwards.

References VectorBase(), Ogre::Math::Cos(), Ogre::Math::RangeRandom(), Ogre::Math::Sin(), x, and y.

## ◆ angleTo()

Radian Ogre::VectorBase< 2, Real >::angleTo | ( | const Vector2 & | other | ) | const
| inline

Gets the oriented angle between 2 vectors.

Vectors do not have to be unit-length but must represent directions. The angle is comprised between 0 and 2 PI.

References VectorBase(), crossProduct(), and Ogre::Math::TWO_PI.

## ◆ perpendicular() [1/2]

Vector2 Ogre::VectorBase< 2, Real >::perpendicular | ( | void |  | ) | const
| inline

Generates a vector perpendicular to this vector (eg an 'up' vector).

This method will return a vector which is perpendicular to this vector. There are an infinite number of possibilities but this method will guarantee to generate one of them. If you need more control you should use the Quaternion class.

References VectorBase(), x, and y.

## ◆ perpendicular() [2/2]

Vector3 Ogre::VectorBase< 3, Real >::perpendicular | ( | void |  | ) | const
| inline

Generates a vector perpendicular to this vector (eg an 'up' vector).

This method will return a vector which is perpendicular to this vector. There are an infinite number of possibilities but this method will guarantee to generate one of them. If you need more control you should use the Quaternion class.

References VectorBase(), Ogre::Math::Abs(), Ogre::Vector< dims, T >::normalisedCopy(), x, y, and z.

## ◆ crossProduct()

Vector3 Ogre::VectorBase< 3, Real >::crossProduct | ( | const Vector3 & | rkVector | ) | const
| inline

Calculates the cross-product of 2 vectors, i.e.

the vector that lies perpendicular to them both.

The cross-product is normally used to calculate the normal vector of a plane, by calculating the cross-product of 2 non-equivalent vectors which lie on the plane (e.g. 2 edges of a triangle).

Parameters

  rkVector | Vector which, together with this one, will be used to calculate the cross-product.

Returns
  A vector which is the result of the cross-product. This vector will NOT be normalised, to maximise efficiency
  - call Vector3::normalise on the result if you wish this to be done. As for which side the resultant vector will be on, the returned vector will be on the side from which the arc from 'this' to rkVector is anticlockwise, e.g. UNIT_Y.crossProduct(UNIT_Z) = UNIT_X, whilst UNIT_Z.crossProduct(UNIT_Y) = -UNIT_X. This is because OGRE uses a right-handed coordinate system.

  For a clearer explanation, look a the left and the bottom edges of your monitor's screen. Assume that the first vector is the left edge and the second vector is the bottom edge, both of them starting from the lower-left corner of the screen. The resulting vector is going to be perpendicular to both of them and will go inside the screen, towards the cathode tube (assuming you're using a CRT monitor, of course).

References VectorBase(), x, y, and z.

Referenced by getRotationTo().

## ◆ midPoint() [2/2]

Vector3 Ogre::VectorBase< 3, Real >::midPoint | ( | const Vector3 & | vec | ) | const
| inline

Returns a vector at a point half way between this and the passed in vector.

References VectorBase(), x, y, and z.

## ◆ randomDeviant() [2/2]

Vector3 Ogre::VectorBase< 3, Real >::randomDeviant | ( | const Radian & | angle,
|  | const Vector3 & | up = ZERO ) const
| inline

Generates a new random vector which deviates from this vector by a given angle in a random direction.

This method assumes that the random number generator has already been seeded appropriately.

Parameters

  angle | The angle at which to deviate
  up | Any vector perpendicular to this one (which could generated by cross-product of this vector and any other non-colinear vector). If you choose not to provide this the function will derive one on it's own, however if you provide one yourself the function will be faster (this allows you to reuse up vectors if you call this method more than once)

Returns
  A random vector which deviates from this vector by angle. This vector will not be normalised, normalise it if you wish afterwards.

References VectorBase(), Ogre::Quaternion::FromAngleAxis(), Ogre::Math::TWO_PI, Ogre::Math::UnitRandom(), and ZERO.

## ◆ getRotationTo()

Quaternion Ogre::VectorBase< 3, Real >::getRotationTo | ( | const Vector3 & | dest,
|  | const Vector3 & | fallbackAxis = ZERO ) const
| inline

Gets the shortest arc quaternion to rotate this vector to the destination vector.

If you call this with a dest vector that is close to the inverse of this vector, we will rotate 180 degrees around the 'fallbackAxis' (if specified, or a generated axis if not) since in this case ANY axis of rotation is valid.

References VectorBase(), Ogre::Math::Abs(), crossProduct(), Ogre::Vector< dims, T >::dotProduct(), Ogre::Quaternion::IDENTITY, Ogre::Quaternion::normalise(), Ogre::Math::RealEqual(), Ogre::Math::Sqrt(), Ogre::Vector< dims, T >::squaredLength(), x, y, and z.

## ◆ positionCloses()

bool Ogre::VectorBase< 3, Real >::positionCloses | ( | const Vector3 & | rhs,
|  | Real | tolerance = 1e-03f ) const
| inline

Returns whether this vector is within a positional tolerance of another vector, also take scale of the vectors into account.

Parameters

  rhs | The vector to compare with
  tolerance | The amount (related to the scale of vectors) that distance of the vector may vary by and still be considered close

References VectorBase(), and Ogre::Vector< dims, T >::squaredLength().

## ◆ directionEquals()

bool Ogre::VectorBase< 3, Real >::directionEquals | ( | const Vector3 & | rhs,
|  | const Radian & | tolerance ) const
| inline

Returns whether this vector is within a directional tolerance of another vector.

Parameters

  rhs | The vector to compare with
  tolerance | The maximum angle by which the vectors may vary and still be considered equal

Note
  Both vectors should be normalised.

References VectorBase(), Ogre::Math::Abs(), Ogre::Math::ACos(), Ogre::Vector< dims, T >::dotProduct(), and Ogre::Radian::valueRadians().

## ◆ primaryAxis()

const Vector3 & Ogre::VectorBase< 3, Real >::primaryAxis | ( |  | ) | const
| inline

Extract the primary (dominant) axis from this direction vector.

References VectorBase(), Ogre::Math::Abs(), NEGATIVE_UNIT_X, NEGATIVE_UNIT_Y, NEGATIVE_UNIT_Z, UNIT_X, UNIT_Y, UNIT_Z, x, y, and z.

## ◆ calculateBasicFaceNormal()

Vector3 Ogre::Math::calculateBasicFaceNormal | ( | const Vector3 & | v1,
|  | const Vector3 & | v2,
|  | const Vector3 & | v3 )
| inlinestatic

Calculate a face normal, no w-information.

References Ogre::Vector< dims, T >::normalise().

Referenced by buildReflectionMatrix(), calculateFaceNormal(), Ogre::LodData::Triangle::computeNormal(), and Ogre::Plane::redefine().

## ◆ calculateFaceNormal()

Vector4 Ogre::Math::calculateFaceNormal | ( | const Vector3 & | v1,
|  | const Vector3 & | v2,
|  | const Vector3 & | v3 )
| inlinestatic

Calculate a face normal, including the w component which is the offset from the origin.

References calculateBasicFaceNormal(), and Ogre::Vector< dims, T >::dotProduct().

Referenced by buildReflectionMatrix().

## ◆ calculateBasicFaceNormalWithoutNormalize()

Vector3 Ogre::Math::calculateBasicFaceNormalWithoutNormalize | ( | const Vector3 & | v1,
|  | const Vector3 & | v2,
|  | const Vector3 & | v3 )
| inlinestatic

Calculate a face normal without normalize, no w-information.

Referenced by buildReflectionMatrix(), and calculateFaceNormalWithoutNormalize().

## ◆ calculateFaceNormalWithoutNormalize()

Vector4 Ogre::Math::calculateFaceNormalWithoutNormalize | ( | const Vector3 & | v1,
|  | const Vector3 & | v2,
|  | const Vector3 & | v3 )
| inlinestatic

Calculate a face normal without normalize, including the w component which is the offset from the origin.

References calculateBasicFaceNormalWithoutNormalize(), and Ogre::Vector< dims, T >::dotProduct().

Referenced by buildReflectionMatrix().