aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/math/Vec3f.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/math/Vec3f.java')
-rw-r--r--src/jogl/classes/com/jogamp/math/Vec3f.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/math/Vec3f.java b/src/jogl/classes/com/jogamp/math/Vec3f.java
index 2dc399ef1..3459c2ad1 100644
--- a/src/jogl/classes/com/jogamp/math/Vec3f.java
+++ b/src/jogl/classes/com/jogamp/math/Vec3f.java
@@ -115,6 +115,14 @@ public final class Vec3f {
return this;
}
+ /** xyz[0..2] = this.{x, y, z}, returns this. */
+ public Vec3f toArray(final float[/*3*/] xyz) {
+ xyz[0] = this.x;
+ xyz[1] = this.y;
+ xyz[2] = this.z;
+ return this;
+ }
+
/** Sets the ith component, 0 <= i < 3 */
public void set(final int i, final float val) {
switch (i) {