Package ke.ric.renderer.api
Record Class RenderLayer
java.lang.Object
java.lang.Record
ke.ric.renderer.api.RenderLayer
- Record Components:
entityOnly- whether only selected entity-owned pixels contribute to the final compositionselector- predicate over copied entity metadatabrightness- finite nonnegative post-render RGB multiplier; 1 preserves brightnessopacity- composition opacity in 0..1; 1 is fully opaquecontent- additional selection, or null to inherit request contentenvironment- per-field overrides, or null to inherit request environmentappearance- per-field overrides, or null to inherit request appearancelighting- complete replacement lighting, or null to inherit request lightingocclusion- visibility of selected entities relative to other captured geometrycolor- pixel colour treatment, applied before brightness and opacity
public record RenderLayer(boolean entityOnly, EntitySelector selector, double brightness, double opacity, SceneContent content, RenderEnvironment environment, RenderAppearance appearance, RenderLighting lighting, Occlusion occlusion, LayerColor color)
extends Record
One immutable pass in a
RenderRecipe. Use scene() for a full-scene base and
entities(EntitySelector) for a selected-entity overlay. Every pass derives independently
from the same original capture; a preceding pass never changes a later pass's source evidence.
Unspecified content, environment, appearance and lighting inherit the request. Content can only narrow the request's selection. Environment and appearance inherit individual unspecified fields; explicit lighting replaces the complete light setup. Capture exclusions and viewer privacy remain authoritative in every pass.
Entity layers respect scene occlusion by default. Use Occlusion.SELECTED_ONLY
explicitly for Xray visibility; selected entities still obscure each other. Primary-camera
selection does not itself remove hidden geometry's lighting or shadows. Layer colour is applied
to rendered pixels first, then brightness, then opacity during ordered composition.
-
Constructor Summary
ConstructorsConstructorDescriptionRenderLayer(boolean entityOnly, EntitySelector selector, double brightness, double opacity) Creates a layer with inherited request controls, original colours and normal scene occlusion.RenderLayer(boolean entityOnly, EntitySelector selector, double brightness, double opacity, SceneContent content, RenderEnvironment environment, RenderAppearance appearance, RenderLighting lighting, Occlusion occlusion, LayerColor color) Constructs a validated immutable value. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theappearancerecord component.appearance(RenderAppearance value) Sets per-field appearance overrides for this pass, such as renderer exposure.doubleReturns the value of thebrightnessrecord component.brightness(double value) Sets a post-render RGB multiplier, after colour treatment and before opacity.color()Returns the value of thecolorrecord component.color(LayerColor value) Sets the RGB treatment applied before this layer's brightness and opacity.content()Returns the value of thecontentrecord component.content(SceneContent value) Narrows request content for this pass without changing the original capture.static RenderLayerentities(EntitySelector selector) Creates a selected-entity layer that respects other scene geometry by default.booleanReturns the value of theentityOnlyrecord component.Returns the value of theenvironmentrecord component.environment(RenderEnvironment value) Sets per-field rendered time/weather overrides for this pass.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.lighting()Returns the value of thelightingrecord component.lighting(RenderLighting value) Replaces the complete light setup for this pass.Returns the value of theocclusionrecord component.Selects whether other captured geometry occludes the selected entities.doubleopacity()Returns the value of theopacityrecord component.opacity(double value) Sets how strongly this layer is composited over earlier layers.static RenderLayerscene()Creates a full-scene layer with original colours, brightness 1 and opacity 1.selector()Returns the value of theselectorrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RenderLayer
public RenderLayer(boolean entityOnly, EntitySelector selector, double brightness, double opacity, SceneContent content, RenderEnvironment environment, RenderAppearance appearance, RenderLighting lighting, Occlusion occlusion, LayerColor color) Constructs a validated immutable value.- Throws:
IllegalArgumentException- for invalid brightness or opacityNullPointerException- if selector, occlusion or color is null
-
RenderLayer
Creates a layer with inherited request controls, original colours and normal scene occlusion.- Parameters:
entityOnly- whether only selected entity-owned pixels contributeselector- entity selection over copied metadatabrightness- finite nonnegative post-render multiplieropacity- composition opacity in 0..1
-
-
Method Details
-
scene
Creates a full-scene layer with original colours, brightness 1 and opacity 1.- Returns:
- a layer inheriting request controls
-
entities
Creates a selected-entity layer that respects other scene geometry by default. Native object-ID evidence determines which pixels belong to the selected entities.- Parameters:
selector- entity selection over copied metadata- Returns:
- an entity layer with original colours, brightness 1 and opacity 1
-
brightness
Sets a post-render RGB multiplier, after colour treatment and before opacity. This differs from exposure, which changes renderer appearance, and from light intensity, which lights surfaces.- Parameters:
value- finite multiplier at least 0; default 1- Returns:
- a new layer with this setting
-
opacity
Sets how strongly this layer is composited over earlier layers.- Parameters:
value- finite opacity from 0 (invisible) to 1 (opaque)- Returns:
- a new layer with this setting
-
content
Narrows request content for this pass without changing the original capture. Removed geometry is unavailable to camera, reflection and shadow rays. Use entity selection and occlusion to restrict camera output while retaining the surrounding scene geometry.- Parameters:
value- selection to intersect with request content, or null to inherit- Returns:
- a new layer with this setting
-
environment
Sets per-field rendered time/weather overrides for this pass. Unset fields inherit the request.- Parameters:
value- overrides, or null to inherit- Returns:
- a new layer with this setting
-
appearance
Sets per-field appearance overrides for this pass, such as renderer exposure.- Parameters:
value- overrides, or null to inherit- Returns:
- a new layer with this setting
-
lighting
Replaces the complete light setup for this pass. This value does not merge light lists.- Parameters:
value- lighting setup, or null to inherit request lighting- Returns:
- a new layer with this setting
-
occlusion
Selects whether other captured geometry occludes the selected entities. Selected entities always occlude each other; lighting geometry remains available.- Parameters:
value- RESPECT_SCENE by default, or explicit SELECTED_ONLY for Xray- Returns:
- a new layer with this setting
-
color
Sets the RGB treatment applied before this layer's brightness and opacity.- Parameters:
value- original colour, multiplicative tint or solid colour- Returns:
- a new layer with this setting
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
entityOnly
public boolean entityOnly()Returns the value of theentityOnlyrecord component.- Returns:
- the value of the
entityOnlyrecord component
-
selector
Returns the value of theselectorrecord component.- Returns:
- the value of the
selectorrecord component
-
brightness
public double brightness()Returns the value of thebrightnessrecord component.- Returns:
- the value of the
brightnessrecord component
-
opacity
public double opacity()Returns the value of theopacityrecord component.- Returns:
- the value of the
opacityrecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
environment
Returns the value of theenvironmentrecord component.- Returns:
- the value of the
environmentrecord component
-
appearance
Returns the value of theappearancerecord component.- Returns:
- the value of the
appearancerecord component
-
lighting
Returns the value of thelightingrecord component.- Returns:
- the value of the
lightingrecord component
-
occlusion
Returns the value of theocclusionrecord component.- Returns:
- the value of the
occlusionrecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-