NearFarScalar

new Cesium.NearFarScalar(near, nearValue, far, farValue)

Represents a scalar value's lower and upper bound at a near distance and far distance in eye space. 当相机视角高度在最小相机边界及以下时,恒定为nearValue,当相机视角高度从最小相机高度逼近到最大相机高度时,值从nearValue渐变到farValue, 当相机视角高度在最大相机边界及以上时,值恒定为farValue。
Name Type Default Description
near Number 0.0 optional The lower bound of the camera range.最小相机高度。
nearValue Number 0.0 optional The value at the lower bound of the camera range.当在最小相机边界时设定的值.
far Number 1.0 optional The upper bound of the camera range.最大相机高度。
farValue Number 0.0 optional The value at the upper bound of the camera range.当在最大相机边界时设定的值。
See:

Members

static Cesium.NearFarScalar.packedLength : Number

The number of elements used to pack the object into an array.
The upper bound of the camera range.
Default Value: 1.0

farValue : Number

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

near : Number

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

nearValue : Number

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

Methods

static Cesium.NearFarScalar.clone(nearFarScalar, result)NearFarScalar

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

static Cesium.NearFarScalar.equals(left, right)Boolean

Compares the provided NearFarScalar and returns true if they are equal, false otherwise.
Name Type Description
left NearFarScalar optional The first NearFarScalar.
right NearFarScalar optional The second NearFarScalar.
Returns:
true if left and right are equal; otherwise false.

static Cesium.NearFarScalar.pack(value, array, startingIndex)Array.<Number>

Stores the provided instance into the provided array.
Name Type Default Description
value NearFarScalar The value to pack.
array Array.<Number> The array to pack into.
startingIndex Number 0 optional The index into the array at which to start packing the elements.
Returns:
The array that was packed into

static Cesium.NearFarScalar.unpack(array, startingIndex, result)NearFarScalar

Retrieves an instance from a packed array.
Name Type Default Description
array Array.<Number> The packed array.
startingIndex Number 0 optional The starting index of the element to be unpacked.
result NearFarScalar optional The object into which to store the result.
Returns:
The modified result parameter or a new NearFarScalar instance if one was not provided.
Duplicates this instance.
Name Type Description
result NearFarScalar optional The object onto which to store the result.
Returns:
The modified result parameter or a new NearFarScalar instance if one was not provided.

equals(right)Boolean

Compares this instance to the provided NearFarScalar and returns true if they are equal, false otherwise.
Name Type Description
right NearFarScalar optional The right hand side NearFarScalar.
Returns:
true if left and right are equal; otherwise false.