Revision 524e4fe7
Added by Leszek Koltunski about 5 years ago
| src/main/java/org/distorted/library/mesh/MeshBase.java | ||
|---|---|---|
| 347 | 347 |
mEquAssociation[component] = equAssociation; |
| 348 | 348 |
} |
| 349 | 349 |
|
| 350 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 351 |
|
|
| 352 |
int numTexComponents() |
|
| 353 |
{
|
|
| 354 |
return mTexComponent.size(); |
|
| 355 |
} |
|
| 356 |
|
|
| 357 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 358 |
|
|
| 359 |
int numEffComponents() |
|
| 360 |
{
|
|
| 361 |
return mEffComponent.size(); |
|
| 362 |
} |
|
| 363 |
|
|
| 364 | 350 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 365 | 351 |
// when a derived class is done computing its mesh, it has to call this method. |
| 366 | 352 |
|
| ... | ... | |
| 898 | 884 |
return BYTES_PER_FLOAT*( 4 + numEff+TEX_COMP_SIZE*numTex + VERT1_ATTRIBS*mNumVertices + VERT2_ATTRIBS*mNumVertices ); |
| 899 | 885 |
} |
| 900 | 886 |
|
| 887 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 888 |
/** |
|
| 889 |
* @y.exclude |
|
| 890 |
*/ |
|
| 891 |
public int getLastVertexEff(int effComponent) |
|
| 892 |
{
|
|
| 893 |
if( effComponent>=0 && effComponent<mTexComponent.size() ) |
|
| 894 |
{
|
|
| 895 |
return mEffComponent.get(effComponent); |
|
| 896 |
} |
|
| 897 |
|
|
| 898 |
return 0; |
|
| 899 |
} |
|
| 900 |
|
|
| 901 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 902 |
/** |
|
| 903 |
* @y.exclude |
|
| 904 |
*/ |
|
| 905 |
public int getLastVertexTex(int texComponent) |
|
| 906 |
{
|
|
| 907 |
if( texComponent>=0 && texComponent<mTexComponent.size() ) |
|
| 908 |
{
|
|
| 909 |
return mTexComponent.get(texComponent).mEndIndex; |
|
| 910 |
} |
|
| 911 |
|
|
| 912 |
return 0; |
|
| 913 |
} |
|
| 914 |
|
|
| 901 | 915 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 902 | 916 |
// PUBLIC API |
| 903 | 917 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| ... | ... | |
| 1134 | 1148 |
} |
| 1135 | 1149 |
} |
| 1136 | 1150 |
|
| 1151 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 1152 |
/** |
|
| 1153 |
* Return the number of texture components, i.e. individual subsets of the whole set of vertices |
|
| 1154 |
* which can be independently textured. |
|
| 1155 |
* |
|
| 1156 |
* @return The number of Texture Components of this Mesh. |
|
| 1157 |
*/ |
|
| 1158 |
public int numTexComponents() |
|
| 1159 |
{
|
|
| 1160 |
return mTexComponent.size(); |
|
| 1161 |
} |
|
| 1162 |
|
|
| 1163 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 1164 |
/** |
|
| 1165 |
* Return the number of 'effect' components, i.e. individual subsets of the whole set of vertices |
|
| 1166 |
* to which a VertexEffect can be addressed, independently of other vertices. |
|
| 1167 |
* |
|
| 1168 |
* @return The number of Effect Components of this Mesh. |
|
| 1169 |
*/ |
|
| 1170 |
public int numEffComponents() |
|
| 1171 |
{
|
|
| 1172 |
return mEffComponent.size(); |
|
| 1173 |
} |
|
| 1174 |
|
|
| 1137 | 1175 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 1138 | 1176 |
/** |
| 1139 | 1177 |
* Copy the Mesh. |
Also available in: Unified diff
Progress with the MeshFile app.