ezEngine  Release 25.03
ezBasisAxis Struct Reference

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

#include <Declarations.h>

Inheritance diagram for ezBasisAxis:

Public Types

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

Static Public Member Functions

static ezVec3 GetBasisVector (ezBasisAxis::Enum basisAxis)
 Returns the vector for the given axis. E.g. (1, 0, 0) or (0, -1, 0), etc.
 
static ezMat3 CalculateTransformationMatrix (ezBasisAxis::Enum forwardDir, ezBasisAxis::Enum rightDir, ezBasisAxis::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 ezQuat GetBasisRotation (ezBasisAxis::Enum identity, ezBasisAxis::Enum axis)
 Returns a quaternion that rotates from 'identity' to 'axis'.
 
static ezQuat GetBasisRotation_PosX (ezBasisAxis::Enum axis)
 Returns a quaternion that rotates from 'PositiveX' to 'axis'.
 
static ezBasisAxis::Enum GetOrthogonalAxis (ezBasisAxis::Enum axis1, ezBasisAxis::Enum axis2, bool bFlip)
 Returns the axis that is orthogonal to axis1 and axis2. If 'flip' is set, it returns the negated axis. More...
 

Detailed Description

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

Member Function Documentation

◆ GetOrthogonalAxis()

ezBasisAxis::Enum ezBasisAxis::GetOrthogonalAxis ( ezBasisAxis::Enum  axis1,
ezBasisAxis::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: