Model

Uses XML Tag mm:model and contains…

Tag Type Description
[src_proto] attribute Specify a path to a prototype. If not supplied, model is unique.
[class] string Class extension. This is required if no source prototype was supplied
name string A name is required.
[center] float[3] Local center position. If not supplied, it will be calculated based on attached meshes.
[minmax] float[6] Local min/max boundaries. If not supplied, it will be calculated based on attached meshes.
[cullradius] float Radius for culling purposes. If not supplied, it will be calculated based on attached meshes.
[castshadows] integer Shadow casting property. If not supplied, model will not cast shadows.
[position] float[3] World position. If not supplied, it will be located at the world’s origin.
[rotation] float[3] World rotation. If not supplied, it will be aligned to the world’s axes.
[scale] float[3] Local scale. Default is [1,1,1], if not supplied.
[meshes] mm:mesh[?] List of attached meshes. If not supplied, model will be invisible.

Example:

<mm:model>
   <class>MyModel</class>
   <name>MyModel</name>
   <center>0.00,-0.01,3.57</center>
   <minmax>-30.00,-30.02,0.00,30.00,30.00,7.14</minmax>
   <cullradius>46.84</cullradius>
   <castshadows>1</castshadows>
   <position>0.00,0.00,0.00</position>
   <rotation>0.00,0.00,0.00</rotation>
   <scale>1.00,1.00,1.00</scale>
   <meshes>
      <mm:mesh>[...]</mm:mesh>
      <mm:mesh>[...]</mm:mesh>
   </meshes>
</mm:model>