Revision bc208a9c
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/library/mesh/MeshCubes.java | ||
---|---|---|
643 | 643 |
attribs2[VERT2_ATTRIBS*currVert + TEX_ATTRIB+1] = mTexMappingY[BACK] + (1.0f-y) * mTexMappingH[BACK]; |
644 | 644 |
} |
645 | 645 |
|
646 |
attribs2[VERT2_ATTRIBS*currVert + TAG_ATTRIB] = DEFAULT_TAG; |
|
647 |
|
|
646 | 648 |
currVert++; |
647 | 649 |
} |
648 | 650 |
|
... | ... | |
675 | 677 |
|
676 | 678 |
attribs2[VERT2_ATTRIBS*currVert + TEX_ATTRIB ] = mTexMappingX[TOP] + x * mTexMappingW[TOP]; |
677 | 679 |
attribs2[VERT2_ATTRIBS*currVert + TEX_ATTRIB+1] = mTexMappingY[TOP] + (0.5f-z) * mTexMappingH[TOP]; |
680 |
attribs2[VERT2_ATTRIBS*currVert + TAG_ATTRIB ] = DEFAULT_TAG; |
|
678 | 681 |
|
679 | 682 |
break; |
680 | 683 |
case SOUTH: row = curr.row+1; |
... | ... | |
697 | 700 |
|
698 | 701 |
attribs2[VERT2_ATTRIBS*currVert + TEX_ATTRIB ] = mTexMappingX[BOTTOM] + x * mTexMappingW[BOTTOM]; |
699 | 702 |
attribs2[VERT2_ATTRIBS*currVert + TEX_ATTRIB+1] = mTexMappingY[BOTTOM] + (0.5f-z) * mTexMappingH[BOTTOM]; |
703 |
attribs2[VERT2_ATTRIBS*currVert + TAG_ATTRIB ] = DEFAULT_TAG; |
|
700 | 704 |
|
701 | 705 |
break; |
702 | 706 |
case WEST : row = (back ? (curr.row+1):(curr.row)); |
... | ... | |
719 | 723 |
|
720 | 724 |
attribs2[VERT2_ATTRIBS*currVert + TEX_ATTRIB ] = mTexMappingX[LEFT] + (0.5f-z) * mTexMappingW[LEFT]; |
721 | 725 |
attribs2[VERT2_ATTRIBS*currVert + TEX_ATTRIB+1] = mTexMappingY[LEFT] + (1.0f-y) * mTexMappingH[LEFT]; |
726 |
attribs2[VERT2_ATTRIBS*currVert + TAG_ATTRIB ] = DEFAULT_TAG; |
|
722 | 727 |
|
723 | 728 |
break; |
724 | 729 |
case EAST : row = (back ? (curr.row):(curr.row+1)); |
... | ... | |
741 | 746 |
|
742 | 747 |
attribs2[VERT2_ATTRIBS*currVert + TEX_ATTRIB ] = mTexMappingX[RIGHT] + (0.5f-z) * mTexMappingW[RIGHT]; |
743 | 748 |
attribs2[VERT2_ATTRIBS*currVert + TEX_ATTRIB+1] = mTexMappingY[RIGHT] + (1.0f-y) * mTexMappingH[RIGHT]; |
749 |
attribs2[VERT2_ATTRIBS*currVert + TAG_ATTRIB ] = DEFAULT_TAG; |
|
744 | 750 |
|
745 | 751 |
break; |
746 | 752 |
} |
... | ... | |
766 | 772 |
|
767 | 773 |
attribs2[VERT2_ATTRIBS*currVert + TEX_ATTRIB ] = attribs2[VERT2_ATTRIBS*(currVert-1) + TEX_ATTRIB ]; |
768 | 774 |
attribs2[VERT2_ATTRIBS*currVert + TEX_ATTRIB+1] = attribs2[VERT2_ATTRIBS*(currVert-1) + TEX_ATTRIB+1]; |
775 |
attribs2[VERT2_ATTRIBS*currVert + TAG_ATTRIB ] = DEFAULT_TAG; |
|
769 | 776 |
|
770 | 777 |
currVert++; |
771 | 778 |
} |
Also available in: Unified diff
Introduce 'tags' (soon to be renamed to 'associations') to Mesh and VertexEffect.
A 'tag' is a way to associate a Vertex Effect only to a subgroup of a given Mesh's vertices (more precisely, only to an arbitrary subset of its Components)