Changeset 397 for trunk/nv/core/transform.hh
- Timestamp:
- 06/12/15 19:27:20 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/core/transform.hh
r395 r397 25 25 void set_position( const vec3& a_position ) { m_position = a_position; } 26 26 void set_orientation( const quat& a_orientation ) { m_orientation = a_orientation; } 27 void set_orientation( const vec3& axis, float angle)28 { 29 m_orientation = glm::angleAxis( angle, axis );30 }27 void set_orientation( float radians, const vec3& axis ) 28 { // use glm::radians if degrees! 29 m_orientation = glm::angleAxis( radians, axis ); 30 } 31 31 32 32 const vec3& get_position() const { return m_position; } … … 42 42 m_position += absolute; 43 43 } 44 void rotate( const vec3& axis, f32 angle )45 { 46 quat temp( angle, axis );47 m_orientation = temp * m_orientation;48 }44 // void rotate( const vec3& axis, f32 angle ) 45 // { // use glm::radians if degrees! 46 // quat temp( angle, axis ); 47 // m_orientation = temp * m_orientation; 48 // } 49 49 void set( const mat4& from ) 50 50 {
Note: See TracChangeset
for help on using the changeset viewer.