IAddChildContext class

<oceansdk/contexts.h>

Description

This class allows plugin nodes to have child nodes.

Add functions declare the children to Ocean and must be called in the addChildren() overloads of plugin classes.

Get functions must be called in the prepare() overloads of plugin classes. The returned pointers should be stored for later use in main node functions.

Namespace

This class is in the namespace Ocean::Sdk

Members

class IAddChildContext
bool addEnvironment(const char *childName, const char *childType = 0)

[virtual]

Parameters
  • childName – Child name as a null terminated string

  • childType – Default child type

Returns

True if successful, false otherwise

Adds a filter shader child.

If a valid childType is specified, the child is mandatory (cannot be disabled in Ocean) and will default to the given type.

If no childType is specified, the child is optional and disabled by default.

The child name must contain only lowercase ASCII letters (a-z), underscores (_) and digits (0-9).

bool addFilterShader(const char *childName, const char *childType = 0)

[virtual]

Parameters
  • childName – Child name as a null terminated string

  • childType – Default child type

Returns

True if successful, false otherwise

Adds a filter shader child.

If a valid childType is specified, the child is mandatory (cannot be disabled in Ocean) and will default to the given type.

If no childType is specified, the child is optional and disabled by default.

The child name must contain only lowercase ASCII letters (a-z), underscores (_) and digits (0-9).

bool addScalarShader(const char *childName, const char *childType = 0)

[virtual]

Parameters
  • childName – Child name as a null terminated string

  • childType – Default child type

Returns

True if successful, false otherwise

Adds a filter shader child.

If a valid childType is specified, the child is mandatory (cannot be disabled in Ocean) and will default to the given type.

If no childType is specified, the child is optional and disabled by default.

The child name must contain only lowercase ASCII letters (a-z), underscores (_) and digits (0-9).

bool addNormalShader(const char *childName, const char *childType = 0)

[virtual]

Parameters
  • childName – Child name as a null terminated string

  • childType – Default child type

Returns

True if successful, false otherwise

Adds a filter shader child.

If a valid childType is specified, the child is mandatory (cannot be disabled in Ocean) and will default to the given type.

If no childType is specified, the child is optional and disabled by default.

The child name must contain only lowercase ASCII letters (a-z), underscores (_) and digits (0-9).

~IAddChildContext()

[virtual]

The destructor for IAddChildContext