mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class ClippingPrimitive

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

    Inheritance
    Object
    ClippingPrimitive
    ClippingBox
    ClippingPlane
    ClippingSphere
    Implements
    IMaterialInstanceOwner
    MonoBehaviour
    Namespace: Microsoft.MixedReality.Toolkit.Utilities
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class ClippingPrimitive : MonoBehaviour, IMaterialInstanceOwner, MonoBehaviour

    Fields

    clippingSide

    Declaration
    protected ClippingPrimitive.Side clippingSide
    Field Value
    Type Description
    ClippingPrimitive.Side

    clippingSide

    Declaration
    protected ClippingPrimitive.Side clippingSide
    Field Value
    Type Description
    ClippingPrimitive.Side

    materialPropertyBlock

    Declaration
    protected MaterialPropertyBlock materialPropertyBlock
    Field Value
    Type Description
    MaterialPropertyBlock

    materialPropertyBlock

    Declaration
    protected MaterialPropertyBlock materialPropertyBlock
    Field Value
    Type Description
    MaterialPropertyBlock

    renderers

    Declaration
    protected List<Renderer> renderers
    Field Value
    Type Description
    List<Renderer>

    renderers

    Declaration
    protected List<Renderer> renderers
    Field Value
    Type Description
    List<Renderer>

    Properties

    ClippingSide

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

    Declaration
    public ClippingPrimitive.Side ClippingSide { get; set; }
    Property Value
    Type Description
    ClippingPrimitive.Side

    ClippingSide

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

    Declaration
    public ClippingPrimitive.Side ClippingSide { get; set; }
    Property Value
    Type Description
    ClippingPrimitive.Side

    ClippingSideProperty

    Declaration
    protected abstract string ClippingSideProperty { get; }
    Property Value
    Type Description
    String

    ClippingSideProperty

    Declaration
    protected abstract string ClippingSideProperty { get; }
    Property Value
    Type Description
    String

    Keyword

    Declaration
    protected abstract string Keyword { get; }
    Property Value
    Type Description
    String

    Keyword

    Declaration
    protected abstract string Keyword { get; }
    Property Value
    Type Description
    String

    UseOnPreRender

    Toggles whether the primitive will use the Camera OnPreRender event.

    Declaration
    public bool UseOnPreRender { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    This is especially helpful if you're trying to clip dynamically created objects that may be added to the scene after LateUpdate such as OnWillRender

    UseOnPreRender

    Toggles whether the primitive will use the Camera OnPreRender event.

    Declaration
    public bool UseOnPreRender { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    This is especially helpful if you're trying to clip dynamically created objects that may be added to the scene after LateUpdate such as OnWillRender

    Methods

    AddRenderer(Renderer)

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

    Declaration
    public void AddRenderer(Renderer _renderer)
    Parameters
    Type Name Description
    Renderer _renderer

    AddRenderer(Renderer)

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

    Declaration
    public void AddRenderer(Renderer _renderer)
    Parameters
    Type Name Description
    Renderer _renderer

    ClearRenderers()

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

    Declaration
    public void ClearRenderers()

    ClearRenderers()

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

    Declaration
    public void ClearRenderers()

    GetRenderersCopy()

    Returns a copy of the current list of renderers.

    Declaration
    public IEnumerable<Renderer> GetRenderersCopy()
    Returns
    Type Description
    IEnumerable<Renderer>

    The current list of renderers.

    GetRenderersCopy()

    Returns a copy of the current list of renderers.

    Declaration
    public IEnumerable<Renderer> GetRenderersCopy()
    Returns
    Type Description
    IEnumerable<Renderer>

    The current list of renderers.

    Initialize()

    Declaration
    protected virtual void Initialize()

    Initialize()

    Declaration
    protected virtual void Initialize()

    LateUpdate()

    Declaration
    protected void LateUpdate()

    LateUpdate()

    Declaration
    protected void LateUpdate()

    OnCameraPreRender(CameraEventRouter)

    Declaration
    protected void OnCameraPreRender(CameraEventRouter router)
    Parameters
    Type Name Description
    CameraEventRouter router

    OnCameraPreRender(CameraEventRouter)

    Declaration
    protected void OnCameraPreRender(CameraEventRouter router)
    Parameters
    Type Name Description
    CameraEventRouter router

    OnDestroy()

    Declaration
    protected void OnDestroy()

    OnDestroy()

    Declaration
    protected void OnDestroy()

    OnDisable()

    Declaration
    protected void OnDisable()

    OnDisable()

    Declaration
    protected void OnDisable()

    OnEnable()

    Declaration
    protected void OnEnable()

    OnEnable()

    Declaration
    protected void OnEnable()

    OnMaterialChanged(MaterialInstance)

    Declaration
    public void OnMaterialChanged(MaterialInstance materialInstance)
    Parameters
    Type Name Description
    MaterialInstance materialInstance

    OnMaterialChanged(MaterialInstance)

    Declaration
    public void OnMaterialChanged(MaterialInstance materialInstance)
    Parameters
    Type Name Description
    MaterialInstance materialInstance

    RemoveRenderer(Renderer)

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

    Declaration
    public void RemoveRenderer(Renderer _renderer)
    Parameters
    Type Name Description
    Renderer _renderer

    RemoveRenderer(Renderer)

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

    Declaration
    public void RemoveRenderer(Renderer _renderer)
    Parameters
    Type Name Description
    Renderer _renderer

    ToggleClippingFeature(Material, Boolean)

    Declaration
    protected void ToggleClippingFeature(Material material, bool keywordOn)
    Parameters
    Type Name Description
    Material material
    Boolean keywordOn

    ToggleClippingFeature(Material, Boolean)

    Declaration
    protected void ToggleClippingFeature(Material material, bool keywordOn)
    Parameters
    Type Name Description
    Material material
    Boolean keywordOn

    ToggleClippingFeature(Material[], Boolean)

    Declaration
    protected void ToggleClippingFeature(Material[] materials, bool keywordOn)
    Parameters
    Type Name Description
    Material[] materials
    Boolean keywordOn

    ToggleClippingFeature(Material[], Boolean)

    Declaration
    protected void ToggleClippingFeature(Material[] materials, bool keywordOn)
    Parameters
    Type Name Description
    Material[] materials
    Boolean keywordOn

    ToggleClippingFeature(Boolean)

    Declaration
    protected void ToggleClippingFeature(bool keywordOn)
    Parameters
    Type Name Description
    Boolean keywordOn

    ToggleClippingFeature(Boolean)

    Declaration
    protected void ToggleClippingFeature(bool keywordOn)
    Parameters
    Type Name Description
    Boolean keywordOn

    UpdateRenderers()

    Declaration
    protected virtual void UpdateRenderers()

    UpdateRenderers()

    Declaration
    protected virtual void UpdateRenderers()

    UpdateShaderProperties(MaterialPropertyBlock)

    Declaration
    protected abstract void UpdateShaderProperties(MaterialPropertyBlock materialPropertyBlock)
    Parameters
    Type Name Description
    MaterialPropertyBlock materialPropertyBlock

    UpdateShaderProperties(MaterialPropertyBlock)

    Declaration
    protected abstract void UpdateShaderProperties(MaterialPropertyBlock materialPropertyBlock)
    Parameters
    Type Name Description
    MaterialPropertyBlock materialPropertyBlock

    Implements

    IMaterialInstanceOwner
    MonoBehaviour
    In This Article
    • Fields
      • clippingSide
      • clippingSide
      • materialPropertyBlock
      • materialPropertyBlock
      • renderers
      • renderers
    • Properties
      • ClippingSide
      • ClippingSide
      • ClippingSideProperty
      • ClippingSideProperty
      • Keyword
      • Keyword
      • UseOnPreRender
      • UseOnPreRender
    • Methods
      • AddRenderer(Renderer)
      • AddRenderer(Renderer)
      • ClearRenderers()
      • ClearRenderers()
      • GetRenderersCopy()
      • GetRenderersCopy()
      • Initialize()
      • Initialize()
      • LateUpdate()
      • LateUpdate()
      • OnCameraPreRender(CameraEventRouter)
      • OnCameraPreRender(CameraEventRouter)
      • OnDestroy()
      • OnDestroy()
      • OnDisable()
      • OnDisable()
      • OnEnable()
      • OnEnable()
      • OnMaterialChanged(MaterialInstance)
      • OnMaterialChanged(MaterialInstance)
      • RemoveRenderer(Renderer)
      • RemoveRenderer(Renderer)
      • ToggleClippingFeature(Material, Boolean)
      • ToggleClippingFeature(Material, Boolean)
      • ToggleClippingFeature(Material[], Boolean)
      • ToggleClippingFeature(Material[], Boolean)
      • ToggleClippingFeature(Boolean)
      • ToggleClippingFeature(Boolean)
      • UpdateRenderers()
      • UpdateRenderers()
      • UpdateShaderProperties(MaterialPropertyBlock)
      • UpdateShaderProperties(MaterialPropertyBlock)
    • Implements
    Back to top Generated by DocFX