RendererConfig

class RendererConfig[source]

Bases: Config

The class representation for the renderer.json of the class Renderer. The renderer.json contains all the settings about the renderer: background color, selection color, …

Parameters:
show_gridbool

Whether to show the grid or not.

gridsizetuple[float, int, float, int]

The size of the grid.

show_gridzbool

Whether to show the z-grid or not.

viewmodeLiteral[“front”, “right”, “top”, “perspective”]

The viewmode of the camera.

rendermodeLiteral[“wireframe”, “shaded”, “ghosted”, “lighted”, “instance”]

The rendermode of the renderer.

backgroundcolorColor

The background color of the renderer.

ghostopacityfloat

The opacity of the ghost mode.

cameracompas_viewer.configurations.renderer_config.CameraConfigType

The camera configuration of the renderer.

selectorcompas_viewer.configurations.renderer_config.SelectorConfigType

The selector configuration of the renderer.

Attributes:
CameraConfigTypecompas_viewer.configurations.renderer_config.CameraConfigType

The type template for the the camera: {fov: float, near: float, far: float, …, pan_delta: float}

SelectorConfigTypecompas_viewer.configurations.renderer_config.SelectorConfigType

The type template for the the selector: {enable_selector: bool, selectioncolor: Color}

Methods

from_default

Load the default configuration.

from_json

Construct an object of this type from a JSON file.

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_jsonstring

Construct an object of this type from a JSON string.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

validate_data

Validate the data against the object's data schema.