- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# LayerContainer Class Reference

This reference page is linked to from the following overview topics: Scene Graph, Sampling Texture Values, Layers and Viewport Filters, Layer Containers, Viewports.

Search for all occurrences

## Detailed Description

This class contains and manages a list of Layers.

Definition at line 47 of file layer.h.

`#include <layer.h>`

Inheritance diagram for LayerContainer:
[legend]

List of all members.

## Public Member Functions
virtual unsigned int | LayerCount (void) const
| Returns the number of layers in the container.
virtual class Layer * | Layer (unsigned int iLayerIndex) const
| Returns a pointer to a contained layer, based on its index in the list.
virtual unsigned int | LayerIndex (const class Layer *pLayer) const
| Returns the index of the specified layer in the container. If the layer in not in the container, either -1 or a value equal to LayerCount() will be returned.
virtual void | UnlinkLayer (class Layer *pLayer)
| Removes a layer from the container. The layer is not deleted.
virtual void | AddLayer (class Layer *pLayer)
| Adds a new layer to the container.
virtual class Layer * | CreateLayer (void)
| Creates a new layer and returns a pointer to it.
virtual class Layer * | ActiveLayer (void) const
| Returns a pointer to the current (active) layer.
virtual void | SetActiveLayer (class Layer *pLayer)
| Sets the current (active) layer.
virtual void | MoveLayer (class Layer *pLayer, class Layer *pWhere, bool bBefore)
| Moves the layer before or after the specified one in the list.
virtual void | ReparentLayer (class Layer *pLayer, class Layer *pParent)
| Makes this layer as a child of another one.
virtual class Layer * | BaseLayer (void) const
| Returns the base layer.
virtual void | Serialize (Stream &s)
| Reads/writes this object to/from a data stream.

## Member Function Documentation

virtual unsigned int LayerCount | ( | void |  | ) | const `[virtual]`

Search for all occurrences

Returns the number of layers in the container.

Reimplemented in ViewPort.

virtual class Layer* Layer | ( | unsigned int | iLayerIndex | ) | const `[virtual]`

Search for all occurrences

Returns a pointer to a contained layer, based on its index in the list.

Parameters:

  [in] | iLayerIndex | index of the layer to return (0-based)

Reimplemented in ViewPort.

virtual unsigned int LayerIndex | ( | const class Layer * | pLayer | ) | const `[virtual]`

Search for all occurrences

Returns the index of the specified layer in the container. If the layer in not in the container, either -1 or a value equal to LayerCount() will be returned.

Parameters:

  [in] | pLayer | A pointer to the layer whose index you want.

virtual void UnlinkLayer | ( | class Layer * | pLayer | ) | `[virtual]`

Search for all occurrences

Removes a layer from the container. The layer is not deleted.

Parameters:

  [in] | pLayer | A pointer to the layer to be removed

Reimplemented in ViewPort.

virtual void AddLayer | ( | class Layer * | pLayer | ) | `[virtual]`

Search for all occurrences

Adds a new layer to the container.

Parameters:

  [in] | pLayer | A pointer to the layer to be added

Reimplemented in ViewPort.

virtual class Layer* CreateLayer | ( | void |  | ) | `[virtual]`

Search for all occurrences

Creates a new layer and returns a pointer to it.

Reimplemented in ViewPort.

virtual class Layer* ActiveLayer | ( | void |  | ) | const `[virtual]`

Search for all occurrences

Returns a pointer to the current (active) layer.

Reimplemented in ViewPort.

virtual void SetActiveLayer | ( | class Layer * | pLayer | ) | `[virtual]`

Search for all occurrences

Sets the current (active) layer.

Parameters:

  [in] | pLayer | A pointer to the layer to be made current

Reimplemented in ViewPort.

virtual void MoveLayer | ( | class Layer * | pLayer,
|  | class Layer * | pWhere,
|  | bool | bBefore
| ) |  | `[virtual]`

Search for all occurrences

Moves the layer before or after the specified one in the list.

Parameters:

  [in] | pLayer | A pointer to the layer to be moved
  [in] | pWhere | A pointer to the destination
  [in] | bBefore | If true, the layer is moved to immediately before the destination. If false, it is moved to immediately after.

virtual void ReparentLayer | ( | class Layer * | pLayer,
|  | class Layer * | pParent
| ) |  | `[virtual]`

Search for all occurrences

Makes this layer as a child of another one.

Parameters:

  [in] | pLayer | The layer to move
  [in] | pParent | Its new parent

virtual class Layer* BaseLayer | ( | void |  | ) | const `[virtual]`

Search for all occurrences

Returns the base layer.

virtual void Serialize | ( | Stream & | s | ) | `[virtual]`

Search for all occurrences

Reads/writes this object to/from a data stream.

Parameters:

  [in] | s | the data stream

Reimplemented from TreeNode.

The documentation for this class was generated from the following file:

- Mudbox/layer.h

LayerContainer LayerContainer LayerContainer LayerContainer LayerContainer LayerContainer LayerContainer LayerContainer LayerContainer LayerContainer
LayerContainer LayerContainer LayerContainer LayerContainer LayerContainer LayerContainer LayerContainer LayerContainer LayerContainer LayerContainer