Plasma Engine  2.0
Loading...
Searching...
No Matches
plBasisAxis Struct Reference

An enum that allows to select on of the six main axis (positive / negative) More...

#include <Declarations.h>

Inheritance diagram for plBasisAxis:

Public Types

enum  Enum : plInt8 {
  PositiveX , PositiveY , PositiveZ , NegativeX ,
  NegativeY , NegativeZ , Default = PositiveX
}
 An enum that allows to select on of the six main axis (positive / negative)
 
using StorageType = plInt8
 

Static Public Member Functions

static plVec3 GetBasisVector (plBasisAxis::Enum basisAxis)
 Returns the vector for the given axis. E.g. (1, 0, 0) or (0, -1, 0), etc.
 
static plMat3 CalculateTransformationMatrix (plBasisAxis::Enum forwardDir, plBasisAxis::Enum rightDir, plBasisAxis::Enum dir, float fUniformScale=1.0f, float fScaleX=1.0f, float fScaleY=1.0f, float fScaleZ=1.0f)
 Computes a matrix representing the transformation. 'Forward' represents the X axis, 'Right' the Y axis and 'Up' the Z axis.
 
static plQuat GetBasisRotation (plBasisAxis::Enum identity, plBasisAxis::Enum axis)
 Returns a quaternion that rotates from 'identity' to 'axis'.
 
static plQuat GetBasisRotation_PosX (plBasisAxis::Enum axis)
 Returns a quaternion that rotates from 'PositiveX' to 'axis'.
 
static plBasisAxis::Enum GetOrthogonalAxis (plBasisAxis::Enum axis1, plBasisAxis::Enum axis2, bool bFlip)
 Returns the axis that is orthogonal to axis1 and axis2. If 'flip' is set, it returns the negated axis.
 

Detailed Description

An enum that allows to select on of the six main axis (positive / negative)

Member Function Documentation

◆ GetOrthogonalAxis()

plBasisAxis::Enum plBasisAxis::GetOrthogonalAxis ( plBasisAxis::Enum axis1,
plBasisAxis::Enum axis2,
bool bFlip )
static

Returns the axis that is orthogonal to axis1 and axis2. If 'flip' is set, it returns the negated axis.

If axis1 and axis2 are not orthogonal to each other, the value of axis1 is returned as the result.


The documentation for this struct was generated from the following files: