Volume primitves are used within
maya, normally to define volumetric fog and lighting effects.
There is no reason however, why you cannot use the volume primitives
for collision objects, level triggers etc. Each volume primitive
is simply a basic shape parented under a transform node.
Volume Primitives
Maya contains a number of basic volume primitives. These primitives
can prove to be useful for items such as collision primitves,
level triggers etc.
#include<maya/MItDag.h>
// create an iterator to go through all
nodes MItDag it(MFn::kInvalid);
while(!it.isDone())
{
// only
want non-history items if(it.item().apiType()
== MFn::kRenderSphere ) {
MFnDagNode
fnDep(obj); MFnDagNode
fnParent(fnDep.parent(0)); // get the radius of the sphere
float radius; MPlug
plgRadius = fnDep.findPlug("radius");
plgRadius.getValue(radius);