SkyObject

Class that allows programmatic control of the engine’s Sky Box rendering.

Summary
SkyObjectClass that allows programmatic control of the engine’s Sky Box rendering.
Functions
NKGetNameReturns the name of this sky object.
NKSetAzimuthSets the azimuth for this object.
NKSetInclinationSets the inclination for this object.
NKSetOrientationSets the local orientation of the billboard.
NKSetColorMultiplierSets the color multiplier for this sky object.
NKSetBasisOrientationSets the orientation of the basis vectors used for this sky object’s positioning.
NKScaleSets the scale of this sky object.
NKScaleSets the scale of this sky object.
NKGetAzimuthReturns the current azimuth of this sky object.
NKGetInclinationReturns the current inclination of this sky object.
NKSetAlphaScalarSets the alpha scalar of this sky object.
NKGetAlphaScalarReturns the current alpha scalar of this sky object.
NKGetPositionReturns the current, normalized position of this sky object.
NKGetColorMultiplierReturns the color multiplier of this sky object.
NKGetBasisOrientationReturns the orientation of the basis vectors used to determine this object’s position.
NKGetScaleReturns two values, an X and a Y, for the scale of this sky object.

Functions

NKGetName

Returns the name of this sky object.

Returns

stringThe name of this sky object.

NKSetAzimuth

Sets the azimuth for this object.  Sky objects use spherical coordinates to determine their position in the sky.  The azimuth is the rotation around the vertical axis.

Parameters

numberThe new angle for the azimuth.

NKSetInclination

Sets the inclination for this object.  Sky objects use spherical coordinates to determine their position in the sky.  The inclination is the rotation around the horizontal axis, after the azimuth is applied.

Parameters

numberThe new angle for the inclination.

NKSetOrientation

Sets the local orientation of the billboard.  This rotates the billboard clockwise around its center.

Parameters

numberThe new angle for the orientation.

NKSetColorMultiplier

Sets the color multiplier for this sky object.  The color specified here will be multiplied by the color of the texture to produce the final color.

Parameters

vec3The new color value for the multiplier.  Each number should be in the range of 0 to 255.

NKSetBasisOrientation

Sets the orientation of the basis vectors used for this sky object’s positioning.

Parameters

quatThe new orientation.

NKScale

Sets the scale of this sky object.  This function works the same as its counterpart that takes a vec3, the only difference is the input.

Parameters

numberThe new X scale.
numberThe new Y scale.

NKScale

Sets the scale of this sky object.  This function works the same as its counterpart that takes two numbers, the only difference is the input.

Parameters

vec3A vec3 representing the new scale.  Note that the z value is not used.

NKGetAzimuth

Returns the current azimuth of this sky object.

Returns

numberThe current azimuth of this sky object.

NKGetInclination

Returns the current inclination of this sky object.

Returns

numberThe current inclination of this sky object.

NKSetAlphaScalar

Sets the alpha scalar of this sky object.

Parameters

numberThe new alpha scalar, ranging from 0 to 1.

NKGetAlphaScalar

Returns the current alpha scalar of this sky object.

Returns

numberThe current alpha scalar of this sky object.

NKGetPosition

Returns the current, normalized position of this sky object.  Note that all sky objects are oriented around the camera, so this is effectively just the direction to that sky object.

Returns

vec3The normalized position of this sky object.

NKGetColorMultiplier

Returns the color multiplier of this sky object.

Returns

vec3The color multiplier of this sky object.  Values will range from 0.0 to 255.0.

NKGetBasisOrientation

Returns the orientation of the basis vectors used to determine this object’s position.

Returns

quatThe basis orientation.

NKGetScale

Returns two values, an X and a Y, for the scale of this sky object.

Returns

numberThe X scale of this sky object.
numberThe Y scale of this sky object.
Close