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

Preview system structure contains those features that are used in the preview but not in the normal application. More...

Macros

#define KZU_PREVIEW_SYSTEM_OPTION_OVERDRAW_VISUALIZATION
 Specifies option for overdraw visualization. More...
 
#define KZU_PREVIEW_SYSTEM_OPTION_LAYER_RENDER_TO_TEXTURE_VISUALIZATION
 Specifies option for visualization if layer is rendered into a texture. More...
 
#define KZU_PREVIEW_SYSTEM_OPTION_LAYER_IS_TRANSPARENT_VISUALIZATION
 Specifies option for visualization if layer is rendered into a texture. More...
 
#define KZU_PREVIEW_SYSTEM_OPTION_LAYER_VISUALIZATION
 Specifies option for overdraw visualization. More...
 
#define KZU_PREVIEW_SYSTEM_OPTION_PERFORMANCE_HUD
 Specifies option for Performance HUD display. More...
 
#define KZU_PREVIEW_SYSTEM_OPTION_ANIMATION_HUD
 Specifies option for Animation HUD display. More...
 
#define KZU_PREVIEW_SYSTEM_OPTION_BOUNDING_VOLUMES
 Specifies option for bounding volume visualization. More...
 

Enumerations

enum  KzuPreviewSystemPatchType { KZU_PREVIEW_SYSTEM_PATCH_TYPE_UPDATE, KZU_PREVIEW_SYSTEM_PATCH_TYPE_REMOVE }
 Type of a patching event. More...
 
enum  KzuPreviewSystemFeatureType { KZU_PREVIEW_SYSTEM_FEATURE_PREVIEW_CAMERA_SYSTEM, KZU_PREVIEW_SYSTEM_FEATURE_PREVIEW_SELECTION_SYSTEM, KZU_PREVIEW_SYSTEM_FEATURE_PREVIEW_GIZMO_SYSTEM, KZU_PREVIEW_SYSTEM_FEATURE_HUD }
 Type of a preview system feature. More...
 
enum  KzuPreviewSystemMode { KZU_PREVIEW_SYSTEM_MODE_INTERACT, KZU_PREVIEW_SYSTEM_MODE_EDIT }
 Current preview system mode. More...
 

Functions

kzsError kzuPreviewSystemCreate (const struct KzcMemoryManager *memoryManager, struct KzuEngine *engine, struct KzuUIDomain *uiDomain, kzUint width, kzUint height, struct KzuPreviewSystem **out_previewSystem)
 Creates a new preview system object. More...
 
kzsError kzuPreviewSystemInitialize (struct KzuPreviewSystem *previewSystem)
 Initialized the preview system with resource set up. More...
 
kzsError KzuPreviewSystemDelete (struct KzuPreviewSystem *previewSystem)
 Deletes a preview system object. More...
 
kzsError kzuPreviewSystemUpdate (struct KzuPreviewSystem *previewSystem, kzUint deltaTime)
 Updates the preview system. More...
 
kzsError kzuPreviewSystemHandleInputEvent (const struct KzuPreviewSystem *previewSystem, const struct KzsEvent *event, kzBool *out_inputHandled)
 Notifies the preview system of an input event. More...
 
kzsError kzuPreviewSystemRender (struct KzuPreviewSystem *previewSystem, struct KzuRenderer *renderer, const struct KzcVector2 *offset, const struct KzcVector2 *limits)
 Renders the preview system. More...
 
kzsError kzuPreviewSystemVisualizeLayers (const struct KzuPreviewSystem *previewSystem, struct KzuRenderer *renderer, struct KzuLayer *rootLayer)
 Visualizes the preview system layers. More...
 
kzsError kzuPreviewSystemProjectReloaded (struct KzuPreviewSystem *previewSystem, struct KzuUIDomain *uiDomain)
 Notifies the preview system that a project has been reloaded. More...
 
kzsError kzuPreviewSystemEnableFeature (struct KzuPreviewSystem *previewSystem, enum KzuPreviewSystemFeatureType feature)
 Enables a preview system feature. More...
 
kzsError kzuPreviewSystemDisableFeature (struct KzuPreviewSystem *previewSystem, enum KzuPreviewSystemFeatureType feature)
 Disables a preview system feature. More...
 
kzsError kzuPreviewSystemToggleFeature (struct KzuPreviewSystem *previewSystem, enum KzuPreviewSystemFeatureType feature)
 Toggles a preview system feature. More...
 
struct KzuPreviewCameraSystemkzuPreviewSystemGetPreviewCameraSystem (const struct KzuPreviewSystem *previewSystem)
 Returns the preview camera system, if it's enabled. More...
 
struct KzuPreviewSelectionSystemkzuPreviewSystemGetPreviewSelectionSystem (const struct KzuPreviewSystem *previewSystem)
 Returns the preview selection system, if it's enabled. More...
 
struct
KzuPreviewTransformationGizmoSystem
kzuPreviewSystemGetPreviewTransformationGizmoSystem (const struct KzuPreviewSystem *previewSystem)
 Returns the preview transformation gizmo system, if it's enabled. More...
 
struct KzuHudkzuPreviewSystemGetHud (const struct KzuPreviewSystem *previewSystem)
 Returns the hud from preview system. More...
 
kzsError kzuPreviewSystemSetEditLegend (struct KzuPreviewSystem *previewSystem, kzString legend)
 Sets edit legend for preview system. More...
 
kzsError kzuPreviewSystemSetCameraLegend (struct KzuPreviewSystem *previewSystem, kzString legend)
 Sets camera legend for preview system. More...
 
void kzuPreviewSystemSetScreen (struct KzuPreviewSystem *previewSystem, struct KzuScreen *screen)
 Sets the current screen to the preview system. More...
 
struct KzuScreenkzuPreviewSystemGetScreen (const struct KzuPreviewSystem *previewSystem)
 Gets screen from preview system. More...
 
struct KzuLayerkzuPreviewSystemGetRootLayer (const struct KzuPreviewSystem *previewSystem)
 Gets the current root layer. More...
 
kzsError kzuPreviewSystemSetMode (struct KzuPreviewSystem *previewSystem, enum KzuPreviewSystemMode mode)
 Sets the edit/interact mode for preview. More...
 
enum KzuPreviewSystemMode kzuPreviewSystemGetMode (const struct KzuPreviewSystem *previewSystem)
 Gets the edit/interact mode from preview. More...
 
struct KzuEnginekzuPreviewSystemGetEngine (const struct KzuPreviewSystem *previewSystem)
 Gets the engine. More...
 
struct KzcMemoryManagerkzuPreviewSystemGetMemoryManager (const struct KzuPreviewSystem *previewSystem)
 Gets the memory manager. More...
 
struct KzuUIDomainkzuPreviewSystemGetUIDomain (const struct KzuPreviewSystem *previewSystem)
 Gets the project. More...
 
struct KzuPickkzuPreviewSystemGetPick (const struct KzuPreviewSystem *previewSystem)
 Gets the pick. More...
 
kzsError kzuPreviewSystemBeginOverdrawVisualization (struct KzuPreviewSystem *previewSystem, struct KzuRenderer *renderer)
 Begins overdraw visualization. More...
 
kzsError kzuPreviewSystemEndOverdrawVisualization (const struct KzuPreviewSystem *previewSystem, struct KzuRenderer *renderer)
 Ends overdraw visualization. More...
 
kzsError kzuPreviewSystemSetPreviewOptionInteger (struct KzuPreviewSystem *previewSystem, kzString optionName, kzInt value)
 Sets preview option for application. More...
 
kzBool kzuPreviewSystemGetPreviewOptionInteger (const struct KzuPreviewSystem *previewSystem, kzString optionName, kzInt *out_value)
 Returns preview option value from application. More...
 
struct KzuViewportLayerkzuPreviewSystemFindFirstViewportLayer (const struct KzuPreviewSystem *previewSystem)
 Finds the first viewport layer from given preview system. More...
 
void kzuPreviewSystemSetDebugComposer (struct KzuPreviewSystem *previewSystem, struct KzuComposer *debugComposer)
 Sets debug composer for preview system. More...
 
void kzuPreviewSystemSetKeyHandlingEnabled (struct KzuPreviewSystem *previewSystem, kzBool enabled)
 Enables or disables the preview system key handling. More...
 

Detailed Description

Preview system structure contains those features that are used in the preview but not in the normal application.

Copyright 2008-2019 by Rightware. All rights reserved.

Macro Definition Documentation

#define KZU_PREVIEW_SYSTEM_OPTION_OVERDRAW_VISUALIZATION

Specifies option for overdraw visualization.

#define KZU_PREVIEW_SYSTEM_OPTION_LAYER_RENDER_TO_TEXTURE_VISUALIZATION

Specifies option for visualization if layer is rendered into a texture.

#define KZU_PREVIEW_SYSTEM_OPTION_LAYER_IS_TRANSPARENT_VISUALIZATION

Specifies option for visualization if layer is rendered into a texture.

#define KZU_PREVIEW_SYSTEM_OPTION_LAYER_VISUALIZATION

Specifies option for overdraw visualization.

#define KZU_PREVIEW_SYSTEM_OPTION_PERFORMANCE_HUD

Specifies option for Performance HUD display.

#define KZU_PREVIEW_SYSTEM_OPTION_ANIMATION_HUD

Specifies option for Animation HUD display.

#define KZU_PREVIEW_SYSTEM_OPTION_BOUNDING_VOLUMES

Specifies option for bounding volume visualization.

Enumeration Type Documentation

Type of a patching event.

Enumerator
KZU_PREVIEW_SYSTEM_PATCH_TYPE_UPDATE 
KZU_PREVIEW_SYSTEM_PATCH_TYPE_REMOVE 

Type of a preview system feature.

Enumerator
KZU_PREVIEW_SYSTEM_FEATURE_PREVIEW_CAMERA_SYSTEM 
KZU_PREVIEW_SYSTEM_FEATURE_PREVIEW_SELECTION_SYSTEM 
KZU_PREVIEW_SYSTEM_FEATURE_PREVIEW_GIZMO_SYSTEM 
KZU_PREVIEW_SYSTEM_FEATURE_HUD 

Current preview system mode.

Enumerator
KZU_PREVIEW_SYSTEM_MODE_INTERACT 

Interactive mode.

KZU_PREVIEW_SYSTEM_MODE_EDIT 

Edit mode.

Function Documentation

kzsError kzuPreviewSystemCreate ( const struct KzcMemoryManager memoryManager,
struct KzuEngine engine,
struct KzuUIDomain uiDomain,
kzUint  width,
kzUint  height,
struct KzuPreviewSystem **  out_previewSystem 
)

Creates a new preview system object.

kzsError kzuPreviewSystemInitialize ( struct KzuPreviewSystem previewSystem)

Initialized the preview system with resource set up.

kzsError KzuPreviewSystemDelete ( struct KzuPreviewSystem previewSystem)

Deletes a preview system object.

kzsError kzuPreviewSystemUpdate ( struct KzuPreviewSystem previewSystem,
kzUint  deltaTime 
)

Updates the preview system.

kzsError kzuPreviewSystemHandleInputEvent ( const struct KzuPreviewSystem previewSystem,
const struct KzsEvent *  event,
kzBool out_inputHandled 
)

Notifies the preview system of an input event.

Output parameter is set to KZ_TRUE if the preview system has consumed the event.

kzsError kzuPreviewSystemRender ( struct KzuPreviewSystem previewSystem,
struct KzuRenderer renderer,
const struct KzcVector2 offset,
const struct KzcVector2 limits 
)

Renders the preview system.

kzsError kzuPreviewSystemVisualizeLayers ( const struct KzuPreviewSystem previewSystem,
struct KzuRenderer renderer,
struct KzuLayer rootLayer 
)

Visualizes the preview system layers.

kzsError kzuPreviewSystemProjectReloaded ( struct KzuPreviewSystem previewSystem,
struct KzuUIDomain uiDomain 
)

Notifies the preview system that a project has been reloaded.

kzsError kzuPreviewSystemEnableFeature ( struct KzuPreviewSystem previewSystem,
enum KzuPreviewSystemFeatureType  feature 
)

Enables a preview system feature.

kzsError kzuPreviewSystemDisableFeature ( struct KzuPreviewSystem previewSystem,
enum KzuPreviewSystemFeatureType  feature 
)

Disables a preview system feature.

kzsError kzuPreviewSystemToggleFeature ( struct KzuPreviewSystem previewSystem,
enum KzuPreviewSystemFeatureType  feature 
)

Toggles a preview system feature.

struct KzuPreviewCameraSystem* kzuPreviewSystemGetPreviewCameraSystem ( const struct KzuPreviewSystem previewSystem)

Returns the preview camera system, if it's enabled.

Returns KZ_NULL if the feature is not enabled.

struct KzuPreviewSelectionSystem* kzuPreviewSystemGetPreviewSelectionSystem ( const struct KzuPreviewSystem previewSystem)

Returns the preview selection system, if it's enabled.

Returns KZ_NULL if the feature is not enabled.

struct KzuPreviewTransformationGizmoSystem* kzuPreviewSystemGetPreviewTransformationGizmoSystem ( const struct KzuPreviewSystem previewSystem)

Returns the preview transformation gizmo system, if it's enabled.

Returns KZ_NULL if the feature is not enabled.

struct KzuHud* kzuPreviewSystemGetHud ( const struct KzuPreviewSystem previewSystem)

Returns the hud from preview system.

kzsError kzuPreviewSystemSetEditLegend ( struct KzuPreviewSystem previewSystem,
kzString  legend 
)

Sets edit legend for preview system.

kzsError kzuPreviewSystemSetCameraLegend ( struct KzuPreviewSystem previewSystem,
kzString  legend 
)

Sets camera legend for preview system.

void kzuPreviewSystemSetScreen ( struct KzuPreviewSystem previewSystem,
struct KzuScreen screen 
)

Sets the current screen to the preview system.

struct KzuScreen* kzuPreviewSystemGetScreen ( const struct KzuPreviewSystem previewSystem)

Gets screen from preview system.

struct KzuLayer* kzuPreviewSystemGetRootLayer ( const struct KzuPreviewSystem previewSystem)

Gets the current root layer.

kzsError kzuPreviewSystemSetMode ( struct KzuPreviewSystem previewSystem,
enum KzuPreviewSystemMode  mode 
)

Sets the edit/interact mode for preview.

enum KzuPreviewSystemMode kzuPreviewSystemGetMode ( const struct KzuPreviewSystem previewSystem)

Gets the edit/interact mode from preview.

struct KzuEngine* kzuPreviewSystemGetEngine ( const struct KzuPreviewSystem previewSystem)

Gets the engine.

struct KzcMemoryManager* kzuPreviewSystemGetMemoryManager ( const struct KzuPreviewSystem previewSystem)

Gets the memory manager.

struct KzuUIDomain* kzuPreviewSystemGetUIDomain ( const struct KzuPreviewSystem previewSystem)

Gets the project.

struct KzuPick* kzuPreviewSystemGetPick ( const struct KzuPreviewSystem previewSystem)

Gets the pick.

kzsError kzuPreviewSystemBeginOverdrawVisualization ( struct KzuPreviewSystem previewSystem,
struct KzuRenderer renderer 
)

Begins overdraw visualization.

kzsError kzuPreviewSystemEndOverdrawVisualization ( const struct KzuPreviewSystem previewSystem,
struct KzuRenderer renderer 
)

Ends overdraw visualization.

kzsError kzuPreviewSystemSetPreviewOptionInteger ( struct KzuPreviewSystem previewSystem,
kzString  optionName,
kzInt  value 
)

Sets preview option for application.

For example "IsMyCustomVisualizationEnabled", 1.

kzBool kzuPreviewSystemGetPreviewOptionInteger ( const struct KzuPreviewSystem previewSystem,
kzString  optionName,
kzInt out_value 
)

Returns preview option value from application.

Return if it was found

Parameters
optionNameName of the preview option.
out_valueOutput value, KZ_NULL if not required.
struct KzuViewportLayer* kzuPreviewSystemFindFirstViewportLayer ( const struct KzuPreviewSystem previewSystem)

Finds the first viewport layer from given preview system.

void kzuPreviewSystemSetDebugComposer ( struct KzuPreviewSystem previewSystem,
struct KzuComposer debugComposer 
)

Sets debug composer for preview system.

void kzuPreviewSystemSetKeyHandlingEnabled ( struct KzuPreviewSystem previewSystem,
kzBool  enabled 
)

Enables or disables the preview system key handling.

By default, the key handling is enabled.