diff options
Diffstat (limited to 'Unicity.Renderer/Shapes/Rectangle.cs')
| -rw-r--r-- | Unicity.Renderer/Shapes/Rectangle.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Unicity.Renderer/Shapes/Rectangle.cs b/Unicity.Renderer/Shapes/Rectangle.cs new file mode 100644 index 0000000..2239426 --- /dev/null +++ b/Unicity.Renderer/Shapes/Rectangle.cs @@ -0,0 +1,26 @@ +namespace Unicity.Renderer.Shapes +{ + public class Rectangle : Shape + { + Triangle rect1 = null; + Triangle rect2 = null; + + public Rectangle(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4) + { + rect1 = new Triangle(x1, y1, z1, x2, y2, z2, x3, y3, z3); + rect2 = new Triangle(x3, y3, z3, x2, y2, z2, x4, y4, z4); + } + + internal override void Draw(Shader shader, GraphicsRenderer renderer) + { + rect1.Draw(shader, renderer); + rect2.Draw(shader, renderer); + } + + public override void Dispose() + { + rect1.Dispose(); + rect2.Dispose(); + } + } +} |
