Pinhole - package raytracer.cameras import...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: package raytracer.cameras; import raytracer.utility.*; import raytracer.world.*; public class Pinhole extends Camera { private float d; // view plane distance private float zoom; // zoom factor // ----------------------------------------------------------------------------- default constructor public Pinhole(){ super(); d = 500; zoom = 1.0f; } // ----------------------------------------------------------------------------- copy constructor public Pinhole(Pinhole c){ super(c); d = c.d; zoom = c.zoom; } // ----------------------------------------------------------------------------- clone public Camera clone() { return (new Pinhole(this)); } // ----------------------------------------------------------------------------- assignment operator public void set (Pinhole rhs) { if (this != rhs) { super.set(rhs); d = rhs.d; zoom = rhs.zoom; } } //-------------------------------------------------------------------------- set_vpd public void set_view_distance(float _d) { d = _d; } //--------------------------------------------------------------------------...
View Full Document

{[ snackBarMessage ]}

Page1 / 3

Pinhole - package raytracer.cameras import...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online