Project

General

Profile

« Previous | Next » 

Revision bc208a9c

Added by Leszek Koltunski almost 4 years ago

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)

View differences:

src/main/java/org/distorted/library/mesh/MeshSphere.java
33 33
  private static final int NUMFACES = 16;
34 34
  private static final double P = Math.PI;
35 35

  
36
  // An array of 16 entries, each describing a single face of the solid in an (admittedly) weird
36
  // An array of 16 entries, each describing a single face of a solid in an (admittedly) weird
37 37
  // fashion. Each face is a triangle, with 2 vertices on the same latitude.
38 38
  // Single row is (longitude of V1, longitude of V2, (common) latitude of V1 and V2, latitude of V3)
39 39
  // longitude of V3 is simply midpoint of V1 and V2 so we don't have to specify it here.
......
95 95

  
96 96
      attribs2[VERT2_ATTRIBS*currentVert + TEX_ATTRIB  ] = attribs2[VERT2_ATTRIBS*(currentVert-1) + TEX_ATTRIB  ];
97 97
      attribs2[VERT2_ATTRIBS*currentVert + TEX_ATTRIB+1] = attribs2[VERT2_ATTRIBS*(currentVert-1) + TEX_ATTRIB+1];
98
      attribs2[VERT2_ATTRIBS*currentVert + TAG_ATTRIB  ] = DEFAULT_TAG;
98 99

  
99 100
      currentVert++;
100 101
      }
......
198 199

  
199 200
    attribs2[VERT2_ATTRIBS*currentVert + TEX_ATTRIB  ] = (float)texX;
200 201
    attribs2[VERT2_ATTRIBS*currentVert + TEX_ATTRIB+1] = (float)texY;
202
    attribs2[VERT2_ATTRIBS*currentVert + TAG_ATTRIB  ] = DEFAULT_TAG;
201 203

  
202 204
    currentVert++;
203 205

  

Also available in: Unified diff