My favorites | English | Sign in

o3d.ClearBuffer Class Reference

Inherits o3d.RenderNode

List of all members.


Detailed Description

A ClearBuffer is a render node that clears the color buffer, zbuffer and/or stencil buffer of the current render target.

Public Member Functions

copyParams(sourceParamObject) o3d.ParamObject
o3d.Param  createParam(paramName, paramTypeName) o3d.ParamObject
o3d.Param  getParam(paramName) o3d.ParamObject
!Array.<!o3d.RenderNode getRenderNodesByClassNameInTree(className) o3d.RenderNode
!Array.<!o3d.RenderNode getRenderNodesByNameInTree(name) o3d.RenderNode
!Array.<!o3d.RenderNode getRenderNodesInTree() o3d.RenderNode
boolean  isAClassName(className) o3d.ObjectBase
boolean  removeParam(param) o3d.ParamObject

Public Properties

boolean active o3d.RenderNode
!Array.<!o3d.RenderNode> children o3d.RenderNode
string className o3d.ObjectBase
!o3d.Float4 clearColor o3d.ClearBuffer
boolean clearColorFlag o3d.ClearBuffer
number clearDepth o3d.ClearBuffer
boolean clearDepthFlag o3d.ClearBuffer
number clearStencil o3d.ClearBuffer
boolean clearStencilFlag o3d.ClearBuffer
number clientId o3d.ObjectBase
string name o3d.NamedObject
!Array.<!o3d.Param> params o3d.ParamObject
o3d.RenderNode parent o3d.RenderNode
number priority o3d.RenderNode

Parameters

o3d.ParamFloat priority o3d.RenderNode
o3d.ParamBoolean active o3d.RenderNode
o3d.ParamFloat4 clearColor o3d.ClearBuffer
o3d.ParamBoolean clearColorFloat o3d.ClearBuffer
o3d.ParamFloat clearColor o3d.ClearBuffer
o3d.ParamBoolean clearColorFloat o3d.ClearBuffer
o3d.ParamInteger clearColor o3d.ClearBuffer
o3d.ParamBoolean clearColorFloat o3d.ClearBuffer

Member Function Documentation

ClearBuffer.copyParams ( !o3d.ParamObject sourceParamObject ) [inherited from o3d.ParamObject]

Copies all the params from a the given source_param_object to this param object. Does not replace any currently existing params with the same name.

Parameters:
sourceParamObject param object to copy params from.
o3d.Param ClearBuffer.createParam ( string paramName
string paramTypeName ) [inherited from o3d.ParamObject]

Creates a Param with the given name and type on the ParamObject. Will fail if a param with the same name already exists.

Parameters:
paramName The name of the Param to be created.
paramTypeName The type of Param to create. Valid types are
  • 'o3d.ParamBoolean'
  • 'o3d.ParamBoundingBox'
  • 'o3d.ParamDrawContext'
  • 'o3d.ParamDrawList'
  • 'o3d.ParamEffect'
  • 'o3d.ParamFloat'
  • 'o3d.ParamFloat2'
  • 'o3d.ParamFloat3'
  • 'o3d.ParamFloat4'
  • 'o3d.ParamFunction'
  • 'o3d.ParamInteger'
  • 'o3d.ParamMaterial'
  • 'o3d.ParamMatrix4'
  • 'o3d.ParamParamArray'
  • 'o3d.ParamRenderSurface'
  • 'o3d.ParamRenderDepthStencilSurface'
  • 'o3d.ParamSampler'
  • 'o3d.ParamSkin'
  • 'o3d.ParamSteamBank'
  • 'o3d.ParamState'
  • 'o3d.ParamString'
  • 'o3d.ParamTexture'
  • 'o3d.ParamTransform'
  • 'o3d.ProjectionParamMatrix4'
  • 'o3d.ProjectionInverseParamMatrix4'
  • 'o3d.ProjectionTransposeParamMatrix4'
  • 'o3d.ProjectionInverseTransposeParamMatrix4'
  • 'o3d.ViewParamMatrix4'
  • 'o3d.ViewInverseParamMatrix4'
  • 'o3d.ViewTransposeParamMatrix4'
  • 'o3d.ViewInverseTransposeParamMatrix4'
  • 'o3d.ViewProjectionParamMatrix4'
  • 'o3d.ViewProjectionInverseParamMatrix4'
  • 'o3d.ViewProjectionTransposeParamMatrix4'
  • 'o3d.ViewProjectionInverseTransposeParamMatrix4'
  • 'o3d.WorldParamMatrix4'
  • 'o3d.WorldInverseParamMatrix4'
  • 'o3d.WorldTransposeParamMatrix4'
  • 'o3d.WorldInverseTransposeParamMatrix4'
  • 'o3d.WorldViewParamMatrix4'
  • 'o3d.WorldViewInverseParamMatrix4'
  • 'o3d.WorldViewTransposeParamMatrix4'
  • 'o3d.WorldViewInverseTransposeParamMatrix4'
  • 'o3d.WorldViewProjectionParamMatrix4'
  • 'o3d.WorldViewProjectionInverseParamMatrix4'
  • 'o3d.WorldViewProjectionTransposeParamMatrix4'
  • 'o3d.WorldViewProjectionInverseTransposeParamMatrix4'
  • Returns:
    o3d.Param.The newly created Param or null on failure.
    o3d.Param ClearBuffer.getParam ( string paramName ) [inherited from o3d.ParamObject]

    Searches by name for a Param defined in the object.

    Parameters:
    paramName Name to search for.
    Returns:
    o3d.Param.The Param with the given name, or null otherwise.
    !Array.<!o3d.RenderNode> ClearBuffer.getRenderNodesByClassNameInTree ( string className ) [inherited from o3d.RenderNode]

    Searches for render nodes that match the given class name in the hierarchy under and including this render node. Note that modifications to this array [e.g. push()] will not affect the underlying RenderNode, while modifications to the array's members will affect them.

    Parameters:
    className class name to look for.
    Returns:
    !Array.<!o3d.RenderNode>.An array containing all nodes among this node and its decendants whose type is class_name.
    !Array.<!o3d.RenderNode> ClearBuffer.getRenderNodesByNameInTree ( string name ) [inherited from o3d.RenderNode]

    Searches for render nodes that match the given name in the hierarchy under and including this render node. Since there can be several render nodes with a given name the results are returned in an array. Note that modifications to this array [e.g. push()] will not affect the underlying RenderNode, while modifications to the array's members will affect them.

    Parameters:
    name Rendernode name to look for.
    Returns:
    !Array.<!o3d.RenderNode>.An array containing all nodes among this node and its decendants that have the given name.
    ClearBuffer.getRenderNodesInTree ( ) [inherited from o3d.RenderNode]

    Returns this render node and all its descendants. Note that this render node might not be in the render graph. Note that modifications to this array [e.g. push()] will not affect the underlying RenderNode, while modifications to the array's members will affect them.

    Returns:
    !Array.<!o3d.RenderNode>.An array containing all render nodes of the subtree.
    boolean ClearBuffer.isAClassName ( string className ) [inherited from o3d.ObjectBase]

    Takes the name of a class as an argument, and returns true if this object is either an instance of that class or derives from that class.

    var t = pack.createObject('o3d.Transform');
    t.isAClassName('o3d.Transform');    // true
    t.isAClassName('o3d.ParamObject');  // true
    t.isAClassName('o3d.Shape');        // false
    
    Parameters:
    className Name of class to check for.
    Returns:
    boolean.true if this object is a or is derived from the given class name.
    boolean ClearBuffer.removeParam ( !o3d.Param param ) [inherited from o3d.ParamObject]

    Removes a Param from a ParamObject. This function will fail if the param does not exist on this ParamObject or if the param is unremovable.

    Parameters:
    param param to remove.
    Returns:
    boolean.True if the param was removed.

    Member Property Documentation

    boolean ClearBuffer.active [inherited from o3d.RenderNode]

    Setting false skips this render node. Setting true processes this render node. (ie, renders whatever it's supposed to render) Default = true.

    !Array.<!o3d.RenderNode> ClearBuffer.children [inherited from o3d.RenderNode]

    The immediate children of this RenderNode. Each access to this field gets the entire list so it is best to get it just once. For example:

    var children = renderNode.children;
    for (var i = 0; i < children.length; i++) {
      var child = children[i];
    }
    
    Note that modifications to this array [e.g. push()] will not affect the underlying RenderNode, while modifications to the array's members will affect them. This property is read-only.
    string ClearBuffer.className [inherited from o3d.ObjectBase]

    The concrete class name for an object derived from ObjectBase. If you want to know if an object is of a certain type you should use objectBase.isAClassName

    var t = pack.createObject('o3d.Transform');
    t.className == 'o3d.Transform';  // true
    
    This property is read-only.
    !o3d.Float4 ClearBuffer.clearColor

    The color to clear the buffer in RGBA Float4 format. Default = [0, 0, 0, 1]

    boolean ClearBuffer.clearColorFlag

    true clears the current render target's color buffer to the clear color. false does not clear the color buffer. Default = true.

    number ClearBuffer.clearDepth

    The value to clear the depth buffer (0.0 to 1.0) Default = 1.

    boolean ClearBuffer.clearDepthFlag

    true clears the current render target's depth buffer to the clear depth value. false does not clear the depth buffer. Default = true.

    number ClearBuffer.clearStencil

    The value to clear the stencil buffer to (0 - 255). Default = 0.

    boolean ClearBuffer.clearStencilFlag

    true clears the current render target's stencil buffer to the clear stencil value. false does not clear the stencil buffer Default = true.

    number ClearBuffer.clientId [inherited from o3d.ObjectBase]

    Unique id of the object. This id will be unique, even across multiple O3D clients in the same page. This property is read-only.

    string ClearBuffer.name [inherited from o3d.NamedObject]

    The object's name. Setting this has no meaning to O3D, but is useful for debugging and for the functions Client.getObjects, Pack.getObject, RenderNode.getRenderNodesByNameInTree and RenderNode.getTransformsByNameInTree which search for objects by name.

    !Array.<!o3d.Param> ClearBuffer.params [inherited from o3d.ParamObject]

    Gets all the param on this param object. Each access to this field gets the entire list, so it is best to get it just once. For example:

    var params = paramObject.params;
    for (var i = 0; i < params.length; i++) {
      var param = params[i];
    }
    
    Note that modifications to this array [e.g. push()] will not affect the underlying ParamObject, while modifications to the array's members will affect them. This property is read-only.
    o3d.RenderNode ClearBuffer.parent [inherited from o3d.RenderNode]

    Sets the parent of the node by re-parenting the node under parent_node. Setting parent_node to null removes the node and the entire subtree below it from the render graph. This property is write-only.

    number ClearBuffer.priority [inherited from o3d.RenderNode]

    Sets the priority of this render node. lower priorities are rendered first. Default = 0.


    Parameter Documentation

    o3d.ParamFloat priority [inherited from o3d.RenderNode]

    The priority of this render node. Lower priorities are rendered first.

    o3d.ParamBoolean active [inherited from o3d.RenderNode]

    If true this node is processed. If false it is not.

    o3d.ParamFloat4 clearColor

    The color to clear to.

    o3d.ParamBoolean clearColorFloat

    True to clear the color of the current render target.

    o3d.ParamFloat clearColor

    The depth value to clear to (0.0 to 1.0).

    o3d.ParamBoolean clearColorFloat

    True to clear the depth of the current render target.

    o3d.ParamInteger clearColor

    The stencil value to clear to.

    o3d.ParamBoolean clearColorFloat

    True to clear the stencil of the current render target.