mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-16 01:54:50 +00:00
Initial 1.7 commit
This commit is contained in:
1 parent
34154fc011
commit
ca675b5f31
72 files changed
+2967
-3335
No files matched your search
@@ -0,0 +1,37 @@
|
||||
package codechicken.lib.render.uv;
|
||||
|
||||
import codechicken.lib.render.CCRenderState;
|
||||
import codechicken.lib.vec.ITransformation;
|
||||
|
||||
/**
|
||||
* Abstract supertype for any UV transformation
|
||||
*/
|
||||
public abstract class UVTransformation extends ITransformation<UV, UVTransformation> implements CCRenderState.IVertexOperation
|
||||
{
|
||||
public static final int operationIndex = CCRenderState.registerOperation();
|
||||
|
||||
public UVTransformation at(UV point) {
|
||||
return new UVTransformationList(new UVTranslation(-point.u, -point.v), this, new UVTranslation(point.u, point.v));
|
||||
}
|
||||
|
||||
public UVTransformationList with(UVTransformation t) {
|
||||
return new UVTransformationList(this, t);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean load() {
|
||||
return !isRedundant();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void operate() {
|
||||
apply(CCRenderState.vert.uv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int operationID() {
|
||||
return operationIndex;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user