Urho3D::Vector3 Class Reference

Three-dimensional vector. More...

`#include <Vector3.h>`

Collaboration diagram for Urho3D::Vector3:
[legend]

## Public Member Functions

Vector3 ()
Construct a zero vector.

Vector3 (const Vector3 &vector)
Copy-construct from another vector.

Vector3 (const Vector2 &vector, float z)
Construct from a two-dimensional vector and the Z coordinate.

Vector3 (const Vector2 &vector)
Construct from a two-dimensional vector (for Urho2D).

Vector3 (float x, float y, float z)
Construct from coordinates.

Vector3 (float x, float y)
Construct from two-dimensional coordinates (for Urho2D).

Vector3 (const float *data)
Construct from a float array.

Vector3operator= (const Vector3 &rhs)
Assign from another vector.

bool operator== (const Vector3 &rhs) const
Test for equality with another vector without epsilon.

bool operator!= (const Vector3 &rhs) const
Test for inequality with another vector without epsilon.

Vector3 operator+ (const Vector3 &rhs) const

Vector3 operator- () const
Return negation.

Vector3 operator- (const Vector3 &rhs) const
Subtract a vector.

Vector3 operator* (float rhs) const
Multiply with a scalar.

Vector3 operator* (const Vector3 &rhs) const
Multiply with a vector.

Vector3 operator/ (float rhs) const
Divide by a scalar.

Vector3 operator/ (const Vector3 &rhs) const
Divide by a vector.

Vector3operator+= (const Vector3 &rhs)

Vector3operator-= (const Vector3 &rhs)
Subtract-assign a vector.

Vector3operator*= (float rhs)
Multiply-assign a scalar.

Vector3operator*= (const Vector3 &rhs)
Multiply-assign a vector.

Vector3operator/= (float rhs)
Divide-assign a scalar.

Vector3operator/= (const Vector3 &rhs)
Divide-assign a vector.

void Normalize ()
Normalize to unit length.

float Length () const
Return length.

float LengthSquared () const
Return squared length.

float DotProduct (const Vector3 &rhs) const
Calculate dot product.

float AbsDotProduct (const Vector3 &rhs) const
Calculate absolute dot product.

Vector3 CrossProduct (const Vector3 &rhs) const
Calculate cross product.

Vector3 Abs () const
Return absolute vector.

Vector3 Lerp (const Vector3 &rhs, float t) const
Linear interpolation with another vector.

bool Equals (const Vector3 &rhs) const
Test for equality with another vector with epsilon.

float Angle (const Vector3 &rhs) const
Returns the angle between this vector and another vector in degrees.

bool IsNaN () const
Return whether is NaN.

Vector3 Normalized () const
Return normalized to unit length.

const float * Data () const
Return float data.

String ToString () const
Return as string.

float x_
X coordinate.

float y_
Y coordinate.

float z_
Z coordinate.

## Static Public Attributes

static const Vector3 ZERO
Zero vector.

static const Vector3 LEFT
(-1,0,0) vector.

static const Vector3 RIGHT
(1,0,0) vector.

static const Vector3 UP
(0,1,0) vector.

static const Vector3 DOWN
(0,-1,0) vector.

static const Vector3 FORWARD
(0,0,1) vector.

static const Vector3 BACK
(0,0,-1) vector.

static const Vector3 ONE
(1,1,1) vector.

## Detailed Description

Three-dimensional vector.

The documentation for this class was generated from the following files:
• /home/travis/build/urho3d/Urho3D/Source/Urho3D/Math/Vector3.h
• /home/travis/build/urho3d/Urho3D/Source/Urho3D/Math/Vector3.cpp