![]() |
HIRO_DRAW
Computer Graphics Structures library
|
Stylization of the rendered geometry. More...
Public Types | |
| enum | RenderMode : int32_t { RenderMode::points = 0, RenderMode::wires = 1, RenderMode::wired_points = 2, RenderMode::faces = 3, RenderMode::wired_faces = 4 } |
| Available modes for rendering geometry. More... | |
| enum | PresetType { PresetType::plaster, PresetType::golden, PresetType::normals } |
| Available stylization presets. More... | |
Public Member Functions | |
| bool | ReadFromStream (std::istream &str) override |
| Imports state from stream. | |
| void | WriteToStream (std::ostream &str) override |
| Exports state to stream. | |
Static Public Member Functions | |
| static hiro::draw::GeometryStyle | GetPreset (hiro::draw::GeometryStyle::PresetType type) |
| Creates a new geometry style from the defined preset. | |
Data Fields | |
| hiro::draw::GeometryStyle::RenderMode | render_mode = hiro::draw::GeometryStyle::RenderMode::faces |
| Mode currently used for rendering geometry. | |
| hiro::shader::Material | material |
| Material setting for the faces or points (depending on a selected render mode). | |
| bool | back_face_culling { false } |
| When enabled, faces and edges with normal vector turned away from the camera are hidden. | |
| float | point_size { 10.0f } |
| Size of point in screen pixels. Used only for render modes that include points. | |
| hiro::draw::ColorSource | color_source { hiro::draw::ColorSource::material } |
| Color source used to colorize faces and points. | |
| glw::PTexture2D | albedo_texture { nullptr } |
| Albedo texture. To use, set color source to ColorSource::albedo_map. | |
| hiro::draw::FacesStyle::NormalSource | normal_source { hiro::draw::FacesStyle::NormalSource::flat_normals } |
| Normal source used to calculate the lighting. | |
| glw::PTexture2D | normal_texture { nullptr } |
| Normal texture. To use, set normal source to NormalSource::normal_map. | |
| bool | display_normals { false } |
| When enabled, normal vector for every point is rendered. | |
| cogs::Color3f | normal_color { cogs::color::BLACK } |
| Color of normal vector tips. Used only when normals are displayed. | |
| float | normal_length { 0.1f } |
| Length of normal vectors. Used only when normals are displayed. | |
| cogs::Color3f | edge_color { cogs::color::BLACK } |
| Color of the edges. Used only for render modes that include edges. | |
| float | edge_width { 1.0f } |
| Width of the edges. Used only for render modes that include edges. | |
| bool | use_matcap { false } |
| When enabled, color and lighting is picked from matcap sampler texture. | |
| glw::PTexture2D | matcap_sampler { nullptr } |
| Matcap sampler. Used only when matcap rendering is enabled. | |
| uint32_t | object_id { 0u } |
| Enables shaders to distinguish between various geometrical objects and instances. | |
Data Fields inherited from hiro::draw::Style | |
| bool | visible = true |
| Whether the renderer that uses this style should be skipped during the rendering. | |
| cogs::Transform | transform |
| Model transformation applied to the renderer. In shader will appear as MODEL_MATRIX. | |
Additional Inherited Members | |
Protected Member Functions inherited from hiro::draw::Style | |
| bool | ReadVersion (std::istream &str, const uint32_t expected_version) |
| Read uint32_t version from stream and check if it is equal to the expected version. | |
Stylization of the rendered geometry.
|
strong |
|
strong |