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 | |
Geometry
| Derived from: | Node3D |
| Class name: | Geometry3D |
| Description: | The object scene graph node loads and displays a mesh from an external file in one of the supported formats. Currently only the Alias Wavefront Object format is supperted (.obj and corresponding .mtl). All bitmap formats implemented by the FreeImage library are supported for textures. |
Function List
| Name | XE_geometry_register_static_mesh |
| Arguments | int node_id, const char* file_name |
| Return Type | bool |
| Description | Registers a static mesh in OBJ format. If the OBJ file is not included in the provided data paths, then XE_scene_append_directory should be used to add the directory that points to the obj file. Parameters: node_id - the geometry node that will hold the mesh file_name - the filename (without any paths) that contains the mesh. Returns true if the node id was found |
| Notes: |
Scene Description Language Declaration
| XML node name | object | ||||||
| Placement: | Anywhere | ||||||
| Special notes: | In addition to the regular color texture specified in a OBJ format material (in the .mtl file), the engine supports the loading of emission, bump and specular maps as part of the material description. In the .mtl file, these are provided by the following tags in each material declaration:
|
||||||
| Inherited attributes: | name, active, visible | ||||||
| New attributes: |
|
||||||
| Events: |
|
||||||
| Inherited events: | - | ||||||
| New messages: |
|
||||||
| Inherited messages: | active, visible, hide, show, deactivate, enable, activate, disable | ||||||
| Redefined messages: | - | ||||||
| Obsolete messages: | - |

Example
<world ambient="0.3 0.3 0.3" background="0.2 0.2 0.2"> <camera name="first_person" aperture="50.0" near="2.0" far="1000" follow="Myself" primary="true"> </camera> <transformation name="environment" scale="1.0,1.0,1.0" translation="0,0,-10"> <object name="geom2" file="arena.obj"></object> </transformation> <user name="Myself" control="navigate" speed="2.0" turn="0.5" position="0,10,100" lookat="0,10,0" input="MouseKeyboard"> </user> <input name="MouseKeyboard" devicename="device0"> </input> </world> |
Last updated: 3 Jun. 2013