HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::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...
 
CombineArgssetResult (const AValueType &val)
 Set the output value. More...
 
CombineArgssetARef (const AValueType &a)
 Redirect the A value to a new external source. More...
 
CombineArgssetBRef (const BValueType &b)
 Redirect the B value to a new external source. More...
 
CombineArgssetResultRef (AValueType &val)
 Redirect the result value to a new external destination. More...
 
bool aIsActive () const
 
bool bIsActive () const
 
bool resultIsActive () const
 
CombineArgssetAIsActive (bool b)
 Set the active state of the A value. More...
 
CombineArgssetBIsActive (bool b)
 Set the active state of the B value. More...
 
CombineArgssetResultIsActive (bool b)
 Set the active state of the output value. More...
 
const AValueType & result () const
 Get the output value. More...
 
AValueType & result ()
 Get 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::OPENVDB_VERSION_NAME::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));

Definition at line 386 of file Types.h.

Member Typedef Documentation

template<typename AValueType, typename BValueType = AValueType>
using openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::AValueT = AValueType

Definition at line 389 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
using openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::BValueT = BValueType

Definition at line 390 of file Types.h.

Constructor & Destructor Documentation

template<typename AValueType, typename BValueType = AValueType>
openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::CombineArgs ( )
inline

Definition at line 392 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::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.

Definition at line 403 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::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.

Definition at line 415 of file Types.h.

Member Function Documentation

template<typename AValueType, typename BValueType = AValueType>
const AValueType& openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::a ( ) const
inline

Get the A input value.

Definition at line 426 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
bool openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::aIsActive ( ) const
inline
Returns
true if the A value is active

Definition at line 446 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
const BValueType& openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::b ( ) const
inline

Get the B input value.

Definition at line 428 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
bool openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::bIsActive ( ) const
inline
Returns
true if the B value is active

Definition at line 448 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
const AValueType& openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::result ( ) const
inline

Get the output value.

Definition at line 431 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
AValueType& openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::result ( )
inline

Get the output value.

Definition at line 432 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
bool openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::resultIsActive ( ) const
inline
Returns
true if the output value is active

Definition at line 450 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
CombineArgs& openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::setAIsActive ( bool  b)
inline

Set the active state of the A value.

Definition at line 453 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
CombineArgs& openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::setARef ( const AValueType &  a)
inline

Redirect the A value to a new external source.

Definition at line 439 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
CombineArgs& openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::setBIsActive ( bool  b)
inline

Set the active state of the B value.

Definition at line 455 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
CombineArgs& openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::setBRef ( const BValueType &  b)
inline

Redirect the B value to a new external source.

Definition at line 441 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
CombineArgs& openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::setResult ( const AValueType &  val)
inline

Set the output value.

Definition at line 436 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
CombineArgs& openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::setResultIsActive ( bool  b)
inline

Set the active state of the output value.

Definition at line 457 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
CombineArgs& openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::setResultRef ( AValueType &  val)
inline

Redirect the result value to a new external destination.

Definition at line 443 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
void openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::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().

Definition at line 462 of file Types.h.

Member Data Documentation

template<typename AValueType, typename BValueType = AValueType>
bool openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::mAIsActive
protected

Definition at line 468 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
const AValueType* openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::mAValPtr
protected

Definition at line 464 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
bool openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::mBIsActive
protected

Definition at line 468 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
const BValueType* openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::mBValPtr
protected

Definition at line 465 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
bool openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::mResultIsActive
protected

Definition at line 469 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
AValueType openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::mResultVal
protected

Definition at line 466 of file Types.h.

template<typename AValueType, typename BValueType = AValueType>
AValueType* openvdb::OPENVDB_VERSION_NAME::CombineArgs< AValueType, BValueType >::mResultValPtr
protected

Definition at line 467 of file Types.h.


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