Basics
Guides
API Reference
Basics
Guides
API Reference
[17:7] extends: FxObj
Wraps FXGL's Vec3 (com.almasb.fxgl.core.math.Vec3), a 3D float vector used throughout the FXGL 3D scene API and pathfinding. Companion to the existing Vec2 wrapper. Methods that mutate (set, addLocal, subLocal, mulLocal, negateLocal, setZero) return this for fluent chaining. Vec3 fields are floats; values come back to Aussom as doubles because Aussom does not have a separate float type.
Vec3 (double X = 0.0, double Y = 0.0, double Z = 0.0)
Creates a new Vec3 with the given X, Y, Z components.
X is a double X component.Y is a double Y component.Z is a double Z component.adopt (object Ajo)
Wraps an existing Vec3 AussomJavaObject as a Vec3 wrapper.
Ajo is an AussomJavaObject around a Vec3.A new wrapper.getX ()
Returns the X component as a double.
getY ()
Returns the Y component as a double.
getZ ()
Returns the Z component as a double.
set (double X, double Y, double Z)
Sets all three components.
this objectsetVec (object Other)
Copies another Vec3 into this one in place.
this objectaddLocal (object Other)
Adds Other to this vector in place.
this objectsubLocal (object Other)
Subtracts Other from this vector in place.
this objectmulLocal (double Scalar)
Multiplies this vector by Scalar in place.
this objectnegateLocal ()
Negates this vector in place.
this objectsetZero ()
Zeros all components in place.
this objectcopy ()
Returns a fresh copy of this Vec3.
A new Vec3 wrapper.dot (object A, object B)
Static helper: returns the dot product of two Vec3s.
A is a Vec3 wrapper.B is a Vec3 wrapper.A double.cross (object A, object B)
Static helper: returns the cross product of two Vec3s as a new Vec3 wrapper.
A is a Vec3 wrapper.B is a Vec3 wrapper.A new Vec3 wrapper.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.