Ok, I have a problem here, relating to the above question
Code:
// Load the direction list
Vector3D myList = generateRayDirections(400,400,0);
// A function for generating a ray
// Note: this is not a part of Engine::
Vector3D generateRayDirections(int width, int hight, int depth)
{
// An array for holding all the directions for all the rays which
// later will be created
Vector3D *directionTable = new Vector3D[width * hight];
// Variables for holding half the width and hight.
// Is used to set the camera at the center of the screen
float halfWidth = (float)(width/2);
float halfHight = (float)(hight/2);
// We loop through all the pixels starting from left uper
// corner and move to the right. Then a direction is created
// for each of them, making it easy to acces them later
for (int y = 0; y < hight; y++)
{
for (int x = 0; x < width; x++)
{
// Assign direction
// reference which number of the array
// Create a vector with the direction
// Normalize the vector
// Add a vector with the direction to the array
}
}
return directionTable;
}
Here is the errors:
RayTracer.cpp In function `Vector3D generateRayDirections(int, int, int)':
RayTracer.cpp conversion from `Vector3D*' to non-scalar type `Vector3D' requested