@JsType(isNative=true, namespace="Cesium", name="Cartesian3") public class Cartesian3 extends Object implements Packable
Cartesian2
,
Cartesian4
Modifier and Type | Field and Description |
---|---|
static int |
packedLength
The number of elements used to pack the object into an array.
|
double |
x
The X component.
|
double |
y
The Y component.
|
double |
z
The Z component.
|
Constructor and Description |
---|
Cartesian3()
A 3D Cartesian point.
|
Cartesian3(double x,
double y,
double z)
A 3D Cartesian point.
|
Modifier and Type | Method and Description |
---|---|
static Cartesian3 |
abs(Cartesian3 cartesian,
Cartesian3 result)
Computes the absolute value of the provided Cartesian.
|
static Cartesian3 |
add(Cartesian3 left,
Cartesian3 right,
Cartesian3 result)
Computes the componentwise sum of two Cartesians.
|
static double |
angleBetween(Cartesian3 left,
Cartesian3 right)
Returns the angle, in radians, between the provided Cartesians.
|
Cartesian3 |
clone()
Duplicates this Cartesian3 instance.
|
Cartesian3 |
clone(Cartesian3 result)
Duplicates this Cartesian3 instance.
|
static Cartesian3 |
clone(Cartesian3 cartesian,
Cartesian3 result)
Duplicates a Cartesian3 instance.
|
static Cartesian3 |
cross(Cartesian3 left,
Cartesian3 right,
Cartesian3 result)
Computes the cross (outer) product of two Cartesians.
|
static double |
distance(Cartesian3 left,
Cartesian3 right)
Computes the distance between two points.
|
static double |
distanceSquared(Cartesian3 left,
Cartesian3 right)
Computes the squared distance between two points.
|
static Cartesian3 |
divideByScalar(Cartesian3 cartesian,
double scalar,
Cartesian3 result)
Divides the provided Cartesian componentwise by the provided scalar.
|
static Cartesian3 |
divideComponents(Cartesian3 left,
Cartesian3 right,
Cartesian3 result)
Computes the componentwise quotient of two Cartesians.
|
static double |
dot(Cartesian3 left,
Cartesian3 right)
Computes the dot (scalar) product of two Cartesians.
|
Cartesian3 |
equals(Cartesian3 right)
Compares this Cartesian against the provided Cartesian componentwise and returns true if they are equal, false otherwise.
|
static boolean |
equals(Cartesian3 left,
Cartesian3 right)
Compares the provided Cartesians componentwise and returns true if they are equal, false otherwise.
|
static boolean |
equalsEpsilon(Cartesian3 left,
Cartesian3 right,
double relativeEpsilon,
double absoluteEpsilon)
Compares the provided Cartesians componentwise and returns true if they pass an absolute or relative tolerance test, false otherwise.
|
boolean |
equalsEpsilon(Cartesian3 right,
double relativeEpsilon,
double absoluteEpsilon)
Compares this Cartesian against the provided Cartesian componentwise and returns true if they pass an absolute or
relative tolerance test, false otherwise.
|
static Cartesian3 |
fromArray(double[] array,
Cartesian3 result)
Creates a Cartesian3 from two consecutive elements in an array.
|
static Cartesian3 |
fromArray(double[] array,
int startingIndex,
Cartesian3 result)
Creates a Cartesian3 from two consecutive elements in an array.
|
static Cartesian3 |
fromArray(com.google.gwt.core.client.JsArrayNumber array,
Cartesian3 result)
Creates a Cartesian3 from two consecutive elements in an array.
|
static Cartesian3 |
fromArray(com.google.gwt.core.client.JsArrayNumber array,
int startingIndex,
Cartesian3 result)
Creates a Cartesian3 from two consecutive elements in an array.
|
static Cartesian3 |
fromCartesian4(Cartesian4 cartesian,
Cartesian3 result)
Creates a Cartesian3 instance from an existing Cartesian4.
|
static Cartesian3 |
fromDegrees(double longitude,
double latitude)
Returns a Cartesian3 position from longitude and latitude values given in degrees.
|
static Cartesian3 |
fromDegrees(double longitude,
double latitude,
double height)
Returns a Cartesian3 position from longitude and latitude values given in degrees.
|
static Cartesian3 |
fromDegrees(double longitude,
double latitude,
double height,
Ellipsoid ellipsoid,
Cartesian3 result)
Returns a Cartesian3 position from longitude and latitude values given in degrees.
|
static Cartesian3[] |
fromDegreesArray(double[] coordinates)
Returns an array of Cartesian3 positions given an array of longitude and latitude values given in degrees.
|
static Cartesian3[] |
fromDegreesArray(double[] coordinates,
Ellipsoid ellipsoid,
Cartesian3[] result)
Returns an array of Cartesian3 positions given an array of longitude and latitude values given in degrees.
|
static Cartesian3[] |
fromDegreesArrayHeights(double[] coordinates)
Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in degrees.
|
static Cartesian3[] |
fromDegreesArrayHeights(double[] coordinates,
Ellipsoid ellipsoid,
Cartesian3[] result)
Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in degrees.
|
static Cartesian3 |
fromElements(double x,
double y,
double z,
Cartesian3 result)
Creates a Cartesian3 instance from x and y coordinates.
|
static Cartesian3 |
fromRadians(double longitude,
double latitude)
Returns a Cartesian3 position from longitude and latitude values given in radians.
|
static Cartesian3 |
fromRadians(double longitude,
double latitude,
double height)
Returns a Cartesian3 position from longitude and latitude values given in radians.
|
static Cartesian3 |
fromRadians(double longitude,
double latitude,
double height,
Ellipsoid ellipsoid,
Cartesian3 result)
Returns a Cartesian3 position from longitude and latitude values given in radians.
|
static Cartesian3[] |
fromRadiansArray(double[] coordinates)
Returns an array of Cartesian3 positions given an array of longitude and latitude values given in radians.
|
static Cartesian3[] |
fromRadiansArray(double[] coordinates,
Ellipsoid ellipsoid,
Cartesian3[] result)
Returns an array of Cartesian3 positions given an array of longitude and latitude values given in radians.
|
static Cartesian3[] |
fromRadiansArrayHeights(double[] coordinates)
Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in radians.
|
static Cartesian3[] |
fromRadiansArrayHeights(double[] coordinates,
Ellipsoid ellipsoid,
Cartesian3[] result)
Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in radians.
|
static Cartesian3 |
fromSpherical(Spherical spherical,
Cartesian3 result)
Converts the provided Spherical into Cartesian3 coordinates.
|
static Cartesian3 |
lerp(Cartesian3 start,
Cartesian3 end,
double t,
Cartesian3 result)
Computes the linear interpolation or extrapolation at t using the provided cartesians.
|
static double |
magnitude(Cartesian3 cartesian)
Computes the Cartesian's magnitude (length).
|
static double |
magnitudeSquared(Cartesian3 cartesian)
Computes the provided Cartesian's squared magnitude.
|
static Cartesian3 |
maximumByComponent(Cartesian3 first,
Cartesian3 second,
Cartesian3 result)
Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
|
static double |
maximumComponent(Cartesian3 cartesian)
Computes the value of the maximum component for the supplied Cartesian.
|
static Cartesian3 |
midpoint(Cartesian3 left,
Cartesian3 right,
Cartesian3 result)
Computes the midpoint between the right and left Cartesian.
|
static Cartesian3 |
minimumByComponent(Cartesian3 first,
Cartesian3 second,
Cartesian3 result)
Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
|
static double |
minimumComponent(Cartesian3 cartesian)
Computes the value of the minimum component for the supplied Cartesian.
|
static Cartesian3 |
mostOrthogonalAxis(Cartesian3 cartesian,
Cartesian3 result)
Returns the axis that is most orthogonal to the provided Cartesian.
|
static Cartesian3 |
multiplyByScalar(Cartesian3 cartesian,
double scalar,
Cartesian3 result)
Multiplies the provided Cartesian componentwise by the provided scalar.
|
static Cartesian3 |
multiplyComponents(Cartesian3 left,
Cartesian3 right,
Cartesian3 result)
Computes the componentwise product of two Cartesians.
|
static Cartesian3 |
negate(Cartesian3 cartesian,
Cartesian3 result)
Negates the provided Cartesian.
|
static Cartesian3 |
normalize(Cartesian3 cartesian,
Cartesian3 result)
Computes the normalized form of the supplied Cartesian.
|
static com.google.gwt.core.client.JsArrayNumber |
pack(Cartesian3 value,
com.google.gwt.core.client.JsArrayNumber array,
int startingIndex)
Stores the provided instance into the provided array.
|
static com.google.gwt.core.client.JsArrayNumber |
packArray(Cartesian3[] array,
com.google.gwt.core.client.JsArrayNumber result)
Flattens an array of Cartesian3s into and array of components.
|
static Cartesian3 |
projectVector(Cartesian3 a,
Cartesian3 b,
Cartesian3 result)
Projects vector a onto vector b
|
static Cartesian3 |
subtract(Cartesian3 left,
Cartesian3 right,
Cartesian3 result)
Computes the componentwise difference of two Cartesians.
|
String |
toString()
Creates a string representing this Cartesian in the format '(x, y, z)'.
|
static Cartesian3 |
UNIT_X()
An immutable Cartesian3 instance initialized to (1.0, 0.0, 0.0).
|
static Cartesian3 |
UNIT_Y()
An immutable Cartesian3 instance initialized to (0.0, 1.0, 0.0).
|
static Cartesian3 |
UNIT_Z()
An immutable Cartesian3 instance initialized to (0.0, 0.0, 1.0).
|
static Cartesian3 |
unpack(com.google.gwt.core.client.JsArrayNumber array)
Retrieves an instance from a packed array.
|
static Cartesian3 |
unpack(com.google.gwt.core.client.JsArrayNumber array,
int startingIndex,
Cartesian3 result)
Retrieves an instance from a packed array.
|
static Cartesian3[] |
unpackArray(com.google.gwt.core.client.JsArrayNumber array,
Cartesian3[] result)
Unpacks an array of cartesian components into and array of Cartesian3s.
|
static Cartesian3 |
ZERO()
An immutable Cartesian3 instance initialized to (0.0, 0.0, 0.0).
|
@JsProperty public double x
@JsProperty public double y
@JsProperty public double z
@JsProperty public static int packedLength
@JsConstructor public Cartesian3()
Cartesian2
,
Cartesian4
@JsConstructor public Cartesian3(double x, double y, double z)
x
- The X component. Default Value: 0.0y
- The Y component. Default Value: 0.0z
- The Z component. Default value: 0.0Cartesian2
,
Cartesian4
@JsProperty(name="UNIT_X") public static Cartesian3 UNIT_X()
@JsProperty(name="UNIT_Y") public static Cartesian3 UNIT_Y()
@JsProperty(name="UNIT_Z") public static Cartesian3 UNIT_Z()
@JsProperty(name="ZERO") public static Cartesian3 ZERO()
@JsMethod public Cartesian3 clone(Cartesian3 result)
result
- The object onto which to store the result. Optional.@JsMethod public Cartesian3 clone()
@JsMethod public Cartesian3 equals(Cartesian3 right)
right
- The right hand side Cartesian. Optional.@JsMethod public boolean equalsEpsilon(Cartesian3 right, double relativeEpsilon, double absoluteEpsilon)
right
- The right hand side Cartesian. Optional.relativeEpsilon
- The relative epsilon tolerance to use for equality testing.absoluteEpsilon
- The absolute epsilon tolerance to use for equality testing. Optional.@JsMethod public String toString()
@JsMethod public static Cartesian3 abs(Cartesian3 cartesian, Cartesian3 result)
cartesian
- The Cartesian whose absolute value is to be computed.result
- The object onto which to store the result.@JsMethod public static Cartesian3 add(Cartesian3 left, Cartesian3 right, Cartesian3 result)
left
- The first Cartesian.right
- The second Cartesian.result
- The object onto which to store the result.@JsMethod public static double angleBetween(Cartesian3 left, Cartesian3 right)
left
- The first Cartesian.right
- The second Cartesian.@JsMethod public static Cartesian3 clone(Cartesian3 cartesian, @JsOptional Cartesian3 result)
cartesian
- The Cartesian to duplicate.result
- The object onto which to store the result. Optional.@JsMethod public static Cartesian3 cross(Cartesian3 left, Cartesian3 right, Cartesian3 result)
left
- The first Cartesian.right
- The second Cartesian.result
- The object onto which to store the result.@JsMethod public static double distance(Cartesian3 left, Cartesian3 right)
Example:
// Returns 1.0
double d = Cartesian3.distance(new Cartesian3(1.0, 0.0, 0.0), new Cartesian3(2.0, 0.0, 0.0));
left
- The first point to compute the distance from.right
- The second point to compute the distance to.@JsMethod public static double distanceSquared(Cartesian3 left, Cartesian3 right)
Example:
// Returns 4.0, not 2.0
double d = Cartesian3.distanceSquared(new Cartesian3(1.0, 0.0, 0.0), new Cartesian3(3.0, 0.0, 0.0));
left
- The first point to compute the distance from.right
- The second point to compute the distance to.@JsMethod public static Cartesian3 divideByScalar(Cartesian3 cartesian, double scalar, Cartesian3 result)
cartesian
- The Cartesian to be divided.scalar
- The scalar to divide by.result
- The object onto which to store the result.@JsMethod public static Cartesian3 divideComponents(Cartesian3 left, Cartesian3 right, Cartesian3 result)
left
- The first Cartesian.right
- The second Cartesian.result
- The object onto which to store the result.@JsMethod public static double dot(Cartesian3 left, Cartesian3 right)
left
- The first Cartesian.right
- The second Cartesian.@JsMethod public static boolean equals(Cartesian3 left, Cartesian3 right)
left
- The first Cartesian. Optional.right
- The second Cartesian. Optional.@JsMethod public static boolean equalsEpsilon(Cartesian3 left, Cartesian3 right, double relativeEpsilon, double absoluteEpsilon)
left
- The first Cartesian. Optional.right
- The second Cartesian. Optional.relativeEpsilon
- The relative epsilon tolerance to use for equality testing.absoluteEpsilon
- The absolute epsilon tolerance to use for equality testing. Optional.@JsMethod public static Cartesian3 fromArray(com.google.gwt.core.client.JsArrayNumber array, Cartesian3 result)
Example:
JsArrayNumber jsArrayNumber = JsArray.createArray().cast();
jsArrayNumber.push(1);
jsArrayNumber.push(2);
Cartesian3 c = Cartesian3.fromArray(jsArrayNumber, 0, null);
array
- The array whose two consecutive elements correspond to the x and y components, respectively.result
- The object onto which to store the result. Optional.@JsMethod public static Cartesian3 fromArray(double[] array, Cartesian3 result)
Example:
double[] array = {1, 2, 3};
Cartesian3 c = Cartesian3.fromArray(array, 0, null);
array
- The array whose two consecutive elements correspond to the x and y components, respectively.result
- The object onto which to store the result. Optional.@JsMethod public static Cartesian3 fromArray(com.google.gwt.core.client.JsArrayNumber array, int startingIndex, Cartesian3 result)
Example:
JsArrayNumber jsArrayNumber = JsArray.createArray().cast();
jsArrayNumber.push(1);
jsArrayNumber.push(2);
jsArrayNumber.push(3);
jsArrayNumber.push(4);
Cartesian3 c = Cartesian3.fromArray(jsArrayNumber, 2, null);
array
- The array whose two consecutive elements correspond to the x and y components, respectively.startingIndex
- The offset into the array of the first element, which corresponds to the x component. Optional.result
- The object onto which to store the result. Optional.@JsMethod public static Cartesian3 fromArray(double[] array, int startingIndex, Cartesian3 result)
Example:
double[] array = {1, 2, 3, 4, 5, 6};
Cartesian3 c = Cartesian3.fromArray(array, 2, null);
array
- The array whose two consecutive elements correspond to the x and y components, respectively.startingIndex
- The offset into the array of the first element, which corresponds to the x component. Optional.result
- The object onto which to store the result. Optional.@JsMethod public static Cartesian3 fromCartesian4(Cartesian4 cartesian, Cartesian3 result)
cartesian
- The Cartesian4 instance to create a Cartesian3 instance from.result
- The object onto which to store the result. Optional.@JsMethod public static Cartesian3 fromDegrees(double longitude, double latitude)
Example:
Cartesian3 position = Cartesian3.fromDegrees(-115.0, 37.0);
longitude
- The longitude, in degreeslatitude
- The latitude, in degrees@JsMethod public static Cartesian3 fromDegrees(double longitude, double latitude, double height)
Example:
Cartesian3 position = Cartesian3.fromDegrees(-115.0, 37.0);
longitude
- The longitude, in degreeslatitude
- The latitude, in degreesheight
- The height, in meters, above the ellipsoid. Optional. Default: 0.0.@JsMethod public static Cartesian3 fromDegrees(double longitude, double latitude, double height, Ellipsoid ellipsoid, Cartesian3 result)
Example:
Cartesian3 position = Cartesian3.fromDegrees(-115.0, 37.0);
longitude
- The longitude, in degreeslatitude
- The latitude, in degreesheight
- The height, in meters, above the ellipsoid. Optional. Default: 0.0.ellipsoid
- The ellipsoid on which the position lies. Optional. Default: Ellipsoid.WGS84.result
- The object onto which to store the result. Optional.@JsMethod public static Cartesian3[] fromDegreesArray(double[] coordinates)
Example:
double[] coordinates = {-115.0, 37.0, -107.0, 33.0};
Cartesian3 positions = Cartesian3.fromDegreesArray(coordinates);
coordinates
- A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].@JsMethod public static Cartesian3[] fromDegreesArray(double[] coordinates, Ellipsoid ellipsoid, Cartesian3[] result)
Example:
double[] coordinates = {-115.0, 37.0, -107.0, 33.0};
Cartesian3 positions = Cartesian3.fromDegreesArray(coordinates);
coordinates
- A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].ellipsoid
- The ellipsoid on which the coordinates line. Optional.result
- An array of Cartesian3 objects to store the result. Optional.@JsMethod public static Cartesian3[] fromDegreesArrayHeights(double[] coordinates)
Example:
double[] coordinates = {-115.0, 37.0, 100000.0, -107.0, 33.0, 150000.0};
Cartesian3 positions = Cartesian3.fromDegreesArrayHeights(coordinates);
coordinates
- A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].@JsMethod public static Cartesian3[] fromDegreesArrayHeights(double[] coordinates, Ellipsoid ellipsoid, Cartesian3[] result)
Example:
double[] coordinates = {-115.0, 37.0, 100000.0, -107.0, 33.0, 150000.0};
Cartesian3 positions = Cartesian3.fromDegreesArrayHeights(coordinates);
coordinates
- A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].ellipsoid
- The ellipsoid on which the position lies. Optional. Default: Ellipsoid.WGS84.result
- An array of Cartesian3 objects to store the result. Optional;@JsMethod public static Cartesian3 fromElements(double x, double y, double z, Cartesian3 result)
x
- The x coordinate.y
- The y coordinate.z
- The z coordinate.result
- Cartesian3 optional The object onto which to store the result.@JsMethod public static Cartesian3 fromRadians(double longitude, double latitude)
Cartesian3 position = Cartesian3.fromRadians(-2.007, 0.645);
longitude
- The longitude, in radians.latitude
- The latitude, in radians.@JsMethod public static Cartesian3 fromRadians(double longitude, double latitude, double height)
Cartesian3 position = Cartesian3.fromRadians(-2.007, 0.645);
longitude
- The longitude, in radians.latitude
- The latitude, in radians.height
- The height, in meters, above the ellipsoid.@JsMethod public static Cartesian3 fromRadians(double longitude, double latitude, double height, Ellipsoid ellipsoid, Cartesian3 result)
Cartesian3 position = Cartesian3.fromRadians(-2.007, 0.645);
longitude
- The longitude, in radianslatitude
- The latitude, in radiansheight
- The height, in meters, above the ellipsoid. Optional.ellipsoid
- The ellipsoid on which the position lines. Optional. Default: Ellipsoid.WGS84.result
- The object onto which to store the result. Optional.@JsMethod public static Cartesian3[] fromRadiansArray(double[] coordinates)
double coordinates[] = {-2.007, 0.645, -1.867, .575};
Cartesian3[] positions = Cartesian3.fromRadiansArray(coordinates);
coordinates
- A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].@JsMethod public static Cartesian3[] fromRadiansArray(double[] coordinates, Ellipsoid ellipsoid, Cartesian3[] result)
double coordinates[] = {-2.007, 0.645, -1.867, .575};
Cartesian3[] positions = Cartesian3.fromRadiansArray(coordinates);
coordinates
- A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].ellipsoid
- The ellipsoid on which the position lines. Optional. Default: Ellipsoid.WGS84.result
- The object onto which to store the result. Optional.@JsMethod public static Cartesian3[] fromRadiansArrayHeights(double[] coordinates)
double[] coordinates = {-2.007, 0.645, 100000.0, -1.867, .575, 150000.0};
Cartesian3[] positions = Cartesian3.fromRadiansArrayHeights(coordinates);
coordinates
- A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].@JsMethod public static Cartesian3[] fromRadiansArrayHeights(double[] coordinates, Ellipsoid ellipsoid, Cartesian3[] result)
coordinates
- A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].ellipsoid
- The ellipsoid on which the position lines. Optional. Default: Ellipsoid.WGS84.result
- An array of Cartesian3 objects to store the result. Optional.@JsMethod public static Cartesian3 fromSpherical(Spherical spherical, Cartesian3 result)
spherical
- The Spherical to be converted to Cartesian3.result
- The object onto which to store the result. Optional.@JsMethod public static Cartesian3 lerp(Cartesian3 start, Cartesian3 end, double t, Cartesian3 result)
start
- The value corresponding to t at 0.0.end
- The value corresponding to t at 1.0.t
- The point along t at which to interpolate.result
- The object onto which to store the result.@JsMethod public static double magnitude(Cartesian3 cartesian)
cartesian
- The Cartesian instance whose magnitude is to be computed.@JsMethod public static double magnitudeSquared(Cartesian3 cartesian)
cartesian
- The Cartesian instance whose squared magnitude is to be computed.@JsMethod public static Cartesian3 maximumByComponent(Cartesian3 first, Cartesian3 second, Cartesian3 result)
first
- A cartesian to compare.second
- A cartesian to compare.result
- The object into which to store the result.@JsMethod public static double maximumComponent(Cartesian3 cartesian)
cartesian
- The cartesian to use.@JsMethod public static Cartesian3 midpoint(Cartesian3 left, Cartesian3 right, Cartesian3 result)
left
- The first Cartesian.right
- The second Cartesian.result
- The object onto which to store the result.@JsMethod public static Cartesian3 minimumByComponent(Cartesian3 first, Cartesian3 second, Cartesian3 result)
first
- A cartesian to compare.second
- A cartesian to compare.result
- The object into which to store the result.@JsMethod public static double minimumComponent(Cartesian3 cartesian)
cartesian
- The cartesian to use.@JsMethod public static Cartesian3 mostOrthogonalAxis(Cartesian3 cartesian, Cartesian3 result)
cartesian
- The Cartesian on which to find the most orthogonal axis.result
- The object onto which to store the result.@JsMethod public static Cartesian3 multiplyByScalar(Cartesian3 cartesian, double scalar, Cartesian3 result)
cartesian
- The Cartesian to be scaled.scalar
- The scalar to multiply with.result
- The object onto which to store the result.@JsMethod public static Cartesian3 multiplyComponents(Cartesian3 left, Cartesian3 right, Cartesian3 result)
left
- The first Cartesian.right
- The second Cartesian.result
- The object onto which to store the result.@JsMethod public static Cartesian3 negate(Cartesian3 cartesian, Cartesian3 result)
cartesian
- The Cartesian to be negated.result
- The object onto which to store the result.@JsMethod public static Cartesian3 normalize(Cartesian3 cartesian, Cartesian3 result)
cartesian
- The Cartesian to be normalized.result
- The object onto which to store the result.@JsMethod public static com.google.gwt.core.client.JsArrayNumber pack(Cartesian3 value, com.google.gwt.core.client.JsArrayNumber array, int startingIndex)
value
- The value to pack.array
- The array to pack into.startingIndex
- The index into the array at which to start packing the elements. Optional.@JsMethod public static com.google.gwt.core.client.JsArrayNumber packArray(Cartesian3[] array, com.google.gwt.core.client.JsArrayNumber result)
array
- The array of cartesians to pack.result
- The array onto which to store the result.@JsMethod public static Cartesian3 projectVector(Cartesian3 a, Cartesian3 b, Cartesian3 result)
a
- The vector that needs projectingb
- The vector to project ontoresult
- The result cartesian@JsMethod public static Cartesian3 subtract(Cartesian3 left, Cartesian3 right, Cartesian3 result)
left
- The first Cartesian.right
- The second Cartesian.result
- The object onto which to store the result.@JsMethod public static Cartesian3 unpack(com.google.gwt.core.client.JsArrayNumber array)
array
- The packed array.@JsMethod public static Cartesian3 unpack(com.google.gwt.core.client.JsArrayNumber array, int startingIndex, Cartesian3 result)
array
- The packed array.startingIndex
- The starting index of the element to be unpacked. Optional. Default 0.result
- The object into which to store the result. Optional.@JsMethod public static Cartesian3[] unpackArray(com.google.gwt.core.client.JsArrayNumber array, Cartesian3[] result)
array
- The array of components to unpack.result
- The array onto which to store the result.Copyright © 2019. All rights reserved.