Io::RendererViewport class reference
[Core module]
Declaration
#include <Goptical/Io/RendererViewport>
namespace Goptical {
namespace Io {
class RendererViewport;
};
};
This class is a member of the Io namespace.
This abstract class contains pure virtuals.
Inheritance
Description
This class defines an interface for rendering drivers which rely on viewport windows, scaling and 2d projection operations. It's designed to be used as a base class for such renderers; this mainly includes pixel based output renderers.
Renderers which write output in vector format in world coordinates directly do not need this class as base.
Members
See also the full member list section for this class.
Inherited members
- 10 members inherited from Renderer
Functions
- RendererViewport()
- virtual void draw_pages_grid(const Rgb &rgb = [...])
- virtual Math::Transform<3> get_camera_transform() const = 0;
- double get_fov() const
- const Math::VectorPair2 & get_window() const
- virtual void set_2d_size(double width, double height)
- void set_camera_direction(const Math::Vector3 &dir)
- void set_camera_position(const Math::Vector3 &pos)
- virtual void set_camera_transform(const Math::Transform<3> &t) = 0;
- void set_fov(double fov)
- void set_margin(double left, double bottom, double right, double top)
- void set_margin(double width, double height)
- void set_margin_output(double left, double bottom, double right, double top)
- void set_margin_output(double width, double height)
- void set_margin_ratio(double left, double bottom, double right, double top)
- void set_margin_ratio(double width, double height)
- void set_numeric_format(std::ios_base::fmtflags format, unsigned int precision)
- virtual void set_page(unsigned int page)
- virtual void set_page_layout(unsigned int cols, unsigned int rows)
- virtual void set_perspective() = 0;
- virtual void set_window(const Math::Vector2 ¢er, const Math::Vector2 &size, bool keep_aspect = [...])
- void set_window(const Math::VectorPair2 &window, bool keep_aspect = [...])
- void set_window(const Math::Vector2 ¢er, double radius, bool keep_aspect = [...])
Members detail
No documentation available
virtual void draw_pages_grid(const Rgb &rgb = rgb_gray)
Draw separations between pages, output window must have been setup before.
virtual Math::Transform<3> get_camera_transform() const = 0;
Get reference to 3d camera transform
Get field of view in degrees.
See also set_fov function.
const Math::VectorPair2 & get_window() const
Get current viewport window
Update 2d output size, not all drivers support this
void set_camera_direction(const Math::Vector3 &dir)
Set 3d camera rotation from direction vector
void set_camera_position(const Math::Vector3 &pos)
Set 3d camera rotation from direction vector
virtual void set_camera_transform(const Math::Transform<3> &t) = 0;
Get modifiable reference to 3d camera transform
Set field of view in degrees.
See also get_fov function.
Set amount of 2d margin space for set_window operation in world coordinates units.
See set_margin function.
Set amount of 2d margin space for set_window operation in output size units (usually pixels).
See set_margin_output function.
Set amount of 2d margin space for set_window operation as ratio of window.
See set_margin_ratio function.
void set_numeric_format(std::ios_base::fmtflags format, unsigned int precision)
Set format used to print numeric values
Select current page when multiple pages layout is in use.
See also set_page_layout function.
This function can be used to setup a pages grid. Current output page must be selected with set_page.
Set 3d perspective projection mode. This function reset the viewport window to (-1,1).
See also set_window function and set_fov function.
virtual void set_window(const Math::Vector2 ¢er, const Math::Vector2 &size, bool keep_aspect = true)
Set 2d viewport window. This function set 3d projection to orthographic.
void set_window(const Math::VectorPair2 &window, bool keep_aspect = true)
Set 2d viewport window. This function set 3d projection to orthographic.
void set_window(const Math::Vector2 ¢er, double radius, bool keep_aspect = true)
Set 2d viewport window. This function set 3d projection to orthographic.