public Door(Transform transform, Material material, Vector3f openPos)
	{
		this.transform = transform;
		this.material = material;
        this.closePos = transform.getTranslation().mul(1);
        this.openPos = openPos;
		if(mesh == null)
		{
			Vertex[] vertices = new Vertex[]{new Vertex(new Vector3f(START, START, START), new Vector2f(0.5f,1)),
											 new Vertex(new Vector3f(START, HEIGHT, START), new Vector2f(0.5f,0.75f)),
											 new Vertex(new Vector3f(LENGHT, HEIGHT, START), new Vector2f(0.75f,0.75f)),
											 new Vertex(new Vector3f(LENGHT, START, START), new Vector2f(0.75f,1)),

                                             new Vertex(new Vector3f(START, START, START), new Vector2f(0.73f,1)),
                                             new Vertex(new Vector3f(START, HEIGHT, START), new Vector2f(0.73f,0.75f)),
                                             new Vertex(new Vector3f(START, HEIGHT, WIDTH), new Vector2f(0.75f,0.75f)),
                                             new Vertex(new Vector3f(START, START, WIDTH), new Vector2f(0.75f,1f)),

                                             new Vertex(new Vector3f(START, START, WIDTH), new Vector2f(0.5f,1)),
                                             new Vertex(new Vector3f(START, HEIGHT, WIDTH), new Vector2f(0.5f,0.75f)),
                                             new Vertex(new Vector3f(LENGHT, HEIGHT, WIDTH), new Vector2f(0.75f,0.75f)),
                                             new Vertex(new Vector3f(LENGHT, START, WIDTH), new Vector2f(0.75f,1)),

                                             new Vertex(new Vector3f(LENGHT, START, START), new Vector2f(0.73f,1)),
                                             new Vertex(new Vector3f(LENGHT, HEIGHT, START), new Vector2f(0.73f,0.75f)),
                                             new Vertex(new Vector3f(LENGHT, HEIGHT, WIDTH), new Vector2f(0.75f,0.75f)),
                                             new Vertex(new Vector3f(LENGHT, START, WIDTH), new Vector2f(0.75f,1f))};

            int[] indices = new int[]{0,1,2,
                                      0,2,3,
                                      6,5,4,
                                      7,6,4,

                                      10,9,8,
                                      11,10,8,
                                      12,13,14,
                                      12,14,15};

            mesh = new Mesh(vertices, indices);
		}
		
		
	}