-
-
Notifications
You must be signed in to change notification settings - Fork 9
Vector3f
Vector3f represents the type of a three float vector.
| Type | Size | Memory Management Model | File |
|---|---|---|---|
Vector3f |
12 bytes | None | 2.7/Vector3f.adept |
struct Vector3f (x, y, z float)
| Name | Type | Description |
|---|---|---|
x |
float |
X Value |
y |
float |
Y Value |
z |
float |
Z Value |
func __add__(a POD Vector3f, b POD Vector3f) Vector3ffunc __subtract__(a POD Vector3f, b POD Vector3f) Vector3ffunc __multiply__(a POD Vector3f, b POD Vector3f) Vector3ffunc __multiply__(a POD Vector3f, factor float) Vector3f
-
func Vector3f(x, y, z float) Vector3fConstructs a
Vector3f. -
func vector3f(x, y, z float) Vector3fConstructs a
Vector3f.
-
func zero(this *Vector3f) voidSets all components of a vector to zero.
-
func set(this *Vector3f, x, y, z float) voidSets the components of a vector.
-
func set(this *Vector3f, other Vector3f) voidSets the components of a vector to those of another.
-
func add(this *Vector3f, other Vector3f) voidAdds the components of a vector to another.
-
func subtract(this *Vector3f, other Vector3f) voidSubtracts the components of a vector from another.
-
func multiply(this *Vector3f, other Vector3f) voidMultiplies the components of a vector by another.
-
func negate(this *Vector3f) voidNegates the components of a vector.
-
func negated(this *Vector3f) Vector3fReturns a negated copy of a vector.
-
func scale(this *Vector3f, amount float) voidScales a vector by a scalar.
-
func normalize(this *Vector3f) voidNormalizes a vector.
-
func cross(this *Vector3f, other Vector3f) voidSets a
Vector3fto the cross-product of it with another. -
func crossed(this *Vector3f, other Vector3f) Vector3fReturns a the cross-product of a
Vector3fwith another. -
func length(this *Vector3f) floatCalculates the length of a vector.
-
func dot(this *Vector3f, other Vector3f) floatCalculates the dot product of two vectors.
-
func direction(this *Vector3f, other Vector3f) voidSets a vector to a unit vector equal to the difference of it and another.
-
func lerp(this *Vector3f, other Vector3f, lerp float) voidLinearly interpolates between two vectors by
lerp[0.0, 1.0] amount. -
func lerp(this *Vector3f, other Vector3f) voidLinearly interpolates halfway between two vectors.
-
func distance(this *Vector3f, other Vector3f) floatCalculates the distance between two points.
-
func toString(this *Vector3f) StringConverts a vector to a
String. -
func print(this *Vector3f) voidPrints a vector to stdout.