Scene Format

A text representation of a scene is a minimal representation for the geometry of objects in a scene. The format is very simple: ''' scene_name objects . ' where scene_name'' is a string defining the name of the scene and objects is a possibly empty array of objects. Each object is represented as follows:

''' * object_name shape_count shape_descriptions '''

Each object has a name of type string and may consist of one or more shapes. Each shape defines a part of the geometry of the object. Each shape description is represented as follows:

''' type shape_geometry translation_x translation_y translation_z quaternion_x quaternion_y quaternion_z quaternion_w color_r color_g color_b color_a '''

Each shape has its own geometry specification. The pose of the shape is specified as translation and rotation. The color of the shape is specified as (r,g,b,a), with the special case that (0,0,0,0) means undefined color (so a default can be used).

Types of shape geometry:

sphere: ''' radius '''

box: ''' size_x size_y size_z '''

cone: ''' radius length '''

cylinder: ''' radius length '''

plane:  a b c d  where the plane equation is ax + by + cz + d = 0.

mesh: ''' vertex_count triangle_count x1 y1 z1 x2 y2 z2 .... xvertex_count yvertex_count zvertex_count idx1_t1 idx2_t1 idx3_t1 idx1_t2 idx2_t2 idx3_t2 ... idx1_ttriangle_count idx2_ttriangle_count idx3_ttriangle_count '''