PhysicalNoise Class
Interface for physical noise handling. The physical noise is based on the volumetric noise texture. It is used to simulate a force field affecting particles and objects with spatial 3D noise. The physical noise can be applied either to Particle objects or Physics bodies.
To use this class, include the UniginePhysicalNoise.h file.
PhysicalNoise Class
Members
PhysicalNoise (const Math::vec3 & size)
Constructor. Creates a physical noise node of the specified size.Arguments
- const Math::vec3 & size - Physical noise box size in units.
int getFrequency ()
Returns the value of noise spatial texture frequency octaves.Return value
The noise frequency value. The minimum value is 1, the maximum value is 16.Math::vec3 getThreshold ()
Returns the threshold of the physical noise node.Return value
The physical noise threshold.Ptr<Image> getImage ()
Returns the spatial noise texture image.Return value
The spatial noise texture image.void setForce (float force)
Sets a value of the noise force vector.Arguments
- float force - A noise force value.
void setOffset (const Math::vec3 & offset)
Sets an offset for the physical noise node along the X, Y and Z axes.Arguments
- const Math::vec3 & offset - An offset of the physical noise box in units.
void setImageSize (int size)
Sets a size of the spatial noise texture image.Arguments
- int size - A size of the spatial noise texture image.
Math::vec3 getOffset ()
Returns the offset of the physical noise node along the X, Y and Z axes.Return value
The offset of the physical noise box in units.void setThreshold (const Math::vec3 & threshold)
Sets a threshold for a physical noise node.Arguments
- const Math::vec3 & threshold - A physical noise threshold.
float getScale ()
Returns the value of the noise spatial texture image scale.Return value
The scale of the spatial noise texture image. The minimum value is 0, the maximum value is 1.void setFrequency (int frequency)
Sets a value for noise spatial texture frequency octaves.Arguments
- int frequency - A noise frequency value. The minimum value is 1, the maximum value is 16.
float getForce ()
Returns the value of the noise force vector.Return value
The noise force value.Math::vec3 getSize ()
Returns the current size of the physical noise node.Return value
The size of the physical noise box in units.void setScale (float scale)
Sets a value for the noise spatial texture image scale.Arguments
- float scale - A scale of the spatial noise texture image. The minimum value is 0, the maximum value is 1.
Math::vec3 getStep ()
Returns the step of the physical noise node.Return value
The physical noise step.int getImageSize ()
Returns the size of the spatial noise texture image.Return value
The size of the spatial noise texture image.void setStep (const Math::vec3 & step)
Sets a step for the physical noise node.Arguments
- const Math::vec3 & step - A step for the physical noise node.
void setSize (const Math::vec3 & size)
Sets a size for the physical noise node.Arguments
- const Math::vec3 & size - A size of the physical noise box in units. If a negative value is provided, 0 will be used instead.
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)