Camera
// Views the scene from a location.
class RVAPI Camera
{
public:
// Get position.
const M4f &GetPos() const;
// Set tone color. [tone] influences the overall scene color.
// The default tone is neutral (1, 1, 1).
void SetTone(const Color &color);
// Set background color.
void SetBgd(const Color &color);
// Set background ambient light.
void SetAmbient(float ambient);
// The ray gap is the offset from the surface for ray bounces. The default is .0001f meters.
// For large outdoor scenes this value may have to be scaled higher to smooth shadows.
// Experiment with increasing the value.
void SetRayGap(float gap);
// Set focal ratio. .1f=wide to 3.0f=narrow. Default=.4f.
void SetFocalRatio(float fr);
// Set view distance in meters. Default is 999.
void SetViewDist(float dist);
// Set viewport dimensions. Coordinates are normalized.
void SetViewPort(float x1, float y1, float x2, float y2);
// Set position.
void SetPos(const M4f &pos);
// Internal.
void *operator () () const { return (void *)wobj; }
// Construct camera at [z] order in the viewport. Higher z overlays lower z.
// [n] is the camera number within the z order. z and n together must be unique.
Camera(const M4f &pos, uint z = 0, uint n = 0);
// Destructor.
~Camera();
private:
byte wobj[640];
};