Skip to content
reduz edited this page Feb 23, 2014 · 12 revisions

Vector3

Brief Description

Vector class, which performs basic 3D vector math operations.

Member Functions

Member Variables

Numeric Constants

  • AXIS_X = 0
  • AXIS_Y = 1
  • AXIS_Z = 2

Description

Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vecor math operations.

Member Function Description

  • Vector3 inverse ( ) \ Returns the inverse of the vector. this is the same as Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z )
  • real length ( ) \ Return the length of the vector.
  • real length_squared ( ) \ Return the length of the vector, without the square root step.
  • Vector3 normalized ( ) \ Return a copy of the normalized vector to unit length. This is the same as v / v.length()
  • Vector3 snapped ( real by ) \ Return a copy of the vector, snapped to the lowest neared multiple.
Clone this wiki locally