Class nokia.maps.util.Vector3D
Class Summary
This class represents a three dimensional vector.
new nokia.maps.util.Vector3D
(x, y, z)
Method Summary
add
(other)
: nokia.maps.util.Vector3D
This method creates the sum of the given vector and the vector provided by the caller.
angle
([px, [py, [intertX, [intertY]]]])
: Number
This method retrieves the angle of the given vector in decimal degrees to the given point within a coordinate system in which the highest (positive) values are in the top right.
divide
(other)
: nokia.maps.util.Vector3D
This method creates vector that represents the quotient obtained by dividing the given vector by the one supplied by the caller.
dot
(other)
: number
This method creates the dot product of the given vector and the one provided by the caller.
magnitude
()
: number
This method calculates the length of the given vector.
multiply
(other)
: nokia.maps.util.Vector3D
This method creates a vector that represents the product of the given vector and the one provided by the caller.
normal
(other)
: nokia.maps.util.Vector3D
This method creates the normal vector of the plane between the given vector and the one provided by the caller.
normalize
()
: nokia.maps.util.Vector3D
This method creates normalized representation of the given vector.
subtract
(other)
: nokia.maps.util.Vector3D
This method creates a vector that represents the difference between the given vector and the vector supplied by the caller.
Field Summary
Constructor Detail
Method Detail
add
(other)
: nokia.maps.util.Vector3D
This method creates the sum of the given vector and the vector provided
by the caller.
Parameters:
{nokia.maps.util.Vector3D}  other  The vector to be added 
Returns:
{nokia.maps.util.Vector3D}  A vector representing the sum of the given vector and the vector supplied by the caller 
angle
([px, [py, [intertX, [intertY]]]])
: Number
This method retrieves the angle of the given vector in decimal degrees to
the given point within a coordinate system in which the highest (positive)
values are in the top right.
For screen coordinates, the yaxis must be inverted. For a normalized vector, the method can be called without parameters to return its normalized angle.
Parameters:
{Number}  [px]:  The xcoordinate of the point to which the angle is to be calculated; if not provided zero is used 
{Number}  [py]:  The ycoordinate of the point to which the angle is to be calculated; if not provided zero is used 
{Boolean}  [intertX]: 
If provided and true , the xaxis is inverted, therefore the
coordinates are increasing to the left and decreasing to the right

{Boolean}  [intertY]: 
If provided and true , the yaxis is inverted, therefore
the coordinates are increasing to the bottom and decreasing to the top

Returns:
{Number}  The angle of this vector in degrees, relative to the given coordinate 
divide
(other)
: nokia.maps.util.Vector3D
This method creates vector that represents the quotient obtained by
dividing the given vector by the one supplied by the caller.
Parameters:
{nokia.maps.util.Vector3D}  other  The vector by which divide the given vector 
Returns:
{nokia.maps.util.Vector3D}  A vector representing a quotient of the division of the given vector by the one supplied by the caller 
dot
(other)
: number
This method creates the dot product of the given vector and the one
provided by the caller.
Parameters:
{nokia.maps.util.Vector3D}  other  The vector with which the given vector is to be dotmultiplied 
Returns:
{number}  The dot product of the two vectors 
magnitude
()
: number
This method calculates the length of the given vector.
Returns:
{number}  The length of this vector 
multiply
(other)
: nokia.maps.util.Vector3D
This method creates a vector that represents the product of the given vector and
the one provided by the caller.
Parameters:
{nokia.maps.util.Vector3D}  other  The vector to be multiplied 
Returns:
{nokia.maps.util.Vector3D}  A vector resulting from the multiplication of the given vector by the one supplied by the caller 
normal
(other)
: nokia.maps.util.Vector3D
This method creates the normal vector of the plane between the
given vector and the one provided by the caller.
Parameters:
{nokia.maps.util.Vector3D}  other  The vector provided by the caller 
Returns:
{nokia.maps.util.Vector3D}  The normal vector of the plane between the given vector and that provided by the caller 
normalize
()
: nokia.maps.util.Vector3D
This method creates normalized representation of the given vector.
Returns:
{nokia.maps.util.Vector3D}  The normalized representation (length = 1) of th vector 
subtract
(other)
: nokia.maps.util.Vector3D
This method creates a vector that represents the difference between the
given vector and the vector supplied by the caller.
Parameters:
{nokia.maps.util.Vector3D}  other  The vector to be subtracted from the given vector 
Returns:
{nokia.maps.util.Vector3D}  A vector resulting from the subtraction 