]> gerrit.simantics Code Review - simantics/3d.git/blob
1548881cc4d64aaf3534796debe5f0a627870db0
[simantics/3d.git] /
1 /*******************************************************************************\r
2  * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
3  * All rights reserved. This program and the accompanying materials\r
4  * are made available under the terms of the Eclipse Public License v1.0\r
5  * which accompanies this distribution, and is available at\r
6  * http://www.eclipse.org/legal/epl-v10.html\r
7  *\r
8  * Contributors:\r
9  *     VTT Technical Research Centre of Finland - initial API and implementation\r
10  *******************************************************************************/\r
11 package org.simantics.proconf.g3d.shapeeditor;\r
12 \r
13 import org.simantics.proconf.g3d.csg.stubs.CSGResource;\r
14 import org.simantics.db.Builtins;\r
15 import org.simantics.db.Graph;\r
16 import org.simantics.equation.stubs.EquationResource;\r
17 import org.simantics.g2d.stubs.anim.AnimationResource;\r
18 import org.simantics.animation.curve.CurveBuilder;\r
19 import org.simantics.animation.curve.CurveBuilderImpl;\r
20 import org.simantics.proconf.g3d.stubs.G3DResource;\r
21 \r
22 public class ShapeEditorResources {\r
23         public static Builtins builtins;\r
24         public static G3DResource g3dResource;\r
25         public static CSGResource csgResource;\r
26         public static AnimationResource animationResource;\r
27         public static CurveBuilder curveBuilder;\r
28         public static EquationResource equationResource;\r
29         \r
30         public static void initialize(Graph g) {\r
31                 builtins = g.getBuiltins();\r
32                 animationResource = AnimationResource.getInstance(g);\r
33                 csgResource = CSGResource.getInstance(g);\r
34                 g3dResource = G3DResource.getInstance(g);\r
35                 curveBuilder = new CurveBuilderImpl(ShapeEditorResources.animationResource);\r
36                 equationResource = EquationResource.getInstance(g);\r
37         }\r
38         \r
39         public static void deinitialize() {\r
40                 builtins = null;\r
41                 g3dResource = null;\r
42                 csgResource = null;\r
43                 animationResource = null;\r
44                 curveBuilder = null;\r
45                 equationResource = null;\r
46         }\r
47 \r
48 }\r