This page has been translated automatically.
编程
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
应用程序接口
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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::PhysicalNoise Class

Header:#include <UniginePhysicals.h>
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 PhysicalNoisePtr create(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.

Ptr<PhysicalNoise> cast(const Ptr<Node> & node)

Casts a PhysicalNoise out of the Node instance.

Arguments

  • const Ptr<Node> & node - Pointer to Node.

Return value

Pointer to PhysicalNoise.

Ptr<PhysicalNoise> cast(const Ptr<Physical> & base)

Casts a PhysicalNoise out of the Physical instance.

Arguments

  • const Ptr<Physical> & base - Pointer to Physical.

Return value

Pointer to PhysicalNoise.

void setForce(float force)

Sets a value of the noise force vector.

Arguments

  • float force - A noise force value.

float getForce()

Returns the value of the noise force vector.

Return value

The noise force value.

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.

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.

Ptr<Image> getImage()

Returns the spatial noise texture image.

Return value

The spatial noise texture image.

void setImageSize(int size)

Sets a size of the spatial noise texture image.

Arguments

  • int size - A size of the spatial noise texture image.

int getImageSize()

Returns the size of the spatial noise texture image.

Return value

The size of the spatial noise texture image.

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

float getNoiseScale()

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

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

Math::vec3 getSize()

Returns the current size of the physical noise node.

Return value

The size of the physical noise box in units.

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.

Math::vec3 getStep()

Returns the step of the physical noise node.

Return value

The physical noise step.

void setThreshold(const Math::vec3 & threshold)

Sets a threshold for a physical noise node.

Arguments

  • const Math::vec3 & threshold - A physical noise threshold.

Math::vec3 getThreshold()

Returns the threshold of the physical noise node.

Return value

The physical noise threshold.

int type()

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