package speiger.src.coreengine.rendering.guiOld.renderer.buffer;

import speiger.src.coreengine.rendering.tesselationOld.IVertexBuilder;

public class TranslatedVertexBuilder implements IVertexBuilder
{
	IVertexBuilder builder;
	float xOff;
	float yOff;
	float zOff;
	float wOff;
	
	public TranslatedVertexBuilder(IVertexBuilder builder, float xOff, float yOff, float zOff, float wOff)
	{
		this.builder = builder;
		this.xOff = xOff;
		this.yOff = yOff;
		this.zOff = zOff;
		this.wOff = wOff;
	}

	@Override
	public IVertexBuilder pos(float x, float y) 
	{
		builder.pos(x, y);
		return this;
	}
	
	@Override
	public IVertexBuilder pos(float x, float y, float z) 
	{
		builder.pos(x, y, z);
		return this;
	}
	
	@Override
	public IVertexBuilder color3f(float r, float g, float b) 
	{
		builder.color3f(r, g, b); 
		return this;
	}
	
	@Override
	public IVertexBuilder color4f(float r, float g, float b, float a) 
	{ 
		builder.color4f(r, g, b, a); 
		return this;
	}
	
	@Override
	public IVertexBuilder tex(float u, float v) 
	{
		builder.tex(u, v);
		return this;
	}
	
	@Override
	public IVertexBuilder normal(float x, float y, float z) 
	{
		builder.normal(x, y, z); 
		return this;
	}
	
	@Override
	public IVertexBuilder custom(float x) 
	{ 
		builder.custom(x); 
		return this;
	}
	
	@Override
	public IVertexBuilder custom(float x, float y)
	{ 
		builder.custom(x, y); 
		return this;
	}
	
	@Override
	public IVertexBuilder custom(float x, float y, float z) 
	{ 
		builder.custom(x, y, z); 
		return this;
	}
	
	@Override
	public IVertexBuilder custom(float x, float y, float z, float w) 
	{ 
		builder.custom(x, y, z, w);
		return this;
	}
	
	@Override
	public IVertexBuilder endVertex() 
	{ 
		builder.custom(xOff, yOff, zOff, wOff).endVertex();
		return this;
	}
}