Jelajahi Sumber

Added Patch as MeshMode
Added private variable patchVertexCount

michael 10 tahun lalu
induk
melakukan
0c35b20412
1 mengubah file dengan 7 tambahan dan 2 penghapusan
  1. 7 2
      jme3-core/src/main/java/com/jme3/scene/Mesh.java

+ 7 - 2
jme3-core/src/main/java/com/jme3/scene/Mesh.java

@@ -134,8 +134,12 @@ public class Mesh implements Savable, Cloneable {
          * {@link Mesh#setElementLengths(int[]) element lengths} must 
          * be specified for this mode.
          */
-        Hybrid(false);
-        
+        Hybrid(false),
+        /**
+         * Used for Tesselation only. Requires to set the number of vertices
+         * for each patch (default is 3 for triangle tesselation)
+         */
+        Patch(true);
         private boolean listMode = false;
         
         private Mode(boolean listMode){
@@ -175,6 +179,7 @@ public class Mesh implements Savable, Cloneable {
     private int vertCount = -1;
     private int elementCount = -1;
     private int instanceCount = -1;
+    private int patchVertexCount=3; //only used for tesselation
     private int maxNumWeights = -1; // only if using skeletal animation
 
     private int[] elementLengths;