Shape::Base class reference
[Core module]

Declaration  

#include <Goptical/Shape/Base>

namespace Goptical {
namespace Shape {
class Base;
};
};

This class is a member of the Shape namespace.

This abstract class contains pure virtuals.

Inheritance  

Description  

This class defines an interface for all 2d shape implementations. It is mainly used to describe 2d contours of optical surfaces and provides distribution pattern for ray tracing.

Members  

See also the full member list section for this class.

Functions  

  • Base()
  • virtual ~Base()
  • virtual Math::VectorPair2 get_bounding_box() const = 0;
  • virtual void get_contour(unsigned int contour, const Math::Vector2::put_delegate_t &f, double resolution) const = 0;
  • virtual unsigned int get_contour_count() const = 0;
  • virtual double get_hole_radius(const Math::Vector2 &dir) const
  • virtual double get_outter_radius(const Math::Vector2 &dir) const = 0;
  • virtual void get_pattern(const Math::Vector2::put_delegate_t &f, const Trace::Distribution &d, bool unobstructed = [...]) const
  • virtual void get_triangles(const Math::Triangle<2>::put_delegate_t &f, double resolution) const = 0;
  • virtual bool inside(const Math::Vector2 &point) const = 0;
  • virtual double max_radius() const = 0;
  • virtual double min_radius() const = 0;

Members detail  

Base()  

No documentation available

virtual ~Base()  

No documentation available

virtual Math::VectorPair2 get_bounding_box() const = 0;  

Get shape bounding box

virtual void get_contour(unsigned int contour, const Math::Vector2::put_delegate_t &f, double resolution) const = 0;  

Get contour polygone points for specified contour id. First contour is always outter edge.

See also get_contour_count function.

virtual unsigned int get_contour_count() const = 0;  

Get number of contours polygones. This function returns value is greater than 1 if shape has hole(s).

See also get_contour function.

virtual double get_hole_radius(const Math::Vector2 &dir) const  

Get distance between origin and nearest shape outter edge in specified direction

virtual double get_outter_radius(const Math::Vector2 &dir) const = 0;  

Get distance between origin and farthest shape edge in specified direction

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

Get points distributed on shape area with given pattern

virtual void get_triangles(const Math::Triangle<2>::put_delegate_t &f, double resolution) const = 0;  

Get shape teselation triangles

virtual bool inside(const Math::Vector2 &point) const = 0;  

Check if the (x,y) 2d point is inside 2d shape area

virtual double max_radius() const = 0;  

Get distance between origin and farthest shape edge

virtual double min_radius() const = 0;  

Get distance between origin and nearest shape outter edge

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