Jet
v1.3.3
|
3-D grid-based volumetric emitter. More...
#include <jet/volume_grid_emitter3.h>
Classes | |
class | Builder |
Front-end to create VolumeGridEmitter3 objects step by step. More... | |
Public Types | |
typedef std::function< double(double, const Vector3D &, double)> | ScalarMapper |
Maps to a scalar value for given signed-dist, location, and old value. More... | |
typedef std::function< Vector3D(double, const Vector3D &, const Vector3D &)> | VectorMapper |
Maps to a vector value for given signed-dist, location, and old value. More... | |
![]() | |
typedef std::function< void(double, double)> | OnBeginUpdateCallback |
Callback function type for update calls. More... | |
Public Member Functions | |
VolumeGridEmitter3 (const ImplicitSurface3Ptr &sourceRegion, bool isOneShot=true) | |
Constructs an emitter with a source and is-one-shot flag. More... | |
virtual | ~VolumeGridEmitter3 () |
Destructor. 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 ImplicitSurface3Ptr & | sourceRegion () const |
Returns implicit surface which defines the source region. More... | |
bool | isOneShot () const |
Returns true if this emits only once. More... | |
![]() | |
GridEmitter3 () | |
Constructs an emitter. More... | |
virtual | ~GridEmitter3 () |
Destructor. More... | |
void | update (double currentTimeInSeconds, double timeIntervalInSeconds) |
bool | isEnabled () 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 | builder () |
Returns builder fox VolumeGridEmitter3. More... | |
Additional Inherited Members |
3-D grid-based volumetric emitter.
typedef std::function<double(double, const Vector3D&, double)> jet::VolumeGridEmitter3::ScalarMapper |
Maps to a scalar value for given signed-dist, location, and old value.
typedef std::function<Vector3D(double, const Vector3D&, const Vector3D&)> jet::VolumeGridEmitter3::VectorMapper |
Maps to a vector value for given signed-dist, location, and old value.
|
explicit |
Constructs an emitter with a source and is-one-shot flag.
[in] | sourceRegion | Emitting region given by the SDF. |
[in] | isOneShot | True if emitter gets disabled after one shot. |
|
virtual |
Destructor.
void jet::VolumeGridEmitter3::addSignedDistanceTarget | ( | const ScalarGrid3Ptr & | scalarGridTarget | ) |
Adds signed-distance target to the scalar grid.
void jet::VolumeGridEmitter3::addStepFunctionTarget | ( | const ScalarGrid3Ptr & | scalarGridTarget, |
double | minValue, | ||
double | maxValue | ||
) |
Adds step function target to the scalar grid.
[in] | scalarGridTarget | The scalar grid target. |
[in] | minValue | The minimum value of the step function. |
[in] | maxValue | The maximum value of the step function. |
void jet::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.
[in] | scalarGridTarget | The scalar grid target |
[in] | customMapper | The custom mapper. |
void jet::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 sigend-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.
[in] | scalarGridTarget | The vector grid target |
[in] | customMapper | The custom mapper. |
|
static |
Returns builder fox VolumeGridEmitter3.
bool jet::VolumeGridEmitter3::isOneShot | ( | ) | const |
Returns true if this emits only once.
const ImplicitSurface3Ptr& jet::VolumeGridEmitter3::sourceRegion | ( | ) | const |
Returns implicit surface which defines the source region.