X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.g3d%2Fscl%2FG3D%2FMath%2FPoint3d.scl;fp=org.simantics.g3d%2Fscl%2Fg3d%2Fmath%2FPoint3d.scl;h=51c8e54138377fa8b7fa56cdbd7d62d44b2d275f;hb=0f296670cc492cef317342832d3e131fd6d76aba;hp=11012aa4e7960b4bc7d6539252eab55ef48863fb;hpb=333af611947bc5cf7f7212b2fa36d6b7f3b37899;p=simantics%2F3d.git diff --git a/org.simantics.g3d/scl/g3d/math/Point3d.scl b/org.simantics.g3d/scl/G3D/Math/Point3d.scl similarity index 58% rename from org.simantics.g3d/scl/g3d/math/Point3d.scl rename to org.simantics.g3d/scl/G3D/Math/Point3d.scl index 11012aa4..51c8e541 100644 --- a/org.simantics.g3d/scl/g3d/math/Point3d.scl +++ b/org.simantics.g3d/scl/G3D/Math/Point3d.scl @@ -1,5 +1,7 @@ import "./Tuple3d" +import "JavaBuiltin" as Java + importJava "javax.vecmath.Point3d" where data Point3d @@ -9,6 +11,11 @@ importJava "javax.vecmath.Point3d" where @JavaName "" createPoint3d :: Double -> Double -> Double -> Point3d @JavaName "" - copyPoint3d :: Tuple3d -> Point3d + copyPoint3d' :: Tuple3d -> Point3d @JavaName "" - defaultPoint3d :: Point3d \ No newline at end of file + defaultPoint3d :: Point3d + +instance Tuple3dClass Point3d + +copyPoint3d :: Tuple3dClass a => a -> Point3d +copyPoint3d = copyPoint3d' . asTuple