]> gerrit.simantics Code Review - simantics/3d.git/blob - dev/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/base/GeometryProvider.java
Release
[simantics/3d.git] / dev / org.simantics.proconf.g3d / src / org / simantics / proconf / g3d / base / GeometryProvider.java
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.base;\r
12 \r
13 import org.simantics.layer0.utils.IEntity;\r
14 \r
15 \r
16 /**\r
17  * Interface for geometryProviders\r
18  * \r
19  * TODO : instead of using Geometry array, create class that is passed through\r
20  * TODO : Current animation system links resources; what about code generated meshes ?\r
21  * \r
22  * @author Marko Luukkainen\r
23  *\r
24  */\r
25 public interface GeometryProvider {\r
26     \r
27         /**\r
28          * Used to check if GeometryProvider can generate mesh\r
29          * @param instance\r
30          * @return\r
31          */\r
32     public boolean canHandle(IEntity instance);\r
33         \r
34     /**\r
35      * Generates mesh\r
36      * @param instance\r
37      * @param transform\r
38      * @return\r
39      */\r
40     public com.jme.scene.Geometry[] getGeometryFromResource(IEntity instance, boolean transform);\r
41     \r
42     /**\r
43      * Updates mesh\r
44      * @param instance\r
45      * @param transform\r
46      * @param geometry\r
47      * @return\r
48      */\r
49     public boolean reconstructGeometry(IEntity instance, boolean transform, com.jme.scene.Geometry[] geometry);\r
50 }\r