This page has been translated automatically.
Programming
Fundamentals
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
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Plugins-Related Classes
Rendering-Related 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

Inherits:Physical

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


static PhysicalNoise(vec3 size)

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

Arguments

  • vec3 size - Physical noise box size in units.

PhysicalNoise cast(Node node)

Casts a PhysicalNoise out of the Node instance.

Arguments

  • Node node - Node instance.

Return value

PhysicalNoise instance.

PhysicalNoise cast(Physical base)

Casts a PhysicalNoise out of the Physical instance.

Arguments

  • Physical base - Physical instance.

Return value

PhysicalNoise instance.

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.

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.

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.

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.

Image getImage()

Returns the noise texture image.

Return value

The noise texture image.

void setImageSize(int size)

Sets a size of the noise texture in units.

Arguments

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

int getImageSize()

Returns the size of the noise texture in pixels.

Return value

Size of the noise texture.

void setNoiseScale(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.

float getNoiseScale()

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 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.

vec3 getOffset()

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

Return value

Sampling offset along the axes.

void setSize(vec3 size)

Sets a size for the physical noise node.

Arguments

  • vec3 size - Physical noise box size in units.

vec3 getSize()

Returns the current size of the physical noise node.

Return value

Size of the physical noise box in units.

void setStep(vec3 step)

Sets the step for the physical noise node.

Arguments

  • vec3 step - Sampling step.

vec3 getStep()

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

Return value

Size of the sampling step.

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.

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.

int type()

Last update: 2017-07-03
Build: ()