CameraTool (object)¶
バージョン 2.0.1 で追加.
CameraTool provides camera manpulations services for the Camera interface. The CameraTool can only be used with standalone application, not from within DCC integrations.
Usage: - Click the Left mouse button and drag with the mouse to cause camera orbiting. - Click the Middle mouse button and drag with the mouse to cause camera panning. - Click the Left mouse button, the Alt key, and drag with the mouse to cause camera dollying. - Use the mouse wheel to cause camera dollying.
参考
Members¶
Boolean | enabled | Handler is enabled. |
Key | enableKey | Enable key. |
HandlerExclusivity | handlerExclusivity | Handler exclusivity. |
Boolean | isIndependent | HandlerExclusivity local override. |
Boolean | takeAllEvents | It true, the handler takes all the events. |
Boolean | alwaysEnabled | It true, the handler takes all the events. |
Boolean | isOwnedByDispatcher | Checks if the handler is owned by a handlerDispatcher. In most of the cases, the dispatcher owns the handlers. However, it’s not true in DFG graphs where the handlers are owns by the nodes. |
Ref<HandlerDispatcher> | dispatcher | Reference to the dispatcher. |
ToolTarget | target | Tool target. |
Boolean | performing | True if the tool is performing an action. |
ManipulationMode | mode | Orbit, pan or dolly mode. |
Vec2 | prevMousePos | Previous mouse position during a mouse drag. |
Scalar | orbitRate | Rate at which the mouse drag correlates to orbit velocity of the camera. |
Scalar | mouseWheelDollySpeed | Factor at which mouse wheel actions are converted to dolly motion. |
Float32 | moveSpeed | Scale factor for the camera translation speed |
Float32 | turnSpeed | Scale factor for the camera orbit speed |
Methods¶
CameraTool ( in CameraTool other ) | |
CameraTool ( in Key enableKey ) | |
CameraTool () | |
CameraTool | clone ? () |
dolly ! ( in Scalar delta, io Camera camera ) | |
init ! ( in Key enableKey, in Boolean isOwnedByDispatcher ) | |
onEvent ! ( io Event event ) | |
orbit ! ( in Vec2 mouseDelta, io Camera camera ) | |
pan ! ( in Vec2 mouseDelta, in Viewport_Virtual viewport, io Camera camera ) |
Methods in detail¶
CameraTool ( in CameraTool other )
copy constructor
CameraTool ( in Key enableKey )
Constructor.
enableKey | Enabled key stroke. |
CameraTool ()
Default constructor.
CameraTool CameraTool.clone? ()
clone method
CameraTool.dolly! ( in Scalar delta, io Camera camera )
Camera dolly.
delta | Value of the dolly |
camera | The camera. |
CameraTool.init! ( in Key enableKey, in Boolean isOwnedByDispatcher )
Initializes a CameraTool.
enableKey | Enabled key stroke. |
isOwnedByDispatcher | If true, owned by the dispatcher when registered. |
CameraTool.onEvent! ( io Event event )
Implementation of EventHandler.
CameraTool.orbit! ( in Vec2 mouseDelta, io Camera camera )
Camera orbiting (rotation).
mouseDelta | Mouse delta (in screen space). |
camera | The camera. |
CameraTool.pan! ( in Vec2 mouseDelta, in Viewport_Virtual viewport, io Camera camera )
Camera panning.
mouseDelta | Mouse displacement (in screen space). |
viewport | Reference to the viewport. |
camera | The camera. |