Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DepthReducer

This class is a small wrapper around the MinMaxReducer class to compute the min/max values of a depth texture

Hierarchy

Index

Constructors

constructor

Properties

onAfterReductionPerformedSearch playground for onAfterReductionPerformed

onAfterReductionPerformed: Observable<{ max: number; min: number }>

Observable triggered when the computation has been performed

Accessors

activated

  • get activated(): boolean
  • Gets the activation status of the reducer

    Returns boolean

depthRenderer

  • Gets the depth renderer used for the computation. Note that the result is null if you provide your own renderer when calling setDepthRenderer.

    Returns Nullable<DepthRenderer>

refreshRate

  • get refreshRate(): number
  • set refreshRate(value: number): any
  • Defines the refresh rate of the computation. Use 0 to compute just once, 1 to compute on every frame, 2 to compute every two frames and so on...

    Returns number

  • Defines the refresh rate of the computation. Use 0 to compute just once, 1 to compute on every frame, 2 to compute every two frames and so on...

    Parameters

    • value: number

    Returns any

sourceTexture

Methods

activateSearch playground for activate

  • activate(): void
  • Activates the reduction computation. When activated, the observers registered in onAfterReductionPerformed are called after the computation is performed

    Returns void

deactivateSearch playground for deactivate

  • deactivate(): void
  • Deactivates the reduction computation.

    Returns void

disposeSearch playground for dispose

  • dispose(disposeAll?: boolean): void
  • Disposes the depth reducer

    Parameters

    • Optional disposeAll: boolean

      true to dispose all the resources. You should always call this function with true as the parameter (or without any parameter as it is the default one). This flag is meant to be used internally.

    Returns void

setDepthRendererSearch playground for setDepthRenderer

  • setDepthRenderer(depthRenderer?: Nullable<DepthRenderer>, type?: number, forceFullscreenViewport?: boolean): void
  • Sets the depth renderer to use to generate the depth map

    Parameters

    • Optional depthRenderer: Nullable<DepthRenderer>

      The depth renderer to use. If not provided, a new one will be created automatically

    • Optional type: number

      The texture type of the depth map (default: TEXTURETYPE_HALF_FLOAT)

    • Optional forceFullscreenViewport: boolean

      Forces the post processes used for the reduction to be applied without taking into account viewport (defaults to true)

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Property
  • Method
  • Static property
  • Static method