Nokia Maps API Reference

Contents

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
Number x This property holds the x component of the vector.
Number y This property holds the y component of the vector
Number z This property holds the z component of the vector.
Constructor Detail

This class represents a three dimensional vector.

new nokia.maps.util.Vector3D(x, y, z)
Parameters:
{number} x The x component of the vector.
{number} y The y component of the vector.
{number} z The z component of the vector.
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 y-axis must be inverted. For a normalized vector, the method can be called without parameters to return its normalized angle.

Parameters:
{Number} [px]: The x-coordinate of the point to which the angle is to be calculated; if not provided zero is used
{Number} [py]: The y-coordinate of the point to which the angle is to be calculated; if not provided zero is used
{Boolean} [intertX]: If provided and true, the x-axis is inverted, therefore the coordinates are increasing to the left and decreasing to the right
{Boolean} [intertY]: If provided and true, the y-axis 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 dot-multiplied
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
Field Detail
readonly Number x
This property holds the x component of the vector.
readonly Number y
This property holds the y component of the vector
readonly Number z
This property holds the z component of the vector.
Documentation generated on Thu Jun 28 2012 19:57:01 GMT+0200 (CEST).