-
Notifications
You must be signed in to change notification settings - Fork 0
XML Scene
This page describes the format of an XML scene.
Every scene saved or loaded by the Shoggoth Engine follows a simple format. The scene is described in the tag scene. Inside there should be the root tag, which is an entity of type root-node. All of its children are the rest of the entities describing the scene. A typical root node would look like this:
...
Every attribute in an XML tag has a default value if not specified.
If a certain tag is of type entity, then the name of the entity is the name of the tag. It is important to note that every entity should have a different name. In the case two entities are named the same it will load the first one, ignore any entity with a repeated name and print a warning. It also includes the position as a 3D vector with format "X Y Z" and the orientation as a quaternion with format "W X Y Z" of the entity. An entity could look like this:
...
As children to an entity could be more entities or its components. If it is another entity it will keep reading recursively. If it is of type component, then a new component of type component-name will be created and attached to the current entity. All of the attributes will then be read and set to the component, if no attribute is specified a default value will be used. A component would use the following format:
At least one camera component must be present, otherwise it will fail to load the scene.