TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::quat Struct Reference

A rotation, as a unit quaternion. More...

#include <gui_core/gui_math3d.h>

Public Member Functions

bool operator== (const quat &) const =default
quat operator* (const quat &b) const
 This rotation after b: rotating by the product is rotating by b, then this.
float3 Rotate (float3 v) const
 v rotated.
quat Normalized () const
 At length 1; a zero quaternion becomes no rotation.

Static Public Member Functions

static quat AxisAngle (float3 axis, float radians)
 radians round axis (any length but zero), counterclockwise looking down it.

Public Attributes

float x = 0.0f
float y = 0.0f
float z = 0.0f
float w = 1.0f

Detailed Description

A rotation, as a unit quaternion.

Member Function Documentation

◆ operator==()

bool tachyon::quat::operator== ( const quat & ) const
default

◆ AxisAngle()

quat tachyon::quat::AxisAngle ( float3 axis,
float radians )
inlinestatic

radians round axis (any length but zero), counterclockwise looking down it.

◆ operator*()

quat tachyon::quat::operator* ( const quat & b) const
inline

This rotation after b: rotating by the product is rotating by b, then this.

◆ Rotate()

float3 tachyon::quat::Rotate ( float3 v) const
inline

v rotated.

◆ Normalized()

quat tachyon::quat::Normalized ( ) const
inline

At length 1; a zero quaternion becomes no rotation.

Member Data Documentation

◆ x

float tachyon::quat::x = 0.0f

◆ y

float tachyon::quat::y = 0.0f

◆ z

float tachyon::quat::z = 0.0f

◆ w

float tachyon::quat::w = 1.0f

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