Versions Compared

Key

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

...

Code Block
languagecpp
linenumberstrue
// 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( "Density", bladesDensity ); 

float length = 0.25; 
grassParams->setFloat( "Length ", length ); 

grassParams->setString( "Material", materialName );

//...etc..


object.applyGeometryModifierExtension( grassParams );


 

...

 

Name

Type

MinMaxDefault

Description

"Material"

char*

------

Material name

"Density"

unsigned int

11e82000

Blades density (blades/m2)

"Density Map"

Cmap

------

Blades density map

"Length"

float

 0.0 1e5 10.0

Blade length

"Length Map"Cmap------Length density map
 byte    
MaxwellParticlesfloat    
MaxwellParticlesfloat    
MaxwellParticlesbyte    
MaxwellParticlesfloat    
 float    
MaxwellParticlesbyte    
MaxwellParticlesbyte    
MaxwellParticlesunsigned int    
MaxwellParticlesunsigned int    
MaxwellParticlesbyte    
MaxwellParticlesbyte    
MaxwellParticlesfloat    
MaxwellParticlesfloat    
MaxwellParticlesbyte    
MaxwellParticlesfloat    
MaxwellParticlesfloat    
MaxwellParticlesbyte    
MaxwellParticlesfloat    
MaxwellParticlesfloat    

...