Revision 1e672c1d
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/library/effect/VertexEffect.java | ||
---|---|---|
58 | 58 |
{ |
59 | 59 |
return |
60 | 60 |
|
61 |
"if( vName[i]=="+effect+" && (int(a_Tag) & vTag[i]) != 0 )\n" +
|
|
61 |
"if( vName[i]=="+effect+" && (int(a_Association) & vAssociation[i]) != 0 )\n" +
|
|
62 | 62 |
"{\n" + |
63 | 63 |
code +"\n" + |
64 | 64 |
"}\n" + |
... | ... | |
190 | 190 |
|
191 | 191 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
192 | 192 |
/** |
193 |
* Set a tag.
|
|
193 |
* Set Mesh association.
|
|
194 | 194 |
* |
195 |
* A 'tag' of a Vertex Effect joins the effect with a component of a Mesh the effect gets applied to.
|
|
196 |
* One can set a Tag of the effect and of a Component, and the Effect will only be active on vertices
|
|
197 |
* of Components such that (effect tag) & (component tag) != 0. (see retSection() above)
|
|
195 |
* This creates an association between this Vertex Effect and a Component of a Mesh.
|
|
196 |
* One can set the association of an Effect and of a Component, and the Effect will only be active on
|
|
197 |
* vertices of Components such that (effect assoc) & (component assoc) != 0. (see retSection() above)
|
|
198 | 198 |
* |
199 | 199 |
* The point: this way we can configure the system so that each Vertex Effect acts only on a certain |
200 |
* subset of the Mesh, thus potentially significantly reducing the number of render calls.
|
|
200 |
* subset of a Mesh, thus potentially significantly reducing the number of render calls.
|
|
201 | 201 |
*/ |
202 |
public void setTag(int tag)
|
|
202 |
public void setMeshAssociation(int association)
|
|
203 | 203 |
{ |
204 |
mTag = tag;
|
|
204 |
mAssociation = association;
|
|
205 | 205 |
} |
206 | 206 |
} |
Also available in: Unified diff
Change 'tag' to a more appropriate name - 'association'.