|
gtsam_points
|
Shader setting class that holds rendering settings. More...
#include <shader_setting.hpp>

Public Types | |
| using | Ptr = std::shared_ptr< ShaderSetting > |
| using | ConstPtr = std::shared_ptr< const ShaderSetting > |
Public Member Functions | |
| ShaderSetting () | |
| Default constructor. | |
| ShaderSetting (int color_mode) | |
| Constructor. | |
| ShaderSetting (int color_mode, const Eigen::Matrix4f &transform) | |
| Constructor. | |
| template<typename Transform > | |
| ShaderSetting (int color_mode, const Transform &transform) | |
| Constructor. | |
| ShaderSetting (const ShaderSetting &other) | |
| Copy constructor. | |
| ShaderSetting & | operator= (const ShaderSetting &other) |
| Copy assignment operator. | |
| virtual | ~ShaderSetting () |
| Destructor. | |
| ShaderSetting | clone () const |
| Clone the shader setting. | |
| template<typename T > | |
| ShaderSetting & | add (const std::string &name_, const T &value) |
| Add a new parameter to the shader setting. | |
| template<typename T > | |
| std::optional< T > | get (const std::string &name_) |
| Get a parameter value from the shader setting. | |
| template<typename T > | |
| std::optional< T > | get (const std::string &name_) const |
| Get a parameter value from the shader setting. | |
| template<typename T > | |
| T | cast (const std::string &name_) const |
| Get a parameter value from the shader setting. This method avoid type checking. Fast but unsafe. | |
| void | set (glk::GLSLShader &shader) const |
| Set shader parameters to the shader program. | |
| ShaderSetting & | static_object () |
| Set static object flag. | |
| ShaderSetting & | dynamic_object () |
| Set dynamic object flag. | |
| Eigen::Vector4f | material_color () const |
| Get material color (FLAT_COLOR). | |
| ShaderSetting & | set_color (float r, float g, float b, float a) |
| Set material color (FLAT_COLOR). | |
| template<typename Color > | |
| ShaderSetting & | set_color (const Color &color_) |
| Set material color (for FLAT_COLOR). | |
| ShaderSetting & | set_alpha (float alpha) |
| Set alpha value of the material color. | |
| ShaderSetting & | make_transparent () |
| Make the object transparent (alpha blending). | |
| ShaderSetting & | set_rainbow_range (const Eigen::Vector2f &minmax_z) |
| Set RAINBOW color range. | |
| ShaderSetting & | set_rainbow_axis (const Eigen::Vector3f &axis) |
| Set RAINBOW coloring axis. | |
| float | point_scale () const |
| Get point size scale factor. | |
| ShaderSetting & | set_point_scale (float scaling) |
| Set point size scale factor. | |
| float | point_size () const |
| Get point size. | |
| ShaderSetting & | set_point_size (float size) |
| Set point size. | |
| ShaderSetting & | set_point_size_offset (float offset) |
| Set point size offset. | |
| ShaderSetting & | set_point_shape_mode (guik::PointShapeMode::MODE mode) |
| Set point shape mode. | |
| ShaderSetting & | set_point_shape_circle () |
| Set point shape to circle. | |
| ShaderSetting & | set_point_shape_rectangle () |
| Set point shape to rectangle. | |
| ShaderSetting & | set_point_scale_mode (guik::PointScaleMode::MODE mode) |
| Set point size scale mode. | |
| ShaderSetting & | set_point_scale_screenspace () |
| Set point size scale to screen space. | |
| ShaderSetting & | set_point_scale_metric () |
| Set point size scale to metric. | |
| ShaderSetting & | set_point_shape (float point_size, bool metric, bool circle) |
| Set point shape with common settings. | |
| ShaderSetting & | set_old_default_point_shape () |
| Set old (v0.1.9) default point shape (rectangle + screenspace) | |
| ShaderSetting & | remove_model_matrix () |
| int | color_mode () const |
| Get color mode. | |
| ShaderSetting & | set_color_mode (int color_mode) |
| Set color mode. | |
| Eigen::Matrix4f | model_matrix () const |
| Get model matrix. | |
| Eigen::Vector3f | translation () const |
| Get translation vector from the model matrix. | |
| Eigen::Matrix3f | rotation () const |
| Get rotation matrix from the model matrix. | |
| template<typename Transform > | |
| ShaderSetting & | set_model_matrix (const Transform &transform) |
| Set model matrix. | |
| template<typename Transform > | |
| ShaderSetting & | transform (const Transform &transform) |
| Apply transformation to the model matrix. | |
| ShaderSetting & | translate (float tx, float ty, float tz) |
| Apply translation to the model matrix. | |
| ShaderSetting & | translate (const Eigen::Vector3f &translation) |
| Apply translation to the model matrix. | |
| template<typename Vector > | |
| ShaderSetting & | translate (const Vector &translation) |
| Apply translation to the model matrix. | |
| ShaderSetting & | rotate (const float angle, const Eigen::Vector3f &axis) |
| Apply rotation to the model matrix. | |
| template<typename Vector > | |
| ShaderSetting & | rotate (const float angle, const Vector &axis) |
| Apply rotation to the model matrix. | |
| template<typename Scalar > | |
| ShaderSetting & | rotate (const Eigen::Quaternion< Scalar > &quat) |
| Apply rotation to the model matrix. | |
| template<typename Scalar , int Dim> | |
| ShaderSetting & | rotate (const Eigen::Matrix< Scalar, Dim, Dim > &rot) |
| Apply rotation to the model matrix. | |
| ShaderSetting & | scale (float scaling) |
| Apply uniform scaling to the model matrix. | |
| ShaderSetting & | scale (float sx, float sy, float sz) |
| Apply scaling to the model matrix (non-uniform). | |
| ShaderSetting & | scale (const Eigen::Vector3f &scaling) |
| Apply scaling to the model matrix (non-uniform). | |
| template<typename Vector > | |
| std::enable_if_t<!std::is_arithmetic_v< Vector >, ShaderSetting & > | scale (const Vector &scaling) |
| Apply scaling to the model matrix (non-uniform). | |
| template<> | |
| ShaderSetting & | add (const std::string &name, const Eigen::Isometry3f &value) |
| template<> | |
| ShaderSetting & | add (const std::string &name, const Eigen::Affine3f &value) |
Public Attributes | |
| bool | transparent |
| If true, the object is rendered as transparent. | |
| std::vector< ShaderParameter > | params |
| Shader parameters. | |
Shader setting class that holds rendering settings.
| using guik::ShaderSetting::ConstPtr = std::shared_ptr<const ShaderSetting> |
| using guik::ShaderSetting::Ptr = std::shared_ptr<ShaderSetting> |
| guik::ShaderSetting::ShaderSetting | ( | ) |
Default constructor.
| guik::ShaderSetting::ShaderSetting | ( | int | color_mode | ) |
Constructor.
| color_mode | Color mode (ColorMode) |
| guik::ShaderSetting::ShaderSetting | ( | int | color_mode, |
| const Eigen::Matrix4f & | transform | ||
| ) |
Constructor.
| color_mode | Color mode (ColorMode) |
| transform | Transform matrix (Eigen::Matrix4f) |
|
inline |
Constructor.
| color_mode | Color mode (ColorMode) |
| transform | Transform matrix (e.g., Eigen::Matrix4(f|d) or Eigen::Isometry3(f|d)) |
| guik::ShaderSetting::ShaderSetting | ( | const ShaderSetting & | other | ) |
Copy constructor.
|
inlinevirtual |
Destructor.
|
inline |
|
inline |
|
inline |
Add a new parameter to the shader setting.
| name | Parameter name |
| value | Parameter value |
|
inline |
Get a parameter value from the shader setting. This method avoid type checking. Fast but unsafe.
| name | Parameter name |
| ShaderSetting guik::ShaderSetting::clone | ( | ) | const |
Clone the shader setting.
| int guik::ShaderSetting::color_mode | ( | ) | const |
Get color mode.
| ShaderSetting & guik::ShaderSetting::dynamic_object | ( | ) |
Set dynamic object flag.
|
inline |
Get a parameter value from the shader setting.
| name | Parameter name |
|
inline |
Get a parameter value from the shader setting.
| name | Parameter name |
| ShaderSetting & guik::ShaderSetting::make_transparent | ( | ) |
Make the object transparent (alpha blending).
| Eigen::Vector4f guik::ShaderSetting::material_color | ( | ) | const |
Get material color (FLAT_COLOR).
| Eigen::Matrix4f guik::ShaderSetting::model_matrix | ( | ) | const |
Get model matrix.
| ShaderSetting & guik::ShaderSetting::operator= | ( | const ShaderSetting & | other | ) |
Copy assignment operator.
| float guik::ShaderSetting::point_scale | ( | ) | const |
Get point size scale factor.
| float guik::ShaderSetting::point_size | ( | ) | const |
Get point size.
| ShaderSetting & guik::ShaderSetting::remove_model_matrix | ( | ) |
|
inline |
Apply rotation to the model matrix.
| rot | Rotation matrix (Eigen::Matrix3(f|d)) |
|
inline |
Apply rotation to the model matrix.
| quat | Rotation quaternion (Eigen::Quaternion(f|d)) |
| ShaderSetting & guik::ShaderSetting::rotate | ( | const float | angle, |
| const Eigen::Vector3f & | axis | ||
| ) |
Apply rotation to the model matrix.
|
inline |
Apply rotation to the model matrix.
| Eigen::Matrix3f guik::ShaderSetting::rotation | ( | ) | const |
Get rotation matrix from the model matrix.
| ShaderSetting & guik::ShaderSetting::scale | ( | const Eigen::Vector3f & | scaling | ) |
Apply scaling to the model matrix (non-uniform).
|
inline |
Apply scaling to the model matrix (non-uniform).
| Vector | Eigen vector type (e.g., Eigen::Vector3f, Eigen::Vector3d) |
| ShaderSetting & guik::ShaderSetting::scale | ( | float | scaling | ) |
Apply uniform scaling to the model matrix.
| ShaderSetting & guik::ShaderSetting::scale | ( | float | sx, |
| float | sy, | ||
| float | sz | ||
| ) |
Apply scaling to the model matrix (non-uniform).
| void guik::ShaderSetting::set | ( | glk::GLSLShader & | shader | ) | const |
Set shader parameters to the shader program.
| shader | Shader program |
| ShaderSetting & guik::ShaderSetting::set_alpha | ( | float | alpha | ) |
Set alpha value of the material color.
|
inline |
Set material color (for FLAT_COLOR).
| Color | Eigen 4d vector type (e.g., Eigen::Vector4f, Eigen::Vector4d) |
| ShaderSetting & guik::ShaderSetting::set_color | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
Set material color (FLAT_COLOR).
| ShaderSetting & guik::ShaderSetting::set_color_mode | ( | int | color_mode | ) |
Set color mode.
|
inline |
Set model matrix.
| Transform | Transform matrix type (e.g., Eigen::Matrix4(f|d) or Eigen::Isometry3(f|d)) |
| ShaderSetting & guik::ShaderSetting::set_old_default_point_shape | ( | ) |
Set old (v0.1.9) default point shape (rectangle + screenspace)
| ShaderSetting & guik::ShaderSetting::set_point_scale | ( | float | scaling | ) |
Set point size scale factor.
| ShaderSetting & guik::ShaderSetting::set_point_scale_metric | ( | ) |
Set point size scale to metric.
| ShaderSetting & guik::ShaderSetting::set_point_scale_mode | ( | guik::PointScaleMode::MODE | mode | ) |
Set point size scale mode.
| ShaderSetting & guik::ShaderSetting::set_point_scale_screenspace | ( | ) |
Set point size scale to screen space.
| ShaderSetting & guik::ShaderSetting::set_point_shape | ( | float | point_size, |
| bool | metric, | ||
| bool | circle | ||
| ) |
Set point shape with common settings.
| point_size | Point size in meters (if metric) or in pseudo pixels (if screenspace) |
| metric | If true, point size is in meters. If false, point size is in pixels. |
| circle | If true, point shape is circle. If false, point shape is rectangle. |
| ShaderSetting & guik::ShaderSetting::set_point_shape_circle | ( | ) |
Set point shape to circle.
| ShaderSetting & guik::ShaderSetting::set_point_shape_mode | ( | guik::PointShapeMode::MODE | mode | ) |
Set point shape mode.
| ShaderSetting & guik::ShaderSetting::set_point_shape_rectangle | ( | ) |
Set point shape to rectangle.
| ShaderSetting & guik::ShaderSetting::set_point_size | ( | float | size | ) |
Set point size.
| ShaderSetting & guik::ShaderSetting::set_point_size_offset | ( | float | offset | ) |
Set point size offset.
| ShaderSetting & guik::ShaderSetting::set_rainbow_axis | ( | const Eigen::Vector3f & | axis | ) |
Set RAINBOW coloring axis.
| ShaderSetting & guik::ShaderSetting::set_rainbow_range | ( | const Eigen::Vector2f & | minmax_z | ) |
Set RAINBOW color range.
| ShaderSetting & guik::ShaderSetting::static_object | ( | ) |
Set static object flag.
|
inline |
Apply transformation to the model matrix.
| Transform | Transform matrix type (e.g., Eigen::Matrix4(f|d) or Eigen::Isometry3(f|d)) |
| ShaderSetting & guik::ShaderSetting::translate | ( | const Eigen::Vector3f & | translation | ) |
Apply translation to the model matrix.
|
inline |
Apply translation to the model matrix.
| Vector | Eigen vector type (e.g., Eigen::Vector3f, Eigen::Vector3d) |
| ShaderSetting & guik::ShaderSetting::translate | ( | float | tx, |
| float | ty, | ||
| float | tz | ||
| ) |
Apply translation to the model matrix.
| Eigen::Vector3f guik::ShaderSetting::translation | ( | ) | const |
Get translation vector from the model matrix.
| std::vector<ShaderParameter> guik::ShaderSetting::params |
Shader parameters.
| bool guik::ShaderSetting::transparent |
If true, the object is rendered as transparent.