SceneGraph

Home About XEngine Engine API SceneGraph Changelog Programming Guide

Index

| Scene Description Language | camera | directory | eventmessage | geometry | group | input | light | node | primitives | root | spinner | transformation | user |

Directory

Derived from: -
Class name: -
Description: Defines an additional search path for any file seek operation required. This includes the search of all files immediately referenced by the scene graph (e.g. a 3D mesh file declared as input to an object node), and all indirect subsequent load operations (in this example, the texture bitmaps referenced by the mesh file). It helps organize the scenes and assets in logical groups and make them more portable. By default, only the global data paths are included in the search path. Note that this is not a regular scene graph node. It is only valid as a child of the world node and its values are parsed and directly stored in the latter.

 

Function List

Name XE_scene_append_directory
Arguments const char* dir
Return Type void
Description Adds a new directory. This is the same as the directory tag in the scene file. This is added as a relative path to all provided data paths (XE_scene_append_data_path).

The reason this is separate is because Data paths are global engine settings.
Directory paths are scene specific settings (they can also be set with the directory tag within the XML scene file).

Parameters:
- dir, the directory to append
Notes:  

 

Scene Description Language Declaration

XML node name directory
Placement: Within the world node
Special notes: -
Inherited attributes: -
New attributes:
attribute type description
path STRING Adds the specified relative path to the provided data paths in order to be included in the scene's search paths for data files.
Events:
event name condition
-  
Inherited events: -
New messages:
attribute value description
Inherited messages: -
Redefined messages: -
Obsolete messages: -

Example

<world ambient="0.3 0.3 0.3" background="0.2 0.2 0.2">
  
    <directory path=".\arena"></directory>
    <directory path=".\scripts"></directory>
    <directory path=".\sounds"></directory>
    
    <transformation name="environment" scale="1.0,1.0,1.0" translation="0,0,-10">
        
        <object name="geom2" file="arena.obj"></object>
    
    </transformation>
    
    <object name="geom1" file="fighter.obj"></object>
    
</world>

Last updated: 3 Jun. 2013