...
Code Block | ||||
---|---|---|---|---|
| ||||
// If we don't need to call functions such as CgeometryModifierExtension::getProxyDisplayPoints() // (i.e for display purposes) // then it is possible to define procedural geometries or object modifiers // without loading extension dynamic libraries (.mxx files) // but a MXparamList object can be created and filled with the desired parameters. Cmaxwell::Cobject mesh = pMaxwell->createMesh( ... ); // ...fill mesh parameters MXparamList* grassParams = new MXparamList( "MaxwellGrass" ); float bladesDensity = 500.0; grassParams->setFloat>createUInt( "Density", 2000, 1, 1000000000 ); grassParams->setUint( "Density", bladesDensity ); float length = 0.25; grassParams->createFloat( "Length", 10.0f, 0.f, 100000.f ); grassParams->setFloat( "LengthLenght ", length ); grassParams->createString( "Material", "" ); grassParams->setString( "Material", materialName ); //...etc.. object.applyGeometryModifierExtension( grassParams ); |
...