Sys::Element class reference
[Core module]

Declaration  

#include <Goptical/Sys/Element>

namespace Goptical {
namespace Sys {
class Element;
};
};

This class is a member of the Sys namespace.

Inheritance  

Description  

This is the base class for all optical elements.

Instances of this class may be registered as members of the Container class. It handles element position and transform to parent coordinates.

This class has virtual functions which must be reimplemented to handle incoming rays.

Members  

See also the full member list section for this class.

Types  

Functions  

Members detail  

Element(const Math::VectorPair3 &plane)  

Create a new optical element with given position and direction in parent coordinates system.

virtual ~Element()  

No documentation available

virtual void draw_2d_e(Io::Renderer &r, const Element *ref) const  

Draw element 2d layout using the given renderer in given element coordinates.

virtual void draw_3d_e(Io::Renderer &r, const Element *ref) const  

Draw element in 3d using the given renderer in given element coordinates

virtual Math::VectorPair3 get_bounding_box() const  

Get bounding box in local coordinates

Math::Vector3 get_direction(const Element &e) const  

Get element direction in given element coordinate system

Math::Vector3 get_direction() const  

Get element direction in system global coordinates

const Math::Transform<3> & get_global_transform() const  

Get transform from this element local to global coordinates

Math::Vector3 get_local_direction() const  

Get element direction in parent coordinate system

Math::VectorPair3 get_local_plane() const  

Get reference plane (position and direction) in parent coordinate system

See also get_local_direction function and get_local_position function.

const Math::Vector3 & get_local_position() const  

Get element position in parent local coordinate system

const Math::Transform<3> & get_local_transform() const  

Get transform from global to this element local coordinates

Group * get_parent() const  

Get a pointer to parent element, if any.

Math::VectorPair3 get_plane() const  

Get reference plane (position and direction) in system global coordinates

See also get_direction function and get_position function.

Math::VectorPair3 get_plane(const Element &e) const  

Get reference plane (position and direction) in given element coordinates

See also get_direction function and get_position function.

Math::Vector3 get_position(const Element &e) const  

Get element position in given element coordinate system

Math::Vector3 get_position() const  

Get element position in system global coordinate system

System * get_system() const  

Get a pointer to system

const Math::Transform<3> & get_transform() const  

Get transform from this element to parent element coordinate system

const Math::Transform<3> & get_transform_from(const Element &e) const  

Get transform from given element to this element coordinate system

const Math::Transform<3> & get_transform_from(const Element *e) const  

Get transform from given element to this element coordinate system. Transform from global coordinates is returned if paramter is 0.

const Math::Transform<3> & get_transform_to(const Element &e) const  

Get transform from this element to given element coordinate system

const Math::Transform<3> & get_transform_to(const Element *e) const  

Get transform from this element to given element coordinate system. Transform to global coordinates is returned if paramter is 0.

unsigned int get_version() const  

Get element version. version is updated each time element or its children properties are changed

unsigned int id() const  

Get element identifer in current system

bool is_enabled() const  

Return true if element must be considered

typedef delegate<void(Element&)> mod_delegate_t  

No documentation available

virtual void print(std::ostream &o) const  

No documentation available

template <Trace::IntensityMode m> void process_rays(Trace::Result &result, Trace::rays_queue_t *input) const  

Batch process a list of light rays interacting with element. This function is only used in sequential ray trace mode.

typedef delegate<void(const Element&)> put_delegate_t  

No documentation available

void rotate(double x, double y, double z)  

Rotate element direction. angles are in degrees

void set_direction(const Math::Vector3 &v)  

Set element direction in system global coordinates

void set_enable_state(bool enabled)  

Set enable state

void set_local_direction(const Math::Vector3 &v)  

Set element direction in parent coordinate system

void set_local_plane(const Math::VectorPair3 &p)  

Set reference plane (position and direction) in parent coordinate system

See also set_local_direction function and set_local_position function.

void set_local_position(const Math::Vector3 &v)  

Set element position in parent local coordinate system

void set_plane(const Math::VectorPair3 &p)  

Set reference plane (position and direction) in system global coordinates

See also set_direction function and set_position function.

void set_position(const Math::Vector3 &v)  

Set element position in system global coordinate system

void set_transform(const Math::Transform<3> &t)  

Set transform to parant coordinate system

void update_version()  

Increase current element version

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