Revision 3ee1d662
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistySquare1.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.type.Static3D; |
25 | 25 |
import org.distorted.library.type.Static4D; |
26 | 26 |
|
27 |
import org.distorted.objectlib.helpers.ObjectFaceShape; |
|
27 | 28 |
import org.distorted.objectlib.touchcontrol.TouchControlHexahedron; |
28 | 29 |
import org.distorted.objectlib.main.ObjectControl; |
29 | 30 |
import org.distorted.objectlib.main.ObjectType; |
... | ... | |
96 | 97 |
{4,5,6,7} |
97 | 98 |
}; |
98 | 99 |
|
99 |
float[][] bands = new float[][] { {0.040f,35,0.8f,1.0f,5,2,1}, {0.020f,35,0.8f,1.0f,5,2,1}, {0.001f,35,0.8f,1.0f,5,2,1} }; |
|
100 |
int[] bandIndices = new int[] { 2,2,1,1,0,2 }; |
|
101 |
float[][] corners = new float[][] { {0.03f,0.05f} }; |
|
102 |
int[] cornerIndices = new int[] { 0,0,0,0,0,0,0,0 }; |
|
103 |
float[][] centers = new float[][] { { -0.75f, 0.0f, 0.0f} }; |
|
104 |
int[] centerIndices = new int[] { 0,0,0,0,0,0,0,0 }; |
|
105 |
|
|
106 |
return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null, 3); |
|
100 |
return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),3); |
|
107 | 101 |
} |
108 | 102 |
else if( variant==1 ) |
109 | 103 |
{ |
... | ... | |
126 | 120 |
{5,3,0,2} |
127 | 121 |
}; |
128 | 122 |
|
129 |
float[][] bands = new float[][] { {0.038f,35,0.5f,0.9f, 5,2,1}, {0.001f,35,0.5f,0.9f, 5,2,1} }; |
|
130 |
int[] bandIndices = new int[] { 0,1,0,1,1 }; |
|
131 |
float[][] corners = new float[][] { {0.04f,0.15f} }; |
|
132 |
int[] cornerIndices = new int[] { 0,0,-1,0,0,-1 }; |
|
133 |
float[][] centers = new float[][] { { 0.0f, 0.0f,-0.5f} }; |
|
134 |
int[] centerIndices = new int[] { 0,0,-1,0,0,-1 }; |
|
135 |
|
|
136 |
return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null, 2); |
|
123 |
return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),2); |
|
137 | 124 |
} |
138 | 125 |
else |
139 | 126 |
{ |
... | ... | |
158 | 145 |
{4,5,6,7} |
159 | 146 |
}; |
160 | 147 |
|
161 |
float[][] bands = new float[][] { {0.038f,35,0.9f,1.0f, 5,2,1}, {0.001f,35,0.9f,1.0f, 5,2,1} }; |
|
162 |
int[] bandIndices = new int[] { 0,1,0,0,1,1 }; |
|
163 |
float[][] corners = new float[][] { {0.05f,0.13f} }; |
|
164 |
int[] cornerIndices = new int[] { 0,0,0,-1,0,0,0,-1 }; |
|
165 |
float[][] centers = new float[][] { { -0.5f, 0.0f,-0.5f} }; |
|
166 |
int[] centerIndices = new int[] { -1,0,-1,-1,-1,0,-1,-1 }; |
|
148 |
return new ObjectShape(vertices,vert_indices,getNumCubitFaces(),3); |
|
149 |
} |
|
150 |
} |
|
151 |
|
|
152 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
167 | 153 |
|
168 |
return new ObjectShape(vertices,vert_indices,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null, 3); |
|
154 |
public ObjectFaceShape getObjectFaceShape(int variant) |
|
155 |
{ |
|
156 |
if( variant==0 ) |
|
157 |
{ |
|
158 |
float[][] bands = { {0.040f,35,0.8f,1.0f,5,2,1}, {0.020f,35,0.8f,1.0f,5,2,1}, {0.001f,35,0.8f,1.0f,5,2,1} }; |
|
159 |
int[] bandIndices = { 2,2,1,1,0,2 }; |
|
160 |
float[][] corners = { {0.03f,0.05f} }; |
|
161 |
int[] cornerIndices = { 0,0,0,0,0,0,0,0 }; |
|
162 |
float[][] centers = { { -0.75f, 0.0f, 0.0f} }; |
|
163 |
int[] centerIndices = { 0,0,0,0,0,0,0,0 }; |
|
164 |
|
|
165 |
return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null); |
|
166 |
} |
|
167 |
else if( variant==1 ) |
|
168 |
{ |
|
169 |
float[][] bands = { {0.038f,35,0.5f,0.9f, 5,2,1}, {0.001f,35,0.5f,0.9f, 5,2,1} }; |
|
170 |
int[] bandIndices = { 0,1,0,1,1 }; |
|
171 |
float[][] corners = { {0.04f,0.15f} }; |
|
172 |
int[] cornerIndices = { 0,0,-1,0,0,-1 }; |
|
173 |
float[][] centers = { { 0.0f, 0.0f,-0.5f} }; |
|
174 |
int[] centerIndices = { 0,0,-1,0,0,-1 }; |
|
175 |
|
|
176 |
return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null); |
|
177 |
} |
|
178 |
else |
|
179 |
{ |
|
180 |
float[][] bands = { {0.038f,35,0.9f,1.0f, 5,2,1}, {0.001f,35,0.9f,1.0f, 5,2,1} }; |
|
181 |
int[] bandIndices = { 0,1,0,0,1,1 }; |
|
182 |
float[][] corners = { {0.05f,0.13f} }; |
|
183 |
int[] cornerIndices = { 0,0,0,-1,0,0,0,-1 }; |
|
184 |
float[][] centers = { { -0.5f, 0.0f,-0.5f} }; |
|
185 |
int[] centerIndices = { -1,0,-1,-1,-1,0,-1,-1 }; |
|
186 |
|
|
187 |
return new ObjectFaceShape(bands,bandIndices,corners,cornerIndices,centers,centerIndices,null); |
|
169 | 188 |
} |
170 | 189 |
} |
171 | 190 |
|
Also available in: Unified diff
Split ObjectShape into ObjectShape and ObjectFaceShape