Advanced Search
Search Results
497 total results found
Lua Introduction
Callback Functions If you open your script in the Script Editor you can see that there are already the most important lines of code. These are the so called callback functions which are called by Candera. Init(self, id) The Init function gets ...
Id Handling
This chapter explains how to get access to other nodes via the id of their attached script. Therefore, create a new Scene Composer solution using the "3D Getting started" template, which includes a 3D model of a car. To start it's important to know that there...
Communication between Children
How to find siblings This chapter explains how to get access to sibling nodes via the id of their attached script. Because there is yet no direct way to get the ids of sibling nodes you have to use a workaround. The recommended way is to use a script on a roo...
OnEnable() and OnDisable()
How to use OnEnable() and OnDisable() As in this example the root node script "CarRootController" controls nearly all of the other scripts it would be advisable to disable all the child scripts in case of a disabled root script. Therefore use the OnDisable() ...
Set Priority of Lua-Scripts
Script Priority Another useful feature of Lua-Scripting is the priority. It defines in which order the scripts get called (f.e. the Update or the Init). To test this feature in its simplest way create four cubes and equip them with the same script called "Sim...
2D Scenes and Nodes
Scene Graph The 2D scene graph is a tree structure which organizes nodes of type Candera::Node2D. The root of each scene graph has to be a node of type Candera::Scene2D. All nodes of type Candera::Node2D can hold sub nodes added by Candera::Node2D::AddChild()...
2D Node Transformations
2D Node Manipulation Example To illustrate basic node transformation operations, the NodeManipulationWidget_2D and the DisplayPositionWidget2D part of the Tutorial Widgets cand be used. An usage example for NodeManipulationWidget_2D can be seen in NodeManipul...
2D Effects
Description Candera2D renders content exclusively by pieces of code which are named effects. Effects represent semantic functionality which considers hardware and driver capabilities. The set of effects supported depends on the feature set of the...
2D Scene Graph Dynamics
Description Usually all required nodes are already specified and preconfigured via SceneComposer, so in most cases it won't be necessary to make any adaptations within the scene graph loaded from an asset at runtime. However, some use cases might require suc...
Camera / Viewport
The following example shows the interaction between scene and camera. The objects are placed relatively to the scene origin (which is the root node). The camera defines the view to that scene by defining also a position relative to the scene. The ...
2D Layout
Description In a typical user interface users need to distribute screen space to different elements. If the size of elements is dynamic, it's desired that the screen space distribution is done automatically based on the contents's natural size. To enable easy...
Candera 2D Listener
Applications can receive notifications on scene graph events. Therefore implement a listener, which defines hooks to receive those notifications. Following listener interfaces are provided in Candera 2D: Candera::Camera2DListener defines hooks that ...
3D Scenes and Nodes
Scenes and Nodes Candera::Node is an abstract base class for all scene graph nodes. Each node defines a local coordinate system relative to the coordinate system of the parent node. The functionality to define the local coordinate system is deriv...
3D Node Transformations
3D Node Manipulation Example To illustrate basic node transformation operations, the NodeManipulationWidget_3D and the DisplayPositionWidget3D part of the Tutorial Widgets can be used. An usage example for NodeManipulationWidget_3D widget is presented in Node...
3D Node Appearance
Description Candera::Appearance groups following render attributes: Candera::Material, Candera::Texture, Candera::RenderMode Candera::Shader and Candera::ShaderParamSetter. Render attributes define the distinctive visualization of a geom...
3D Scene Graph Dynamics
Description Usually all required nodes are already specified and preconfigured via SceneComposer, so in most cases it won't be necessary to make any adaptations within the scene graph loaded from an asset at runtime. However, some use cases might require suc...
3D Render Order
Description There are various reasons why sorting of objects to render is required: Transparency: Transparent objects must be rendered from back to front, while opaque objects must be rendered from front to back. Performance: Front to back order or ...
Searching for Nodes with SearchTreeTraverser
Searching for Nodes With Candera::SearchTreeTraverser it is possible to find nodes within a given scene tree by certain criteria. The search scene graph traverser is a Candera::TreeTraverserBase implementation that evaluates each node with a given Candera::Se...