Nebula
Loading...
Searching...
No Matches
Math::transform Class Reference

#include <transform.h>

Detailed Description

Simple transform using position, quaternion, and scale.

Public Member Functions

 transform ()
 default constructor
 
 transform (const Math::vec3 &pos, const Math::quat &rot=Math::quat(), const Math::vec3 &scale=Math::_plus1)
 constructor 1
 
void Set (const Math::vec3 &pos, const Math::quat &rot, const Math::vec3 &scale)
 set content
 
transform GetRelative (const transform &child)
 get the relative transform from this to child, expressed as matrix result = this * inv(child)
 

Static Public Member Functions

static transform FromMat4 (const Math::mat4 &mat)
 transforms a vector (ignores position)
 

Public Attributes

Math::vec3 position
 
Math::quat rotation
 
Math::vec3 scale
 

Constructor & Destructor Documentation

◆ transform() [1/2]

Math::transform::transform ( )
inline

default constructor

◆ transform() [2/2]

Math::transform::transform ( const Math::vec3 & pos,
const Math::quat & rot = Math::quat(),
const Math::vec3 & scale = Math::_plus1 )
inline

constructor 1

Member Function Documentation

◆ FromMat4()

transform Math::transform::FromMat4 ( const Math::mat4 & mat)
inlinestatic

transforms a vector (ignores position)

◆ GetRelative()

transform Math::transform::GetRelative ( const transform & child)
inline

get the relative transform from this to child, expressed as matrix result = this * inv(child)

◆ Set()

void Math::transform::Set ( const Math::vec3 & pos,
const Math::quat & rot,
const Math::vec3 & scale )
inline

set content

Member Data Documentation

◆ position

Math::vec3 Math::transform::position

◆ rotation

Math::quat Math::transform::rotation

◆ scale

Math::vec3 Math::transform::scale

The documentation for this class was generated from the following file: