g4tools  5.4.0
Public Member Functions | List of all members
tools::rotf Class Reference
Inheritance diagram for tools::rotf:
Inheritance graph
[legend]
Collaboration diagram for tools::rotf:
Collaboration graph
[legend]

Public Member Functions

 rotf ()
 
 rotf (const vec3f &a_axis, float a_radians)
 
 rotf (const vec3f &a_from, const vec3f &a_to)
 
virtual ~rotf ()
 
 rotf (const rotf &a_from)
 
rotfoperator= (const rotf &a_from)
 
rotfoperator*= (const rotf &a_q)
 
rotf operator* (const rotf &a_r) const
 
bool set_value (const vec3f &a_from, const vec3f &a_to)
 
bool set_value (const vec3f &a_from, float a_a)
 
bool value (vec3f &a_from, float &a_a) const
 
void value (mat4f &a_m) const
 
void set_value (const mat4f &a_m)
 
- Public Member Functions inherited from tools::qrot< vec3f, vec4f >
 qrot ()
 
 qrot (const vec3f &a_axis, T a_radians, T(*a_sin)(T), T(*a_cos)(T))
 
 qrot (const vec3f &a_from, const vec3f &a_to, T(*a_sqrt)(T), T(*a_fabs)(T))
 
 qrot (const qrot &a_from)
 
virtual ~qrot ()
 
qrotoperator= (const qrot &a_from)
 
qrotoperator*= (const qrot &a_q)
 
bool operator== (const qrot &a_r) const
 
bool operator!= (const qrot &a_r) const
 
qrot operator* (const qrot &a_r) const
 
bool invert ()
 
bool inverse (qrot &a_r) const
 
bool set_value (const vec3f &a_axis, T a_radians, T(*a_sin)(T), T(*a_cos)(T))
 
bool set_value (const vec3f &a_from, const vec3f &a_to, T(*a_sqrt)(T), T(*a_fabs)(T))
 
void set_value (const MAT4 &a_m, T(*a_sqrt)(T))
 
bool value (vec3f &a_axis, T &a_radians, T(*a_sin)(T), T(*a_acos)(T)) const
 
void value (MAT4 &a_m) const
 
T value_3 (MAT3 &a_m) const
 
void mul_vec (const vec3f &a_in, vec3f &a_out) const
 
void mul_vec (vec3f &a_v) const
 
void mul_3 (T &a_x, T &a_y, T &a_z) const
 
const vec4fquat () const
 
vec4fquat ()
 

Additional Inherited Members

- Protected Types inherited from tools::qrot< vec3f, vec4f >
typedef VEC4::elem_t T
 
- Protected Member Functions inherited from tools::qrot< vec3f, vec4f >
 qrot (T a_q0, T a_q1, T a_q2, T a_q3)
 
- Static Protected Member Functions inherited from tools::qrot< vec3f, vec4f >
static T one ()
 
static T minus_one ()
 
static T half ()
 
- Protected Attributes inherited from tools::qrot< vec3f, vec4f >
vec4f m_quat
 

Detailed Description

Definition at line 16 of file rotf.

Constructor & Destructor Documentation

◆ rotf() [1/4]

tools::rotf::rotf ( )
inline

Definition at line 21 of file rotf.

21 :parent() {} //zero rotation around the positive Z axis.

◆ rotf() [2/4]

tools::rotf::rotf ( const vec3f a_axis,
float  a_radians 
)
inline

Definition at line 22 of file rotf.

22 :parent(a_axis,a_radians,::sinf,::cosf) {}

◆ rotf() [3/4]

tools::rotf::rotf ( const vec3f a_from,
const vec3f a_to 
)
inline

Definition at line 23 of file rotf.

23 :parent(a_from,a_to,::sqrtf,::fabsf) {}

◆ ~rotf()

virtual tools::rotf::~rotf ( )
inlinevirtual

Definition at line 24 of file rotf.

24 {}

◆ rotf() [4/4]

tools::rotf::rotf ( const rotf a_from)
inline

Definition at line 26 of file rotf.

26 :parent(a_from) {}

Member Function Documentation

◆ operator*()

rotf tools::rotf::operator* ( const rotf a_r) const
inline

Definition at line 36 of file rotf.

36  {
37  rotf tmp(*this);
38  tmp *= a_r;
39  return tmp;
40  }

◆ operator*=()

rotf& tools::rotf::operator*= ( const rotf a_q)
inline

Definition at line 32 of file rotf.

32  {
33  parent::operator*=(a_q);
34  return *this;
35  }

◆ operator=()

rotf& tools::rotf::operator= ( const rotf a_from)
inline

Definition at line 27 of file rotf.

27  {
28  parent::operator=(a_from);
29  return *this;
30  }

◆ set_value() [1/3]

void tools::rotf::set_value ( const mat4f a_m)
inline

Definition at line 53 of file rotf.

53 {parent::set_value(a_m,::sqrtf);}

◆ set_value() [2/3]

bool tools::rotf::set_value ( const vec3f a_from,
const vec3f a_to 
)
inline

Definition at line 42 of file rotf.

42  {
43  return parent::set_value(a_from,a_to,::sqrtf,::fabsf);
44  }

◆ set_value() [3/3]

bool tools::rotf::set_value ( const vec3f a_from,
float  a_a 
)
inline

Definition at line 45 of file rotf.

45  {
46  return parent::set_value(a_from,a_a,::sinf,::cosf);
47  }

◆ value() [1/2]

void tools::rotf::value ( mat4f a_m) const
inline

Definition at line 52 of file rotf.

52 {parent::value(a_m);}

◆ value() [2/2]

bool tools::rotf::value ( vec3f a_from,
float &  a_a 
) const
inline

Definition at line 48 of file rotf.

48  {
49  return parent::value(a_from,a_a,::sinf,::acosf); //WARNING acos and not cos
50  }

The documentation for this class was generated from the following file:
tools::rotf::rotf
rotf()
Definition: rotf:21
tools::qrot< vec3f, vec4f >::set_value
bool set_value(const vec3f &a_axis, T a_radians, T(*a_sin)(T), T(*a_cos)(T))
Definition: qrot:109
tools::qrot< vec3f, vec4f >::operator=
qrot & operator=(const qrot &a_from)
Definition: qrot:29
tools::qrot< vec3f, vec4f >::value
bool value(vec3f &a_axis, T &a_radians, T(*a_sin)(T), T(*a_acos)(T)) const
Definition: qrot:166
tools::qrot< vec3f, vec4f >::operator*=
qrot & operator*=(const qrot &a_q)
Definition: qrot:41