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>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef struct MR_WatershedGraph MR_WatershedGraph
 
typedef struct MR_PrecipitationSimulator MR_PrecipitationSimulator
 
typedef int32_t MR_PrecipitationSimulator_Event
 
typedef struct MR_PrecipitationSimulator_SimulationStep MR_PrecipitationSimulator_SimulationStep
 Generated from class MR::PrecipitationSimulator::SimulationStep.
 

Enumerations

enum  { 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)
 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.
 
MRC_API MR_PrecipitationSimulatorMR_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.
 
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)
 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.
 
MRC_API MR_PrecipitationSimulator_SimulationStepMR_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.
 
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.

◆ MR_PrecipitationSimulator_Event

◆ MR_PrecipitationSimulator_SimulationStep

◆ MR_WatershedGraph

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
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 a constructor of class MR::PrecipitationSimulator. Parameter wg can not be null. It is a single 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 a constructor of class MR::PrecipitationSimulator. 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.

◆ 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.

◆ 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 a method of class MR::PrecipitationSimulator named 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 a method of class MR::PrecipitationSimulator::SimulationStep named operator=. Parameter _this can not be null. It is a single object. Parameter _other 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_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. 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_ConstructFromAnother()

MRC_API MR_PrecipitationSimulator_SimulationStep * MR_PrecipitationSimulator_SimulationStep_ConstructFromAnother ( const MR_PrecipitationSimulator_SimulationStep * _other)

Generated from a constructor of class MR::PrecipitationSimulator::SimulationStep. Parameter _other 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_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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.