#include <CameraUi.h>
Enables user interaction with a CameraPersp via the mouse.
cinder::CameraUi::CameraUi |
( |
| ) |
|
Constructs a CameraUi which manipulates camera directly (and consequently expects its pointer to remain valid). Optionally attaches to mouse/window signals of window, with priority signalPriority.
cinder::CameraUi::CameraUi |
( |
const CameraUi & |
rhs | ) |
|
cinder::CameraUi::~CameraUi |
( |
| ) |
|
void cinder::CameraUi::connect |
( |
const app::WindowRef & |
window, |
|
|
int |
signalPriority = 0 |
|
) |
| |
Connects to mouseDown, mouseDrag, mouseWheel and resize signals of window, with optional priority signalPriority.
void cinder::CameraUi::disconnect |
( |
| ) |
|
Disconnects all signal handlers.
bool cinder::CameraUi::isConnected |
( |
| ) |
const |
Returns whether the CameraUi is connected to mouse and window signal handlers.
void cinder::CameraUi::enable |
( |
bool |
enable = true | ) |
|
Sets whether the CameraUi will modify its CameraPersp either through its Window signals or through the various mouse*() member functions. Does not prevent resize handling.
void cinder::CameraUi::disable |
( |
| ) |
|
Prevents the CameraUi from modifying its CameraPersp either through its Window signals or through the various mouse*() member functions. Does not prevent resize handling.
bool cinder::CameraUi::isEnabled |
( |
| ) |
const |
Returns whether the CameraUi will modify its CameraPersp either through its Window signals or through the various mouse*() member functions. Does not prevent resize handling.
Signal emitted whenever the user modifies the camera.
void cinder::CameraUi::mouseDown |
( |
const vec2 & |
mousePos | ) |
|
void cinder::CameraUi::mouseUp |
( |
const vec2 & |
mousePos | ) |
|
void cinder::CameraUi::mouseWheel |
( |
float |
increment | ) |
|
void cinder::CameraUi::mouseDrag |
( |
const vec2 & |
mousePos, |
|
|
bool |
leftDown, |
|
|
bool |
middleDown, |
|
|
bool |
rightDown |
|
) |
| |
const CameraPersp& cinder::CameraUi::getCamera |
( |
| ) |
const |
Returns a reference to the currently controlled CameraPersp.
void cinder::CameraUi::setCamera |
( |
CameraPersp * |
camera | ) |
|
void cinder::CameraUi::setWindowSize |
( |
const ivec2 & |
windowSizePixels | ) |
|
Sets the size of the window in pixels when no WindowRef is supplied with connect()
void cinder::CameraUi::setMouseWheelMultiplier |
( |
float |
multiplier | ) |
|
Sets the multiplier on mouse wheel zooming. Larger values zoom faster. Negative values invert the direction. Default is 1.2
.
float cinder::CameraUi::getMouseWheelMultiplier |
( |
| ) |
const |
Returns the multiplier on mouse wheel zooming. Default is 1.2
.
void cinder::CameraUi::setMinimumPivotDistance |
( |
float |
minPivotDistance | ) |
|
Sets the minimum allowable pivot distance. Default is 1.0
. If the user dollies closer than minPivotDistance the pivotDistance remains minPivotDistance.
float cinder::CameraUi::getMinimumPivotDistance |
( |
| ) |
const |
Returns the minimum allowable pivot distance. Default is 1.0
.
The documentation for this class was generated from the following files: