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

Preview selection system structure contains the picking functionality that is used in the preview application. More...

Typedefs

typedef kzsError(* KzuPreviewSelectionCallback )(kzString objectPath, void *userData)
 Selection callback prototype. More...
 

Enumerations

enum  KzuPreviewSelectionMode { KZU_PREVIEW_SELECTION_MODE_NODE, KZU_PREVIEW_SELECTION_MODE_MATERIAL }
 Selection mode for the preview selection system. More...
 

Functions

kzsError kzuPreviewSelectionSystemCreate (const struct KzcMemoryManager *memoryManager, struct KzuPreviewSystem *previewSystem, struct KzuPreviewSelectionSystem **out_previewSelectionSystem)
 Creates a new preview selection system object. More...
 
kzsError kzuPreviewSelectionSystemDelete (struct KzuPreviewSelectionSystem *previewSelectionSystem)
 Deletes a preview selection system object. More...
 
kzsError kzuPreviewSelectionSystemHandleLayerPointingEvent (const struct KzuPreviewSelectionSystem *previewSelectionSystem, enum KzsInputPointingDeviceState state, const struct KzuViewportLayer *viewportLayer, const struct KzcVector2 *layerPoint)
 Notifies the preview selection system of a pointing device event that has been mapped to a viewport layer. More...
 
void kzuPreviewSelectionSystemSetSelectionMode (struct KzuPreviewSelectionSystem *previewSelectionSystem, enum KzuPreviewSelectionMode mode)
 Sets the selection mode. More...
 
void kzuPreviewSelectionSystemSetSelectionCallback (struct KzuPreviewSelectionSystem *previewSelectionSystem, KzuPreviewSelectionCallback selectionCallback, void *userData)
 Sets the callback that is called when objects are selected by the preview selection system. More...
 
kzsError kzuPreviewSelectionSystemPerformSelection (const struct KzuPreviewSelectionSystem *previewSelectionSystem, kzUint x, kzUint y, struct KzuObjectNode **out_node, kzUint *out_cluster)
 Performs a single selection operation in the current root layer. More...
 
kzBool kzuPreviewSelectionSystemHasModulateSelection (const struct KzuPreviewSelectionSystem *previewSelectionSystem)
 Tell if selection modulation is on. More...
 
void kzuPreviewSelectionSystemSetModulateSelection (struct KzuPreviewSelectionSystem *previewSelectionSystem, kzBool enabled)
 Turn selection modulation on or off. More...
 
kzsError kzuPreviewSelectionSystemClearSelection (const struct KzuPreviewSelectionSystem *previewSelectionSystem)
 Clears all selected objects. More...
 
kzsError kzuPreviewSelectionSystemAddToSelection (const struct KzuPreviewSelectionSystem *previewSelectionSystem, kzString objectPath)
 Adds one target object for the selection. More...
 
kzsError kzuPreviewSelectionSystemApplySelection (const struct KzuPreviewSelectionSystem *previewSelectionSystem, kzString objectPath)
 Apply one path for the selection. More...
 
struct KzcDynamicArraykzuPreviewSelectionSystemGetSelection (const struct KzuPreviewSelectionSystem *previewSelectionSystem)
 Gets all selected objects. More...
 
kzString kzuPreviewSelectionSystemGetFirstSelectedObject (const struct KzuPreviewSelectionSystem *previewSelectionSystem)
 Gets the first selected object. More...
 

Detailed Description

Preview selection system structure contains the picking functionality that is used in the preview application.

Copyright 2008-2019 by Rightware. All rights reserved.

Typedef Documentation

typedef kzsError(* KzuPreviewSelectionCallback)(kzString objectPath, void *userData)

Selection callback prototype.

Enumeration Type Documentation

Selection mode for the preview selection system.

Enumerator
KZU_PREVIEW_SELECTION_MODE_NODE 
KZU_PREVIEW_SELECTION_MODE_MATERIAL 

Function Documentation

kzsError kzuPreviewSelectionSystemCreate ( const struct KzcMemoryManager memoryManager,
struct KzuPreviewSystem previewSystem,
struct KzuPreviewSelectionSystem **  out_previewSelectionSystem 
)

Creates a new preview selection system object.

kzsError kzuPreviewSelectionSystemDelete ( struct KzuPreviewSelectionSystem previewSelectionSystem)

Deletes a preview selection system object.

kzsError kzuPreviewSelectionSystemHandleLayerPointingEvent ( const struct KzuPreviewSelectionSystem previewSelectionSystem,
enum KzsInputPointingDeviceState  state,
const struct KzuViewportLayer viewportLayer,
const struct KzcVector2 layerPoint 
)

Notifies the preview selection system of a pointing device event that has been mapped to a viewport layer.

void kzuPreviewSelectionSystemSetSelectionMode ( struct KzuPreviewSelectionSystem previewSelectionSystem,
enum KzuPreviewSelectionMode  mode 
)

Sets the selection mode.

void kzuPreviewSelectionSystemSetSelectionCallback ( struct KzuPreviewSelectionSystem previewSelectionSystem,
KzuPreviewSelectionCallback  selectionCallback,
void userData 
)

Sets the callback that is called when objects are selected by the preview selection system.

kzsError kzuPreviewSelectionSystemPerformSelection ( const struct KzuPreviewSelectionSystem previewSelectionSystem,
kzUint  x,
kzUint  y,
struct KzuObjectNode **  out_node,
kzUint out_cluster 
)

Performs a single selection operation in the current root layer.

The selection callback is called for an object under the pointer. The object is not automatically added to the current selection.

kzBool kzuPreviewSelectionSystemHasModulateSelection ( const struct KzuPreviewSelectionSystem previewSelectionSystem)

Tell if selection modulation is on.

void kzuPreviewSelectionSystemSetModulateSelection ( struct KzuPreviewSelectionSystem previewSelectionSystem,
kzBool  enabled 
)

Turn selection modulation on or off.

kzsError kzuPreviewSelectionSystemClearSelection ( const struct KzuPreviewSelectionSystem previewSelectionSystem)

Clears all selected objects.

kzsError kzuPreviewSelectionSystemAddToSelection ( const struct KzuPreviewSelectionSystem previewSelectionSystem,
kzString  objectPath 
)

Adds one target object for the selection.

kzsError kzuPreviewSelectionSystemApplySelection ( const struct KzuPreviewSelectionSystem previewSelectionSystem,
kzString  objectPath 
)

Apply one path for the selection.

This either selects or unselects the given object.

struct KzcDynamicArray* kzuPreviewSelectionSystemGetSelection ( const struct KzuPreviewSelectionSystem previewSelectionSystem)

Gets all selected objects.

Each object is represented as a kzString path.

kzString kzuPreviewSelectionSystemGetFirstSelectedObject ( const struct KzuPreviewSelectionSystem previewSelectionSystem)

Gets the first selected object.