Hi guys
I have a ray intersection method(code below) that was created using java and have been trying to convert it to c#/xna
but Im having trouble trying to find the class equivalent of javas Image and Scene classes if anyone could help
me with this conversion it would be much appreciated. Thankyou
Image RayCast(Camera camera, Scene scene, int width, int height)
{
Image image = new Image(width, height);
for (int i = 0; i < width; i++)
{
for (int j = 0; j < height; j++)
{
Ray ray = ConstructRayThroughPixel(camera, i, j);
Intersection hit = FindIntersection(ray, scene);
image[j] = GetColor(hit);
}
}
return image;
}