| 62 | } |
| 63 | |
| 64 | void CullableObject::setTransform( const vec3 &position, const vec3 &rotation, float scale ) |
| 65 | { |
| 66 | mPosition = position; |
| 67 | mRotation = rotation; |
| 68 | mScale = scale; |
| 69 | |
| 70 | // by creating a single transformation matrix, it will be very easy to construct a world space bounding box for this object |
| 71 | mTransform = mat4(); |
| 72 | mTransform *= glm::translate( position ); |
| 73 | mTransform *= toMat4( quat( rotation ) ); |
| 74 | mTransform *= glm::scale( vec3( scale ) ); |
| 75 | } |
no test coverage detected