Easy3D 2.6.1
Loading...
Searching...
No Matches
easy3d::setting Namespace Reference

Default parameters used for initializing rendering and UI. More...

Functions

void initialize (const std::string &setting_file="default")
 Initializes the default setting for rendering.
 
bool save (const std::string &filename)
 Save the setting (i.e., rendering parameters) to a file.
 
bool load (const std::string &filename)
 Load the setting (i.e., rendering parameters) from a file.
 

Variables

EASY3D_UTIL_EXPORT vec4 background_color
 Background color of the viewer.
 
EASY3D_UTIL_EXPORT vec4 highlight_color
 Default highlight color for highlighted/selected primitives.
 
EASY3D_UTIL_EXPORT vec4 light_position
 Default light position defined in the camera coordinate system.
 
EASY3D_UTIL_EXPORT vec4 material_ambient
 Default ambient color of the material.
 
EASY3D_UTIL_EXPORT vec4 material_specular
 Default specular color of the material.
 
EASY3D_UTIL_EXPORT float material_shininess
 Default shininess of the material.
 
EASY3D_UTIL_EXPORT float effect_ssao_radius
 Radius of the SSAO (Screen Space Ambient Occlusion) effect.
 
EASY3D_UTIL_EXPORT float effect_ssao_intensity
 Intensity of the SSAO (Screen Space Ambient Occlusion) effect.
 
EASY3D_UTIL_EXPORT float effect_ssao_bias
 Bias of the SSAO (Screen Space Ambient Occlusion) effect.
 
EASY3D_UTIL_EXPORT float effect_ssao_sharpness
 Sharpness of the SSAO (Screen Space Ambient Occlusion) effect.
 
EASY3D_UTIL_EXPORT bool effect_edl_enabled
 Whether EDL (Eye-Dome Lighting) effect is enabled.
 
EASY3D_UTIL_EXPORT bool effect_transparency_enabled
 Whether transparency effect is enabled.
 
EASY3D_UTIL_EXPORT bool effect_shadow_enabled
 Whether shadow effect is enabled.
 
EASY3D_UTIL_EXPORT float effect_shadow_light_distance
 Distance of the light source to the scene (w.r.t. the scene radius).
 
EASY3D_UTIL_EXPORT float effect_shadow_softness
 Softness of the shadow effect.
 
EASY3D_UTIL_EXPORT float effect_shadow_darkness
 Darkness of the shadow effect.
 
EASY3D_UTIL_EXPORT bool points_drawable_two_side_lighting
 Whether two-side lighting is enabled for points drawable.
 
EASY3D_UTIL_EXPORT bool points_drawable_distinct_backside_color
 Whether a distinct backside color is used for points drawable.
 
EASY3D_UTIL_EXPORT vec4 points_drawable_backside_color
 Backside color for points drawable.
 
EASY3D_UTIL_EXPORT bool lines_drawable_two_side_lighting
 Whether two-side lighting is enabled for lines drawable.
 
EASY3D_UTIL_EXPORT bool lines_drawable_distinct_backside_color
 Whether a distinct backside color is used for lines drawable.
 
EASY3D_UTIL_EXPORT vec4 lines_drawable_backside_color
 Backside color for lines drawable.
 
EASY3D_UTIL_EXPORT bool triangles_drawable_two_side_lighting
 Whether two-side lighting is enabled for triangles drawable.
 
EASY3D_UTIL_EXPORT bool triangles_drawable_distinct_backside_color
 Whether a distinct backside color is used for triangles drawable.
 
EASY3D_UTIL_EXPORT vec4 triangles_drawable_backside_color
 Backside color for triangles drawable.
 
EASY3D_UTIL_EXPORT bool point_cloud_vertices_visible
 Whether point cloud vertices are visible.
 
EASY3D_UTIL_EXPORT vec4 point_cloud_vertices_color
 Color of point cloud vertices.
 
EASY3D_UTIL_EXPORT bool point_cloud_vertices_impostors
 Whether point cloud vertices are rendered as impostors.
 
EASY3D_UTIL_EXPORT float point_cloud_vertices_size
 Size of point cloud vertices.
 
EASY3D_UTIL_EXPORT bool surface_mesh_faces_phong_shading
 Whether Phong shading is enabled for surface mesh faces.
 
EASY3D_UTIL_EXPORT bool surface_mesh_faces_visible
 Whether surface mesh faces are visible.
 
EASY3D_UTIL_EXPORT vec4 surface_mesh_faces_color
 Color of surface mesh faces.
 
EASY3D_UTIL_EXPORT float surface_mesh_faces_opacity
 Opacity of surface mesh faces.
 
EASY3D_UTIL_EXPORT bool surface_mesh_vertices_visible
 Whether surface mesh vertices are visible.
 
EASY3D_UTIL_EXPORT vec4 surface_mesh_vertices_color
 Color of surface mesh vertices.
 
EASY3D_UTIL_EXPORT bool surface_mesh_vertices_imposters
 Whether surface mesh vertices are rendered as impostors.
 
EASY3D_UTIL_EXPORT float surface_mesh_vertices_size
 Size of surface mesh vertices.
 
EASY3D_UTIL_EXPORT bool surface_mesh_edges_visible
 Whether surface mesh edges are visible.
 
EASY3D_UTIL_EXPORT vec4 surface_mesh_edges_color
 Color of surface mesh edges.
 
EASY3D_UTIL_EXPORT bool surface_mesh_edges_imposters
 Whether surface mesh edges are rendered as impostors.
 
EASY3D_UTIL_EXPORT float surface_mesh_edges_size
 Size of surface mesh edges.
 
EASY3D_UTIL_EXPORT bool surface_mesh_borders_visible
 Whether surface mesh borders are visible.
 
EASY3D_UTIL_EXPORT vec4 surface_mesh_borders_color
 Color of surface mesh borders.
 
EASY3D_UTIL_EXPORT bool surface_mesh_borders_imposters
 Whether surface mesh borders are rendered as impostors.
 
EASY3D_UTIL_EXPORT float surface_mesh_borders_size
 Size of surface mesh borders.
 
EASY3D_UTIL_EXPORT bool graph_vertices_visible
 Whether graph vertices are visible.
 
EASY3D_UTIL_EXPORT vec4 graph_vertices_color
 Color of graph vertices.
 
EASY3D_UTIL_EXPORT bool graph_vertices_imposters
 Whether graph vertices are rendered as impostors.
 
EASY3D_UTIL_EXPORT float graph_vertices_size
 Size of graph vertices.
 
EASY3D_UTIL_EXPORT bool graph_edges_visible
 Whether graph edges are visible.
 
EASY3D_UTIL_EXPORT vec4 graph_edges_color
 Color of graph edges.
 
EASY3D_UTIL_EXPORT bool graph_edges_imposters
 Whether graph edges are rendered as impostors.
 
EASY3D_UTIL_EXPORT float graph_edges_size
 Size of graph edges.
 
EASY3D_UTIL_EXPORT bool poly_mesh_faces_visible
 Whether polyhedral mesh faces are visible.
 
EASY3D_UTIL_EXPORT vec4 poly_mesh_faces_color
 Color of polyhedral mesh faces.
 
EASY3D_UTIL_EXPORT bool poly_mesh_vertices_visible
 Whether polyhedral mesh vertices are visible.
 
EASY3D_UTIL_EXPORT vec4 poly_mesh_vertices_color
 Color of polyhedral mesh vertices.
 
EASY3D_UTIL_EXPORT bool poly_mesh_vertices_imposters
 Whether polyhedral mesh vertices are rendered as impostors.
 
EASY3D_UTIL_EXPORT float poly_mesh_vertices_size
 Size of polyhedral mesh vertices.
 
EASY3D_UTIL_EXPORT bool poly_mesh_edges_visible
 Whether polyhedral mesh edges are visible.
 
EASY3D_UTIL_EXPORT vec4 poly_mesh_edges_color
 Color of polyhedral mesh edges.
 
EASY3D_UTIL_EXPORT bool poly_mesh_edges_imposters
 Whether polyhedral mesh edges are rendered as impostors.
 
EASY3D_UTIL_EXPORT float poly_mesh_edges_size
 Size of polyhedral mesh edges.
 
EASY3D_UTIL_EXPORT vec4 clipping_plane_color
 Default color of the clipping plane.
 

Detailed Description

Default parameters used for initializing rendering and UI.

Function Documentation

◆ initialize()

void initialize ( const std::string & setting_file = "default")

Initializes the default setting for rendering.

By calling this function with a valid file name, a setting file with an extension ".ini" will be created on the first startup of the program. This setting file stores the default rendering parameters. Users can modify this file to change the default rendering parameters, then the changes will be effective for the future.

Parameters
setting_fileA string specifying the name of setting file. Three different values are accepted:
  • ""(an empty string): indicating that no setting file will be created.
  • "default": create a setting file with a title in the form "AppName.ini" next to the executable file.
  • any non-empty string: (if it is a valid path) a setting file with the same name will be created and rendering parameters will be written to this file.

Variable Documentation

◆ background_color

EASY3D_UTIL_EXPORT vec4 background_color
extern

Background color of the viewer.

This variable defines the background color used in the viewer. It is represented as a 4D vector (RGBA).

Examples
Tutorial_203_Viewer_wxWidgets/main.cpp, and Tutorial_204_Viewer_Qt/main.cpp.

◆ clipping_plane_color

EASY3D_UTIL_EXPORT vec4 clipping_plane_color
extern

Default color of the clipping plane.

This variable defines the color used for rendering the clipping plane.

◆ effect_edl_enabled

EASY3D_UTIL_EXPORT bool effect_edl_enabled
extern

Whether EDL (Eye-Dome Lighting) effect is enabled.

This variable enables or disables the EDL effect, which enhances depth perception by adding shading to the scene.

◆ effect_shadow_darkness

EASY3D_UTIL_EXPORT float effect_shadow_darkness
extern

Darkness of the shadow effect.

This variable controls the darkness of the shadow effect, which determines how dark the shadows appear.

◆ effect_shadow_enabled

EASY3D_UTIL_EXPORT bool effect_shadow_enabled
extern

Whether shadow effect is enabled.

This variable enables or disables the shadow effect, which adds shadows to the scene based on the light source.

◆ effect_shadow_light_distance

EASY3D_UTIL_EXPORT float effect_shadow_light_distance
extern

Distance of the light source to the scene (w.r.t. the scene radius).

This variable controls the distance of the light to the scene, which affects the size and softness of shadows.

◆ effect_shadow_softness

EASY3D_UTIL_EXPORT float effect_shadow_softness
extern

Softness of the shadow effect.

This variable controls the softness of the shadow effect, which determines how sharp or blurry the shadows appear.

◆ effect_ssao_bias

EASY3D_UTIL_EXPORT float effect_ssao_bias
extern

Bias of the SSAO (Screen Space Ambient Occlusion) effect.

This variable controls the bias of the SSAO effect, which helps reduce artifacts by offsetting the occlusion calculation.

◆ effect_ssao_intensity

EASY3D_UTIL_EXPORT float effect_ssao_intensity
extern

Intensity of the SSAO (Screen Space Ambient Occlusion) effect.

This variable controls the intensity of the SSAO effect, which determines how dark the occluded areas appear.

◆ effect_ssao_radius

EASY3D_UTIL_EXPORT float effect_ssao_radius
extern

Radius of the SSAO (Screen Space Ambient Occlusion) effect.

This variable controls the radius of the SSAO effect, which determines the area around each pixel where occlusion is calculated.

◆ effect_ssao_sharpness

EASY3D_UTIL_EXPORT float effect_ssao_sharpness
extern

Sharpness of the SSAO (Screen Space Ambient Occlusion) effect.

This variable controls the sharpness of the SSAO effect, which determines how sharp or smooth the occlusion edges appear.

◆ effect_transparency_enabled

EASY3D_UTIL_EXPORT bool effect_transparency_enabled
extern

Whether transparency effect is enabled.

This variable enables or disables the transparency effect, which allows objects to be rendered with transparency.

◆ graph_edges_color

EASY3D_UTIL_EXPORT vec4 graph_edges_color
extern

Color of graph edges.

This variable defines the color used for rendering graph edges.

◆ graph_edges_imposters

EASY3D_UTIL_EXPORT bool graph_edges_imposters
extern

Whether graph edges are rendered as impostors.

This variable enables or disables the use of impostors (e.g., cylinders) for rendering graph edges.

◆ graph_edges_size

EASY3D_UTIL_EXPORT float graph_edges_size
extern

Size of graph edges.

This variable controls the size of graph edges when rendered.

◆ graph_edges_visible

EASY3D_UTIL_EXPORT bool graph_edges_visible
extern

Whether graph edges are visible.

This variable enables or disables the visibility of graph edges.

◆ graph_vertices_color

EASY3D_UTIL_EXPORT vec4 graph_vertices_color
extern

Color of graph vertices.

This variable defines the color used for rendering graph vertices.

◆ graph_vertices_imposters

EASY3D_UTIL_EXPORT bool graph_vertices_imposters
extern

Whether graph vertices are rendered as impostors.

This variable enables or disables the use of impostors (e.g., spheres) for rendering graph vertices.

◆ graph_vertices_size

EASY3D_UTIL_EXPORT float graph_vertices_size
extern

Size of graph vertices.

This variable controls the size of graph vertices when rendered.

◆ graph_vertices_visible

EASY3D_UTIL_EXPORT bool graph_vertices_visible
extern

Whether graph vertices are visible.

This variable enables or disables the visibility of graph vertices.

◆ highlight_color

EASY3D_UTIL_EXPORT vec4 highlight_color
extern

Default highlight color for highlighted/selected primitives.

This variable defines the color used to highlight or select primitives (e.g., points, lines, faces).

Examples
Tutorial_203_Viewer_wxWidgets/main.cpp, and Tutorial_204_Viewer_Qt/main.cpp.

◆ light_position

EASY3D_UTIL_EXPORT vec4 light_position
extern

Default light position defined in the camera coordinate system.

This variable defines the position of the light source in the camera coordinate system.

Examples
Tutorial_203_Viewer_wxWidgets/main.cpp, and Tutorial_204_Viewer_Qt/main.cpp.

◆ lines_drawable_backside_color

EASY3D_UTIL_EXPORT vec4 lines_drawable_backside_color
extern

Backside color for lines drawable.

This variable defines the color used for the backside of lines when lines_drawable_distinct_backside_color is enabled.

◆ lines_drawable_distinct_backside_color

EASY3D_UTIL_EXPORT bool lines_drawable_distinct_backside_color
extern

Whether a distinct backside color is used for lines drawable.

This variable enables or disables the use of a distinct color for the backside of lines.

◆ lines_drawable_two_side_lighting

EASY3D_UTIL_EXPORT bool lines_drawable_two_side_lighting
extern

Whether two-side lighting is enabled for lines drawable.

This variable enables or disables two-side lighting for lines, which ensures both sides of the lines are illuminated.

◆ material_ambient

EASY3D_UTIL_EXPORT vec4 material_ambient
extern

Default ambient color of the material.

This variable defines the ambient color of the material, which represents the color of the material under ambient lighting.

Examples
Tutorial_203_Viewer_wxWidgets/main.cpp, and Tutorial_204_Viewer_Qt/main.cpp.

◆ material_shininess

EASY3D_UTIL_EXPORT float material_shininess
extern

Default shininess of the material.

This variable defines the shininess (specular power) of the material, which controls the size and intensity of specular highlights.

Examples
Tutorial_203_Viewer_wxWidgets/main.cpp, and Tutorial_204_Viewer_Qt/main.cpp.

◆ material_specular

EASY3D_UTIL_EXPORT vec4 material_specular
extern

Default specular color of the material.

This variable defines the specular color of the material, which represents the color of the material's highlights.

Examples
Tutorial_203_Viewer_wxWidgets/main.cpp, and Tutorial_204_Viewer_Qt/main.cpp.

◆ point_cloud_vertices_color

EASY3D_UTIL_EXPORT vec4 point_cloud_vertices_color
extern

Color of point cloud vertices.

This variable defines the color used for rendering point cloud vertices.

◆ point_cloud_vertices_impostors

EASY3D_UTIL_EXPORT bool point_cloud_vertices_impostors
extern

Whether point cloud vertices are rendered as impostors.

This variable enables or disables the use of impostors (e.g., spheres) for rendering point cloud vertices.

◆ point_cloud_vertices_size

EASY3D_UTIL_EXPORT float point_cloud_vertices_size
extern

Size of point cloud vertices.

This variable controls the size of point cloud vertices when rendered.

◆ point_cloud_vertices_visible

EASY3D_UTIL_EXPORT bool point_cloud_vertices_visible
extern

Whether point cloud vertices are visible.

This variable enables or disables the visibility of point cloud vertices.

◆ points_drawable_backside_color

EASY3D_UTIL_EXPORT vec4 points_drawable_backside_color
extern

Backside color for points drawable.

This variable defines the color used for the backside of points when points_drawable_distinct_backside_color is enabled.

◆ points_drawable_distinct_backside_color

EASY3D_UTIL_EXPORT bool points_drawable_distinct_backside_color
extern

Whether a distinct backside color is used for points drawable.

This variable enables or disables the use of a distinct color for the backside of points.

◆ points_drawable_two_side_lighting

EASY3D_UTIL_EXPORT bool points_drawable_two_side_lighting
extern

Whether two-side lighting is enabled for points drawable.

This variable enables or disables two-side lighting for points, which ensures both sides of the points are illuminated.

◆ poly_mesh_edges_color

EASY3D_UTIL_EXPORT vec4 poly_mesh_edges_color
extern

Color of polyhedral mesh edges.

This variable defines the color used for rendering polyhedral mesh edges.

◆ poly_mesh_edges_imposters

EASY3D_UTIL_EXPORT bool poly_mesh_edges_imposters
extern

Whether polyhedral mesh edges are rendered as impostors.

This variable enables or disables the use of impostors (e.g., cylinders) for rendering polyhedral mesh edges.

◆ poly_mesh_edges_size

EASY3D_UTIL_EXPORT float poly_mesh_edges_size
extern

Size of polyhedral mesh edges.

This variable controls the size of polyhedral mesh edges when rendered.

◆ poly_mesh_edges_visible

EASY3D_UTIL_EXPORT bool poly_mesh_edges_visible
extern

Whether polyhedral mesh edges are visible.

This variable enables or disables the visibility of polyhedral mesh edges.

◆ poly_mesh_faces_color

EASY3D_UTIL_EXPORT vec4 poly_mesh_faces_color
extern

Color of polyhedral mesh faces.

This variable defines the color used for rendering polyhedral mesh faces.

◆ poly_mesh_faces_visible

EASY3D_UTIL_EXPORT bool poly_mesh_faces_visible
extern

Whether polyhedral mesh faces are visible.

This variable enables or disables the visibility of polyhedral mesh faces.

◆ poly_mesh_vertices_color

EASY3D_UTIL_EXPORT vec4 poly_mesh_vertices_color
extern

Color of polyhedral mesh vertices.

This variable defines the color used for rendering polyhedral mesh vertices.

◆ poly_mesh_vertices_imposters

EASY3D_UTIL_EXPORT bool poly_mesh_vertices_imposters
extern

Whether polyhedral mesh vertices are rendered as impostors.

This variable enables or disables the use of impostors (e.g., spheres) for rendering polyhedral mesh vertices.

◆ poly_mesh_vertices_size

EASY3D_UTIL_EXPORT float poly_mesh_vertices_size
extern

Size of polyhedral mesh vertices.

This variable controls the size of polyhedral mesh vertices when rendered.

◆ poly_mesh_vertices_visible

EASY3D_UTIL_EXPORT bool poly_mesh_vertices_visible
extern

Whether polyhedral mesh vertices are visible.

This variable enables or disables the visibility of polyhedral mesh vertices.

◆ surface_mesh_borders_color

EASY3D_UTIL_EXPORT vec4 surface_mesh_borders_color
extern

Color of surface mesh borders.

This variable defines the color used for rendering surface mesh borders.

◆ surface_mesh_borders_imposters

EASY3D_UTIL_EXPORT bool surface_mesh_borders_imposters
extern

Whether surface mesh borders are rendered as impostors.

This variable enables or disables the use of impostors (e.g., cylinders) for rendering surface mesh borders.

◆ surface_mesh_borders_size

EASY3D_UTIL_EXPORT float surface_mesh_borders_size
extern

Size of surface mesh borders.

This variable controls the size of surface mesh borders when rendered.

◆ surface_mesh_borders_visible

EASY3D_UTIL_EXPORT bool surface_mesh_borders_visible
extern

Whether surface mesh borders are visible.

This variable enables or disables the visibility of surface mesh borders.

◆ surface_mesh_edges_color

EASY3D_UTIL_EXPORT vec4 surface_mesh_edges_color
extern

Color of surface mesh edges.

This variable defines the color used for rendering surface mesh edges.

◆ surface_mesh_edges_imposters

EASY3D_UTIL_EXPORT bool surface_mesh_edges_imposters
extern

Whether surface mesh edges are rendered as impostors.

This variable enables or disables the use of impostors (e.g., cylinders) for rendering surface mesh edges.

◆ surface_mesh_edges_size

EASY3D_UTIL_EXPORT float surface_mesh_edges_size
extern

Size of surface mesh edges.

This variable controls the size of surface mesh edges when rendered.

◆ surface_mesh_edges_visible

EASY3D_UTIL_EXPORT bool surface_mesh_edges_visible
extern

Whether surface mesh edges are visible.

This variable enables or disables the visibility of surface mesh edges.

◆ surface_mesh_faces_color

EASY3D_UTIL_EXPORT vec4 surface_mesh_faces_color
extern

Color of surface mesh faces.

This variable defines the color used for rendering surface mesh faces.

◆ surface_mesh_faces_opacity

EASY3D_UTIL_EXPORT float surface_mesh_faces_opacity
extern

Opacity of surface mesh faces.

This variable controls the opacity of surface mesh faces, where 1.0 is fully opaque and 0.0 is fully transparent.

◆ surface_mesh_faces_phong_shading

EASY3D_UTIL_EXPORT bool surface_mesh_faces_phong_shading
extern

Whether Phong shading is enabled for surface mesh faces.

This variable enables or disables Phong shading for surface mesh faces, which provides smoother lighting.

◆ surface_mesh_faces_visible

EASY3D_UTIL_EXPORT bool surface_mesh_faces_visible
extern

Whether surface mesh faces are visible.

This variable enables or disables the visibility of surface mesh faces.

◆ surface_mesh_vertices_color

EASY3D_UTIL_EXPORT vec4 surface_mesh_vertices_color
extern

Color of surface mesh vertices.

This variable defines the color used for rendering surface mesh vertices.

◆ surface_mesh_vertices_imposters

EASY3D_UTIL_EXPORT bool surface_mesh_vertices_imposters
extern

Whether surface mesh vertices are rendered as impostors.

This variable enables or disables the use of impostors (e.g., spheres) for rendering surface mesh vertices.

◆ surface_mesh_vertices_size

EASY3D_UTIL_EXPORT float surface_mesh_vertices_size
extern

Size of surface mesh vertices.

This variable controls the size of surface mesh vertices when rendered.

◆ surface_mesh_vertices_visible

EASY3D_UTIL_EXPORT bool surface_mesh_vertices_visible
extern

Whether surface mesh vertices are visible.

This variable enables or disables the visibility of surface mesh vertices.

◆ triangles_drawable_backside_color

EASY3D_UTIL_EXPORT vec4 triangles_drawable_backside_color
extern

Backside color for triangles drawable.

This variable defines the color used for the backside of triangles when triangles_drawable_distinct_backside_color is enabled.

◆ triangles_drawable_distinct_backside_color

EASY3D_UTIL_EXPORT bool triangles_drawable_distinct_backside_color
extern

Whether a distinct backside color is used for triangles drawable.

This variable enables or disables the use of a distinct color for the backside of triangles.

◆ triangles_drawable_two_side_lighting

EASY3D_UTIL_EXPORT bool triangles_drawable_two_side_lighting
extern

Whether two-side lighting is enabled for triangles drawable.

This variable enables or disables two-side lighting for triangles, which ensures both sides of the triangles are illuminated.