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
- typedef [...] mod_delegate_t
- typedef [...] put_delegate_t
Functions
- Element(const Math::VectorPair3 &plane)
- virtual ~Element()
- virtual void draw_2d_e(Io::Renderer &r, const Element *ref) const
- virtual void draw_3d_e(Io::Renderer &r, const Element *ref) const
- virtual Math::VectorPair3 get_bounding_box() const
- Math::Vector3 get_direction(const Element &e) const
- Math::Vector3 get_direction() const
- const Math::Transform<3> & get_global_transform() const
- Math::Vector3 get_local_direction() const
- Math::VectorPair3 get_local_plane() const
- const Math::Vector3 & get_local_position() const
- const Math::Transform<3> & get_local_transform() const
- Group * get_parent() const
- Math::VectorPair3 get_plane() const
- Math::VectorPair3 get_plane(const Element &e) const
- Math::Vector3 get_position(const Element &e) const
- Math::Vector3 get_position() const
- System * get_system() const
- const Math::Transform<3> & get_transform() const
- const Math::Transform<3> & get_transform_from(const Element &e) const
- const Math::Transform<3> & get_transform_from(const Element *e) const
- const Math::Transform<3> & get_transform_to(const Element &e) const
- const Math::Transform<3> & get_transform_to(const Element *e) const
- unsigned int get_version() const
- unsigned int id() const
- bool is_enabled() const
- virtual void print(std::ostream &o) const
- template void process_rays(Trace::Result &result, Trace::rays_queue_t *input) const
- void rotate(double x, double y, double z)
- void set_direction(const Math::Vector3 &v)
- void set_enable_state(bool enabled)
- void set_local_direction(const Math::Vector3 &v)
- void set_local_plane(const Math::VectorPair3 &p)
- void set_local_position(const Math::Vector3 &v)
- void set_plane(const Math::VectorPair3 &p)
- void set_position(const Math::Vector3 &v)
- void set_transform(const Math::Transform<3> &t)
- void update_version()
Members detail
Element(const Math::VectorPair3 &plane)
Create a new optical element with given position and direction in parent coordinates system.
No documentation available
Draw element 2d layout using the given renderer in given element coordinates.
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
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.
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
Get transform from given element to this element coordinate system
Get transform from given element to this element coordinate system. Transform from global coordinates is returned if paramter is 0.
Get transform from this element to given element coordinate system
Get transform from this element to given element coordinate system. Transform to global coordinates is returned if paramter is 0.
Get element version. version is updated each time element or its children properties are changed
Get element identifer in current system
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
Rotate element direction. angles are in degrees
void set_direction(const Math::Vector3 &v)
Set element direction in system global coordinates
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
Increase current element version