Compound - package raytracer.geometricObjects import...

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

View Full Document Right Arrow Icon
package raytracer.geometricObjects; import raytracer.utility.*; import java.util.Vector; import; import; import; import java.util.Scanner; import java.util.Random; public class Compound extends GeometricObject { protected Vector<GeometricObject> objects; public Compound() { super(); objects = new Vector<GeometricObject>(); } // ---------------------------------------------------------------- copy constructor public Compound(Compound c) { super(c); copy_objects(c.objects); } // ---------------------------------------------------------------- assignment operator public void set (Compound rhs) { if (this != rhs) { super.set(rhs); copy_objects(rhs.objects); } } // ---------------------------------------------------------------- clone public GeometricObject clone() { return (new Compound(this)); } // ---------------------------------------------------------------- add_object public void add_object(GeometricObject object_ptr) { objects.add(object_ptr);
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/19/2010 for the course CS 390 taught by Professor Hu during the Spring '10 term at Westminster UT.

Page1 / 4

Compound - package raytracer.geometricObjects 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