ClippingPrimitive Class

Definition

An abstract primitive component to animate and visualize a clipping primitive that can be used to drive per pixel based clipping.

public ref class ClippingPrimitive abstract : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::Rendering::IMaterialInstanceOwner
[UnityEngine.ExecuteAlways]
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/rendering/clipping-primitive")]
public abstract class ClippingPrimitive : UnityEngine.MonoBehaviour, Microsoft.MixedReality.Toolkit.Rendering.IMaterialInstanceOwner
[<UnityEngine.ExecuteAlways>]
[<UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/rendering/clipping-primitive")>]
type ClippingPrimitive = class
    inherit MonoBehaviour
    interface IMaterialInstanceOwner
Public MustInherit Class ClippingPrimitive
Inherits MonoBehaviour
Implements IMaterialInstanceOwner
Inheritance
UnityEngine.MonoBehaviour
ClippingPrimitive
Derived
Attributes
UnityEngine.ExecuteAlwaysAttribute UnityEngine.HelpURLAttribute
Implements

Constructors

ClippingPrimitive()

Fields

clippingSide
materialPropertyBlock
renderers

Properties

ApplyToSharedMaterial

Toggles whether the clipping features will apply to shared materials or material instances (default).

ClippingSide

The renderer(s) that should be affected by the primitive.

ClippingSideProperty
IsDirty

Keeping track of any field, property or transformation changes to optimize material property block setting.

Keyword
UseOnPreRender

Toggles whether the primitive will use the Camera OnPreRender event.

Methods

AddRenderer(Renderer)

Adds a renderer to the list of objects this clipping primitive clips.

BeginUpdateShaderProperties()
ClearRenderers()

Removes all renderers in the list of objects this clipping primitive clips.

ClearRenderers(Boolean)

Removes all renderers in the list of objects this clipping primitive clips.

EditorUpdate()
EndUpdateShaderProperties()
GetRenderersCopy()

Returns a copy of the current list of renderers.

Initialize()
LateUpdate()
OnCameraPreRender(CameraEventRouter)
OnDestroy()
OnDisable()
OnEnable()
OnMaterialChanged(MaterialInstance)

Method which is invoked by a MaterialInstance when an external material change is detected. This normally occurs when materials are changed via Renderer.material, Renderer.materials, or via the editor.

RemoveRenderer(Renderer)

Removes a renderer to the list of objects this clipping primitive clips.

ToggleClippingFeature(Boolean)
ToggleClippingFeature(Material, Boolean)
ToggleClippingFeature(Material[], Boolean)
Update()
UpdateRenderers()
UpdateShaderProperties(MaterialPropertyBlock)

Applies to