]> gerrit.simantics Code Review - simantics/3d.git/blob - 3d_ontologies/g3d.graph
ErrorLogger moved (integration)
[simantics/3d.git] / 3d_ontologies / g3d.graph
1 %import "layer0.graph" \r
2 %import "animation.graph"\r
3 %import "image.graph" IMAGE\r
4 %define symmetric()\r
5     $subject\r
6         $layer0.InverseOf $subject\r
7 %define tag($tagname)\r
8     $subject\r
9         $tagname $subject\r
10 %deflib Type _ @ "Types" : TypeLibrary\r
11     PartOf G3DOntology\r
12 %deflib Relation _ @ "Relations" : RelationLibrary\r
13     PartOf G3DOntology\r
14 %deflib Library G3DOntology\r
15 G3DOntology @ "G3D Ontology" : Ontology\r
16     PartOf TypeSystemProject\r
17     HasNamespace "http://www.vtt.fi/Simantics/G3D/1.0" : URI\r
18     HasVersion "1.0" : Version\r
19     HasResourceClass "org.simantics.proconf.g3d.stubs.G3DResource" : String\r
20     HasStubsPackage "org.simantics.proconf.g3d.stubs" : String\r
21 \r
22 G3DNamespace @ "G3D Namespace" : Namespace\r
23     PartOf TypeSystemNamespaces\r
24     HasNamespace "http://www.vtt.fi/Simantics/G3D/1.0" : URI\r
25     HasNamespaceRoot G3DOntology\r
26 \r
27 HasTransformationValue <R HasProperty\r
28     InverseOf TransformationValueOf\r
29     HasRange [Double]\r
30 HasX <R HasTransformationValue\r
31 HasY <R HasTransformationValue\r
32 HasZ <R HasTransformationValue\r
33 HasAngle <R HasTransformationValue\r
34 Tuple3 <T Property\r
35     [HasX card "1"]\r
36     [HasY card "1"]\r
37     [HasZ card "1"]\r
38 Position <T Tuple3\r
39 Center <T Tuple3\r
40 Orientation <T Property\r
41     [HasX card "1"]\r
42     [HasY card "1"]\r
43     [HasZ card "1"]\r
44     [HasAngle card "1"]\r
45 Transformation <T Property\r
46 Position <T Transformation\r
47 Orientation <T Transformation\r
48 Center <T Transformation\r
49 \r
50 # Parent-child relationship\r
51 HasChild <R IsRelatedTo\r
52     InverseOf HasParent\r
53     HasDomain [G3DNode]\r
54     HasRange [G3DNode]\r
55 HasGeometryDefinition <R HasChild\r
56     InverseOf GeometryDefinitionOf\r
57 \r
58 # Properties of G3DNode are divided into transformation properties and non-transformation properties    \r
59 # All 3D properties must be inherited from these two. (Queries that update scene-graph require this)    \r
60 HasTransformation <R HasProperty\r
61     InverseOf TransformationOf\r
62 HasNonTransformation <R HasProperty\r
63     InverseOf NonTransformationOf\r
64     \r
65 HasLocalPosition <R HasTransformation\r
66     HasRange [Position]\r
67     InverseOf LocalPositionOf\r
68 HasWorldPosition <R HasTransformation\r
69     HasRange [Position]\r
70     InverseOf WorldPositionOf\r
71 HasLocalOrientation <R HasTransformation\r
72     HasRange [Orientation]\r
73     InverseOf LocalOrientationOf\r
74 HasWorldOrientation <R HasTransformation\r
75     HasRange [Orientation]\r
76     InverseOf WorldOrientationOf\r
77 HasCenter <R HasTransformation\r
78     HasRange [Center]\r
79 G3DNode @ "G3DNode" <T Entity\r
80     [HasParent card "0..1"]\r
81     [HasChild card "0..*"]\r
82     [HasLocalPosition card "0..1"]\r
83     [HasWorldPosition card "0..1"]\r
84     [HasLocalOrientation card "0..1"]\r
85     [HasWorldOrientation card "0..1"]\r
86     [HasCenter card "0..1"]\r
87     HasDescription "Base node for scene-graph" : String\r
88     Includes\r
89         HasChild\r
90     Propagates\r
91         HasChild\r
92 HasG3DNode @ "Has G3DNode" <R DependsOn\r
93     HasRange [G3DNode]\r
94 HasRed <R HasProperty\r
95     HasRange [Double]\r
96 HasGreen <R HasProperty\r
97     HasRange [Double]\r
98 HasBlue <R HasProperty\r
99     HasRange [Double]\r
100 HasTransparency <R HasProperty\r
101     HasRange [Double]\r
102 HasShininess <R HasProperty\r
103     HasRange [Double]\r
104 Color <T Entity\r
105     [HasRed card "1"]\r
106     [HasGreen card "1"]\r
107     [HasBlue card "1"]\r
108 HasDiffuseColor <R IsRelatedTo\r
109     InverseOf DiffuseColorOf\r
110     HasRange [Color]\r
111 HasSpecularColor <R IsRelatedTo\r
112     InverseOf SpecularColorOf\r
113     HasRange [Color]\r
114 HasAmbientColor <R IsRelatedTo\r
115     InverseOf AmbientColorOf\r
116     HasRange [Color]\r
117 HasEmissiveColor <R IsRelatedTo\r
118     InverseOf EmissiveColorOf\r
119     HasRange [Color]\r
120 \r
121 Material <T Entity\r
122     [HasDiffuseColor card "1"]\r
123     [HasSpecularColor card "1"]\r
124     [HasAmbientColor card "1"]\r
125     [HasEmissiveColor card "1"]\r
126     [HasTransparency card "1"]\r
127     [HasShininess card "1"]\r
128     Includes\r
129         HasDiffuseColor\r
130         HasSpecularColor\r
131         HasAmbientColor\r
132         HasEmissiveColor\r
133         HasTransparency\r
134         HasShininess\r
135     Propagates\r
136         HasDiffuseColor\r
137         HasSpecularColor\r
138         HasAmbientColor\r
139         HasEmissiveColor\r
140         HasTransparency\r
141         HasShininess\r
142 TextureCoordinateGenerator <T Property\r
143     tag(Enumeration)\r
144 HasTextureCoordinateGenerator <R DependsOn\r
145     HasRange [TextureCoordinateGenerator]\r
146 TextureCoordinateGenerations : Library\r
147     ConsistsOf\r
148         _sphere @ "sphere" : TextureCoordinateGenerator\r
149         _eye_linear @ "eye linear" : TextureCoordinateGenerator\r
150         _object_linear @ "object linear" : TextureCoordinateGenerator\r
151         _normal @ "normal" : TextureCoordinateGenerator\r
152         _reflection @ "reflection" : TextureCoordinateGenerator\r
153 \r
154 TextureMode @ "MultiTexture Mode" <T Property\r
155     tag(Enumeration)\r
156     ConsistsOf\r
157       mt_add @ "add" : TextureMode\r
158       mt_modulate @ "modulate" : TextureMode\r
159       mt_blend @ "blend" : TextureMode\r
160       mt_decal @ "decal" : TextureMode\r
161       mt_replace @ "replace" : TextureMode\r
162       mt_combine @ "combine" : TextureMode\r
163 HasTextureMode @ "Has Texture Mode" <R DependsOn\r
164     HasRange [TextureMode]\r
165    \r
166 CombineMode <T Property\r
167     tag(Enumeration)\r
168     ConsistsOf\r
169       cm_add @ "add" : CombineMode\r
170       cm_replace @ "replace" : CombineMode\r
171       cm_modulate @ "modulate" : CombineMode\r
172       cm_add_signed @ "add signed" : CombineMode\r
173       cm_subtract @ "subtract" : CombineMode\r
174       cm_interpolate @ "interpolate" : CombineMode\r
175       cm_dot3 @ "dot3" : CombineMode\r
176 #HasCombineMode <R DependsOn\r
177 #    HasRange [CombineMode]\r
178    \r
179 CombineSource <T Property\r
180     tag(Enumeration)\r
181     ConsistsOf\r
182       cs_object_color @ "object color" : CombineSource\r
183       cs_texture_color @ "texture color" : CombineSource\r
184       cs_constant_color @ "constant color" : CombineSource\r
185       cs_previous_texture_state @ "previous state" : CombineSource\r
186       cs_texture0 @ "texture 0" : CombineSource\r
187       cs_texture1 @ "texture 1" : CombineSource\r
188 #HasCombineSource <R DependsOn\r
189 #    HasRange [CombineSource]\r
190 CombineFunction <T Property\r
191     tag(Enumeration)\r
192     ConsistsOf\r
193       cf_src_color @ "src color" : CombineFunction\r
194       cf_one_minus_src_color @ "one minus src color" : CombineFunction\r
195       cf_src_alpha @ "src alpha" : CombineFunction\r
196       cf_one_minus_src_alpha @ "one minus src alpha" : CombineFunction\r
197 #HasCombineFunction <R DependsOn\r
198 #    HasRange [CombineFunction]\r
199 \r
200 HasCombineDefinition @ "Has Combine Definition" <R HasProperty\r
201     HasRange [LinkedList]\r
202     \r
203 #MultiTextureElement @ "MultiTextureElement" <T Entity\r
204 #    [HasTexture card "1"]\r
205 \r
206 Texture <T Property\r
207     [HasTextureMode card "0..1"]\r
208     [HasCombineDefinition card "0..1"]\r
209     [HasTextureCoordinateGenerator card "0..1"]\r
210     #[HasCombineMode card "0..1"]\r
211     #[HasCombineSource card "0..1"]\r
212     #[HasCombineFunction card "0..1"]\r
213     \r
214 HasTexture <R DependsOn\r
215     HasRange [Texture]\r
216     \r
217 Texture1D @ "Texture1D" <T Texture\r
218 Texture2D @ "Texture2D" <T Texture\r
219 Texture3D @ "Texture3D" <T Texture\r
220 CubeMapTexture @ "CubeMap Texture" <T Texture\r
221     \r
222 #MultiTextureElementList @ "MultiTextureElementList" <T LinkedList\r
223 #HasMultiTextureElementList @ "Has MultiTextureElementList" <R DependsOn : FunctionalRelation\r
224 HasMultiTextureElementList @ "Has MultiTextureElementList" <R HasProperty\r
225     HasRange [LinkedList]\r
226     #HasRange [MultiTextureElementList]\r
227 # this definition is incorrect: multitexture cannot have texturemode,m etc. itself\r
228 MultiTexture @ "MultiTexture" <T Texture\r
229     [HasMultiTextureElementList card "1"]\r
230 HasImage <R DependsOn\r
231     HasRange [IMAGE.Image]\r
232 ImageTexture @ "ImageTexture" <T Texture2D\r
233     [HasImage card "1"]\r
234 HasVertexShader <R HasProperty\r
235     HasRange [String]\r
236 HasFragmentShader <R HasProperty\r
237     HasRange [String]\r
238 Shader <T Entity\r
239     [HasVertexShader card "1"]\r
240     [HasFragmentShader card "1"]\r
241 HasMaterial <R IsRelatedTo\r
242     HasRange [Material]\r
243 HasShader <R IsRelatedTo\r
244     HasRange [Shader]\r
245 Appearance <T Entity\r
246     [HasMaterial card "0..1"]\r
247     [HasTexture card "0..1"]\r
248     [HasShader card "0..1"]\r
249     Includes\r
250         HasMaterial\r
251         HasTexture\r
252         HasShader\r
253     Propagates\r
254         HasMaterial\r
255         HasTexture\r
256         HasShader\r
257 HasAppearance <R HasProperty # HasNonTransformation \r
258     HasRange [Appearance]\r
259 Shape <T G3DNode\r
260     [HasAppearance card "0..1"]\r
261     HasDescription "Node for representing geometries" : String\r
262     Includes\r
263         HasAppearance\r
264 G3DModel @ "G3DModel" <T G3DNode\r
265     [HasAnimation card "0..*"]\r
266     [HasSizingParameter card "0..*"]\r
267     Includes\r
268         HasAnimation\r
269         HasSizingParameter\r
270     Propagates\r
271         HasAnimation\r
272         HasSizingParameter\r
273 HasSizingParameter <R HasNonTransformation\r
274     HasDescription "Sizing parameters are used for defining parameterization of a model" : String\r
275     HasDomain [G3DModel]\r
276     HasRange [Double]\r
277 HasDefaultDoubleValue <R HasProperty\r
278     HasDescription "Sizing Parameter's default value" : String\r
279     HasDomain [Double]\r
280     HasRange [Double]\r
281     \r
282 HasConstraints <R HasAdapter2 : FunctionalRelation\r
283 \r
284 \r