Struct CubeMapRenderPass
pub struct CubeMapRenderPass(/* private fields */);Expand description
Use the Cubemap Render Pass to create a cubemap texture that represents the scene from some location. You can use the result of the Cubemap Render Pass as a cubemap texture. For example, use the Cubemap Render Pass to create dynamic reflections of the environment on the surface of 3D nodes.
The Cubemap Render Pass is similar to the CompositionTargetRenderPass, except that the Cubemap Render Pass sets each face of a cubemap as the composition target before rendering the descendant render passes.
§Configuring the cubemap composition target
By default, the Cubemap Render Pass creates a cubemap composition target automatically. The attributes of the generated cubemap are derived from these properties of the Cubemap Render Pass:
- ResolutionProperty
- PixelFormatProperty
- FilterModeProperty
- MipmapModeProperty
To set the cubemap composition target manually:
- Set the CompositionTargetProperty to the Cubemap Render Target %Texture that you want to use as the composition target.
- Set the DepthTargetProperty to the Cubemap Render Target %Texture that you want to use as the depth target.
To create a Cubemap Render Target %Texture, use Texture::CreateInfoCubemapRenderTarget.
§Accessing the composition result
When you set a Cubemap Render Target %Texture as the composition target of a Cubemap Render Pass, you can use that texture as the cubemap texture in materials.
To use the result textures of a Cubemap Render Pass in another render pass, create bindings to these properties:
-
ResultTextureProperty.
When you set the value of the CompositionTargetProperty, this property gets that value.
-
ResultDepthTextureProperty
When you set the value of the DepthTargetProperty, this property gets that value.
You can use these properties to access the result textures of both the composition targets that you set explicitly and the composition targets that the Cubemap Render Pass creates automatically.
§Examples
To create and use a Cubemap Render Pass:
§Since
Kanzi 3.8.0
Implementations§
§impl CubeMapRenderPass
impl CubeMapRenderPass
§impl CubeMapRenderPass
impl CubeMapRenderPass
pub fn get_resolution(&self) -> Result<i32, Error>
pub fn get_resolution(&self) -> Result<i32, Error>
See: RESOLUTION_PROPERTY
pub fn set_resolution(&self, value: i32) -> Result<(), Error>
pub fn set_resolution(&self, value: i32) -> Result<(), Error>
See: RESOLUTION_PROPERTY
pub fn get_pixel_format(&self) -> Result<GraphicsFormat, Error>
pub fn get_pixel_format(&self) -> Result<GraphicsFormat, Error>
pub fn set_pixel_format(&self, value: GraphicsFormat) -> Result<(), Error>
pub fn set_pixel_format(&self, value: GraphicsFormat) -> Result<(), Error>
pub fn get_depth_format(&self) -> Result<GraphicsFormat, Error>
pub fn get_depth_format(&self) -> Result<GraphicsFormat, Error>
pub fn set_depth_format(&self, value: GraphicsFormat) -> Result<(), Error>
pub fn set_depth_format(&self, value: GraphicsFormat) -> Result<(), Error>
pub fn get_depth_compare_function(
&self,
) -> Result<GraphicsCompareFunction, Error>
pub fn get_depth_compare_function( &self, ) -> Result<GraphicsCompareFunction, Error>
pub fn set_depth_compare_function(
&self,
value: GraphicsCompareFunction,
) -> Result<(), Error>
pub fn set_depth_compare_function( &self, value: GraphicsCompareFunction, ) -> Result<(), Error>
pub fn get_filter_mode(&self) -> Result<SamplerFilter, Error>
pub fn get_filter_mode(&self) -> Result<SamplerFilter, Error>
See: FILTER_MODE_PROPERTY
pub fn set_filter_mode(&self, value: SamplerFilter) -> Result<(), Error>
pub fn set_filter_mode(&self, value: SamplerFilter) -> Result<(), Error>
See: FILTER_MODE_PROPERTY
pub fn get_mipmap_mode(&self) -> Result<SamplerMipmapMode, Error>
pub fn get_mipmap_mode(&self) -> Result<SamplerMipmapMode, Error>
See: MIPMAP_MODE_PROPERTY
pub fn set_mipmap_mode(&self, value: SamplerMipmapMode) -> Result<(), Error>
pub fn set_mipmap_mode(&self, value: SamplerMipmapMode) -> Result<(), Error>
See: MIPMAP_MODE_PROPERTY
pub fn get_resolve_immediately(&self) -> Result<bool, Error>
pub fn get_resolve_immediately(&self) -> Result<bool, Error>
pub fn set_resolve_immediately(&self, value: bool) -> Result<(), Error>
pub fn set_resolve_immediately(&self, value: bool) -> Result<(), Error>
pub fn get_override_camera(&self) -> Result<KanziString, Error>
pub fn get_override_camera(&self) -> Result<KanziString, Error>
pub fn get_face_update_rate(&self) -> Result<i32, Error>
pub fn get_face_update_rate(&self) -> Result<i32, Error>
pub fn set_face_update_rate(&self, value: i32) -> Result<(), Error>
pub fn set_face_update_rate(&self, value: i32) -> Result<(), Error>
Methods from Deref<Target = RenderPass>§
pub fn get_enabled(&self) -> Result<bool, Error>
pub fn get_enabled(&self) -> Result<bool, Error>
See: ENABLED_PROPERTY
pub fn set_enabled(&self, value: bool) -> Result<(), Error>
pub fn set_enabled(&self, value: bool) -> Result<(), Error>
See: ENABLED_PROPERTY
pub fn get_input_viewport_area(&self) -> Result<Vector4, Error>
pub fn get_input_viewport_area(&self) -> Result<Vector4, Error>
pub fn set_input_viewport_area(&self, value: Vector4) -> Result<(), Error>
pub fn set_input_viewport_area(&self, value: Vector4) -> Result<(), Error>
pub fn get_update_rate(&self) -> Result<i32, Error>
pub fn get_update_rate(&self) -> Result<i32, Error>
See: UPDATE_RATE_PROPERTY
pub fn set_update_rate(&self, value: i32) -> Result<(), Error>
pub fn set_update_rate(&self, value: i32) -> Result<(), Error>
See: UPDATE_RATE_PROPERTY
pub fn get_update_offset(&self) -> Result<i32, Error>
pub fn get_update_offset(&self) -> Result<i32, Error>
pub fn set_update_offset(&self, value: i32) -> Result<(), Error>
pub fn set_update_offset(&self, value: i32) -> Result<(), Error>
Methods from Deref<Target = Resource>§
pub fn get_name(&self) -> Result<KanziString, Error>
pub fn get_name(&self) -> Result<KanziString, Error>
Gets the resource name.
pub fn get_url(&self) -> Result<KanziString, Error>
pub fn get_url(&self) -> Result<KanziString, Error>
Gets the resource URL. Note that the URL is not necessarily in URL form if resource has been just created.
§Returns
URL string.
Methods from Deref<Target = Object>§
pub fn as_ptr(&self) -> *mut ObjectWrapper
pub fn as_wrapper(&self) -> &ObjectWrapper
pub fn as_object(&self) -> &Object
pub fn as_object(&self) -> &Object
Represents any type inheriting from Object as &Object.
This is useful for comparisions when PartialEq traits failed to compare objects of
different types.
let child = screen.get_child(0)?;
let parent = child.get_parent()?.into_error(ErrorKind::ObjectNotFound)?;
// assert_eq!(screen, parent); // <- Fails to compile!
assert_eq!(screen.as_object(), parent.as_object());pub fn get_native(&self) -> Result<NonNull<c_void>, Error>
pub fn get_native(&self) -> Result<NonNull<c_void>, Error>
Gets a pointer to the backing C++ instance.
pub fn get_property<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<<T as VariantConstraint>::RetArg, Error>where
T: PropertyTypeConstraint,
pub fn get_property<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<<T as VariantConstraint>::RetArg, Error>where
T: PropertyTypeConstraint,
Returns the current value of a property disregarding modifiers.
Base value is affected by the following inputs where the highest entry in the list determines the base value:
- Local value set with setProperty or loaded from kzb
- Value set by a style affecting the property.
- Value defined by class metadata.
Modifiers are not applied, the highest-priority base value is returned.
If no inputs to the property value can be established the system returns the value default value from property type metadata.
§Arguments
property_type- The property type identifying the property to retrieve.
§Returns
The evaluated property value.
pub fn get_optional_property<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<Option<<T as VariantConstraint>::RetArg>, Error>where
T: PropertyTypeConstraint,
pub fn get_optional_property<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<Option<<T as VariantConstraint>::RetArg>, Error>where
T: PropertyTypeConstraint,
Returns the current value of a property disregarding modifiers, but does not default to the value in property metadata if there are no inputs to the property value.
If there is no value sources, None is returned.
If no inputs to the property value can be established the system returns the value default value from property type metadata.
§Arguments
property_type- The property type identifying the property to retrieve.
§Returns
The evaluated property value.
pub fn set_property<T>(
&self,
property_type: &PropertyType<T>,
value: <T as VariantConstraint>::DataArg<'_>,
) -> Result<(), Error>where
T: PropertyTypeConstraint,
pub fn set_property<T>(
&self,
property_type: &PropertyType<T>,
value: <T as VariantConstraint>::DataArg<'_>,
) -> Result<(), Error>where
T: PropertyTypeConstraint,
Sets the local value of a property type.
pub fn has_value<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<bool, Error>where
T: PropertyTypeConstraint,
pub fn has_value<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<bool, Error>where
T: PropertyTypeConstraint,
Evaluates whether there are any inputs into the property value. Both value sources and modifiers are taken into account.
§Returns
Returns true if there are inputs into the property value, false otherwise.
pub fn remove_local_value<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<(), Error>where
T: PropertyTypeConstraint,
pub fn remove_local_value<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<(), Error>where
T: PropertyTypeConstraint,
Removes the local value associated with the property.
pub fn get_metaclass(&self) -> Result<Metaclass, Error>
pub fn get_metaclass(&self) -> Result<Metaclass, Error>
Returns the metaclass of the dynamic type of the object.
pub fn get_domain(&self) -> Result<Domain, Error>
pub fn get_domain(&self) -> Result<Domain, Error>
Returns the domain the object belongs to.
pub fn set_flag_keep_during_patching<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<(), Error>where
T: PropertyTypeConstraint,
pub fn set_flag_keep_during_patching<T>(
&self,
property_type: &PropertyType<T>,
) -> Result<(), Error>where
T: PropertyTypeConstraint,
Sets the flag to indicate that the property was loaded from KZB.
pub fn debug_string(&self) -> Result<String, Error>
pub fn debug_string(&self) -> Result<String, Error>
Builds a string representation of the object intended for debugging purposes.
Trait Implementations§
§impl Clone for CubeMapRenderPass
impl Clone for CubeMapRenderPass
§fn clone(&self) -> CubeMapRenderPass
fn clone(&self) -> CubeMapRenderPass
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more