File: Vector3D.hx

package info (click to toggle)
haxe 1%3A4.3.6-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 46,180 kB
  • sloc: ml: 137,199; ansic: 2,448; makefile: 456; java: 386; cs: 336; cpp: 318; python: 318; sh: 75; objc: 64; php: 50; xml: 31; javascript: 11
file content (34 lines) | stat: -rw-r--r-- 1,404 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package flash.geom;

@:require(flash10) extern class Vector3D {
	@:flash.property var length(get,never) : Float;
	@:flash.property var lengthSquared(get,never) : Float;
	var w : Float;
	var x : Float;
	var y : Float;
	var z : Float;
	function new(x : Float = 0, y : Float = 0, z : Float = 0, w : Float = 0) : Void;
	function add(a : Vector3D) : Vector3D;
	function clone() : Vector3D;
	@:require(flash11) function copyFrom(sourceVector3D : Vector3D) : Void;
	function crossProduct(a : Vector3D) : Vector3D;
	function decrementBy(a : Vector3D) : Void;
	function dotProduct(a : Vector3D) : Float;
	function equals(toCompare : Vector3D, allFour : Bool = false) : Bool;
	private function get_length() : Float;
	private function get_lengthSquared() : Float;
	function incrementBy(a : Vector3D) : Void;
	function nearEquals(toCompare : Vector3D, tolerance : Float, allFour : Bool = false) : Bool;
	function negate() : Void;
	function normalize() : Float;
	function project() : Void;
	function scaleBy(s : Float) : Void;
	@:require(flash11) function setTo(xa : Float, ya : Float, za : Float) : Void;
	function subtract(a : Vector3D) : Vector3D;
	function toString() : String;
	static final X_AXIS : Vector3D;
	static final Y_AXIS : Vector3D;
	static final Z_AXIS : Vector3D;
	static function angleBetween(a : Vector3D, b : Vector3D) : Float;
	static function distance(pt1 : Vector3D, pt2 : Vector3D) : Float;
}