MeshLib C Docs
Loading...
Searching...
No Matches
MRPrecipitationSimulator.h File Reference
#include <MRCMesh/MRId.h>
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stddef.h>

Go to the source code of this file.

Typedefs

typedef struct MR_WatershedGraph MR_WatershedGraph
 
typedef enum MR_PrecipitationSimulator_Event MR_PrecipitationSimulator_Event
 
typedef struct MR_PrecipitationSimulator_SimulationStep MR_PrecipitationSimulator_SimulationStep
 
typedef struct MR_PrecipitationSimulator MR_PrecipitationSimulator
 

Enumerations

enum  MR_PrecipitationSimulator_Event { MR_PrecipitationSimulator_Event_Finish = 0 , MR_PrecipitationSimulator_Event_BasinFull = 1 , MR_PrecipitationSimulator_Event_Merge = 2 }
 

Functions

MRC_API MR_PrecipitationSimulatorMR_PrecipitationSimulator_ConstructFromAnother (MR_PassBy _other_pass_by, MR_PrecipitationSimulator *_other)
 
MRC_API const MR_PrecipitationSimulatorMR_PrecipitationSimulator_OffsetPtr (const MR_PrecipitationSimulator *ptr, ptrdiff_t i)
 
MRC_API MR_PrecipitationSimulatorMR_PrecipitationSimulator_OffsetMutablePtr (MR_PrecipitationSimulator *ptr, ptrdiff_t i)
 
MRC_API MR_PrecipitationSimulatorMR_PrecipitationSimulator_Construct (MR_WatershedGraph *wg)
 
MRC_API void MR_PrecipitationSimulator_Destroy (const MR_PrecipitationSimulator *_this)
 Destroys a heap-allocated instance of MR_PrecipitationSimulator. Does nothing if the pointer is null.
 
MRC_API void MR_PrecipitationSimulator_DestroyArray (const MR_PrecipitationSimulator *_this)
 Destroys a heap-allocated array of MR_PrecipitationSimulator. Does nothing if the pointer is null.
 
MRC_API MR_PrecipitationSimulator_SimulationStepMR_PrecipitationSimulator_simulateOne (MR_PrecipitationSimulator *_this)
 
MRC_API const MR_PrecipitationSimulator_EventMR_PrecipitationSimulator_SimulationStep_Get_event (const MR_PrecipitationSimulator_SimulationStep *_this)
 
MRC_API void MR_PrecipitationSimulator_SimulationStep_Set_event (MR_PrecipitationSimulator_SimulationStep *_this, MR_PrecipitationSimulator_Event value)
 
MRC_API MR_PrecipitationSimulator_EventMR_PrecipitationSimulator_SimulationStep_GetMutable_event (MR_PrecipitationSimulator_SimulationStep *_this)
 
MRC_API const float * MR_PrecipitationSimulator_SimulationStep_Get_amount (const MR_PrecipitationSimulator_SimulationStep *_this)
 
MRC_API void MR_PrecipitationSimulator_SimulationStep_Set_amount (MR_PrecipitationSimulator_SimulationStep *_this, float value)
 
MRC_API float * MR_PrecipitationSimulator_SimulationStep_GetMutable_amount (MR_PrecipitationSimulator_SimulationStep *_this)
 
MRC_API const MR_GraphVertIdMR_PrecipitationSimulator_SimulationStep_Get_basin (const MR_PrecipitationSimulator_SimulationStep *_this)
 
MRC_API void MR_PrecipitationSimulator_SimulationStep_Set_basin (MR_PrecipitationSimulator_SimulationStep *_this, MR_GraphVertId value)
 
MRC_API MR_GraphVertIdMR_PrecipitationSimulator_SimulationStep_GetMutable_basin (MR_PrecipitationSimulator_SimulationStep *_this)
 
MRC_API const MR_GraphVertIdMR_PrecipitationSimulator_SimulationStep_Get_neiBasin (const MR_PrecipitationSimulator_SimulationStep *_this)
 
MRC_API void MR_PrecipitationSimulator_SimulationStep_Set_neiBasin (MR_PrecipitationSimulator_SimulationStep *_this, MR_GraphVertId value)
 
MRC_API MR_GraphVertIdMR_PrecipitationSimulator_SimulationStep_GetMutable_neiBasin (MR_PrecipitationSimulator_SimulationStep *_this)
 
MRC_API MR_PrecipitationSimulator_SimulationStepMR_PrecipitationSimulator_SimulationStep_DefaultConstruct (void)
 
MRC_API MR_PrecipitationSimulator_SimulationStepMR_PrecipitationSimulator_SimulationStep_DefaultConstructArray (size_t num_elems)
 
MRC_API MR_PrecipitationSimulator_SimulationStepMR_PrecipitationSimulator_SimulationStep_ConstructFrom (MR_PrecipitationSimulator_Event event, float amount, MR_GraphVertId basin, MR_GraphVertId neiBasin)
 
MRC_API const MR_PrecipitationSimulator_SimulationStepMR_PrecipitationSimulator_SimulationStep_OffsetPtr (const MR_PrecipitationSimulator_SimulationStep *ptr, ptrdiff_t i)
 
MRC_API MR_PrecipitationSimulator_SimulationStepMR_PrecipitationSimulator_SimulationStep_OffsetMutablePtr (MR_PrecipitationSimulator_SimulationStep *ptr, ptrdiff_t i)
 
MRC_API MR_PrecipitationSimulator_SimulationStepMR_PrecipitationSimulator_SimulationStep_ConstructFromAnother (const MR_PrecipitationSimulator_SimulationStep *_other)
 
MRC_API void MR_PrecipitationSimulator_SimulationStep_Destroy (const MR_PrecipitationSimulator_SimulationStep *_this)
 Destroys a heap-allocated instance of MR_PrecipitationSimulator_SimulationStep. Does nothing if the pointer is null.
 
MRC_API void MR_PrecipitationSimulator_SimulationStep_DestroyArray (const MR_PrecipitationSimulator_SimulationStep *_this)
 Destroys a heap-allocated array of MR_PrecipitationSimulator_SimulationStep. Does nothing if the pointer is null.
 
MRC_API MR_PrecipitationSimulator_SimulationStepMR_PrecipitationSimulator_SimulationStep_AssignFromAnother (MR_PrecipitationSimulator_SimulationStep *_this, const MR_PrecipitationSimulator_SimulationStep *_other)
 

Typedef Documentation

◆ MR_PrecipitationSimulator

the class models water increase in the terrain under the rain with constant precipitation Generated from class MR::PrecipitationSimulator. Supported MR_PassBy modes: MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_PrecipitationSimulator_Event

◆ MR_PrecipitationSimulator_SimulationStep

Generated from class MR::PrecipitationSimulator::SimulationStep. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_WatershedGraph

Enumeration Type Documentation

◆ MR_PrecipitationSimulator_Event

Enumerator
MR_PrecipitationSimulator_Event_Finish 

all basins are full and water goes outside

one basin just became full

MR_PrecipitationSimulator_Event_BasinFull 

two basins just merged

MR_PrecipitationSimulator_Event_Merge 

Function Documentation

◆ MR_PrecipitationSimulator_Construct()

MRC_API MR_PrecipitationSimulator * MR_PrecipitationSimulator_Construct ( MR_WatershedGraph * wg)

initializes modeling from the initial subdivision of the terrain Generated from constructor MR::PrecipitationSimulator::PrecipitationSimulator. Parameter wg can not be null. It is a single object. The reference to the parameter wg might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_PrecipitationSimulator_Destroy() to free it when you're done using it.

◆ MR_PrecipitationSimulator_ConstructFromAnother()

MRC_API MR_PrecipitationSimulator * MR_PrecipitationSimulator_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_PrecipitationSimulator * _other )

Generated from constructor MR::PrecipitationSimulator::PrecipitationSimulator. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_PrecipitationSimulator_Destroy() to free it when you're done using it.

◆ MR_PrecipitationSimulator_Destroy()

MRC_API void MR_PrecipitationSimulator_Destroy ( const MR_PrecipitationSimulator * _this)

Destroys a heap-allocated instance of MR_PrecipitationSimulator. Does nothing if the pointer is null.

◆ MR_PrecipitationSimulator_DestroyArray()

MRC_API void MR_PrecipitationSimulator_DestroyArray ( const MR_PrecipitationSimulator * _this)

Destroys a heap-allocated array of MR_PrecipitationSimulator. Does nothing if the pointer is null.

◆ MR_PrecipitationSimulator_OffsetMutablePtr()

MRC_API MR_PrecipitationSimulator * MR_PrecipitationSimulator_OffsetMutablePtr ( MR_PrecipitationSimulator * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_PrecipitationSimulator_OffsetPtr()

MRC_API const MR_PrecipitationSimulator * MR_PrecipitationSimulator_OffsetPtr ( const MR_PrecipitationSimulator * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_PrecipitationSimulator_simulateOne()

MRC_API MR_PrecipitationSimulator_SimulationStep * MR_PrecipitationSimulator_simulateOne ( MR_PrecipitationSimulator * _this)

processes the next event happened with the terrain basins Generated from method MR::PrecipitationSimulator::simulateOne. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_PrecipitationSimulator_SimulationStep_Destroy() to free it when you're done using it.

◆ MR_PrecipitationSimulator_SimulationStep_AssignFromAnother()

MRC_API MR_PrecipitationSimulator_SimulationStep * MR_PrecipitationSimulator_SimulationStep_AssignFromAnother ( MR_PrecipitationSimulator_SimulationStep * _this,
const MR_PrecipitationSimulator_SimulationStep * _other )

Generated from method MR::PrecipitationSimulator::SimulationStep::operator=. Parameter _this can not be null. It is a single object. Parameter _other can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in this object. The returned pointer will never be null. It is non-owning, do NOT destroy it. When this function is called, this object will drop any object references it had previously.

◆ MR_PrecipitationSimulator_SimulationStep_ConstructFrom()

MRC_API MR_PrecipitationSimulator_SimulationStep * MR_PrecipitationSimulator_SimulationStep_ConstructFrom ( MR_PrecipitationSimulator_Event event,
float amount,
MR_GraphVertId basin,
MR_GraphVertId neiBasin )

Constructs MR::PrecipitationSimulator::SimulationStep elementwise. The reference to the parameter event might be preserved in the constructed object. The reference to the parameter basin might be preserved in the constructed object. The reference to the parameter neiBasin might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_PrecipitationSimulator_SimulationStep_Destroy() to free it when you're done using it. When this function is called, this object will drop any object references it had previously.

◆ MR_PrecipitationSimulator_SimulationStep_ConstructFromAnother()

MRC_API MR_PrecipitationSimulator_SimulationStep * MR_PrecipitationSimulator_SimulationStep_ConstructFromAnother ( const MR_PrecipitationSimulator_SimulationStep * _other)

Generated from constructor MR::PrecipitationSimulator::SimulationStep::SimulationStep. Parameter _other can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_PrecipitationSimulator_SimulationStep_Destroy() to free it when you're done using it.

◆ MR_PrecipitationSimulator_SimulationStep_DefaultConstruct()

MRC_API MR_PrecipitationSimulator_SimulationStep * MR_PrecipitationSimulator_SimulationStep_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_PrecipitationSimulator_SimulationStep_Destroy() to free it when you're done using it.

◆ MR_PrecipitationSimulator_SimulationStep_DefaultConstructArray()

MRC_API MR_PrecipitationSimulator_SimulationStep * MR_PrecipitationSimulator_SimulationStep_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_PrecipitationSimulator_SimulationStep_DestroyArray(). Use MR_PrecipitationSimulator_SimulationStep_OffsetMutablePtr() and MR_PrecipitationSimulator_SimulationStep_OffsetPtr() to access the array elements.

◆ MR_PrecipitationSimulator_SimulationStep_Destroy()

MRC_API void MR_PrecipitationSimulator_SimulationStep_Destroy ( const MR_PrecipitationSimulator_SimulationStep * _this)

Destroys a heap-allocated instance of MR_PrecipitationSimulator_SimulationStep. Does nothing if the pointer is null.

◆ MR_PrecipitationSimulator_SimulationStep_DestroyArray()

MRC_API void MR_PrecipitationSimulator_SimulationStep_DestroyArray ( const MR_PrecipitationSimulator_SimulationStep * _this)

Destroys a heap-allocated array of MR_PrecipitationSimulator_SimulationStep. Does nothing if the pointer is null.

◆ MR_PrecipitationSimulator_SimulationStep_Get_amount()

MRC_API const float * MR_PrecipitationSimulator_SimulationStep_Get_amount ( const MR_PrecipitationSimulator_SimulationStep * _this)

amount of precipitation (in same units as mesh coordinates and water level) Modifies a member variable of class MR::PrecipitationSimulator::SimulationStep named amount. Parameter _this can not be null. It is a single object. When this function is called, this object will drop object references it had previously in amount.

◆ MR_PrecipitationSimulator_SimulationStep_Get_basin()

MRC_API const MR_GraphVertId * MR_PrecipitationSimulator_SimulationStep_Get_basin ( const MR_PrecipitationSimulator_SimulationStep * _this)

BasinFull: this basin just became full Merge: this basin just absorbed the other basin Modifies a member variable of class MR::PrecipitationSimulator::SimulationStep named basin. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element basin. When this function is called, this object will drop object references it had previously in basin.

◆ MR_PrecipitationSimulator_SimulationStep_Get_event()

MRC_API const MR_PrecipitationSimulator_Event * MR_PrecipitationSimulator_SimulationStep_Get_event ( const MR_PrecipitationSimulator_SimulationStep * _this)

Returns a pointer to a member variable of class MR::PrecipitationSimulator::SimulationStep named event. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_PrecipitationSimulator_SimulationStep_Get_neiBasin()

MRC_API const MR_GraphVertId * MR_PrecipitationSimulator_SimulationStep_Get_neiBasin ( const MR_PrecipitationSimulator_SimulationStep * _this)

BasinFull: the flow from full basin will first go here (may be not the last destination) Merge: this basin was just absorbed Modifies a member variable of class MR::PrecipitationSimulator::SimulationStep named neiBasin. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element neiBasin. When this function is called, this object will drop object references it had previously in neiBasin.

◆ MR_PrecipitationSimulator_SimulationStep_GetMutable_amount()

MRC_API float * MR_PrecipitationSimulator_SimulationStep_GetMutable_amount ( MR_PrecipitationSimulator_SimulationStep * _this)

BasinFull: this basin just became full Merge: this basin just absorbed the other basin Returns a pointer to a member variable of class MR::PrecipitationSimulator::SimulationStep named basin. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_PrecipitationSimulator_SimulationStep_GetMutable_basin()

MRC_API MR_GraphVertId * MR_PrecipitationSimulator_SimulationStep_GetMutable_basin ( MR_PrecipitationSimulator_SimulationStep * _this)

BasinFull: the flow from full basin will first go here (may be not the last destination) Merge: this basin was just absorbed Returns a pointer to a member variable of class MR::PrecipitationSimulator::SimulationStep named neiBasin. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_PrecipitationSimulator_SimulationStep_GetMutable_event()

MRC_API MR_PrecipitationSimulator_Event * MR_PrecipitationSimulator_SimulationStep_GetMutable_event ( MR_PrecipitationSimulator_SimulationStep * _this)

Returns a mutable pointer to a member variable of class MR::PrecipitationSimulator::SimulationStep named event. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it. amount of precipitation (in same units as mesh coordinates and water level) Returns a pointer to a member variable of class MR::PrecipitationSimulator::SimulationStep named amount. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_PrecipitationSimulator_SimulationStep_GetMutable_neiBasin()

MRC_API MR_GraphVertId * MR_PrecipitationSimulator_SimulationStep_GetMutable_neiBasin ( MR_PrecipitationSimulator_SimulationStep * _this)

◆ MR_PrecipitationSimulator_SimulationStep_OffsetMutablePtr()

MRC_API MR_PrecipitationSimulator_SimulationStep * MR_PrecipitationSimulator_SimulationStep_OffsetMutablePtr ( MR_PrecipitationSimulator_SimulationStep * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_PrecipitationSimulator_SimulationStep_OffsetPtr()

MRC_API const MR_PrecipitationSimulator_SimulationStep * MR_PrecipitationSimulator_SimulationStep_OffsetPtr ( const MR_PrecipitationSimulator_SimulationStep * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_PrecipitationSimulator_SimulationStep_Set_amount()

MRC_API void MR_PrecipitationSimulator_SimulationStep_Set_amount ( MR_PrecipitationSimulator_SimulationStep * _this,
float value )

amount of precipitation (in same units as mesh coordinates and water level) Returns a mutable pointer to a member variable of class MR::PrecipitationSimulator::SimulationStep named amount. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_PrecipitationSimulator_SimulationStep_Set_basin()

MRC_API void MR_PrecipitationSimulator_SimulationStep_Set_basin ( MR_PrecipitationSimulator_SimulationStep * _this,
MR_GraphVertId value )

BasinFull: this basin just became full Merge: this basin just absorbed the other basin Returns a mutable pointer to a member variable of class MR::PrecipitationSimulator::SimulationStep named basin. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_PrecipitationSimulator_SimulationStep_Set_event()

MRC_API void MR_PrecipitationSimulator_SimulationStep_Set_event ( MR_PrecipitationSimulator_SimulationStep * _this,
MR_PrecipitationSimulator_Event value )

Modifies a member variable of class MR::PrecipitationSimulator::SimulationStep named event. Parameter _this can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element event. When this function is called, this object will drop object references it had previously in event.

◆ MR_PrecipitationSimulator_SimulationStep_Set_neiBasin()

MRC_API void MR_PrecipitationSimulator_SimulationStep_Set_neiBasin ( MR_PrecipitationSimulator_SimulationStep * _this,
MR_GraphVertId value )

BasinFull: the flow from full basin will first go here (may be not the last destination) Merge: this basin was just absorbed Returns a mutable pointer to a member variable of class MR::PrecipitationSimulator::SimulationStep named neiBasin. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.