-import "./Tuple3d"
+include "./Tuple3d"
import "JavaBuiltin" as Java
+import "JavaBuiltin" as Java
+
import "G3D/Math/Vector3d"
import "G3D/Math/Quat4d"
-importJava "org.simantics.g3d.scenegraph.G3DNode" where
+include "./Node"
+
+importJava "org.simantics.g3d.scenegraph.IG3DNode" where
data G3DNode
- getOrientation :: G3DNode -> Quat4d
- getPosition :: G3DNode -> Vector3d
+ @JavaName getOrientation
+ getOrientation' :: G3DNode -> Quat4d
+ @JavaName getPosition
+ getPosition' :: G3DNode -> Vector3d
+
+ @JavaName setOrientation
+ setOrientation' :: G3DNode -> Quat4d -> ()
+ @JavaName setPosition
+ setPosition' :: G3DNode -> Vector3d -> ()
+
+ @JavaName getWorldOrientation
+ getWorldOrientation' :: G3DNode -> Quat4d
+ @JavaName getWorldPosition
+ getWorldPosition' :: G3DNode -> Vector3d
- setOrientation :: G3DNode -> Quat4d -> ()
- setPosition :: G3DNode -> Vector3d -> ()
+ @JavaName setWorldOrientation
+ setWorldOrientation' :: G3DNode -> Quat4d -> ()
+ @JavaName setWorldPosition
+ setWorldPosition' :: G3DNode -> Vector3d -> ()
+
+class G3DNodeClass a where
+ asG3DNode :: a -> G3DNode
+ asG3DNode = Java.unsafeCoerce
+
+ getOrientation :: a -> Quat4d
+ getOrientation c = getOrientation' (asG3DNode c)
+ getPosition :: a -> Vector3d
+ getPosition c = getPosition' (asG3DNode c)
- getWorldOrientation :: G3DNode -> Quat4d
- getWorldPosition :: G3DNode -> Vector3d
+ setOrientation :: a -> Quat4d -> ()
+ setOrientation c = setOrientation' (asG3DNode c)
+ setPosition :: a -> Vector3d -> ()
+ setPosition c = setPosition' (asG3DNode c)
- setWorldOrientation :: G3DNode -> Quat4d -> ()
- setWorldPosition :: G3DNode -> Vector3d -> ()
\ No newline at end of file
+ getWorldOrientation :: a -> Quat4d
+ getWorldOrientation c = getWorldOrientation' (asG3DNode c)
+ getWorldPosition :: a -> Vector3d
+ getWorldPosition c = getWorldPosition' (asG3DNode c)
+
+ setWorldOrientation :: a -> Quat4d -> ()
+ setWorldOrientation c = setWorldOrientation' (asG3DNode c)
+ setWorldPosition :: a -> Vector3d -> ()
+ setWorldPosition c = setWorldPosition' (asG3DNode c)
+
+instance NodeClass G3DNode
+instance G3DNodeClass G3DNode where
+ asG3DNode = id
+++ /dev/null
-import "G3D/Math/Vector3d"
-import "G3D/Math/Quat4d"
-
-importJava "org.simantics.g3d.scenegraph.G3DparentNode" where
- data G3DParentNode
-
- getOrientation :: G3DParentNode -> Quat4d
- getPosition :: G3DParentNode -> Vector3d
-
- setOrientation :: G3DParentNode -> Quat4d -> ()
- setPosition :: G3DParentNode -> Vector3d -> ()
-
- getWorldOrientation :: G3DParentNode -> Quat4d
- getWorldPosition :: G3DParentNode -> Vector3d
-
- setWorldOrientation :: G3DParentNode -> Quat4d -> ()
- setWorldPosition :: G3DParentNode -> Vector3d -> ()
\ No newline at end of file
-
-
-importJava "org.simantics.g3d.scenegraph.base.INode" where
- data INode
+import "JavaBuiltin" as Java
importJava "org.simantics.g3d.scenegraph.base.ParentNode" where
data ParentNode
- addNode :: ParentNode -> String -> INode -> ()
- removeNode :: ParentNode -> String -> INode -> Boolean
- deattachNode :: ParentNode -> String -> INode -> Boolean
+ @JavaName addNode
+ addNode' :: ParentNode -> String -> Node -> ()
+ @JavaName removeNode
+ removeNode' :: ParentNode -> String -> Node -> Boolean
+ @JavaName deattachNode
+ deattachNode' :: ParentNode -> String -> Node -> Boolean
- removeNodes :: ParentNode -> String ->()
- getNodes :: ParentNode -> String -> [INode]
+ @JavaName removeNodes
+ removeNodes' :: ParentNode -> String ->()
@JavaName getNodes
- getAllNodes :: ParentNode -> [INode]
- remove :: ParentNode -> ()
+ getNodes' :: ParentNode -> String -> [Node]
+ @JavaName getNodes
+ getAllNodes' :: ParentNode -> [Node]
+ @JavaName remove
+ remove' :: ParentNode -> ()
+
+class ParentNodeClass a where
+ asParentNode :: a -> ParentNode
+ asParentNode = Java.unsafeCoerce
+
+ addNode :: a -> String -> Node -> ()
+ addNode c = addNode' (asParentNode c)
+ removeNode :: a -> String -> Node -> Boolean
+ removeNode c = removeNode' (asParentNode c)
+ deattachNode :: a -> String -> Node -> Boolean
+ deattachNode c = deattachNode' (asParentNode c)
+ removeNodes :: a -> String ->()
+ removeNodes c = removeNodes' (asParentNode c)
+ getNodes :: a -> String -> [Node]
+ getNodes c = getNodes' (asParentNode c)
+ remove :: a -> ()
+ remove c = remove' (asParentNode c)
+
+instance NodeClass ParentNode
+instance ParentNodeClass ParentNode where
+ asParentNode = id
-importJava "org.simantics.g3d.scenegraph.base.Node" where
+importJava "org.simantics.g3d.scenegraph.base.INode" where
data Node
- getParent :: Node -> Maybe ParentNode
- getRootNode :: Node -> Maybe ParentNode
- deattach :: Node -> ()
+ @JavaName getParent
+ getParent' :: Node -> Maybe ParentNode
+ @JavaName getRootNode
+ getRootNode' :: Node -> Maybe ParentNode
+ @JavaName deattach
+ deattach' :: Node -> ()
+
+class NodeClass a where
+ asNode :: a -> Node
+ asNode = Java.unsafeCoerce
+
+ getParent :: a -> Maybe ParentNode
+ getParent c = getParent' (asNode c)
+ getRootNode :: a -> Maybe ParentNode
+ getRootNode c = getRootNode' (asNode c)
+ deattach :: a -> ()
+ deattach c = deattach' (asNode c)
+
+instance NodeClass Node where
+ asNode = id
* Remove this node and its children from the scene graph.
*/
public void remove();
+
+ public void deattach();
public void addListener(NodeListener listener);
-import "./PipelineComponent"
+include "./PipelineComponent"
importJava "org.simantics.plant3d.scenegraph.EndComponent" where
data EndComponent
-
- getType :: EndComponent -> String
- getControlPoint :: EndComponent -> PipeControlPoint
- getPipeRun :: EndComponent -> Maybe PipeRun
\ No newline at end of file
+
+instance NodeClass EndComponent
+instance G3DNodeClass EndComponent
+instance P3DNodeClass EndComponent
+instance PipelineComponentClass EndComponent
+include "G3D/Scenegraph/Node"
+include "G3D/Scenegraph/G3DNode"
+
+include "./P3DNode"
+
import "./Nozzle"
importJava "org.simantics.plant3d.scenegraph.Equipment" where
data Equipment
- getType :: Equipment -> String
+ @JavaName getType
+ getEquipmentType :: Equipment -> String
addChild :: Equipment -> Nozzle -> ()
remChild :: Equipment -> Nozzle -> ()
getChild :: Equipment -> [Nozzle]
- numberOfFixedNozzles :: Equipment -> Integer
\ No newline at end of file
+ numberOfFixedNozzles :: Equipment -> Integer
+
+instance NodeClass Equipment
+instance ParentNodeClass Equipment
+instance G3DNodeClass Equipment
+instance P3DNodeClass Equipment
-import "./PipelineComponent"
+include "./PipelineComponent"
importJava "org.simantics.plant3d.scenegraph.InlineComponent" where
data InlineComponent
- getType :: InlineComponent -> String
- getControlPoint :: InlineComponent -> PipeControlPoint
- getPipeRun :: InlineComponent -> Maybe PipeRun
-
isVariableLength :: InlineComponent -> Boolean
getRotationAngle :: InlineComponent -> Maybe Double
setRotationAngle :: InlineComponent -> Maybe Double -> ()
isReversed :: InlineComponent -> Maybe Boolean
setReversed :: InlineComponent -> Maybe Boolean -> ()
-
\ No newline at end of file
+
+instance NodeClass InlineComponent
+instance G3DNodeClass InlineComponent
+instance P3DNodeClass InlineComponent
+instance PipelineComponentClass InlineComponent
-import "./PipelineComponent"
+include "./PipelineComponent"
importJava "org.simantics.plant3d.scenegraph.Nozzle" where
data Nozzle
- getType :: Nozzle -> String
- getControlPoint :: Nozzle -> PipeControlPoint
- getPipeRun :: Nozzle -> Maybe PipeRun
-
getNozzleId :: Nozzle -> Integer
isFixed :: Nozzle -> Boolean
isConnected :: Nozzle -> Boolean
-
\ No newline at end of file
+
+instance NodeClass Nozzle
+instance G3DNodeClass Nozzle
+instance P3DNodeClass Nozzle
+instance PipelineComponentClass Nozzle
-import "G3D/Math/Vector3d"
-import "G3D/Math/Quat4d"
+import "JavaBuiltin" as Java
-importJava "org.simantics.plant3d.scenegraph.P3DNode" where
+importJava "org.simantics.plant3d.scenegraph.IP3DVisualNode" where
data P3DNode
- getName :: P3DNode -> Maybe String
- setName :: P3DNode -> String -> ()
+ @JavaName getName
+ getName' :: P3DNode -> Maybe String
+ @JavaName setName
+ setName' :: P3DNode -> String -> ()
- getOrientation :: P3DNode -> Quat4d
- getPosition :: P3DNode -> Vector3d
-
- setOrientation :: P3DNode -> Quat4d -> ()
- setPosition :: P3DNode -> Vector3d -> ()
-
- getWorldOrientation :: P3DNode -> Quat4d
- getWorldPosition :: P3DNode -> Vector3d
-
- setWorldOrientation :: P3DNode -> Quat4d -> ()
- setWorldPosition :: P3DNode -> Vector3d -> ()
\ No newline at end of file
+class P3DNodeClass a where
+ asP3DNode :: a -> P3DNode
+ asP3DNode = Java.unsafeCoerce
+
+ getName :: a -> Maybe String
+ getName c = getName' (asP3DNode c)
+ setName :: a -> String -> ()
+ setName c = setName' (asP3DNode c)
+
+instance P3DNodeClass P3DNode where
+ asP3DNode = id
+++ /dev/null
-import "G3D/Math/Vector3d"
-import "G3D/Math/Quat4d"
-
-importJava "org.simantics.plant3d.scenegraph.P3DParentNode" where
- data P3DParentNode
-
- getName :: P3DParentNode -> Maybe String
- setName :: P3DParentNode -> String -> ()
-
- getOrientation :: P3DParentNode -> Quat4d
- getPosition :: P3DParentNode -> Vector3d
-
- setOrientation :: P3DParentNode -> Quat4d -> ()
- setPosition :: P3DParentNode -> Vector3d -> ()
-
- getWorldOrientation :: P3DParentNode -> Quat4d
- getWorldPosition :: P3DParentNode -> Vector3d
-
- setWorldOrientation :: P3DParentNode -> Quat4d -> ()
- setWorldPosition :: P3DParentNode -> Vector3d -> ()
\ No newline at end of file
-import "G3D/Math/Vector3d"
-import "G3D/Math/Quat4d"
-import "G3D/Scenegraph/Node"
+include "G3D/Scenegraph/Node"
+include "G3D/Scenegraph/G3DNode"
importJava "org.simantics.plant3d.scenegraph.P3DRootNode" where
data P3DRootNode
- addChild :: P3DRootNode -> INode -> ()
- getChild :: P3DRootNode -> [INode]
- remChild :: P3DRootNode -> INode -> ()
-
+ addChild :: P3DRootNode -> Node -> ()
+ getChild :: P3DRootNode -> [Node]
+ remChild :: P3DRootNode -> Node -> ()
+
+instance NodeClass P3DRootNode
+instance ParentNodeClass P3DRootNode
+instance G3DNodeClass P3DRootNode
import "G3D/Math/Quat4d"
import "G3D/Math/Vector3d"
+include "G3D/Scenegraph/Node"
+include "G3D/Scenegraph/G3DNode"
+
+include "./P3DNode"
+
+import "JavaBuiltin" as Java
+
importJava "org.simantics.plant3d.scenegraph.PipelineComponent" where
data PipelineComponent
- getPipeRun :: PipelineComponent -> PipeRun
- setPipeRun :: PipelineComponent -> PipeRun -> ()
+ @JavaName getPipeRun
+ getPipeRun' :: PipelineComponent -> PipeRun
+ @JavaName setPipeRun
+ setPipeRun' :: PipelineComponent -> PipeRun -> ()
- getAlternativePipeRun :: PipelineComponent -> Maybe PipeRun
- setAlternativePipeRun :: PipelineComponent -> PipeRun -> ()
+ @JavaName getAlternativePipeRun
+ getAlternativePipeRun' :: PipelineComponent -> Maybe PipeRun
+ @JavaName setAlternativePipeRun
+ setAlternativePipeRun' :: PipelineComponent -> PipeRun -> ()
- updateParameters :: PipelineComponent -> ()
+ @JavaName updateParameters
+ updateParameters' :: PipelineComponent -> ()
- getNext :: PipelineComponent -> Maybe PipelineComponent
- setNext :: PipelineComponent -> Maybe PipelineComponent -> ()
+ @JavaName getNext
+ getNext' :: PipelineComponent -> Maybe PipelineComponent
+ @JavaName setNext
+ setNext' :: PipelineComponent -> Maybe PipelineComponent -> ()
- getPrevious :: PipelineComponent -> Maybe PipelineComponent
- setPrevious :: PipelineComponent -> Maybe PipelineComponent -> ()
+ @JavaName getPrevious
+ getPrevious' :: PipelineComponent -> Maybe PipelineComponent
+ @JavaName setPrevious
+ setPrevious' :: PipelineComponent -> Maybe PipelineComponent -> ()
- getBranch0 :: PipelineComponent -> Maybe PipelineComponent
- setBranch0 :: PipelineComponent -> Maybe PipelineComponent -> ()
+ @JavaName getBranch0
+ getBranch0' :: PipelineComponent -> Maybe PipelineComponent
+ @JavaName setBranch0
+ setBranch0' :: PipelineComponent -> Maybe PipelineComponent -> ()
- getType :: PipelineComponent -> String
+ @JavaName getType
+ getType' :: PipelineComponent -> String
//getControlPoint :: PipelineComponent -> PipeControlPoint
- remove :: PipelineComponent -> ()
-
- getFlowLength :: PipelineComponent -> Maybe Double
- getEnds :: PipelineComponent -> Tuple3d -> Tuple3d -> ()
-
- getOrientation :: PipelineComponent -> Quat4d
- getPosition :: PipelineComponent -> Vector3d
-
- setOrientation :: PipelineComponent -> Quat4d -> ()
- setPosition :: PipelineComponent -> Vector3d -> ()
-
- getWorldOrientation :: PipelineComponent -> Quat4d
- getWorldPosition :: PipelineComponent -> Vector3d
-
- setWorldOrientation :: PipelineComponent -> Quat4d -> ()
- setWorldPosition :: PipelineComponent -> Vector3d -> ()
+ @JavaName remove
+ remove' :: PipelineComponent -> ()
+ @JavaName getFlowLength
+ getFlowLength' :: PipelineComponent -> Maybe Double
+ @JavaName getEnds
+ getEnds' :: PipelineComponent -> Tuple3d -> Tuple3d -> ()
+
+class PipelineComponentClass a where
+ asPipelineComponent :: a -> PipelineComponent
+ asPipelineComponent = Java.unsafeCoerce
+
+ getPipeRun :: a -> PipeRun
+ getPipeRun c = getPipeRun' (asPipelineComponent c)
+ setPipeRun :: a -> PipeRun -> ()
+ setPipeRun c = setPipeRun' (asPipelineComponent c)
+
+ getAlternativePipeRun :: a -> Maybe PipeRun
+ getAlternativePipeRun c = getAlternativePipeRun' (asPipelineComponent c)
+ setAlternativePipeRun :: a -> PipeRun -> ()
+ setAlternativePipeRun c = setAlternativePipeRun' (asPipelineComponent c)
+
+ updateParameters :: a -> ()
+ updateParameters c = updateParameters' (asPipelineComponent c)
+
+ getNext :: a -> Maybe PipelineComponent
+ getNext c = getNext' (asPipelineComponent c)
+ setNext :: a -> Maybe PipelineComponent -> ()
+ setNext c = setNext' (asPipelineComponent c)
+
+ getPrevious :: a -> Maybe PipelineComponent
+ getPrevious c = getPrevious' (asPipelineComponent c)
+ setPrevious :: a -> Maybe PipelineComponent -> ()
+ setPrevious c = setPrevious' (asPipelineComponent c)
+
+ getBranch0 :: a -> Maybe PipelineComponent
+ getBranch0 c = getBranch0' (asPipelineComponent c)
+ setBranch0 :: a -> Maybe PipelineComponent -> ()
+ setBranch0 c = setBranch0' (asPipelineComponent c)
+
+ getType :: a -> String
+ getType c = getType' (asPipelineComponent c)
+
+ remove :: a -> ()
+ remove c = remove' (asPipelineComponent c)
+
+ getFlowLength :: a -> Maybe Double
+ getFlowLength c = getFlowLength' (asPipelineComponent c)
+ getEnds :: a -> Tuple3d -> Tuple3d -> ()
+ getEnds c = getEnds' (asPipelineComponent c)
+
+instance NodeClass PipelineComponent
+instance G3DNodeClass PipelineComponent
+instance P3DNodeClass PipelineComponent
+instance PipelineComponentClass PipelineComponent where
+ asPipelineComponent = id
+
importJava "org.simantics.plant3d.scenegraph.controlpoint.PipeControlPoint$PointType" where
data PointType
getChild :: PipeRun -> [PipelineComponent]
remChild :: PipeRun -> PipelineComponent -> ()
- getSortedChild :: PipeRun -> [PipelineComponent]
\ No newline at end of file
+ getSortedChild :: PipeRun -> [PipelineComponent]
+
+instance NodeClass PipeRun
+instance ParentNodeClass PipeRun
+instance G3DNodeClass PipeRun
+instance P3DNodeClass PipeRun
-import "./PipelineComponent"
+include "./PipelineComponent"
import "G3D/Math/Vector3d"
importJava "org.simantics.plant3d.scenegraph.TurnComponent" where
data TurnComponent
- getType :: TurnComponent -> String
- getControlPoint :: TurnComponent -> PipeControlPoint
- getPipeRun :: TurnComponent -> Maybe PipeRun
-
isVariableAngle :: TurnComponent -> Boolean
getTurnAngle :: TurnComponent -> Maybe Double
setTurnAngle :: TurnComponent -> Maybe Double -> ()
getRotationAngle :: TurnComponent -> Maybe Double
setRotationAngle :: TurnComponent -> Maybe Double -> ()
-
\ No newline at end of file
+
+instance NodeClass TurnComponent
+instance G3DNodeClass TurnComponent
+instance P3DNodeClass TurnComponent
+instance PipelineComponentClass TurnComponent