Add Write methods to scene objects
Write methods are polymorphic, overridden by subclasses. There is a single operator<< for Objects that calls the right Write() method for the object. Neat.
This commit is contained in:
parent
b56bbf4ced
commit
4828cb313f
8 changed files with 64 additions and 1 deletions
|
@ -29,6 +29,10 @@ public:
|
|||
bool DoesIntersect(const Ray& ray, TVector& t, Stats& stats) const;
|
||||
bool point_is_on_surface(const Vector3 &p) const;
|
||||
Vector3 compute_normal(const Vector3 &p) const;
|
||||
|
||||
/** @see charles::Object::Write */
|
||||
void Write(std::ostream& ost) const;
|
||||
|
||||
private:
|
||||
float radius;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue