Previous Up Next

M3createEffect
This function creates an object of type HEffect3d which is a new type of for the 3D engine. This object contains the parameters which define an effect.

HEffect3d M3createEffect (
S3d _session_
I _type_
[F F F] _vectorA_
[F F F] _vectorB_
[F F F] _vectorC_
)
Parameters

_session_
3D Session
_type_
Type of effect : defines the type of effect among the following :
  • EFFECT_CONSTANT : This effect allows to apply a constant force on particles. It can therefore be useful for creating gravity or wind.
    vectorsmeaning
    '_vectorA_'Force applied on the particles
    '_vectorB_' -
    '_vectorC_' -
  • EFFECT_ELECTRIC : This effect simulates an electrically charged entity. This charge creates an electric field which acts on the particles according to their polarity.
    Warning : this effect applies only to particles which do not have a null value for their mass.
    vectorsmeaning
    '_vectorA_'Position of the electric charge, expressed in the global space
    '_vectorB_'First coordinate : value of the electric charge
  • EFFECT_MAGNETIC : This effect simulates a uniform magnetic field. This field creates a force whose direction is given by the vector product between the direction of the magnetic field and the velocity of the particle.
    Warning : this effect applies only to particles which do not have a null value for their mass.
    vectorsmeaning
    '_vectorA_'Magnetic field
    '_vectorB_'First coordinate : polarity of the field
  • EFFECT_CHAOTIC0 : This effect attributes a completely random and independent force to each particle. A maxima and a minima can however be specified :
    vectorsmeaning
    '_vectorA_'Minimum force
    '_vectorB_'Maximum force
  • EFFECT_CHAOTIC1 : This effect is similar to that above except that the force is identical for all the particles.
  • EFFECT_HELICOID : This effect gives the particles a helicoidal trajectory.
    vectorsmeaning
    '_vectorA_'Direction of the helicoïdal trajectory
    '_vectorB_'First and second coordinate : x and y radius
    Third coordinate : rotational speed
_vectorA_
Depends on the '_type_' parameter.
_vectorB_
Depends on the '_type_' parameter.
_vectorC_
Reserved for future effects..
Return value

HEffect3d Object
See Also

M3setEffect and M3getEffect