aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/math/Vec3d.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/math/Vec3d.java')
-rw-r--r--src/jogl/classes/com/jogamp/math/Vec3d.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/math/Vec3d.java b/src/jogl/classes/com/jogamp/math/Vec3d.java
index 7fb4477e0..0b66fe852 100644
--- a/src/jogl/classes/com/jogamp/math/Vec3d.java
+++ b/src/jogl/classes/com/jogamp/math/Vec3d.java
@@ -108,6 +108,14 @@ public final class Vec3d {
return this;
}
+ /** xyz[0..2] = this.{x, y, z}, returns this. */
+ public Vec3d toArray(final double[/*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 double val) {
switch (i) {