Geometry-related code.  
More...
 | 
| class   | Point2D | 
|   | Point2D is a cartesian (X,Y) pairing.  More...
  | 
|   | 
| class   | Polar2D | 
|   | Polar2D is a pairing of a radius r and angle θ from some reference point; in this library, it is assumed to be the Cartesian origin (0, 0).  More...
  | 
|   | 
| class   | Quaternion | 
|   | Quaternions provide a representation of Orientation and rotations in three dimensions.  More...
  | 
|   | 
| class   | Vector | 
|   | Vectors represent a direction and Magnitude.  More...
  | 
|   | 
◆ DoubleQuaternionFromEuler()
COnstruct a Quaternion from Euler angles. 
Given a vector of Euler angles in ZYX sequence (e.g. yaw, pitch, roll), return a Quaternion.
- Parameters
 - 
  
    | euler | A vector Euler Angle in ZYX sequence.  | 
  
   
- Returns
 - A Quaternion representation of the Orientation represented by the Euler angles. 
 
 
 
◆ FloatQuaternionFromEuler()
COnstruct a Quaternion from Euler angles. 
Given a vector of Euler angles in ZYX sequence (e.g. yaw, pitch, roll), return a Quaternion.
- Parameters
 - 
  
    | euler | A vector Euler Angle in ZYX sequence.  | 
  
   
- Returns
 - A Quaternion representation of the Orientation represented by the Euler angles. 
 
 
 
◆ Heading2D()
Compass heading for a Vector2D. 
- Parameters
 - 
  
  
 
- Returns
 - The compass heading of the vector in radians. 
 
 
 
◆ Heading2F()
Compass heading for a Vector2F. 
- Parameters
 - 
  
  
 
- Returns
 - The compass heading of the vector in radians. 
 
 
 
◆ Heading3D()
Heading3D returns a compass heading for a Vector2F.
- Parameters
 - 
  
  
 
- Returns
 - The compass heading of the vector in radians. 
 
 
 
◆ Heading3F()
Compass heading for a Vector2F. 
- Parameters
 - 
  
  
 
- Returns
 - The compass heading of the vector in radians. 
 
 
 
◆ LERP()
Linear interpolation for two Quaternions. 
LERP computes the linear interpolation of two quaternions At some fraction of the distance between them.
- Template Parameters
 - 
  
  
 
- Parameters
 - 
  
    | p | The starting Quaternion.  | 
    | q | The ending Quaternion.  | 
    | t | The fraction of the distance between the two quaternions to interpolate.  | 
  
   
- Returns
 - A Quaternion representing the linear interpolation of the two quaternions. 
 
 
 
◆ MakeQuaternion() [1/3]
Convience Quaternion construction function. 
Return a double Quaternion scaled appropriately from a vector and Angle, e.g. Angle = cos(Angle / 2), Axis.UnitVector() * sin(Angle / 2).
- Parameters
 - 
  
    | axis | The Axis of rotation.  | 
    | angle | The Angle of rotation.  | 
  
   
- Returns
 - A Quaternion. 
 
 
 
◆ MakeQuaternion() [2/3]
Convenience Quaternion construction function. 
Return a float Quaternion scaled appropriately from a vector and Angle, e.g. angle = cos(Angle / 2), Axis.UnitVector() * sin(Angle / 2).
- Parameters
 - 
  
    | axis | The Axis of rotation.  | 
    | angle | The Angle of rotation.  | 
  
   
- Returns
 - A Quaternion. 
 
 
 
◆ MakeQuaternion() [3/3]
Convience Quaternion construction function. 
Return a double Quaternion scaled appropriately from a vector and Angle, e.g. Angle = cos(Angle / 2), Axis.UnitVector() * sin(Angle / 2).
- Parameters
 - 
  
    | axis | The Axis of rotation.  | 
    | angle | The Angle of rotation.  | 
  
   
- Returns
 - A Quaternion. 
 
 
 
◆ QuaternionSelfTest()
      
        
          | void scmp::geom::QuaternionSelfTest  | 
          ( | 
           | ) | 
           | 
        
      
 
Internal consistency check. 
Run a quick self test to exercise basic functionality of the Quaternion class to verify correct operation. Note that if #NDEBUG is defined, the self test is disabled. 
 
 
◆ ShortestSLERP()
Shortest distance spherical linear interpolation. 
ShortestSLERP computes the shortest distance spherical linear interpolation between two unit quaternions At some fraction of the distance between them.
- Template Parameters
 - 
  
  
 
- Parameters
 - 
  
    | p | The starting Quaternion.  | 
    | q | The ending Quaternion.  | 
    | t | The fraction of the distance between the two quaternions to interpolate.  | 
  
   
- Returns
 - A Quaternion representing the shortest path between two quaternions.