nape.geom.Vec3

type
class
A 3 dimensional vector object.

In many instances a Vec3 will be accessible from Nape which is marked as immutable, these cases will be documented and modifying such a Vec3 will result in an error.

Static Methods

static function get(x:Float = 0, y:Float = 0, z:Float = 0):Vec3

+ Allocate a Vec3 from the global object pool.

Constructor

function new(x:Float = 0, y:Float = 0, z:Float = 0)
+ Construct a new Vec3.

Instance Properties

var length : Float = 0

+ Length of Vec3.

var x : Float = 0

The x component of Vec3.

var y : Float = 0

The y component of Vec3.

var z : Float = 0

The z component of Vec3.

Instance Methods

function dispose():Void

+ Produce a copy of this Vec3.

function lsq():Float

+ Compute squared length of Vec3.

function set(vector:Vec3):Vec3

+ Set values of this Vec3 from another.

function setxyz(x:Float, y:Float, z:Float):Vec3

+ Set values of this Vec3 from numbers.

function xy(weak:Bool = false):Vec2

+ Produce copy of the xy components of Vec3.