• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Main repository of MikuMikuStudio


Commit MetaInfo

Revisionace47ad678817cf540b375d30a060191e002f320 (tree)
Time2013-02-27 06:55:59
Authorremy.bouquet@gmail.com <remy.bouquet@gmai...>
Commiterremy.bouquet@gmail.com

Log Message

Reverted accidental commit of GeometryList

git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@10442 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

Change Summary

Incremental Difference

--- a/engine/src/core/com/jme3/renderer/queue/GeometryList.java
+++ b/engine/src/core/com/jme3/renderer/queue/GeometryList.java
@@ -33,7 +33,6 @@ package com.jme3.renderer.queue;
3333
3434 import com.jme3.renderer.Camera;
3535 import com.jme3.scene.Geometry;
36-import com.jme3.util.ListSort;
3736 import com.jme3.util.SortUtil;
3837
3938 /**
@@ -49,15 +48,9 @@ public class GeometryList {
4948 private static final int DEFAULT_SIZE = 32;
5049
5150 private Geometry[] geometries;
52- // private Geometry[] geometries2;
53- private ListSort listSort;
51+ private Geometry[] geometries2;
5452 private int size;
5553 private GeometryComparator comparator;
56-
57- /*static private int count =0;
58- static private int cpt =0;
59- static private long time = 0;
60- */
6154
6255 /**
6356 * Initializes the GeometryList to use the given {@link GeometryComparator}
@@ -68,9 +61,8 @@ public class GeometryList {
6861 public GeometryList(GeometryComparator comparator) {
6962 size = 0;
7063 geometries = new Geometry[DEFAULT_SIZE];
71- // geometries2 = new Geometry[DEFAULT_SIZE];
64+ geometries2 = new Geometry[DEFAULT_SIZE];
7265 this.comparator = comparator;
73- listSort = new ListSort<Geometry>();
7466 }
7567
7668 /**
@@ -123,9 +115,9 @@ public class GeometryList {
123115 System.arraycopy(geometries, 0, temp, 0, size);
124116 geometries = temp; // original list replaced by double-size list
125117
126- // geometries2 = new Geometry[size * 2];
118+ geometries2 = new Geometry[size * 2];
127119 }
128- geometries[size++] = g;
120+ geometries[size++] = g;
129121 }
130122
131123 /**
@@ -136,7 +128,7 @@ public class GeometryList {
136128 geometries[i] = null;
137129 }
138130
139- size = 0;
131+ size = 0;
140132 }
141133
142134 /**
@@ -145,34 +137,14 @@ public class GeometryList {
145137 public void sort() {
146138 if (size > 1) {
147139 // sort the spatial list using the comparator
148-// count++;
149-// long t = System.nanoTime();
150-
151- if(listSort.getLength() != size){
152- listSort.allocateStack(size);
153- }
154- listSort.sort(geometries,comparator);
155140
156-// time += System.nanoTime() - t;
141+// SortUtil.qsort(geometries, 0, size, comparator);
142+// Arrays.sort(geometries, 0, size, comparator);
157143
158-
144+ System.arraycopy(geometries, 0, geometries2, 0, size);
145+ SortUtil.msort(geometries2, geometries, 0, size-1, comparator);
159146
160-// count++;
161-// long t = System.nanoTime();
162-// System.arraycopy(geometries, 0, geometries2, 0, size);
163-// SortUtil.msort(geometries2, geometries, 0, size-1, comparator);
164-// time += System.nanoTime() - t;
165-//
166-// count++;
167-// long t = System.nanoTime();
168-// Arrays.sort(geometries,0,size, comparator);
169-// time += System.nanoTime() - t;
147+
170148 }
171-
172-// if( count>50){
173-// count = 0;
174-// cpt++;
175-// System.err.println(50*cpt+"\t"+time/1000000);
176-// }
177149 }
178150 }
\ No newline at end of file