ClippingPrimitive Class

Definition

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

[UnityEngine.ExecuteAlways]
public abstract class ClippingPrimitive : UnityEngine.MonoBehaviour, Microsoft.MixedReality.GraphicsTools.IMaterialInstanceOwner
[<UnityEngine.ExecuteAlways>]
type ClippingPrimitive = class
    inherit MonoBehaviour
    interface IMaterialInstanceOwner
Public MustInherit Class ClippingPrimitive
Inherits MonoBehaviour
Implements IMaterialInstanceOwner
Inheritance
UnityEngine.MonoBehaviour
ClippingPrimitive
Derived
Attributes
UnityEngine.ExecuteAlwaysAttribute
Implements

Constructors

ClippingPrimitive()

Fields

clippingSide
materialPropertyBlock

The property block in use for material adjustments.

renderers

Properties

ApplyToSharedMaterial

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

ClippingSide

Which side of the primitive to clip pixels against.

ClippingSideProperty

Returns the shader property name used to control the clipping side.

IsDirty

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

Keyword

Returns the shader keyword name used to toggle this clipping feature on/off.

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()

Method called when before each renderer is updated.

ClearRenderers(Boolean)

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

EditorUpdate()
EndUpdateShaderProperties()

Method called when after each renderer is updated.

GetRenderersCopy()

Returns a copy of the current list of renderers.

Initialize()

Caches commonly used state.

LateUpdate()

Updates all renderers with latest clipping state.

OnCameraPreRender(CameraEventRouter)

Updates all renderers with latest clipping state.

OnDestroy()

Removes all renderers from the clipping primitive.

OnDisable()

Turns clipping off.

OnEnable()

Turns clipping on.

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)

Enables or disables clipping for all renderers.

ToggleClippingFeature(Material, Boolean)

Enables or disables clipping on a material.

ToggleClippingFeature(Material[], Boolean)

Enables or disables clipping for a list of materials.

UpdateRenderers()

Updates the render state of all renderers.

UpdateShaderProperties(MaterialPropertyBlock)

Method called for each renderer.

Applies to