1 import "JavaBuiltin" as Java
3 import "G3D/Math/Vector3d"
4 import "G3D/Math/Quat4d"
8 importJava "org.simantics.g3d.scenegraph.IG3DNode" where
11 @JavaName getOrientation
12 getOrientation' :: G3DNode -> <Proc> Quat4d
14 getPosition' :: G3DNode -> <Proc> Vector3d
16 @JavaName setOrientation
17 setOrientation' :: G3DNode -> Quat4d -> <Proc> ()
19 setPosition' :: G3DNode -> Vector3d -> <Proc> ()
21 @JavaName getWorldOrientation
22 getWorldOrientation' :: G3DNode -> <Proc> Quat4d
23 @JavaName getWorldPosition
24 getWorldPosition' :: G3DNode -> <Proc> Vector3d
26 @JavaName setWorldOrientation
27 setWorldOrientation' :: G3DNode -> Quat4d -> <Proc> ()
28 @JavaName setWorldPosition
29 setWorldPosition' :: G3DNode -> Vector3d -> <Proc> ()
31 class G3DNodeClass a where
32 asG3DNode :: a -> G3DNode
33 asG3DNode = Java.unsafeCoerce
35 getOrientation :: a -> <Proc> Quat4d
36 getOrientation c = getOrientation' (asG3DNode c)
37 getPosition :: a -> <Proc> Vector3d
38 getPosition c = getPosition' (asG3DNode c)
40 setOrientation :: a -> Quat4d -> <Proc> ()
41 setOrientation c = setOrientation' (asG3DNode c)
42 setPosition :: a -> Vector3d -> <Proc> ()
43 setPosition c = setPosition' (asG3DNode c)
45 getWorldOrientation :: a -> <Proc> Quat4d
46 getWorldOrientation c = getWorldOrientation' (asG3DNode c)
47 getWorldPosition :: a -> <Proc> Vector3d
48 getWorldPosition c = getWorldPosition' (asG3DNode c)
50 setWorldOrientation :: a -> Quat4d -> <Proc> ()
51 setWorldOrientation c = setWorldOrientation' (asG3DNode c)
52 setWorldPosition :: a -> Vector3d -> <Proc> ()
53 setWorldPosition c = setWorldPosition' (asG3DNode c)
55 instance NodeClass G3DNode
56 instance G3DNodeClass G3DNode where