|
Kanzi Graphics Engine
|
Scene is an object node type that is the root for the 3D part of the scene graph. More...
#include <user/scene_graph/kzu_object_common.h>#include <system/input/kzs_input.h>#include <system/debug/kzs_error.h>#include <system/kzs_types.h>#include <system/kzs_header.h>#include "kzu_scene_properties.h"Enumerations | |
| enum | KzuScenePerformanceMeasurement { KZU_SCENE_PERFORMANCE_MEASUREMENT_LAYOUT, KZU_SCENE_PERFORMANCE_MEASUREMENT_EXTRACT, KZU_SCENE_PERFORMANCE_MEASUREMENT_CONSTRAINTS } |
| Scene performance measurement constants. More... | |
Functions | |
| struct KzuObjectNode * | kzuSceneToObjectNode (const struct KzuScene *scene) |
| Convert scene to object node. More... | |
| struct KzuScene * | kzuSceneFromObjectNode (const struct KzuObjectNode *objectNode) |
| Convert object node to scene. More... | |
| kzsError | kzuSceneCreate (const struct KzcMemoryManager *memoryManager, kzString name, struct KzuUIDomain *uiDomain, struct KzuScene **out_scene) |
| Creates a new scene object. More... | |
| kzsError | kzuSceneRegisterToFactory (const struct KzuFactory *factory) |
| Registers scene node type to factory. More... | |
| kzsError | kzuSceneExtract (struct KzcMemoryManager *memoryManager, struct KzuScene *scene, struct KzuTransformedScene *transformedScene, struct KzuTransformedObjectNode **out_extractedRootNode) |
| Extracts a scene graph, that is, creates a KzuTransformedObjectNode for each KzuObjectNode in the scene. More... | |
| kzsError | kzuSceneAddObject (const struct KzuScene *scene, struct KzuObjectNode *objectNode) |
| Adds an object node to the scene's children. More... | |
| kzsError | kzuSceneRemoveObject (const struct KzuScene *scene, struct KzuObjectNode *objectNode) |
| Removes an object node from the scene's children. More... | |
| struct KzuCameraNode * | kzuSceneGetCurrentCamera (const struct KzuScene *scene) |
| Get currently active camera (default or override). More... | |
| kzsError | kzuSceneLayout (struct KzuScene *scene) |
| Recursively calculate the layouts in the scene. More... | |
| kzsError | kzuSceneArrangeInitial (struct KzuObjectNode *objectNode) |
| Initial scene arrange. More... | |
| kzsError | kzuSceneMeasureInitial (struct KzuObjectNode *objectNode) |
| Initial scene measure. More... | |
| kzsError | kzuSceneMeasureNode (struct KzuObjectNode *node, kzBool *out_changed) |
| Perform layout measurement on a node. More... | |
| kzsError | kzuSceneArrangeNode (struct KzuObjectNode *objectNode) |
| Perform layout arrangement on a node. More... | |
| void | kzuSceneSetConstraintsEnabled (struct KzuScene *scene, kzBool enabled) |
| Sets constraint apply enabled, enabled by default. More... | |
| kzBool | kzuSceneIsConstraintsEnabled (const struct KzuScene *scene) |
| Returns if scene constraints are enabled. More... | |
| kzBool | kzuSceneContainsObject (const struct KzuScene *scene, const struct KzuObjectNode *objectNode) |
| Returns true if scene contains specified object node. More... | |
| struct KzuComposer * | kzuSceneGetComposerReference (const struct KzuScene *scene) |
| Gets the value of property ComposerReference in scene. More... | |
| kzsError | kzuSceneSetComposerReference (struct KzuScene *scene, struct KzuComposer *composer) |
| Sets the value of property ComposerReference in scene. More... | |
| kzBool | kzuObjectNodeIsScene (const struct KzuObjectNode *objectNode) |
| Tell if an object node is a scene. More... | |
Variables | |
| const KzuObjectType | KZU_OBJECT_TYPE_SCENE |
| Object type identifier for scene objects. More... | |
Scene is an object node type that is the root for the 3D part of the scene graph.
Scenes can be added only under viewport layers. Scene may not have layers or scenes as children.
KzuScene does not send or receive any messages.
KZU_PROPERTY_TYPE_COMPOSER_REFERENCE resource ID property specifies the KzuComposer for rendering the scene.
KZU_PROPERTY_TYPE_SCENE_BACKGROUND_TIMELINE_SEQUENCE resource ID property specifies a KzuAnimationItem that is run in the background.
KZU_PROPERTY_TYPE_SCENE_OVERRIDE_CAMERA pointer property specifies a camera that will be used instead of the one specified with the KZU_PROPERTY_TYPE_SCENE_DEFAULT_CAMERA property.
KZU_PROPERTY_TYPE_SCENE_DEFAULT_CAMERA pointer property specifies the camera for viewing the scene.
KZU_PROPERTY_TYPE_SCENE_DEFAULT_PICKING_CAMERA pointer property specifies the camera used in picking the objects in the scene. When the property is not set, the default camera is used.
KZU_PROPERTY_TYPE_SCENE_STARTUP_SCRIPT_FUNCTION_NAME is not used.
Copyright 2008-2019 by Rightware. All rights reserved.
| struct KzuObjectNode* kzuSceneToObjectNode | ( | const struct KzuScene * | scene) |
Convert scene to object node.
| struct KzuScene* kzuSceneFromObjectNode | ( | const struct KzuObjectNode * | objectNode) |
Convert object node to scene.
| kzsError kzuSceneCreate | ( | const struct KzcMemoryManager * | memoryManager, |
| kzString | name, | ||
| struct KzuUIDomain * | uiDomain, | ||
| struct KzuScene ** | out_scene | ||
| ) |
Creates a new scene object.
| kzsError kzuSceneRegisterToFactory | ( | const struct KzuFactory * | factory) |
Registers scene node type to factory.
| kzsError kzuSceneExtract | ( | struct KzcMemoryManager * | memoryManager, |
| struct KzuScene * | scene, | ||
| struct KzuTransformedScene * | transformedScene, | ||
| struct KzuTransformedObjectNode ** | out_extractedRootNode | ||
| ) |
Extracts a scene graph, that is, creates a KzuTransformedObjectNode for each KzuObjectNode in the scene.
Traverses the object nodes one by one and duplicates their hierarchy into the hierarchy of the transformed object nodes. Also transforms the resulting transformed object nodes to world coordinates.
| memoryManager | The memory manager to use for memory allocations. |
| scene | The KzuScene to traverse. |
| transformedScene | The KzuTransformedScene to where the resulting transformed object nodes are added. If the transformed scene has any existing transformed object nodes, those are not removed. |
| out_extractedRootNode | A pointer that is set to point to the new KzuTransformedObjectNode corresponding to the scene argument. |
| kzsError kzuSceneAddObject | ( | const struct KzuScene * | scene, |
| struct KzuObjectNode * | objectNode | ||
| ) |
Adds an object node to the scene's children.
| kzsError kzuSceneRemoveObject | ( | const struct KzuScene * | scene, |
| struct KzuObjectNode * | objectNode | ||
| ) |
Removes an object node from the scene's children.
| struct KzuCameraNode* kzuSceneGetCurrentCamera | ( | const struct KzuScene * | scene) |
Get currently active camera (default or override).
Recursively calculate the layouts in the scene.
I.e. calls the measure and arrange functions of every KzuUiComponentNode in the scene.
| kzsError kzuSceneArrangeInitial | ( | struct KzuObjectNode * | objectNode) |
Initial scene arrange.
| kzsError kzuSceneMeasureInitial | ( | struct KzuObjectNode * | objectNode) |
Initial scene measure.
| kzsError kzuSceneMeasureNode | ( | struct KzuObjectNode * | node, |
| kzBool * | out_changed | ||
| ) |
Perform layout measurement on a node.
| kzsError kzuSceneArrangeNode | ( | struct KzuObjectNode * | objectNode) |
Perform layout arrangement on a node.
Sets constraint apply enabled, enabled by default.
Affects on LOOK_AT, FACE_TO_CAMERA, CONSTRAINT_POSITION and CONSTRAINT_ORIENTATION properties.
Returns if scene constraints are enabled.
| kzBool kzuSceneContainsObject | ( | const struct KzuScene * | scene, |
| const struct KzuObjectNode * | objectNode | ||
| ) |
Returns true if scene contains specified object node.
| struct KzuComposer* kzuSceneGetComposerReference | ( | const struct KzuScene * | scene) |
Gets the value of property ComposerReference in scene.
| kzsError kzuSceneSetComposerReference | ( | struct KzuScene * | scene, |
| struct KzuComposer * | composer | ||
| ) |
Sets the value of property ComposerReference in scene.
| kzBool kzuObjectNodeIsScene | ( | const struct KzuObjectNode * | objectNode) |
Tell if an object node is a scene.
| const KzuObjectType KZU_OBJECT_TYPE_SCENE |
Object type identifier for scene objects.