This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::ObjectVolumeProj Class

Interface for object volumeproj handling. See also the UnigineScript analog. The projected volume object is rendered as a number of billboards, where each following billboard is bigger than the previous one.

To use this class, include the UnigineObjectVolumeProj.h file.

Unigine::ObjectVolumeProj Class

Members


static int type ()

ObjectVolumeProj type.

Return value

ObjectVolumeProj type identifier.

static Ptr< ObjectVolumeProj > create (const NodePtr & node)

ObjectVolumeProj constructor.

Arguments

  • const NodePtr & node - Node smart pointer.

static Ptr< ObjectVolumeProj > create (const ObjectPtr & object)

ObjectVolumeProj constructor.

Arguments

  • const ObjectPtr & object - Object smart pointer.

static Ptr< ObjectVolumeProj > create (float width, float height, float fov)

ObjectVolumeProj constructor.

Arguments

  • float width - Size of the smallest billboard in units.
  • float height - Length of the light beam along the Z axis in units.
  • float fov - Angle of the beam cone in degrees. It controls the width of the light beam.

virtual void setSize (float size) const =0

Sets a size of the smallest billboard at the beginning of the light beam.

Arguments

  • float size - Size of the smallest billboard in units. If a too small value is provided, 0.001 will be used instead.

virtual float getSize () const =0

Returns the size of the smallest billboard at the beginning of the light beam.

Return value

Size of the smallest billboard in units.

virtual void setRadius (float radius) const =0

Sets a length of the light beam.

Arguments

  • float radius - Length in units. If a negative value is provided, 0 will be used instead.

virtual float getRadius () const =0

Returns the length of the light beam along the Z axis in units.

Return value

The current length in units.

virtual void setFov (float fov) const =0

Sets the width of the light beam, which is specified as an angle of the beam cone.

Arguments

  • float fov - Angle in degrees. The provided value will be saturated in the range [10;90].

virtual float getFov () const =0

Returns the width of the light beam, which is specified as the angle of the beam cone.

Return value

Angle in degrees.

virtual void setStep (float step) const =0

Sets a step between neighboring billboards. The step controls how many billboards are used to render the volume projected object. The bigger the step, the less billboards are used to render the object.

Arguments

  • float step - Step between billboards. The provided value will be saturated in the range [0.1; 1]. By the value of 1, the beam is rendered discrete.

virtual float getStep () const =0

Returns the distance between neighboring billboards. The step controls how many billboards are used to render the volume projected object. The bigger the step, the less billboards are used to render the object.

Return value

The step between billboards.

virtual void setVelocity (float velocity) const =0

Sets a velocity with which billboards move to the end of the light beam.

Arguments

  • float velocity - A velocity of billboards.

virtual float getVelocity () const =0

Returns the velocity with which billboards move to the end of the light beam.

Return value

The velocity of billboards.

virtual void setRotation (float rotation) const =0

Sets an angle of billboards rotation. This angle is set for the billboard at the end of the light beam.

Arguments

  • float rotation - A rotation angle. If a positive value is set, the billboards will be rotated clockwise; if a negative value is set, the billboards will be rotated counterclockwise.

virtual float getRotation () const =0

Returns the angle of billboards rotation. This angle is set for the billboard at the end of the beam. If a positive value is set, the billboards will be rotated clockwise; if a negative value is set, the billboards will be rotated counterclockwise.

Return value

The rotation angle.
Last update: 2017-07-03
Build: ()