OpenVDB: CombineArgs< AValueType, BValueType > Class Template Reference

OpenVDB 8.1.0

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CombineArgs< AValueType, BValueType > Class Template Reference

This struct collects both input and output arguments to "grid combiner" functors used with the tree::TypedGrid::combineExtended() and combine2Extended() methods. AValueType and BValueType are the value types of the two grids being combined. More...

`#include <Types.h>`

## Public Types
using | AValueT = AValueType
using | BValueT = BValueType

## Public Member Functions
| CombineArgs ()
| CombineArgs (const AValueType &a, const BValueType &b, AValueType &result, bool aOn=false, bool bOn=false)
| Use this constructor when the result value is stored externally. More...
| CombineArgs (const AValueType &a, const BValueType &b, bool aOn=false, bool bOn=false)
| Use this constructor when the result value should be stored in this struct. More...
const AValueType & | a () const
| Get the A input value. More...
const BValueType & | b () const
| Get the B input value. More...
const AValueType & | result () const
| Get the output value. More...
AValueType & | result ()
CombineArgs & | setResult (const AValueType &val)
| Set the output value. More...
CombineArgs & | setARef (const AValueType &a)
| Redirect the A value to a new external source. More...
CombineArgs & | setBRef (const BValueType &b)
| Redirect the B value to a new external source. More...
CombineArgs & | setResultRef (AValueType &val)
| Redirect the result value to a new external destination. More...
bool | aIsActive () const
bool | bIsActive () const
bool | resultIsActive () const
CombineArgs & | setAIsActive (bool b)
| Set the active state of the A value. More...
CombineArgs & | setBIsActive (bool b)
| Set the active state of the B value. More...
CombineArgs & | setResultIsActive (bool b)
| Set the active state of the output value. More...

## Protected Member Functions
void | updateResultActive ()

## Protected Attributes
const AValueType * | mAValPtr
const BValueType * | mBValPtr
AValueType | mResultVal
AValueType * | mResultValPtr
bool | mAIsActive
bool | mBIsActive
bool | mResultIsActive

## Detailed Description

### template<typename AValueType, typename BValueType = AValueType>
class openvdb::v8_1::CombineArgs< AValueType, BValueType >

This struct collects both input and output arguments to "grid combiner" functors used with the tree::TypedGrid::combineExtended() and combine2Extended() methods. AValueType and BValueType are the value types of the two grids being combined.

See also
  openvdb/tree/Tree.h for usage information.

Setter methods return references to this object, to facilitate the following usage:

CombineArgs<float> args;
myCombineOp(args.setARef(aVal).setBRef(bVal).setAIsActive(true).setBIsActive(false));

## Member Typedef Documentation

## ◆ AValueT

using AValueT = AValueType

## ◆ BValueT

using BValueT = BValueType

## Constructor & Destructor Documentation

## ◆ CombineArgs() [1/3]

CombineArgs | ( |  | ) |
| inline

## ◆ CombineArgs() [2/3]

CombineArgs | ( | const AValueType & | a,
|  | const BValueType & | b,
|  | AValueType & | result,
|  | bool | aOn = `false`,
|  | bool | bOn = `false`
| ) |  |
| inline

Use this constructor when the result value is stored externally.

## ◆ CombineArgs() [3/3]

CombineArgs | ( | const AValueType & | a,
|  | const BValueType & | b,
|  | bool | aOn = `false`,
|  | bool | bOn = `false`
| ) |  |
| inline

Use this constructor when the result value should be stored in this struct.

## Member Function Documentation

## ◆ a()

const AValueType& a | ( |  | ) | const
| inline

Get the A input value.

## ◆ aIsActive()

bool aIsActive | ( |  | ) | const
| inline

Returns
  true if the A value is active

## ◆ b()

const BValueType& b | ( |  | ) | const
| inline

Get the B input value.

## ◆ bIsActive()

bool bIsActive | ( |  | ) | const
| inline

Returns
  true if the B value is active

## ◆ result() [1/2]

AValueType& result | ( |  | ) |
| inline

## ◆ result() [2/2]

const AValueType& result | ( |  | ) | const
| inline

Get the output value.

## ◆ resultIsActive()

bool resultIsActive | ( |  | ) | const
| inline

Returns
  true if the output value is active

## ◆ setAIsActive()

CombineArgs& setAIsActive | ( | bool | b | ) |
| inline

Set the active state of the A value.

## ◆ setARef()

CombineArgs& setARef | ( | const AValueType & | a | ) |
| inline

Redirect the A value to a new external source.

## ◆ setBIsActive()

CombineArgs& setBIsActive | ( | bool | b | ) |
| inline

Set the active state of the B value.

## ◆ setBRef()

CombineArgs& setBRef | ( | const BValueType & | b | ) |
| inline

Redirect the B value to a new external source.

## ◆ setResult()

CombineArgs& setResult | ( | const AValueType & | val | ) |
| inline

Set the output value.

## ◆ setResultIsActive()

CombineArgs& setResultIsActive | ( | bool | b | ) |
| inline

Set the active state of the output value.

## ◆ setResultRef()

CombineArgs& setResultRef | ( | AValueType & | val | ) |
| inline

Redirect the result value to a new external destination.

## ◆ updateResultActive()

void updateResultActive | ( |  | ) |
| inlineprotected

By default, the result value is active if either of the input values is active, but this behavior can be overridden by calling setResultIsActive().

## Member Data Documentation

## ◆ mAIsActive

bool mAIsActive
| protected

## ◆ mAValPtr

const AValueType* mAValPtr
| protected

## ◆ mBIsActive

bool mBIsActive
| protected

## ◆ mBValPtr

const BValueType* mBValPtr
| protected

## ◆ mResultIsActive

bool mResultIsActive
| protected

## ◆ mResultVal

AValueType mResultVal
| protected

## ◆ mResultValPtr

AValueType* mResultValPtr
| protected

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

- openvdb/Types.h