Sys::Surface class reference
[Core module]

Declaration  

#include <Goptical/Sys/Surface>

namespace Goptical {
namespace Sys {
class Surface;
};
};

This class is a member of the Sys namespace.

Inheritance  

Description  

This is the base class for surface element. A surface element is defined by its position, surface curve and contour shape.

This class can handle incoming rays and is responsible for finding rays intersection with the surface.

Depending on ray trace intensity mode, it will potentially adjust light absorption and then call trace_ray_simple, trace_ray_intensity or trace_ray_polarized. These functions must be reimplemented in sub classes, default implementations will throw.

Members  

See also the full member list section for this class.

Inherited members  

Functions  

  • Surface(const Math::VectorPair3 &p, const const_ref<Curve::Base> &curve, const const_ref<Shape::Base> &shape)
  • virtual ~Surface()
  • virtual Math::VectorPair3 get_bounding_box() const
  • virtual Io::Rgb get_color(const Io::Renderer &r) const
  • const Curve::Base & get_curve() const
  • double get_discard_intensity() const
  • void get_pattern(const Math::Vector3::put_delegate_t &f, const Trace::Distribution &d, bool unobstructed = [...]) const
  • const Shape::Base & get_shape() const
  • virtual bool intersect(const Trace::Params &params, Math::VectorPair3 &pt, const Math::VectorPair3 &ray) const
  • void set_curve(const const_ref<Curve::Base> &c)
  • void set_discard_intensity(double intensity)
  • void set_shape(const const_ref<Shape::Base> &s)
  • template void trace_ray(Trace::Result &result, Trace::Ray &incident, const Math::VectorPair3 &local, const Math::VectorPair3 &intersect) const

Members detail  

Surface(const Math::VectorPair3 &p, const const_ref<Curve::Base> &curve, const const_ref<Shape::Base> &shape)  

Create a surface element at given location.

virtual ~Surface()  

No documentation available

virtual Math::VectorPair3 get_bounding_box() const  

This virtual function overrides the get_bounding_box virtual function defined in the Element base class.

Documentation inherited from base class:

Get bounding box in local coordinates

virtual Io::Rgb get_color(const Io::Renderer &r) const  

Get surface apparent color

const Curve::Base & get_curve() const  

Get surface curve

double get_discard_intensity() const  

Get minimal ray intensity.

void get_pattern(const Math::Vector3::put_delegate_t &f, const Trace::Distribution &d, bool unobstructed = false) const  

Get distribution pattern points projected on the surface

const Shape::Base & get_shape() const  

Get surface shape

virtual bool intersect(const Trace::Params &params, Math::VectorPair3 &pt, const Math::VectorPair3 &ray) const  

Get intersection point and normal to surface at intersection. Return false if no intersection occured.

void set_curve(const const_ref<Curve::Base> &c)  

Set surface curve

void set_discard_intensity(double intensity)  

Set minimal ray intensity. Incident rays with less intensity will be discarded

void set_shape(const const_ref<Shape::Base> &s)  

Set surface shape

template <Trace::IntensityMode m> void trace_ray(Trace::Result &result, Trace::Ray &incident, const Math::VectorPair3 &local, const Math::VectorPair3 &intersect) const  

Trace a single ray through the surface

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Jan 8 00:47:25 2012 using MkDoc