Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This extension is a geometry modifier. It loads a particle file, or reads particles stored internally and creates instances of the selected geometry at the particles positions.

Example of how to create a MaxwellCloner object, add a uv channel, set its custom type to "Density" and enable loading the particle densities arraymodifier, and apply it to an already existing object in the scene.

Code Block
languagecpp
linenumberstrue
CextensionManager* extensionManager = CextensionManager::instance();
CgeometryModifierExtension* geomModifExtension = extensionManager->createGeometryModifierExtension( "MaxwellCloner" );
//Get the extension container. When using this method of getting the container,
//nearly all parameters have default values, and there is no need to explicitly set them.
MXparamList* clonerParams = geomModifExtension->getExtensionData();

//Fill the required data
char* filename = "/home/rocco/Emitter01_00023.bin";
clonerParams->setString( "FileName", filename );

//Get the object we want to clone
Cmaxwell::Cobject mxObject = scene->getObject( "MyGeometry" );
isOk = mxObject.applyGeometryModifierExtension( clonerParams );

...