Stores a 3D orientation, which can be rotated by dragging with the mouse.
More...
#include <juce_Draggable3DOrientation.h>
Stores a 3D orientation, which can be rotated by dragging with the mouse.
◆ VectorType
◆ QuaternionType
◆ Draggable3DOrientation() [1/2]
Draggable3DOrientation::Draggable3DOrientation |
( |
float | objectRadius = 0.5f | ) |
|
|
noexcept |
◆ Draggable3DOrientation() [2/2]
Draggable3DOrientation::Draggable3DOrientation |
( |
const Quaternion< float > & | quaternionToUse, |
|
|
float | objectRadius = 0.5f ) |
|
noexcept |
◆ reset()
void Draggable3DOrientation::reset |
( |
const VectorType & | axis | ) |
|
|
noexcept |
Resets the orientation, specifying the axis to align it along.
◆ setViewport()
void Draggable3DOrientation::setViewport |
( |
Rectangle< int > | newArea | ) |
|
|
noexcept |
Sets the viewport area within which mouse-drag positions will occur.
You'll need to set this rectangle before calling mouseDown. The centre of the rectangle is assumed to be the centre of the object that will be rotated, and the size of the rectangle will be used to scale the object radius - see setRadius().
◆ setRadius()
void Draggable3DOrientation::setRadius |
( |
float | newRadius | ) |
|
|
noexcept |
Sets the size of the rotated object, as a proportion of the viewport's size.
- See also
- setViewport
References jmax().
◆ mouseDown()
template<typename Type >
void Draggable3DOrientation::mouseDown |
( |
Point< Type > | mousePos | ) |
|
|
noexcept |
Begins a mouse-drag operation.
You must call this before any calls to mouseDrag(). The position that is supplied will be treated as being relative to the centre of the rectangle passed to setViewport().
◆ mouseDrag()
template<typename Type >
void Draggable3DOrientation::mouseDrag |
( |
Point< Type > | mousePos | ) |
|
|
noexcept |
Continues a mouse-drag operation.
After calling mouseDown() to begin a drag sequence, you can call this method to continue it.
◆ getRotationMatrix()
Matrix3D< float > Draggable3DOrientation::getRotationMatrix |
( |
| ) |
const |
|
noexcept |
◆ getQuaternion()
Provides direct access to the quaternion.
The documentation for this class was generated from the following file: