Options
All
  • Public
  • Public/Protected
  • All
Menu

Class responsible for fluid rendering. It is implementing the method described in https://developer.download.nvidia.com/presentations/2010/gdc/Direct3D_Effects.pdf

Hierarchy

  • FluidRenderer

Index

Constructors

  • Initializes the class

    Parameters

    • scene: Scene

      Scene in which the objects are part of

    Returns FluidRenderer

Properties

Retrieves all the render objects managed by the class

targetRenderers: FluidRenderingTargetRenderer[]

Retrieves all the render target renderers managed by the class

Methods

  • Adds a custom particle set to the fluid renderer.

    Parameters

    • buffers: {}

      The list of buffers (should contain at least a "position" buffer!)

    • numParticles: number

      Number of particles in each buffer

    • Optional generateDiffuseTexture: boolean

      True if you want to generate a diffuse texture from buffers and use it as part of the fluid rendering (default: false). For the texture to be generated correctly, you need a "color" buffer in the set!

    • Optional targetRenderer: FluidRenderingTargetRenderer

      The target renderer used to display the particle system as a fluid. If not provided, the method will create a new one

    • Optional camera: Camera

      The camera used by the target renderer (if the target renderer is created by the method)

    Returns IFluidRenderingRenderObject

    the render object corresponding to the custom particle set

  • Adds a particle system to the fluid renderer.

    Parameters

    • ps: IParticleSystem

      particle system

    • Optional generateDiffuseTexture: boolean

      True if you want to generate a diffuse texture from the particle system and use it as part of the fluid rendering (default: false)

    • Optional targetRenderer: FluidRenderingTargetRenderer

      The target renderer used to display the particle system as a fluid. If not provided, the method will create a new one

    • Optional camera: Camera

      The camera used by the target renderer (if the target renderer is created by the method)

    Returns IFluidRenderingRenderObject

    the render object corresponding to the particle system

  • dispose(): void
  • Disposes of all the ressources used by the class

    Returns void

  • Gets the render object corresponding to a particle system (null if the particle system is not rendered as a fluid)

    Parameters

    Returns Nullable<IFluidRenderingRenderObject>

    the render object corresponding to this particle system if any, otherwise null

  • recreate(): void
  • Reinitializes the class Can be used if you change the object priority (FluidRenderingObject.priority), to make sure the objects are rendered in the right order

    Returns void

  • Removes a render object from the fluid renderer

    Parameters

    • renderObject: IFluidRenderingRenderObject

      the render object to remove

    • Optional removeUnusedTargetRenderer: boolean

      True to remove/dispose of the target renderer if it's not used anymore (default: true)

    Returns boolean

    True if the render object has been found and released, else false

Legend

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

Settings

Theme