AddParticleCloud (X3DObject)

Description

Creates a ParticleCloud object. This is typically used for creating a particle cloud from a set of particle postions.

Scripting Syntax

X3DObject.AddParticleCloud( [Particle types], [Name] )

C# Syntax

X3DObject X3DObject.AddParticleCloud( Object in_inputParTypes, String in_bstrName );

Parameters

Parameter

Type

Description

Particle types

XSICollection or Property

An X3DObjectCollection or a single Particle type

Name

String

name of object

Return Value

This method returns the X3DObject parent of the new Primitive. The new X3DObject is parented under this X3DObject.

Examples

VBScript Example

NewScene , false
set ParTypeCollection = CreateObject( "XSI.Collection" )

set oRtnCol = CreateParticleType()
set oPartSnow = oRtnCol(0)
oPartSnow.Name = "Snow"
ParTypeCollection.Add oPartSnow

set oRtnCol = CreateParticleType()
set oPartRainDrop = oRtnCol(0)
oPartRainDrop.Name = "RainDrop"
ParTypeCollection.Add oPartRainDrop

set oRoot = Application.ActiveProject.ActiveScene.Root
set oParticleCloud = oRoot.AddParticleCloud( ParTypeCollection , "MyCloud" )

set oParticleCloudPrim = oParticleCloud.ActivePrimitive

oParticleCloudPrim.AddParticles 9, oPartSnow

l_aPositions = Array(_
   -1., 0., -1., _
   -1., 0., 0., _
   -1., 0., 1., _
   0., 0., -1., _
   0., 0., 0., _
   0., 0., 1., _
   1., 0., -1., _
   1., 0., 0., _
   1., 0., 1. _
)

set oParticleCollection = oParticleCloud.Particles
oParticleCollection.PositionArray() = l_aPositions 


Autodesk Softimage v7.5