This C++ example shows how to write a particle operator that manipulates a particle cloud. The particle operator makes the particles in a cloud flock together. The property page of the custom operator allows you to tweak the variables that control the flocking behavior.
| Location | |
| Files |
ParticleOpCpp.cpp
ParticleOpCpp.vcproj
DemoParticleOp.vbs
GNUmakefile
|
To install the example
Connect to the Softimage SDK workgroup at %XSISDK_ROOT%\examples\workgroup.
, locate the workgroup
folder and then click Select.To view the help page for an example
to go to Softimage Net local. In
the top navigation bar, click add-ons, and then
click the SDK example add-on.To run the example
Run the command DemoParticleOp.
DemoParticleOp creates a particle cloud, sets up the particles, applies the ParticleOpCpp operator, and opens the operator's property page.
Softimage SDK includes a compiled version of ParticleOp. If you want to modify the code, you can rebuild the example by following these instructions.
To build the example on Windows
Open an Softimage command prompt, and type devenv to start Visual Studio .NET.
Starting Visual Studio .NET from an Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).
Tip To load the ParticleOpCpp project from the command line, type:
devenv ParticleOpCpp.vcproj
To build the example on Linux
In a shell (tcsh) window, type:
source $XSI_HOME/.xsi_<xsi_version>
Change directories to
cppsrc
To remove all intermediate files before building the example, run this command:
gmake clean
To compile the example, run this command:
gmake
This example uses the following keywords:
C++ example, CustomOperator, Update, OutputPort, OperatorContext, Evaluate, Term, ParticleCloudPrimitive, PutUserData, GetUserData, PutPositionArray, AddParticleEmitter, ParticleEmitter_emission.Rate, FreezeObj, XSIMath.CreateVector3, Particles