Ovi Maps API Reference

Contents

Class ovi.mapsapi.util.Vector3D

Class Summary

A class representing a three dimensional vector.

Method Summary
add (other) : ovi.mapsapi.util.Vector3D Creates the sum of this vector and the given one.
angle ([px, [py, [intertX, [intertY]]]]) : Number Returns the angle of this vector in decimal degree to the given point within a coordinate system that goes possitive to top/right.
divide (other) : ovi.mapsapi.util.Vector3D Creates the component-wise quotient of this vector and the given one.
dot (other) : number Creates the dot product of this vector and the given one.
magnitude () : number Calculates the length of this vector.
multiply (other) : ovi.mapsapi.util.Vector3D Creates the component wise product of this vector and the one given.
normal (other) : ovi.mapsapi.util.Vector3D Creates the normal vector of the plane that is spanned by this and the given vector.
normalize () : ovi.mapsapi.util.Vector3D Creates normalized representation of this vector.
subtract (other) : ovi.mapsapi.util.Vector3D Creates the difference of this vector and the given one.
Field Summary
Number x The x component of the vector.
Number y The y component of the vector
Number z The z component of the vector.
Constructor Detail

A class representing a three dimensional vector.

new ovi.mapsapi.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
Creates the sum of this vector and the given one.
Parameters:
{ovi.mapsapi.util.Vector3D} other The vector to be added.
Returns:
{ovi.mapsapi.util.Vector3D} The sum of this and the given vector.
angle ([px, [py, [intertX, [intertY]]]]) : Number
Returns the angle of this vector in decimal degree to the given point within a coordinate system that goes possitive to top/right.

For screen coordinates the Y-axis shall be inverted. For a normalized vector the method can be called without parameters to return it's normalized angle.
Parameters:
{Number} [px]: The x-coordinate of the point to which the angle shall be calculated, if not given zero is used.
{Number} [py]: The y-coordinate of the point to which the angle shall be calculated, if not given zero is used.
{Boolean} [intertX]: If given and true, the x-axis is inverted, therefore the coordinates are increasing to the left and decreasing to the right.
{Boolean} [intertY]: If given 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 degree, relative to the given coordinate.
divide (other) : ovi.mapsapi.util.Vector3D
Creates the component-wise quotient of this vector and the given one.
Parameters:
{ovi.mapsapi.util.Vector3D} other The vector to which this one should be divided.
Returns:
{ovi.mapsapi.util.Vector3D} The component-wise quotient of this and the given vector.
dot (other) : number
Creates the dot product of this vector and the given one.
Parameters:
{ovi.mapsapi.util.Vector3D} other The vector this one should be dot-multiplied with.
Returns:
{number} The dot product of this and the given vector.
magnitude () : number
Calculates the length of this vector.
Returns:
{number} The length of this vector.
multiply (other) : ovi.mapsapi.util.Vector3D
Creates the component wise product of this vector and the one given.
Parameters:
{ovi.mapsapi.util.Vector3D} other The vector to be multiplied.
Returns:
{ovi.mapsapi.util.Vector3D} The component-wise product of this and the given vector.
normal (other) : ovi.mapsapi.util.Vector3D
Creates the normal vector of the plane that is spanned by this and the given vector.
Parameters:
{ovi.mapsapi.util.Vector3D} other The vector that spans the plane together with this.
Returns:
{ovi.mapsapi.util.Vector3D} The normal vector of the plane that spans between this and the given vector.
normalize () : ovi.mapsapi.util.Vector3D
Creates normalized representation of this vector.
Returns:
{ovi.mapsapi.util.Vector3D} The normalized representation (length = 1) of this vector.
subtract (other) : ovi.mapsapi.util.Vector3D
Creates the difference of this vector and the given one.
Parameters:
{ovi.mapsapi.util.Vector3D} other The vector to be substracted.
Returns:
{ovi.mapsapi.util.Vector3D} The substraction of this and the given vector.
Field Detail
Number x
The x component of the vector.
Number y
The y component of the vector
Number z
The z component of the vector.
Documentation generated on Fri Aug 19 2011 13:36:13 GMT+0200 (CEST).