World of Hello
Public Member Functions | List of all members
Create3DParticle Class Reference

a 3D particle system. More...

Inheritance diagram for Create3DParticle:
mesh

Public Member Functions

 Create3DParticle (float x=0, float y=0, float z=0, float rX=0, float rY=0, float rZ=0, float sX=2, float sY=2, float sZ=2)
 create a 3D particle emitter. More...
 
bool setImage (string filePath, int layer=0)
 sets the image texture from a file path. More...
 
string getImage ()
 gets the last set image file. More...
 
mesh setDirection (float x, float y, float z)
 sets the direction and speed of the emitter. More...
 
multiReturn< float, float, float > getDirection ()
 get the direction and speed of the emitter. More...
 
mesh setMinLifeTime (float milliseconds)
 set the minimum time of a particle. More...
 
mesh setMaxLifeTime (float milliseconds)
 set the maximum time of a particle. More...
 
mesh setMinParticlesPerSecond (float particles)
 sets the minimum amount of particles. More...
 
mesh setMaxParticlesPerSecond (float particles)
 sets the maximum amount of particles. More...
 
mesh setMinStartScale (float sX, float sY=sX)
 sets the minimum size of particles. More...
 
mesh setMaxStartScale (float sX, float sY=sX)
 sets the maximum size of particles. More...
 
- Public Member Functions inherited from mesh
mesh addMesh (mesh *m)
 add a child mesh. More...
 
mesh getParent ()
 get the parent mesh. More...
 
string getType ()
 get the type of this mesh. More...
 
mesh setPosition (float X, float Y, float Z)
 sets the position of the mesh. More...
 
multiReturn< float, float, float > getPosition ()
 gets the position of the mesh. More...
 
mesh moveForward (float speed=1, float xRotation=0, float yRotation=0, float zRotation=0)
 moves the mesh forward or toward a direction. More...
 
mesh setX (float X)
 sets the X axis of the mesh. More...
 
mesh setY (float Y)
 sets the Y axis of the mesh. More...
 
mesh setZ (float Z)
 sets the Z axis of the mesh. More...
 
float getX ()
 gets the X axis of the mesh. More...
 
float getY ()
 gets the Y axis of the mesh. More...
 
float getZ ()
 gets the Z axis of the mesh. More...
 
mesh setRotation (float Rx, float Ry, float Rz)
 sets the X, Y, and Z rotation of the mesh. More...
 
multiReturn< float, float, float > getRotation ()
 gets the rotation of the mesh. More...
 
mesh setRx (float Rx)
 sets the X rotation of the mesh. More...
 
mesh setRy (float Ry)
 sets the Y rotation of the mesh. More...
 
mesh setRz (float Rz)
 sets the Z rotation of the mesh. More...
 
float getRx ()
 gets the X rotational axis of the mesh. More...
 
float getRy ()
 gets the Y rotational axis of the mesh. More...
 
float getRy ()
 gets the Y rotational axis of the mesh. More...
 
mesh hide ()
 hide the mesh. More...
 
mesh show ()
 shows the mesh. More...
 
mesh setVisible (bool visible=true)
 sets the visibility of the mesh. More...
 
bool isVisible ()
 gets the visibility of the mesh. More...
 
mesh setLighting (bool lit=true)
 sets whether the mesh is fully lit or needs a light source. More...
 
mesh setZBuffer (bool ZBuffer=true)
 sets whether the mesh has a ZBuffer or not. More...
 
mesh setScale (float X=-1, float Y=-1, float Z=-1)
 sets the X, Y, and Z scale. More...
 
multiReturn< float, float, float > getScale ()
 gets the X, Y and Z scale. More...
 
mesh setColor (int r, int g, int b, int a=255)
 sets the color of the mesh. More...
 
mesh remove ()
 removes the mesh. More...
 
mesh setProperty (string property, string value)
 sets a property of the mesh. More...
 
string getProperty (string property)
 gets the value of a set property. More...
 
string[] getProperties ()
 gets all properties from the object. More...
 
mesh removeProperty (string property)
 removes a property from the object. More...
 
mesh clearProperties ()
 removes all properties from the object. See removeProperty() More...
 
mesh doCommands (string cmd)
 creates the mesh from an object like a server command. More...
 
mesh[] getChildren ()
 gets a list of added children. More...
 
string getObject (bool includeChildren=true)
 get the mesh as a total object. More...
 
mesh sendToClients (bool removeOthers=false, string key="", string keyAns="")
 sends the mesh to all connected clients who meet the criteria. More...
 
mesh removeFromClients ()
 removes the mesh from all online clients. More...
 
bool setID (string ID)
 set the ID of the mesh. More...
 
string getID ()
 get the ID of the mesh. More...
 

Detailed Description

a 3D particle system.

Constructor & Destructor Documentation

◆ Create3DParticle()

Create3DParticle::Create3DParticle ( float  x = 0,
float  y = 0,
float  z = 0,
float  rX = 0,
float  rY = 0,
float  rZ = 0,
float  sX = 2,
float  sY = 2,
float  sZ = 2 
)

create a 3D particle emitter.

   Create a 3D particle emitter that, by default, shoots 2D black blocks.\n
   You may set the mesh using mesh:setMesh() or the image using mesh:setImage()
   in order to change the particle item.\n
   Derives all mesh functions.
Parameters
(optional)The X axis of the emitter.
(optional)The Y axis of the emitter.
(optional)The Z axis of the emitter.
(optional)The X rotational axis.
(optional)The Y rotational axis.
(optional)The Z rotational axis.
(optional)The scale of the emitter along the X axis.
(optional)The scale of the emitter along the Y axis.
(optional)The scale of the emitter along the Z axis.

Member Function Documentation

◆ getDirection()

multiReturn<float, float, float> Create3DParticle::getDirection ( )

get the direction and speed of the emitter.

Returns
(1) The X direction of the emitted particles. (2) The Y direction of the emitted particles. (3) The Z direction of the emitted particles.

◆ getImage()

string Create3DParticle::getImage ( )

gets the last set image file.

   Gets the last set image file.\n
   WARNING: gets the last set image file, NOT the current image file. This means that if you load an image file that doesn't exist, it returns the file that doesn't exist.
Returns
The last set image file.

◆ setDirection()

mesh Create3DParticle::setDirection ( float  x,
float  y,
float  z 
)

sets the direction and speed of the emitter.

Parameters
TheX direction of the emitted particles.
TheY direction of the emitted particles.
TheZ direction of the emitted particles.
Returns
Returns itself.

◆ setImage()

bool Create3DParticle::setImage ( string  filePath,
int  layer = 0 
)

sets the image texture from a file path.

   Sets the image file.\n
   If the image file does not exist,
   gets it from the server if it exists on the server. If the file
   is out of date from the server's file, it will be replaced.
   If the server image file and the local file does not exist, it does not change.\n
   If a texture has been created and stored in the driver, and all of the above have not occurred, uses the texture stored in the driver.\n
Parameters
Theimage file path.
(optional)The layer to set as the texture.
Returns
Whether or not the setImage was successful. Note that this returns false if the image is still being downloaded from the server.

◆ setMaxLifeTime()

mesh Create3DParticle::setMaxLifeTime ( float  milliseconds)

set the maximum time of a particle.

   Sets the maximum amount of time, in milliseconds, until a particle is destroyed.
Parameters
Timein milliseconds.
Returns
Returns itself.

◆ setMaxParticlesPerSecond()

mesh Create3DParticle::setMaxParticlesPerSecond ( float  particles)

sets the maximum amount of particles.

   Sets the maximum amount of particles to be emitted each second.
Parameters
Theamount of particles.
Returns
Returns itself.

◆ setMaxStartScale()

mesh Create3DParticle::setMaxStartScale ( float  sX,
float  sY = sX 
)

sets the maximum size of particles.

   Sets the maximum size of the particles when they are first emitted.
Parameters
Themaximum scale of a particle across the X axis.
(optional)The maximum scale of a particle across the Y axis.
Returns
Returns itself.

◆ setMinLifeTime()

mesh Create3DParticle::setMinLifeTime ( float  milliseconds)

set the minimum time of a particle.

   Sets the minimum amount of time, in milliseconds, until a particle is destroyed.
Parameters
Timein milliseconds.
Returns
Returns itself.

◆ setMinParticlesPerSecond()

mesh Create3DParticle::setMinParticlesPerSecond ( float  particles)

sets the minimum amount of particles.

   Sets the minimum amount of particles to be emitted each second.
Parameters
Theamount of particles.
Returns
Returns itself.

◆ setMinStartScale()

mesh Create3DParticle::setMinStartScale ( float  sX,
float  sY = sX 
)

sets the minimum size of particles.

   Sets the minimum size of the particles when they are first emitted.
Parameters
Theminimum scale of a particle across the X axis.
(optional)The minimum scale of a particle across the Y axis.
Returns
Returns itself.