shape Element Reference

Declares a shape node. More...

Inheritance diagram for shape:

blob cone cube cylinder dynamic mesh plane point shapeSet sphere triangle

Detailed Description

Declares a shape node.

Shapes may either be specified via the common "shape" : { "type" : "sphere" ... } syntax or, for convenience, via "sphere" : { ... }. See the example usage for a concrete example.

Note:
Aggregate shapes such as shapeSet may contain child materials and transforms.

shape corresponds to the underlying Milton class 'Shape.'

Available shape variants:

dynamic, triangle, plane, sphere, blob, point, cube, cone, cylinder, mesh, shapeSet

Example usage:

"scene" : {
// declare the same sphere centered at the origin two different ways
"shape" : { "type" : "sphere" },
"sphere" : { },

// declare a mesh
"mesh" : {
"path" : "path/to/mesh.obj", // ply or obj mesh
"name" : "myMesh", // optionally specify a name
},

// declare a translated mesh instance with a different material
"bsdf" : { "type" : "diffuse", "kd" : [ 1, 0, 0 ], },
"medium" : { "ior" : 1.49 },

"translate" : [ 0, 5, 0 ],
"shape" : { "instance" : "myMesh" },
},
},
},

Generated on 28 Feb 2009 for MiltonScenefileFormat by doxygen 1.5.6