Kanzi Graphics Engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
kzu_orbit_camera.h File Reference

Orbit camera utility. More...

Functions

kzsError kzuOrbitCameraCreate (const struct KzcMemoryManager *memoryManager, struct KzuUIDomain *uiDomain, struct KzuOrbitCamera **out_orbitCamera)
 Creates a new orbit camera object with a default camera in origin. More...
 
kzsError kzuOrbitCameraDelete (struct KzuOrbitCamera *orbitCamera)
 Deletes orbit camera object. More...
 
void kzuOrbitCameraInitializeMatrix (const struct KzuOrbitCamera *orbitCamera, struct KzcMatrix4x4 *out_worldMatrix)
 Returns world matrix from orbit camera position and orientation. More...
 
struct KzuCameraNodekzuOrbitCameraGetCameraNode (const struct KzuOrbitCamera *orbitCamera)
 Returns camera node from orbit camera. More...
 
kzsError kzuOrbitCameraUpdate (struct KzuOrbitCamera *orbitCamera, kzUint deltaTime)
 Updates orbit camera, delta time in milliseconds. More...
 
kzsError kzuOrbitCameraRender (const struct KzuOrbitCamera *orbitCamera, struct KzuRenderer *renderer)
 Renders orbit camera specific elements. More...
 
kzBool kzuOrbitCameraIsActive (const struct KzuOrbitCamera *orbitCamera)
 Tell if orbit camera is active. More...
 
kzsError kzuOrbitCameraReplace (struct KzuOrbitCamera *orbitCamera, const struct KzuScene *scene, const struct KzuObjectNode *viewCameraNode, const struct KzcMatrix4x4 *parentWorldTransformation, const struct KzcMatrix4x4 *viewCameraTransformation)
 Replaces the view camera in a scene with this. More...
 
kzsError kzuOrbitCameraReplaceWithTransformationAttributes (struct KzuOrbitCamera *orbitCamera, const struct KzuScene *scene, const struct KzcMatrix4x4 *parentWorldTransformation, const struct KzuCameraTransformationAttributes *attributes)
 Replaces the view camera in a scene with this taking into account transformation attributes. More...
 
struct KzuObjectNodekzuOrbitCameraGetAttachedSceneObject (const struct KzuOrbitCamera *orbitCamera)
 Get attached scene object from orbit camera. More...
 
kzsError kzuOrbitCameraRestoreReplacedCamera (const struct KzuOrbitCamera *orbitCamera)
 Restores the view camera previously replaced by this orbit camera. More...
 
kzsError kzuOrbitCameraHandleKeyEvents (struct KzuOrbitCamera *orbitCamera, enum KzsInputKey keyCode, enum KzsInputKeyDeviceState keyState)
 Handles orbit camera key events. More...
 
kzsError kzuOrbitCameraHandlePointingDeviceEvents (struct KzuOrbitCamera *orbitCamera, kzU32 buttons, enum KzsInputPointingDeviceState state, kzInt mouseX, kzInt mouseY)
 Handles orbit camera pointing device events. More...
 
kzsError kzuOrbitCameraHandleWindowEvent (struct KzuOrbitCamera *orbitCamera, enum KzsEventType eventType)
 Handles orbit camera window events. More...
 
void kzuOrbitCameraSetFreezed (struct KzuOrbitCamera *orbitCamera, kzBool freezed)
 Sets orbit camera freezed / unfreezed. More...
 
kzBool kzuOrbitCameraIsFreezed (const struct KzuOrbitCamera *orbitCamera)
 Checks if orbit camera is freezed. More...
 
kzsError kzuOrbitCameraFocusToSelection (struct KzuOrbitCamera *orbitCamera, const struct KzcDynamicArray *nodePaths, const struct KzuTransformedScene *transformedScene)
 Focuses orbit camera to specified object node list. More...
 
kzsError kzuOrbitCameraRevertFocus (struct KzuOrbitCamera *orbitCamera)
 Reverts the orbit camera focus. More...
 
void kzuOrbitCameraGetTransformation (const struct KzuOrbitCamera *orbitCamera, kzBool considerParent, struct KzcMatrix4x4 *out_matrix)
 Gets orbit camera transformation, including the parent inverse multiplied. More...
 
void kzuOrbitCameraGetParentWorldTransformation (const struct KzuOrbitCamera *orbitCamera, struct KzcMatrix4x4 *out_matrix)
 Gets orbit camera's parent transformation. More...
 
void kzuOrbitCameraGetTransformationAttributes (const struct KzuOrbitCamera *orbitCamera, struct KzuCameraTransformationAttributes *out_attributes)
 Gets orbit camera transformation attributes. More...
 
kzFloat kzuOrbitCameraGetRadius (const struct KzuOrbitCamera *orbitCamera)
 Gets radius from orbit camera. More...
 
kzBool kzuOrbitCameraIsPickingEnabled (const struct KzuOrbitCamera *orbitCamera)
 Returns KZ_TRUE if picking should be enabled. More...
 

Detailed Description

Orbit camera utility.

A utility for rotating camera around point of interest.

Copyright 2008-2019 by Rightware. All rights reserved.

Function Documentation

kzsError kzuOrbitCameraCreate ( const struct KzcMemoryManager memoryManager,
struct KzuUIDomain uiDomain,
struct KzuOrbitCamera **  out_orbitCamera 
)

Creates a new orbit camera object with a default camera in origin.

kzsError kzuOrbitCameraDelete ( struct KzuOrbitCamera orbitCamera)

Deletes orbit camera object.

void kzuOrbitCameraInitializeMatrix ( const struct KzuOrbitCamera orbitCamera,
struct KzcMatrix4x4 out_worldMatrix 
)

Returns world matrix from orbit camera position and orientation.

struct KzuCameraNode* kzuOrbitCameraGetCameraNode ( const struct KzuOrbitCamera orbitCamera)

Returns camera node from orbit camera.

kzsError kzuOrbitCameraUpdate ( struct KzuOrbitCamera orbitCamera,
kzUint  deltaTime 
)

Updates orbit camera, delta time in milliseconds.

kzsError kzuOrbitCameraRender ( const struct KzuOrbitCamera orbitCamera,
struct KzuRenderer renderer 
)

Renders orbit camera specific elements.

kzBool kzuOrbitCameraIsActive ( const struct KzuOrbitCamera orbitCamera)

Tell if orbit camera is active.

kzsError kzuOrbitCameraReplace ( struct KzuOrbitCamera orbitCamera,
const struct KzuScene scene,
const struct KzuObjectNode viewCameraNode,
const struct KzcMatrix4x4 parentWorldTransformation,
const struct KzcMatrix4x4 viewCameraTransformation 
)

Replaces the view camera in a scene with this.

kzsError kzuOrbitCameraReplaceWithTransformationAttributes ( struct KzuOrbitCamera orbitCamera,
const struct KzuScene scene,
const struct KzcMatrix4x4 parentWorldTransformation,
const struct KzuCameraTransformationAttributes attributes 
)

Replaces the view camera in a scene with this taking into account transformation attributes.

struct KzuObjectNode* kzuOrbitCameraGetAttachedSceneObject ( const struct KzuOrbitCamera orbitCamera)

Get attached scene object from orbit camera.

kzsError kzuOrbitCameraRestoreReplacedCamera ( const struct KzuOrbitCamera orbitCamera)

Restores the view camera previously replaced by this orbit camera.

kzsError kzuOrbitCameraHandleKeyEvents ( struct KzuOrbitCamera orbitCamera,
enum KzsInputKey  keyCode,
enum KzsInputKeyDeviceState  keyState 
)

Handles orbit camera key events.

kzsError kzuOrbitCameraHandlePointingDeviceEvents ( struct KzuOrbitCamera orbitCamera,
kzU32  buttons,
enum KzsInputPointingDeviceState  state,
kzInt  mouseX,
kzInt  mouseY 
)

Handles orbit camera pointing device events.

kzsError kzuOrbitCameraHandleWindowEvent ( struct KzuOrbitCamera orbitCamera,
enum KzsEventType  eventType 
)

Handles orbit camera window events.

void kzuOrbitCameraSetFreezed ( struct KzuOrbitCamera orbitCamera,
kzBool  freezed 
)

Sets orbit camera freezed / unfreezed.

kzBool kzuOrbitCameraIsFreezed ( const struct KzuOrbitCamera orbitCamera)

Checks if orbit camera is freezed.

kzsError kzuOrbitCameraFocusToSelection ( struct KzuOrbitCamera orbitCamera,
const struct KzcDynamicArray nodePaths,
const struct KzuTransformedScene transformedScene 
)

Focuses orbit camera to specified object node list.

NodePaths is list of object node paths in project.

kzsError kzuOrbitCameraRevertFocus ( struct KzuOrbitCamera orbitCamera)

Reverts the orbit camera focus.

void kzuOrbitCameraGetTransformation ( const struct KzuOrbitCamera orbitCamera,
kzBool  considerParent,
struct KzcMatrix4x4 out_matrix 
)

Gets orbit camera transformation, including the parent inverse multiplied.

void kzuOrbitCameraGetParentWorldTransformation ( const struct KzuOrbitCamera orbitCamera,
struct KzcMatrix4x4 out_matrix 
)

Gets orbit camera's parent transformation.

void kzuOrbitCameraGetTransformationAttributes ( const struct KzuOrbitCamera orbitCamera,
struct KzuCameraTransformationAttributes out_attributes 
)

Gets orbit camera transformation attributes.

kzFloat kzuOrbitCameraGetRadius ( const struct KzuOrbitCamera orbitCamera)

Gets radius from orbit camera.

kzBool kzuOrbitCameraIsPickingEnabled ( const struct KzuOrbitCamera orbitCamera)

Returns KZ_TRUE if picking should be enabled.