• 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

Revisión64695842301d143ff3b081c28d82a70605b0f907 (tree)
Tiempo2013-07-07 07:04:48
AutorZeroSeparation@gmail.com <ZeroSeparation@gmai...>
CommiterZeroSeparation@gmail.com

Log Message

Reverted previous change. Use geometry.center() instead.

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

Cambiar Resumen

Diferencia incremental

--- a/engine/src/core/com/jme3/scene/shape/Quad.java
+++ b/engine/src/core/com/jme3/scene/shape/Quad.java
@@ -1,5 +1,5 @@
11 /*
2- * Copyright (c) 2009-2012 jMonkeyEngine
2+ * Copyright (c) 2009-2010 jMonkeyEngine
33 * All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without
@@ -29,6 +29,7 @@
2929 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3030 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3131 */
32+
3233 package com.jme3.scene.shape;
3334
3435 import com.jme3.scene.Mesh;
@@ -77,21 +78,6 @@ public class Quad extends Mesh {
7778 updateGeometry(width, height, flipCoords);
7879 }
7980
80- /**
81- * Create a quad with the given width and height. The quad
82- * is always created in the XY plane.
83- *
84- * @param width The X extent or width
85- * @param height The Y extent or width
86- * @param flipCoords If true, the texture coordinates will be flipped
87- * along the Y axis.
88- * @param originAtCenter If true then the origin of the quad will be at the center
89- * of the quad, rather than at one corner.
90- */
91- public Quad(float width, float height, boolean flipCoords, boolean originAtCenter){
92- updateGeometry(width, height, flipCoords, originAtCenter);
93- }
94-
9581 public float getHeight() {
9682 return height;
9783 }
@@ -103,29 +89,16 @@ public class Quad extends Mesh {
10389 public void updateGeometry(float width, float height){
10490 updateGeometry(width, height, false);
10591 }
106-
92+
10793 public void updateGeometry(float width, float height, boolean flipCoords) {
108- updateGeometry(width, height, flipCoords, false);
109- }
110-
111- public void updateGeometry(float width, float height, boolean flipCoords, boolean originAtCenter) {
11294 this.width = width;
11395 this.height = height;
114- if (originAtCenter) {
115- float halfWidth = width*0.5f;
116- float halfHeight = height*0.5f;
117- setBuffer(Type.Position, 3, new float[]{-halfWidth, -halfHeight, 0,
118- halfWidth, -halfHeight, 0,
119- halfWidth, halfHeight, 0,
120- -halfWidth, halfHeight, 0
121- });
122- } else {
123- setBuffer(Type.Position, 3, new float[]{0, 0, 0,
124- width, 0, 0,
125- width, height, 0,
126- 0, height, 0
127- });
128- }
96+ setBuffer(Type.Position, 3, new float[]{0, 0, 0,
97+ width, 0, 0,
98+ width, height, 0,
99+ 0, height, 0
100+ });
101+
129102
130103 if (flipCoords){
131104 setBuffer(Type.TexCoord, 2, new float[]{0, 1,