Start Page » DEMoCap: Drag[en]gine Motion Capture » XML Element Classes » ECBRenderableCamera
Behavior adding a WorldRenderer widget to a ECBehaviorRenderablePanel showing the content of an ECBehaviorCamera.
This element behavior can be present multiple times in a BehaviorElement. In this case use a unique identifier to distinguish the individual behavior instances.
Element class properties have the prefix renderableCamera.
or renderableCamera({id}).
if id is not empty.
This behavior has no events.
This behavior adds no conversation commands.
This behavior adds no conversation conditions.
This behavior adds no behavior tree actions.
This behavior adds no behavior tree conditions.
This behavior does not support optional behaviors.
Since DEMoCap Version 1.3
class MyElement extends BehaviorElementClass public var ECBehaviorComponent component public var ECBehaviorCollider collider public var ECBehaviorDynamicSkin dynamicSkin public var ECBehaviorRenderablePanel renderablePanel public var ECBehaviorCamera camera public var ECBRenderableCamera renderableCamera func new() component = ECBehaviorComponent.new(this) collider = ECBehaviorCollider.new(this, component) dynamicSkin = ECBehaviorDynamicSkin.new(this, component) renderablePanel = ECBehaviorRenderablePanel.new(this, dynamicSkin) renderablePanel.getRenderable().setValue("board") renderablePanel.getSize().setPoint(Point.new(512, 256)) renderablePanel.getGuiTheme().setPath("/content/ui/adboard.guitheme.xml") camera = ECBehaviorCamera.new(this, collider) renderableCamera = ECBRenderableCamera.new(this, renderablePanel, camera) end end
Using element class supporting adding behaviors the behavior can be added like this (again create an example which creates a valid element class):
<?xml version='1.0' encoding='UTF-8'?> <elementClass name='MyClass' class='GenericBehaviorElement'> <behavior type='ECBehaviorComponent'/> <behavior type='ECBehaviorCollider'/> <behavior type='ECBehaviorDynamicSkin'/> <behavior type='ECBehaviorRenderablePanel'> <string name='.renderable'>board</string> </behavior> <behavior type='ECBRenderableCamera'> <!-- optional: use renderable panel with id instead of empty string --> <string name='renderablePanel'>second</string> <!-- optional: use camera with id instead of empty string --> <string name='camera'>second</string> </behavior> <!-- for adding multiple behaviors use unique identifiers --> <behavior type='ECBRenderableCamera' id='second'/> </elementClass>