NearFarScalar

NearFarScalar

new

Represents a scalar value's lower and upper bound at a near distance and far distance in eye space.

Parameters:
Name Type Argument Default Description
near Number <optional>
0.0 The lower bound of the camera range.
nearValue Number <optional>
0.0 The value at the lower bound of the camera range.
far Number <optional>
1.0 The upper bound of the camera range.
farValue Number <optional>
0.0 The value at the upper bound of the camera range.
See:
Source:

Members

:Number

The upper bound of the camera range.
Default Value:
  • 1.0

:Number

The value at the upper bound of the camera range.
Default Value:
  • 0.0

:Number

The lower bound of the camera range.
Default Value:
  • 0.0

:Number

The value at the lower bound of the camera range.
Default Value:
  • 0.0

<static> :Number

The number of elements used to pack the object into an array.

Methods

Duplicates this instance.

Parameters:
Name Type Argument Description
result NearFarScalar <optional>
The object onto which to store the result.
Returns:
NearFarScalar The modified result parameter or a new NearFarScalar instance if one was not provided.

Compares this instance to the provided NearFarScalar and returns true if they are equal, false otherwise.

Parameters:
Name Type Argument Description
right NearFarScalar <optional>
The right hand side NearFarScalar.
Returns:
Boolean true if left and right are equal; otherwise false.

<static>

Duplicates a NearFarScalar instance.

Parameters:
Name Type Argument Description
nearFarScalar NearFarScalar The NearFarScalar to duplicate.
result NearFarScalar <optional>
The object onto which to store the result.
Returns:
NearFarScalar The modified result parameter or a new NearFarScalar instance if one was not provided. (Returns undefined if nearFarScalar is undefined)

<static>

Compares the provided NearFarScalar and returns true if they are equal, false otherwise.

Parameters:
Name Type Argument Description
left NearFarScalar <optional>
The first NearFarScalar.
right NearFarScalar <optional>
The second NearFarScalar.
Returns:
Boolean true if left and right are equal; otherwise false.

<static>

Stores the provided instance into the provided array.

Parameters:
Name Type Argument Default Description
value NearFarScalar The value to pack.
array Array The array to pack into.
startingIndex Number <optional>
0 The index into the array at which to start packing the elements.
Throws:

<static>

Retrieves an instance from a packed array.

Parameters:
Name Type Argument Default Description
array Array The packed array.
startingIndex Number <optional>
0 The starting index of the element to be unpacked.
result NearFarScalar <optional>
The object into which to store the result.
Throws:
DeveloperError : array is required.