protected override void CreateGeometry() { var sideTexture = new GeometryTextureIndex(1); var topTexture = new GeometryTextureMultiplier(_size); var cuboidTexture = new GeometryTextureCuboidWrapper(); cuboidTexture.AddSide(new[] { CuboidSide.Back, CuboidSide.Front, CuboidSide.Left, CuboidSide.Right }, sideTexture); cuboidTexture.AddSide(new[] { CuboidSide.Top, CuboidSide.Bottom }, topTexture); Geometry.AddVertices(CuboidComposer.Create(_size.X, 0.2f, _size.Y, cuboidTexture)); }
protected override void CreateGeometry() { var side1Texture = new GeometryTextureMultiplier(new Vector2(_size.X, _size.Y)); var side2Texture = new GeometryTextureMultiplier(new Vector2(1, _size.Y)); var topTexture = new GeometryTextureMultiplier(new Vector2(_size.X, 1), 1); var cuboidTexture = new GeometryTextureCuboidWrapper(); cuboidTexture.AddSide(new[] { CuboidSide.Back, CuboidSide.Front }, side1Texture); cuboidTexture.AddSide(new[] { CuboidSide.Left, CuboidSide.Right }, side2Texture); cuboidTexture.AddSide(new[] { CuboidSide.Top, CuboidSide.Bottom }, topTexture); Geometry.AddVertices(CuboidComposer.Create(_size.X, _size.Y, 1f, cuboidTexture)); }
protected override void CreateGeometry() { var side1Texture = new GeometryTextureMultiplier(new Vector2(3, 2)); var side2Texture = new GeometryTextureMultiplier(new Vector2(2, 2)); var doorTexture = new GeometryTextureIndex(1); var topTexture = new GeometryTextureMultiplier(new Vector2(8, 4)); var cuboidTexture = new GeometryTextureCuboidWrapper(); cuboidTexture.AddSide(new[] { CuboidSide.Back, CuboidSide.Front }, side1Texture); cuboidTexture.AddSide(new[] { CuboidSide.Right }, side2Texture); cuboidTexture.AddSide(new[] { CuboidSide.Left }, doorTexture); cuboidTexture.AddSide(new[] { CuboidSide.Top, CuboidSide.Bottom }, topTexture); Geometry.AddVertices(CuboidComposer.Create(4f, 3f, 3f, cuboidTexture)); }
protected override void CreateGeometry() { var cuboidTexture = new GeometryTextureCuboidWrapper(); cuboidTexture.AddSide( new[] { CuboidSide.Left, CuboidSide.Right, CuboidSide.Top, CuboidSide.Bottom }, new GeometryTextureIndex(1)); Geometry.AddVertices(CuboidComposer.Create(1f, 1f, 0.5f, cuboidTexture)); }
protected override void CreateGeometry() { Geometry.AddVertices(CuboidComposer.Create(0.2f, 10f, 0.2f, new GeometryTextureRectangle(new Rectangle(0, 4, 4, 4), _texture))); var sideTexture1 = new GeometryTextureRectangle(new Rectangle(0, 0, 8, 4), _texture); var sideTexture2 = new GeometryTextureRectangle(new Rectangle(12, 4, 4, 4), _texture); var bottomTexture = new GeometryTextureRectangle(new Rectangle(8, 0, 8, 4), _texture); var cuboidTexture = new GeometryTextureCuboidWrapper(); cuboidTexture.AddSide(new[] { CuboidSide.Left, CuboidSide.Right }, sideTexture2); cuboidTexture.AddSide(new[] { CuboidSide.Front, CuboidSide.Back, CuboidSide.Top }, sideTexture1); cuboidTexture.AddSide(new[] { CuboidSide.Bottom }, bottomTexture); var topPart = CuboidComposer.Create(0.8f, 0.4f, 0.4f, cuboidTexture); VertexTransformer.Offset(topPart, new Vector3(0.25f, 5f, 0f)); Geometry.AddVertices(topPart); }