-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTexture2D.cs
More file actions
32 lines (28 loc) · 752 Bytes
/
Texture2D.cs
File metadata and controls
32 lines (28 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Text;
namespace EnesShahn
{
namespace RayTracingEngine
{
class Texture2D
{
private int width;
private int height;
private float aspectRation;
private Color01[,] pixels;
public Texture2D(int width, int height)
{
this.width = width;
this.height = height;
aspectRation = (float)width / height;
pixels = new Color01[width, height];
}
public Color01 this[int x, int y]
{
get { return pixels[x, y]; }
set { pixels[x, y] = value; }
}
}
}
}