sphere Element Reference

Creates a sphere. More...

Inheritance diagram for sphere:

shape

List of all members.

Attributes

vector3 position
 Center of sphere.
ureal_t radius
 Radius of sphere.


Detailed Description

Creates a sphere.

Note:
If left unspecified, the center of the sphere will default to the origin, and the radius of the sphere will default to 0.5 (contained in the unit box ranging from [ -.5, -.5, -.5 ] to [ .5, .5, .5 ]).

sphere corresponds to the underlying Milton class 'Sphere.'

Example usage:

"scene" : {
// declare the same translated, uniformly scaled sphere two different ways
"position" : [ 10, 5, 4 ],
"radius" : 8,
},
"translate" : [ 10, 5, 4 ],
"scale" : [ 16, 16, 16 ],
"sphere" : { },
},
},

Attribute Documentation

Center of sphere.

Expects 3 scalar values: [ px, py, pz ].

typevector3
optionaltrue
default[ 0, 0, 0 ] (origin)

ureal_t sphere::radius

Radius of sphere.

typepositive real scalar
optionaltrue
default0.5


Generated on 28 Feb 2009 for MiltonScenefileFormat by doxygen 1.5.6