This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Bounds-Related Classes
Containers
Controls-Related Classes
Core Library
Engine-Related Classes
GUI-Related Classes
Node-Related Classes
Pathfinding-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Utility Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

PhysicalNoise Class

A PhysicalNoise class is used to simulate a force field affecting physical bodies based on a volumetric noise texture. It creates an additional distribution flow specifying the force and the displacement direction for bodies at each point of the force field.

PhysicalNoise Class

Members


PhysicalNoise (vec3 size)

Constructor. Creates a physical noise node of the specified size.

Arguments

  • vec3 size - Physical noise box size in units.

int getFrequency ()

Returns the number of octaves for the Perlin noise.

Return value

Number of octaves for the Perlin noise. The minimum value is 1, the maximum value is 16.

vec3 getThreshold ()

Returns the threshold distance set for the physical noise node. The threshold determines the distance of gradual change from zero to full force value. This values are relative to the size of the physical noise box. It means that the threshold values should be less than the size of the physical noise box.

Return value

Threshold distance along the axes.

Image getImage ()

Returns the noise texture image.

Return value

The noise texture image.

void setForce (float force)

Sets the value of the force multiplier. The higher the value is, the higher the value of the resulting force that affects an object inside the physical noise node will be.

Arguments

  • float force - Force multiplier.

void setOffset (vec3 offset)

Sets a sampling offset that will be used for pixel sampling from the noise texture.

Arguments

  • vec3 offset - Sampling offset along the axes.

void setImageSize (int size)

Sets a size of the noise texture in units.

Arguments

  • int size - Size of the noise texture in units.

vec3 getOffset ()

Returns the sampling offset that is used for pixel sampling from the noise texture.

Return value

Sampling offset along the axes.

void setThreshold (vec3 threshold)

Sets a threshold distance set for the physical noise node. The threshold determines the distance of gradual change from zero to full force value. This values are relative to the size of the physical noise box. It means that the threshold values should be less than the size of the physical noise box.

Arguments

  • vec3 threshold - Threshold distance along the axes.

float getScale ()

Returns the value of the noise texture scale.

Return value

Scale of the noise texture. The minimum value is 0, the maximum value is 1.

void setFrequency (int frequency)

Sets a number of octaves for the Perlin noise.

Arguments

  • int frequency - Number of octaves. The minimum value is 1, the maximum value is 16.

float getForce ()

Returns the value of the force multiplier that affects on the value of the resulting force that affects objects.

Return value

Force multiplier.

vec3 getSize ()

Returns the current size of the physical noise node.

Return value

Size of the physical noise box in units.

void setScale (float scale)

Sets a value of the noise texture scale.

Arguments

  • float scale - Scale of the noise texture. The minimum value is 0, the maximum value is 1.

vec3 getStep ()

Returns the sampling step that is used for pixel sampling from the noise texture.

Return value

Size of the sampling step.

int getImageSize ()

Returns the size of the noise texture in pixels.

Return value

Size of the noise texture.

void setStep (vec3 step)

Sets the step for the physical noise node.

Arguments

  • vec3 step - Sampling step.

void setSize (vec3 size)

Sets a size for the physical noise node.

Arguments

  • vec3 size - Physical noise box size in units.
Last update: 2017-07-03
Build: ()