CubbyFlow::VolumeGridEmitter3 Class Referencefinal

3-D grid-based volumetric emitter. More...

#include <Core/Emitter/VolumeGridEmitter3.hpp>

Inheritance diagram for CubbyFlow::VolumeGridEmitter3:
CubbyFlow::GridEmitter3

Classes

class  Builder
 Front-end to create VolumeGridEmitter3 objects step by step. More...
 

Public Types

using ScalarMapper = std::function< double(double, const Vector3D &, double)>
 Maps to a scalar value for given signed-dist, location, and old value. More...
 
using VectorMapper = std::function< Vector3D(double, const Vector3D &, const Vector3D &)>
 Maps to a vector value for given signed-dist, location, and old value. More...
 
- Public Types inherited from CubbyFlow::GridEmitter3
using OnBeginUpdateCallback = std::function< void(GridEmitter3 *, double, double)>
 Callback function type for update calls. More...
 

Public Member Functions

 VolumeGridEmitter3 (ImplicitSurface3Ptr sourceRegion, bool isOneShot=true)
 Constructs an emitter with a source and is-one-shot flag. More...
 
 VolumeGridEmitter3 (const VolumeGridEmitter3 &)=default
 Default copy constructor. More...
 
 VolumeGridEmitter3 (VolumeGridEmitter3 &&) noexcept=default
 Default move constructor. More...
 
 ~VolumeGridEmitter3 () override=default
 Default virtual destructor. More...
 
VolumeGridEmitter3operator= (const VolumeGridEmitter3 &)=default
 Default copy assignment operator. More...
 
VolumeGridEmitter3operator= (VolumeGridEmitter3 &&) noexcept=default
 Default move assignment operator. More...
 
void AddSignedDistanceTarget (const ScalarGrid3Ptr &scalarGridTarget)
 Adds signed-distance target to the scalar grid. More...
 
void AddStepFunctionTarget (const ScalarGrid3Ptr &scalarGridTarget, double minValue, double maxValue)
 Adds step function target to the scalar grid. More...
 
void AddTarget (const ScalarGrid3Ptr &scalarGridTarget, const ScalarMapper &customMapper)
 Adds a scalar grid target. More...
 
void AddTarget (const VectorGrid3Ptr &vectorGridTarget, const VectorMapper &customMapper)
 Adds a vector grid target. More...
 
const ImplicitSurface3PtrGetSourceRegion () const
 Returns implicit surface which defines the source region. More...
 
bool GetIsOneShot () const
 Returns true if this emits only once. More...
 
- Public Member Functions inherited from CubbyFlow::GridEmitter3
 GridEmitter3 ()=default
 Default constructor. More...
 
 GridEmitter3 (const GridEmitter3 &)=default
 Default copy constructor. More...
 
 GridEmitter3 (GridEmitter3 &&) noexcept=default
 Default move constructor. More...
 
virtual ~GridEmitter3 ()=default
 Default virtual destructor. More...
 
GridEmitter3operator= (const GridEmitter3 &)=default
 Default copy assignment operator. More...
 
GridEmitter3operator= (GridEmitter3 &&) noexcept=default
 Default copy assignment operator. More...
 
void Update (double currentTimeInSeconds, double timeIntervalInSeconds)
 
bool GetIsEnabled () const
 Returns true if the emitter is enabled. More...
 
void SetIsEnabled (bool enabled)
 Sets true/false to enable/disable the emitter. More...
 
void SetOnBeginUpdateCallback (const OnBeginUpdateCallback &callback)
 Sets the callback function to be called when GridEmitter3::Update function is invoked. More...
 

Static Public Member Functions

static Builder GetBuilder ()
 Returns builder fox VolumeGridEmitter3. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CubbyFlow::GridEmitter3
void CallOnBeginUpdateCallback (double currentTimeInSeconds, double timeIntervalInSeconds)
 

Detailed Description

3-D grid-based volumetric emitter.

Member Typedef Documentation

◆ ScalarMapper

using CubbyFlow::VolumeGridEmitter3::ScalarMapper = std::function<double(double, const Vector3D&, double)>

Maps to a scalar value for given signed-dist, location, and old value.

◆ VectorMapper

using CubbyFlow::VolumeGridEmitter3::VectorMapper = std::function<Vector3D(double, const Vector3D&, const Vector3D&)>

Maps to a vector value for given signed-dist, location, and old value.

Constructor & Destructor Documentation

◆ VolumeGridEmitter3() [1/3]

CubbyFlow::VolumeGridEmitter3::VolumeGridEmitter3 ( ImplicitSurface3Ptr  sourceRegion,
bool  isOneShot = true 
)
explicit

Constructs an emitter with a source and is-one-shot flag.

Parameters
[in]sourceRegionEmitting region given by the SDF.
[in]isOneShotTrue if emitter gets disabled after one shot.

◆ VolumeGridEmitter3() [2/3]

CubbyFlow::VolumeGridEmitter3::VolumeGridEmitter3 ( const VolumeGridEmitter3 )
default

Default copy constructor.

◆ VolumeGridEmitter3() [3/3]

CubbyFlow::VolumeGridEmitter3::VolumeGridEmitter3 ( VolumeGridEmitter3 &&  )
defaultnoexcept

Default move constructor.

◆ ~VolumeGridEmitter3()

CubbyFlow::VolumeGridEmitter3::~VolumeGridEmitter3 ( )
overridedefault

Default virtual destructor.

Member Function Documentation

◆ AddSignedDistanceTarget()

void CubbyFlow::VolumeGridEmitter3::AddSignedDistanceTarget ( const ScalarGrid3Ptr scalarGridTarget)

Adds signed-distance target to the scalar grid.

◆ AddStepFunctionTarget()

void CubbyFlow::VolumeGridEmitter3::AddStepFunctionTarget ( const ScalarGrid3Ptr scalarGridTarget,
double  minValue,
double  maxValue 
)

Adds step function target to the scalar grid.

Parameters
[in]scalarGridTargetThe scalar grid target.
[in]minValueThe minimum value of the step function.
[in]maxValueThe maximum value of the step function.

◆ AddTarget() [1/2]

void CubbyFlow::VolumeGridEmitter3::AddTarget ( const ScalarGrid3Ptr scalarGridTarget,
const ScalarMapper customMapper 
)

Adds a scalar grid target.

This function adds a custom target to the emitter. The first parameter defines which grid should it write to. The second parameter, customMapper, defines how to map signed-distance field from the volume geometry and location of the point to the final scalar value that is going to be written to the target grid. The third parameter defines how to blend the old value from the target grid and the new value from the mapper function.

Parameters
[in]scalarGridTargetThe scalar grid target
[in]customMapperThe custom mapper.

◆ AddTarget() [2/2]

void CubbyFlow::VolumeGridEmitter3::AddTarget ( const VectorGrid3Ptr vectorGridTarget,
const VectorMapper customMapper 
)

Adds a vector grid target.

This function adds a custom target to the emitter. The first parameter defines which grid should it write to. The second parameter, customMapper, defines how to map signed-distance field from the volume geometry and location of the point to the final vector value that is going to be written to the target grid. The third parameter defines how to blend the old value from the target grid and the new value from the mapper function.

Parameters
[in]vectorGridTargetThe vector grid target
[in]customMapperThe custom mapper.

◆ GetBuilder()

static Builder CubbyFlow::VolumeGridEmitter3::GetBuilder ( )
static

Returns builder fox VolumeGridEmitter3.

◆ GetIsOneShot()

bool CubbyFlow::VolumeGridEmitter3::GetIsOneShot ( ) const

Returns true if this emits only once.

◆ GetSourceRegion()

const ImplicitSurface3Ptr& CubbyFlow::VolumeGridEmitter3::GetSourceRegion ( ) const

Returns implicit surface which defines the source region.

◆ operator=() [1/2]

VolumeGridEmitter3& CubbyFlow::VolumeGridEmitter3::operator= ( const VolumeGridEmitter3 )
default

Default copy assignment operator.

◆ operator=() [2/2]

VolumeGridEmitter3& CubbyFlow::VolumeGridEmitter3::operator= ( VolumeGridEmitter3 &&  )
defaultnoexcept

Default move assignment operator.


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