From 0f296670cc492cef317342832d3e131fd6d76aba Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Mon, 19 Aug 2019 17:26:30 +0300 Subject: [PATCH] Refactoring of SCL interfaces for g3d. gitlab #28 Change-Id: I79893888975610f78c850410d7dcd8d9df4662aa --- .../scl/G3D/Math/AxisAngle4d.scl | 48 ++++++++ .../scl/{g3d/math => G3D/Math}/MathTools.scl | 3 +- .../scl/{g3d/math => G3D/Math}/Point3d.scl | 11 +- org.simantics.g3d/scl/G3D/Math/Quat4d.scl | 84 ++++++++++++++ org.simantics.g3d/scl/G3D/Math/Tuple3d.scl | 108 ++++++++++++++++++ org.simantics.g3d/scl/G3D/Math/Vector3d.scl | 75 ++++++++++++ .../scl/{g3d => G3D}/SCLUtil.scl | 0 .../scenegraph => G3D/Scenegraph}/G3DNode.scl | 4 +- .../Scenegraph}/G3DParentNode.scl | 4 +- .../scenegraph => G3D/Scenegraph}/Node.scl | 0 org.simantics.g3d/scl/g3d/math/AxisAngle4d | 20 ---- org.simantics.g3d/scl/g3d/math/Quat4d.scl | 36 ------ org.simantics.g3d/scl/g3d/math/Tuple3d.scl | 25 ---- org.simantics.g3d/scl/g3d/math/Vector3d.scl | 24 ---- .../Scenegraph}/EndComponent.scl | 0 .../Scenegraph}/Equipment.scl | 0 .../Scenegraph}/InlineComponent.scl | 0 .../Scenegraph}/Nozzle.scl | 0 .../Scenegraph}/P3DNode.scl | 4 +- .../Scenegraph}/P3DParentNode.scl | 4 +- .../Scenegraph}/P3DRootNode.scl | 6 +- .../Scenegraph}/PipelineComponent.scl | 6 +- .../Scenegraph}/TurnComponent.scl | 2 +- .../utils => Plant3d/Utils}/Loader.scl | 2 +- .../Utils}/P3DScriptNodeMap.scl | 0 .../utils => Plant3d/Utils}/P3DUtil.scl | 0 26 files changed, 342 insertions(+), 124 deletions(-) create mode 100644 org.simantics.g3d/scl/G3D/Math/AxisAngle4d.scl rename org.simantics.g3d/scl/{g3d/math => G3D/Math}/MathTools.scl (88%) rename org.simantics.g3d/scl/{g3d/math => G3D/Math}/Point3d.scl (58%) create mode 100644 org.simantics.g3d/scl/G3D/Math/Quat4d.scl create mode 100644 org.simantics.g3d/scl/G3D/Math/Tuple3d.scl create mode 100644 org.simantics.g3d/scl/G3D/Math/Vector3d.scl rename org.simantics.g3d/scl/{g3d => G3D}/SCLUtil.scl (100%) rename org.simantics.g3d/scl/{g3d/scenegraph => G3D/Scenegraph}/G3DNode.scl (89%) rename org.simantics.g3d/scl/{g3d/scenegraph => G3D/Scenegraph}/G3DParentNode.scl (90%) rename org.simantics.g3d/scl/{g3d/scenegraph => G3D/Scenegraph}/Node.scl (100%) delete mode 100644 org.simantics.g3d/scl/g3d/math/AxisAngle4d delete mode 100644 org.simantics.g3d/scl/g3d/math/Quat4d.scl delete mode 100644 org.simantics.g3d/scl/g3d/math/Tuple3d.scl delete mode 100644 org.simantics.g3d/scl/g3d/math/Vector3d.scl rename org.simantics.plant3d/scl/{plant3d/scenegraph => Plant3d/Scenegraph}/EndComponent.scl (100%) rename org.simantics.plant3d/scl/{plant3d/scenegraph => Plant3d/Scenegraph}/Equipment.scl (100%) rename org.simantics.plant3d/scl/{plant3d/scenegraph => Plant3d/Scenegraph}/InlineComponent.scl (100%) rename org.simantics.plant3d/scl/{plant3d/scenegraph => Plant3d/Scenegraph}/Nozzle.scl (100%) rename org.simantics.plant3d/scl/{plant3d/scenegraph => Plant3d/Scenegraph}/P3DNode.scl (90%) rename org.simantics.plant3d/scl/{plant3d/scenegraph => Plant3d/Scenegraph}/P3DParentNode.scl (91%) rename org.simantics.plant3d/scl/{plant3d/scenegraph => Plant3d/Scenegraph}/P3DRootNode.scl (72%) rename org.simantics.plant3d/scl/{plant3d/scenegraph => Plant3d/Scenegraph}/PipelineComponent.scl (97%) rename org.simantics.plant3d/scl/{plant3d/scenegraph => Plant3d/Scenegraph}/TurnComponent.scl (95%) rename org.simantics.plant3d/scl/{plant3d/utils => Plant3d/Utils}/Loader.scl (82%) rename org.simantics.plant3d/scl/{plant3d/utils => Plant3d/Utils}/P3DScriptNodeMap.scl (100%) rename org.simantics.plant3d/scl/{plant3d/utils => Plant3d/Utils}/P3DUtil.scl (100%) diff --git a/org.simantics.g3d/scl/G3D/Math/AxisAngle4d.scl b/org.simantics.g3d/scl/G3D/Math/AxisAngle4d.scl new file mode 100644 index 00000000..0cc616a9 --- /dev/null +++ b/org.simantics.g3d/scl/G3D/Math/AxisAngle4d.scl @@ -0,0 +1,48 @@ +import "./Vector3d" + +import "JavaBuiltin" as Java + +importJava "javax.vecmath.AxisAngle4d" where + // Immutable mapping + data AxisAngle4d + + @JavaName "" + createAxisAngle4d :: Double -> Double -> Double -> Double -> AxisAngle4d + @JavaName "" + createAxisAngle4d2 :: Vector3d -> Double -> AxisAngle4d + @JavaName "" + defaultAxisAngle4d :: AxisAngle4d + + getX :: AxisAngle4d -> Double + getY :: AxisAngle4d -> Double + getZ :: AxisAngle4d -> Double + getAngle :: AxisAngle4d -> Double + + // Mutable mapping + data MAxisAngle4d + + @JavaName "" + createMAxisAngle4d :: Double -> Double -> Double -> Double -> MAxisAngle4d + @JavaName "" + createMAxisAngle4d2 :: Vector3d -> Double -> MAxisAngle4d + @JavaName "" + defaultMAxisAngle4d :: MAxisAngle4d + @JavaName "" + copyMAxisAngle4d :: AxisAngle4d -> MAxisAngle4d + + @JavaName getX + getXM :: MAxisAngle4d -> Double + @JavaName getY + getYM :: MAxisAngle4d -> Double + @JavaName getZ + getZM :: MAxisAngle4d -> Double + @JavaName getAngle + getAngleM :: MAxisAngle4d -> Double + + setX :: MAxisAngle4d -> Double -> () + setY :: MAxisAngle4d -> Double -> () + setZ :: MAxisAngle4d -> Double -> () + setAngle :: MAxisAngle4d -> Double -> () + +freeze :: MAxisAngle4d -> AxisAngle4d +freeze = Java.unsafeCoerce diff --git a/org.simantics.g3d/scl/g3d/math/MathTools.scl b/org.simantics.g3d/scl/G3D/Math/MathTools.scl similarity index 88% rename from org.simantics.g3d/scl/g3d/math/MathTools.scl rename to org.simantics.g3d/scl/G3D/Math/MathTools.scl index 9f9d76fd..d899edcc 100644 --- a/org.simantics.g3d/scl/g3d/math/MathTools.scl +++ b/org.simantics.g3d/scl/G3D/Math/MathTools.scl @@ -4,10 +4,11 @@ importJava "org.simantics.g3d.math.MathTools" where @JavaName equals equalsd :: Double -> Double -> Boolean + @JavaName equals equalst :: T3.Tuple3d -> T3.Tuple3d -> Boolean distance :: T3.Tuple3d -> T3.Tuple3d -> Double distanceSquared :: T3.Tuple3d -> T3.Tuple3d -> Double - isValid :: T3.Tuple3d -> Boolean \ No newline at end of file + isValid :: T3.Tuple3d -> Boolean 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 diff --git a/org.simantics.g3d/scl/G3D/Math/Quat4d.scl b/org.simantics.g3d/scl/G3D/Math/Quat4d.scl new file mode 100644 index 00000000..de4497a7 --- /dev/null +++ b/org.simantics.g3d/scl/G3D/Math/Quat4d.scl @@ -0,0 +1,84 @@ +import "JavaBuiltin" as Java + +importJava "javax.vecmath.Quat4d" where + // Immutable binding + data Quat4d + + @JavaName "" + createQuat4d :: Double -> Double -> Double -> Double -> Quat4d + @JavaName "" + copyQuat4d :: Quat4d -> Quat4d + @JavaName "" + defaultQuat4d :: Quat4d + + getX :: Quat4d -> Double + getY :: Quat4d -> Double + getZ :: Quat4d -> Double + getW :: Quat4d -> Double + + // Mutable binding + data MQuat4d + + @JavaName "" + createMQuat4d :: Double -> Double -> Double -> Double -> MQuat4d + @JavaName "" + copyMQuat4d :: Quat4d -> MQuat4d + @JavaName "" + defaultMQuat4d :: MQuat4d + + @JavaName getX + getXM :: MQuat4d -> Double + @JavaName getY + getYM :: MQuat4d -> Double + @JavaName getZ + getZM :: MQuat4d -> Double + @JavaName getW + getWM:: MQuat4d -> Double + setX :: MQuat4d -> Double -> () + setY :: MQuat4d -> Double -> () + setZ :: MQuat4d -> Double -> () + setW :: MQuat4d -> Double -> () + + @JavaName mul + mulM :: MQuat4d -> Quat4d -> () + @JavaName mul + mulM2 :: MQuat4d -> Quat4d -> Quat4d -> () + + @JavaName mulInverse + mulInverseM :: MQuat4d -> Quat4d -> () + @JavaName mulInverse + mulInverseM2 :: MQuat4d -> Quat4d -> Quat4d -> () + + @JavaName inverse + inverseM :: MQuat4d -> () + @JavaName inverse + inverseM2 :: MQuat4d -> Quat4d -> () + + @JavaName normalize + normalizeM :: MQuat4d -> () + @JavaName normalize + normalizeM2 :: MQuat4d -> Quat4d -> () + +freeze :: MQuat4d -> Quat4d +freeze = Java.unsafeCoerce + +// Mapping of mutable operations to immutable ones + +@private +applyMOp :: (MQuat4d -> ()) -> Quat4d -> Quat4d +applyMOp op x = runProc let + z = copyMQuat4d x + op z + in freeze z + +mul :: Quat4d -> Quat4d -> Quat4d +mul x y = applyMOp (flip mulM y) x + +mulInverse :: Quat4d -> Quat4d -> Quat4d +mulInverse x y = applyMOp (flip mulInverseM y) x + +inverse :: Quat4d -> Quat4d +inverse = applyMOp inverseM + +normalize :: Quat4d -> Quat4d +normalize = applyMOp normalizeM diff --git a/org.simantics.g3d/scl/G3D/Math/Tuple3d.scl b/org.simantics.g3d/scl/G3D/Math/Tuple3d.scl new file mode 100644 index 00000000..f7779405 --- /dev/null +++ b/org.simantics.g3d/scl/G3D/Math/Tuple3d.scl @@ -0,0 +1,108 @@ +import "JavaBuiltin" as Java + +importJava "javax.vecmath.Tuple3d" where + // Immutable mapping + data Tuple3d + + @private + @JavaName getX + getX' :: Tuple3d -> Double + @private + @JavaName getY + getY' :: Tuple3d -> Double + @private + @JavaName getZ + getZ' :: Tuple3d -> Double + + // Mutable mapping + data MTuple3d + + @JavaName getX + getXM :: MTuple3d -> Double + @JavaName getY + getYM :: MTuple3d -> Double + @JavaName getZ + getZM :: MTuple3d -> Double + + setX :: MTuple3d -> Double -> () + setY :: MTuple3d -> Double -> () + setZ :: MTuple3d -> Double -> () + + @JavaName add + addM :: MTuple3d -> Tuple3d -> () + @JavaName add + addM2 :: MTuple3d -> Tuple3d -> Tuple3d -> () + + @JavaName sub + subM :: MTuple3d -> Tuple3d -> () + @JavaName sub + subM2 :: MTuple3d -> Tuple3d -> Tuple3d -> () + + @JavaName negate + negateM :: MTuple3d -> () + @JavaName negate + negateM2 :: MTuple3d -> Tuple3d -> () + + @JavaName scale + scaleM :: MTuple3d -> Double -> () + @JavaName scale + scaleM2 :: MTuple3d -> Double -> Tuple3d -> () + + @private + clone :: Tuple3d -> a + +copyMTuple3d :: Tuple3d -> MTuple3d +copyMTuple3d = Java.unsafeCoerce . clone + +@private +applyMOp :: (MTuple3d -> ()) -> Tuple3d -> Tuple3d +applyMOp f x = runProc let + z = copyMTuple3d x + f z + in freeze z + +freeze :: MTuple3d -> Tuple3d +freeze = Java.unsafeCoerce + +addTuple x y = applyMOp (flip addM y) x +subTuple x y = applyMOp (flip subM y) x +negateTuple = applyMOp negateM +scaleTuple x s = applyMOp (flip scaleM s) x + +class Tuple3dClass a where + asTuple :: a -> Tuple3d + asTuple = Java.unsafeCoerce + + asMTuple :: a -> MTuple3d + asMTuple x = copyMTuple3d (asTuple x) + + getX :: a -> Double + getX = getX' . asTuple + + getY :: a -> Double + getY = getY' . asTuple + + getZ :: a -> Double + getZ = getZ' . asTuple + + add :: a -> a -> a + add x y = Java.unsafeCoerce $ addTuple (asTuple x) (asTuple y) + + sub :: a -> a -> a + sub x y = Java.unsafeCoerce $ subTuple (asTuple x) (asTuple y) + + negate :: a -> a + negate x = Java.unsafeCoerce $ negateTuple (asTuple x) + + scale :: a -> Double -> a + scale x s = Java.unsafeCoerce $ scaleTuple (asTuple x) s + +instance Tuple3dClass Tuple3d where + asTuple = id + getX = getX' + getY = getY' + getZ = getZ' + add = addTuple + sub = subTuple + negate = negateTuple + scale = scaleTuple diff --git a/org.simantics.g3d/scl/G3D/Math/Vector3d.scl b/org.simantics.g3d/scl/G3D/Math/Vector3d.scl new file mode 100644 index 00000000..cab23538 --- /dev/null +++ b/org.simantics.g3d/scl/G3D/Math/Vector3d.scl @@ -0,0 +1,75 @@ +import "./Tuple3d" + +import "JavaBuiltin" as Java + +importJava "javax.vecmath.Vector3d" where + // Immutable mapping + data Vector3d + + dot :: Vector3d -> Vector3d -> Double + + length :: Vector3d -> Double + lengthSquared :: Vector3d -> Double + + angle :: Vector3d -> Vector3d -> Double + + @JavaName "" + createVector3d :: Double -> Double -> Double -> Vector3d + @JavaName "" + copyVector3d' :: Tuple3d -> Vector3d + @JavaName "" + defaultVector3d :: Vector3d + + // Mutable mapping + data MVector3d + + @JavaName cross + crossM :: MVector3d -> Vector3d -> Vector3d -> () + + @JavaName normalize + normalizeM :: MVector3d -> () + + @JavaName normalize + normalizeM2 :: MVector3d -> Vector3d -> () + + @JavaName dot + dotM :: MVector3d -> MVector3d -> Double + + @JavaName length + lengthM :: MVector3d -> Double + @JavaName lengthSquared + lengthSquaredM :: MVector3d -> Double + + @JavaName angle + angleM :: MVector3d -> MVector3d -> Double + + @JavaName "" + createMVector3d :: Double -> Double -> Double -> MVector3d + @JavaName "" + copyMVector3d' :: Tuple3d -> MVector3d + @JavaName "" + defaultMVector3d :: MVector3d + +@private +applyMOp :: (MVector3d -> ()) -> ( MVector3d) -> Vector3d +applyMOp op gen = runProc let + z = gen + op z + in freeze z + +normalize :: Vector3d -> Vector3d +normalize v = applyMOp normalizeM (copyMVector3d (asTuple v)) + +cross :: Vector3d -> Vector3d -> Vector3d +cross x y = applyMOp (\z -> crossM z x y) defaultMVector3d + +freeze :: MVector3d -> Vector3d +freeze = Java.unsafeCoerce + +instance Tuple3dClass Vector3d + +copyVector3d :: Tuple3dClass a => a -> Vector3d +copyVector3d = copyVector3d' . asTuple + +copyMVector3d :: Tuple3dClass a => a -> MVector3d +copyMVector3d = copyMVector3d' . asTuple diff --git a/org.simantics.g3d/scl/g3d/SCLUtil.scl b/org.simantics.g3d/scl/G3D/SCLUtil.scl similarity index 100% rename from org.simantics.g3d/scl/g3d/SCLUtil.scl rename to org.simantics.g3d/scl/G3D/SCLUtil.scl diff --git a/org.simantics.g3d/scl/g3d/scenegraph/G3DNode.scl b/org.simantics.g3d/scl/G3D/Scenegraph/G3DNode.scl similarity index 89% rename from org.simantics.g3d/scl/g3d/scenegraph/G3DNode.scl rename to org.simantics.g3d/scl/G3D/Scenegraph/G3DNode.scl index 64b68090..14b362f8 100644 --- a/org.simantics.g3d/scl/g3d/scenegraph/G3DNode.scl +++ b/org.simantics.g3d/scl/G3D/Scenegraph/G3DNode.scl @@ -1,5 +1,5 @@ -import "g3d/math/Vector3d" -import "g3d/math/Quat4d" +import "G3D/Math/Vector3d" +import "G3D/Math/Quat4d" importJava "org.simantics.g3d.scenegraph.G3DNode" where data G3DNode diff --git a/org.simantics.g3d/scl/g3d/scenegraph/G3DParentNode.scl b/org.simantics.g3d/scl/G3D/Scenegraph/G3DParentNode.scl similarity index 90% rename from org.simantics.g3d/scl/g3d/scenegraph/G3DParentNode.scl rename to org.simantics.g3d/scl/G3D/Scenegraph/G3DParentNode.scl index d9e9214f..d62af17c 100644 --- a/org.simantics.g3d/scl/g3d/scenegraph/G3DParentNode.scl +++ b/org.simantics.g3d/scl/G3D/Scenegraph/G3DParentNode.scl @@ -1,5 +1,5 @@ -import "g3d/math/Vector3d" -import "g3d/math/Quat4d" +import "G3D/Math/Vector3d" +import "G3D/Math/Quat4d" importJava "org.simantics.g3d.scenegraph.G3DparentNode" where data G3DParentNode diff --git a/org.simantics.g3d/scl/g3d/scenegraph/Node.scl b/org.simantics.g3d/scl/G3D/Scenegraph/Node.scl similarity index 100% rename from org.simantics.g3d/scl/g3d/scenegraph/Node.scl rename to org.simantics.g3d/scl/G3D/Scenegraph/Node.scl diff --git a/org.simantics.g3d/scl/g3d/math/AxisAngle4d b/org.simantics.g3d/scl/g3d/math/AxisAngle4d deleted file mode 100644 index ed15467a..00000000 --- a/org.simantics.g3d/scl/g3d/math/AxisAngle4d +++ /dev/null @@ -1,20 +0,0 @@ -import "./Tuple3d" - -importJava "javax.vecmath.AxisAngle4d" where - data AxisAngle4d - - @JavaName "" - createAxisAngle4d -> Double -> Double -> Double -> Double -> AxisAngle4d - @JavaName "" - createAxisAngle4d2 -> Tuple3d -> Double -> AxisAngle4d - @JavaName "" - defaultAxisAngle4d -> AxisAngle4d - - getX :: AxisAngle4d -> Double - getY :: AxisAngle4d -> Double - getZ :: AxisAngle4d -> Double - getAngle :: AxisAngle4d -> Double - setX :: AxisAngle4d -> Double -> () - setY :: AxisAngle4d -> Double -> () - setZ :: AxisAngle4d -> Double -> () - setAngle :: AxisAngle4d -> Double -> () \ No newline at end of file diff --git a/org.simantics.g3d/scl/g3d/math/Quat4d.scl b/org.simantics.g3d/scl/g3d/math/Quat4d.scl deleted file mode 100644 index a9910dc6..00000000 --- a/org.simantics.g3d/scl/g3d/math/Quat4d.scl +++ /dev/null @@ -1,36 +0,0 @@ - -importJava "javax.vecmath.Quat4d" where - data Quat4d - - @JavaName "" - createQuat4d :: Double -> Double -> Double -> Double -> Quat4d - @JavaName "" - copyQuat4d :: Quat4d -> Quat4d - @JavaName "" - defaultQuat4d :: Quat4d - - getX :: Quat4d -> Double - getY :: Quat4d -> Double - getZ :: Quat4d -> Double - getW:: Quat4d -> Double - setX :: Quat4d -> Double -> () - setY :: Quat4d -> Double -> () - setZ :: Quat4d -> Double -> () - setW :: Quat4d -> Double -> () - - mul :: Quat4d -> Quat4d -> () - @JavaName mul - mul2 :: Quat4d -> Quat4d -> Quat4d ->() - - mulInverse :: Quat4d -> Quat4d -> () - @JavaName mulInverse - mulInverse2 :: Quat4d -> Quat4d -> Quat4d ->() - - inverse :: Quat4d -> () - @JavaName inverse - inverse2 :: Quat4d -> Quat4d ->() - - normalize :: Quat4d -> () - @JavaName normalize - normalize2 :: Quat4d -> Quat4d ->() - \ No newline at end of file diff --git a/org.simantics.g3d/scl/g3d/math/Tuple3d.scl b/org.simantics.g3d/scl/g3d/math/Tuple3d.scl deleted file mode 100644 index 0126c41b..00000000 --- a/org.simantics.g3d/scl/g3d/math/Tuple3d.scl +++ /dev/null @@ -1,25 +0,0 @@ -importJava "javax.vecmath.Tuple3d" where - data Tuple3d - - getX :: Tuple3d -> Double - getY :: Tuple3d -> Double - getZ :: Tuple3d -> Double - setX :: Tuple3d -> Double -> () - setY :: Tuple3d -> Double -> () - setZ :: Tuple3d -> Double -> () - - add :: Tuple3d -> Tuple3d -> () - @JavaName add - add2 :: Tuple3d -> Tuple3d -> Tuple3d -> () - - sub :: Tuple3d -> Tuple3d -> () - @JavaName sub - sub2 :: Tuple3d -> Tuple3d -> Tuple3d -> () - - negate :: Tuple3d -> () - @JavaName negate - negate2 :: Tuple3d -> Tuple3d -> () - - scale :: Tuple3d -> Double -> () - @JavaName scale - scale2 :: Tuple3d -> Double -> Tuple3d -> () \ No newline at end of file diff --git a/org.simantics.g3d/scl/g3d/math/Vector3d.scl b/org.simantics.g3d/scl/g3d/math/Vector3d.scl deleted file mode 100644 index b2c9243d..00000000 --- a/org.simantics.g3d/scl/g3d/math/Vector3d.scl +++ /dev/null @@ -1,24 +0,0 @@ -import "./Tuple3d" - -importJava "javax.vecmath.Vector3d" where - data Vector3d - - cross :: Vector3d -> Vector3d -> Vector3d -> () - - normalize :: Vector3d -> () - @JavaName normalize - normalize_2 :: Vector3d -> Vector3d -> () - - dot :: Vector3d -> Vector3d -> Double - - length :: Vector3d -> Double - lengthSquared :: Vector3d -> Double - - angle :: Vector3d -> Vector3d -> Double - - @JavaName "" - createVector3d :: Double -> Double -> Double -> Vector3d - @JavaName "" - copyVector3d :: Tuple3d -> Vector3d - @JavaName "" - defaultVector3d :: Vector3d \ No newline at end of file diff --git a/org.simantics.plant3d/scl/plant3d/scenegraph/EndComponent.scl b/org.simantics.plant3d/scl/Plant3d/Scenegraph/EndComponent.scl similarity index 100% rename from org.simantics.plant3d/scl/plant3d/scenegraph/EndComponent.scl rename to org.simantics.plant3d/scl/Plant3d/Scenegraph/EndComponent.scl diff --git a/org.simantics.plant3d/scl/plant3d/scenegraph/Equipment.scl b/org.simantics.plant3d/scl/Plant3d/Scenegraph/Equipment.scl similarity index 100% rename from org.simantics.plant3d/scl/plant3d/scenegraph/Equipment.scl rename to org.simantics.plant3d/scl/Plant3d/Scenegraph/Equipment.scl diff --git a/org.simantics.plant3d/scl/plant3d/scenegraph/InlineComponent.scl b/org.simantics.plant3d/scl/Plant3d/Scenegraph/InlineComponent.scl similarity index 100% rename from org.simantics.plant3d/scl/plant3d/scenegraph/InlineComponent.scl rename to org.simantics.plant3d/scl/Plant3d/Scenegraph/InlineComponent.scl diff --git a/org.simantics.plant3d/scl/plant3d/scenegraph/Nozzle.scl b/org.simantics.plant3d/scl/Plant3d/Scenegraph/Nozzle.scl similarity index 100% rename from org.simantics.plant3d/scl/plant3d/scenegraph/Nozzle.scl rename to org.simantics.plant3d/scl/Plant3d/Scenegraph/Nozzle.scl diff --git a/org.simantics.plant3d/scl/plant3d/scenegraph/P3DNode.scl b/org.simantics.plant3d/scl/Plant3d/Scenegraph/P3DNode.scl similarity index 90% rename from org.simantics.plant3d/scl/plant3d/scenegraph/P3DNode.scl rename to org.simantics.plant3d/scl/Plant3d/Scenegraph/P3DNode.scl index 1b30d88c..b80f401a 100644 --- a/org.simantics.plant3d/scl/plant3d/scenegraph/P3DNode.scl +++ b/org.simantics.plant3d/scl/Plant3d/Scenegraph/P3DNode.scl @@ -1,5 +1,5 @@ -import "g3d/math/Vector3d" -import "g3d/math/Quat4d" +import "G3D/Math/Vector3d" +import "G3D/Math/Quat4d" importJava "org.simantics.plant3d.scenegraph.P3DNode" where data P3DNode diff --git a/org.simantics.plant3d/scl/plant3d/scenegraph/P3DParentNode.scl b/org.simantics.plant3d/scl/Plant3d/Scenegraph/P3DParentNode.scl similarity index 91% rename from org.simantics.plant3d/scl/plant3d/scenegraph/P3DParentNode.scl rename to org.simantics.plant3d/scl/Plant3d/Scenegraph/P3DParentNode.scl index 05e7c1f2..e2b40c32 100644 --- a/org.simantics.plant3d/scl/plant3d/scenegraph/P3DParentNode.scl +++ b/org.simantics.plant3d/scl/Plant3d/Scenegraph/P3DParentNode.scl @@ -1,5 +1,5 @@ -import "g3d/math/Vector3d" -import "g3d/math/Quat4d" +import "G3D/Math/Vector3d" +import "G3D/Math/Quat4d" importJava "org.simantics.plant3d.scenegraph.P3DParentNode" where data P3DParentNode diff --git a/org.simantics.plant3d/scl/plant3d/scenegraph/P3DRootNode.scl b/org.simantics.plant3d/scl/Plant3d/Scenegraph/P3DRootNode.scl similarity index 72% rename from org.simantics.plant3d/scl/plant3d/scenegraph/P3DRootNode.scl rename to org.simantics.plant3d/scl/Plant3d/Scenegraph/P3DRootNode.scl index 29648fe0..85e162d4 100644 --- a/org.simantics.plant3d/scl/plant3d/scenegraph/P3DRootNode.scl +++ b/org.simantics.plant3d/scl/Plant3d/Scenegraph/P3DRootNode.scl @@ -1,6 +1,6 @@ -import "g3d/math/Vector3d" -import "g3d/math/Quat4d" -import "g3d/scenegraph/Node" +import "G3D/Math/Vector3d" +import "G3D/Math/Quat4d" +import "G3D/Scenegraph/Node" importJava "org.simantics.plant3d.scenegraph.P3DRootNode" where data P3DRootNode diff --git a/org.simantics.plant3d/scl/plant3d/scenegraph/PipelineComponent.scl b/org.simantics.plant3d/scl/Plant3d/Scenegraph/PipelineComponent.scl similarity index 97% rename from org.simantics.plant3d/scl/plant3d/scenegraph/PipelineComponent.scl rename to org.simantics.plant3d/scl/Plant3d/Scenegraph/PipelineComponent.scl index f8eab176..f4b62156 100644 --- a/org.simantics.plant3d/scl/plant3d/scenegraph/PipelineComponent.scl +++ b/org.simantics.plant3d/scl/Plant3d/Scenegraph/PipelineComponent.scl @@ -1,6 +1,6 @@ -import "g3d/math/Tuple3d" -import "g3d/math/Quat4d" -import "g3d/math/Vector3d" +import "G3D/Math/Tuple3d" +import "G3D/Math/Quat4d" +import "G3D/Math/Vector3d" importJava "org.simantics.plant3d.scenegraph.PipelineComponent" where data PipelineComponent diff --git a/org.simantics.plant3d/scl/plant3d/scenegraph/TurnComponent.scl b/org.simantics.plant3d/scl/Plant3d/Scenegraph/TurnComponent.scl similarity index 95% rename from org.simantics.plant3d/scl/plant3d/scenegraph/TurnComponent.scl rename to org.simantics.plant3d/scl/Plant3d/Scenegraph/TurnComponent.scl index c5be3778..f6a765f7 100644 --- a/org.simantics.plant3d/scl/plant3d/scenegraph/TurnComponent.scl +++ b/org.simantics.plant3d/scl/Plant3d/Scenegraph/TurnComponent.scl @@ -1,6 +1,6 @@ import "./PipelineComponent" -import "g3d/math/Vector3d" +import "G3D/Math/Vector3d" importJava "org.simantics.plant3d.scenegraph.TurnComponent" where data TurnComponent diff --git a/org.simantics.plant3d/scl/plant3d/utils/Loader.scl b/org.simantics.plant3d/scl/Plant3d/Utils/Loader.scl similarity index 82% rename from org.simantics.plant3d/scl/plant3d/utils/Loader.scl rename to org.simantics.plant3d/scl/Plant3d/Utils/Loader.scl index 6b2f2d99..a3371156 100644 --- a/org.simantics.plant3d/scl/plant3d/utils/Loader.scl +++ b/org.simantics.plant3d/scl/Plant3d/Utils/Loader.scl @@ -1,5 +1,5 @@ import "Simantics/DB" -import "plant3d/scenegraph/P3DRootNode" +import "Plant3d/Scenegraph/P3DRootNode" import "./P3DScriptNodeMap" importJava "org.simantics.plant3d.scl.SCLUtil" where diff --git a/org.simantics.plant3d/scl/plant3d/utils/P3DScriptNodeMap.scl b/org.simantics.plant3d/scl/Plant3d/Utils/P3DScriptNodeMap.scl similarity index 100% rename from org.simantics.plant3d/scl/plant3d/utils/P3DScriptNodeMap.scl rename to org.simantics.plant3d/scl/Plant3d/Utils/P3DScriptNodeMap.scl diff --git a/org.simantics.plant3d/scl/plant3d/utils/P3DUtil.scl b/org.simantics.plant3d/scl/Plant3d/Utils/P3DUtil.scl similarity index 100% rename from org.simantics.plant3d/scl/plant3d/utils/P3DUtil.scl rename to org.simantics.plant3d/scl/Plant3d/Utils/P3DUtil.scl -- 2.47.1