UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials

Unigine::ObjectBillboard Class

Interface for object billboard handling. See also the UnigineScript analog.

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

Unigine::ObjectBillboard Class

Members


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

ObjectBillboard constructor.

Arguments

  • const NodePtr & node - Node smart pointer.

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

ObjectBillboard constructor.

Arguments

  • const ObjectPtr & object - Object smart pointer.

static Ptr< ObjectBillboard > create (float width, float height)

ObjectBillboard constructor.

Arguments

  • float width - Billboard width in units.
  • float height - Billboard height in units.

virtual void setSize (float width, float height) const =0

Updates billboard dimensions.

Arguments

  • float width - Billboard width in units.
  • float height - Billboard height in units.

virtual float getWidth () const =0

Returns the billboard width.

Return value

Billboard width in units.

virtual float getHeight () const =0

Returns the billboard height.

Return value

Billboard height in units.

virtual void setOffset (const vec3 & offset) const =0

Sets an offset parameter for the billboard center of rotation.

Arguments

  • const vec3 & offset - Offset parameter in units.

virtual vec3 getOffset () const =0

Returns the offset parameter for the billboard center of rotation.

Return value

Offset parameter in units.

virtual void setAxisX (int axis) const =0

Locks an ability to change billboard orientation along the X axis.

Arguments

  • int axis - Positive value to lock the ability to change billboard orientation; otherwise, 0.

virtual int getAxisX () const =0

Returns a value indicating if the ability to change billboard orientation along the X axis is locked.

Return value

Returns positive value if the ability to change billboard orientation is locked; otherwise, 0.

virtual void setAxisZ (int axis) const =0

Locks an ability to change billboard orientation along the Z axis.

Arguments

  • int axis - Positive value to lock the ability to change billboard orientation; otherwise, 0. The default value is 0.

virtual int getAxisZ () const =0

Returns a value indicating if the ability to change billboard orientation along the Z axis is locked. The default value is 0.

Return value

Returns positive value if the ability to change billboard orientation is locked; otherwise, 0.

virtual void setScreen (int screen) const =0

Sets a value indicating if the billboard should be screen-aligned (parallel to the screen plane and not rotating).

Arguments

  • int screen - Positive value to make the billboard screen-aligned; otherwise, 0. The default value is 0.

virtual int getScreen () const =0

Returns the value indicating if the billboard should be screen-aligned (parallel to the screen plane and not rotating). The default value is 0 (not screen-aligned).

Return value

Positive value if the billboard is screen-aligned; otherwise, 0.

virtual void setTexCoord (const vec4 & texcoord) const =0

Sets texture coordinates for the billboard.
  • The first pair of coordinates (x and x) sets texture scale by X and Y axes. For example, by the scale of 2 the texture is repeated twice on the billboard.
  • The second pair (z and w) set texture offset along X and Y axes. For example, by the offset of 0.5 along X axis the texture is repositioned to the right (so that the edge of the texture is rendered in the center).

Arguments

  • const vec4 & texcoord - Texture coordinates for the billboard. The default is vec4(1,1,0,0).

virtual vec4 getTexCoord () const =0

Returns texture coordinates of the billboard. The default is vec4(1,1,0,0).
  • The first pair of coordinates (x and x) sets texture scale by X and Y axes. For example, by the scale of 2 the texture is repeated twice on the billboard.
  • The second pair (z and w) set texture offset along X and Y axes. For example, by the offset of 0.5 along X axis the texture is repositioned to the right (so that the edge of the texture is rendered in the center).

Return value

Texture coordinates of the billboard.
Last update: 2017-07-03