Module technology.sola.engine
Class RectangleEmitterShape
java.lang.Object
technology.sola.engine.physics.component.particle.emitter.ParticleEmitterShape
technology.sola.engine.physics.component.particle.emitter.RectangleEmitterShape
RectangleEmitterShape is a
ParticleEmitterShape that emits particles in the shape of a rectangle.-
Constructor Summary
ConstructorsConstructorDescriptionRectangleEmitterShape(int width, int height) Creates a RectangleEmitterShape with the desired width and height. -
Method Summary
Methods inherited from class technology.sola.engine.physics.component.particle.emitter.ParticleEmitterShape
isEmitFromShell, isRandomDirection, nextEmission, setEmitFromShell, setRandomDirection
-
Constructor Details
-
RectangleEmitterShape
public RectangleEmitterShape(int width, int height) Creates a RectangleEmitterShape with the desired width and height.- Parameters:
width- the width of the rectangleheight- the height of the rectangle
-
-
Method Details
-
getWidth
public int getWidth()- Returns:
- the width of the rectangle
-
getHeight
public int getHeight()- Returns:
- the height of the rectangle
-
setSize
Sets the size of the rectangle.- Parameters:
width- the new width of the rectangleheight- the new height of the rectangle- Returns:
- this
-
getCenter
- Specified by:
getCenterin classParticleEmitterShape- Returns:
- the center point of the shape
-
randomPointInShape
- Specified by:
randomPointInShapein classParticleEmitterShape- Returns:
- a random point inside the shape
-
randomPointOnPerimeter
- Specified by:
randomPointOnPerimeterin classParticleEmitterShape- Returns:
- a random point on the perimeter of the shape
-