Add transformation compacting.

This commit is contained in:
Chicken Bones committed 2013-08-29 11:10:33 +10:00
1 parent 0941845227
commit 5ef9f6174d
7 files changed
+133 -66

No files matched your search

+9 -1
View File
@@ -32,7 +32,7 @@ public abstract class Transformation
*/
public Transformation at(Vector3 point)
{
return new TranslatedTransformation(this, point);
return new TransformationList(new Translation(-point.x, -point.y, -point.z), this, point.translation());
}
/**
@@ -44,6 +44,14 @@ public abstract class Transformation
return new TransformationList(this, t);
}
/**
* Returns a simplified transformation that performs this, followed by next. If such a transformation does not exist, returns null
*/
public Transformation merge(Transformation next)
{
return null;
}
@SideOnly(Side.CLIENT)
public abstract void glApply();