FluXY  1.3
2.5D fluid simulator for Unity
 All Classes Namespaces Functions Variables Pages
Fluxy.FluxyStorage Class Reference
Inheritance diagram for Fluxy.FluxyStorage:

Classes

class  Framebuffer
 

Public Types

enum  FluidTexturePrecision { Float, Half, Fixed }
 

Public Member Functions

int RequestFramebuffer (int desiredResolution, int stateSupersampling)
 Requests a framebuffer of a specific resolution. A smaller framebuffer might be returned, depending on the amount of available memory. More...
 
void DisposeFramebuffer (int framebufferID, bool expand=true)
 Disposes of a framebuffer storage. Optionally reallocates all other framebuffers to take full advantage of the memory budget. More...
 
void ResizeStorage ()
 Resizes all existing framebuffers to meet the memory budget. More...
 
Framebuffer GetFramebuffer (int framebufferID)
 Returns a framebuffer given its ID. More...
 

Public Attributes

const int minFramebufferSize = 32
 
const int bytesPerMbyte = 1048576
 
int memoryBudget = 32
 Memory budget, expressed in megabytes. The combined memory used by all solvers sharing this asset will not be larger than this value. Note that supersampling is not taken into account. More...
 
FluidTexturePrecision densityPrecision = FluidTexturePrecision.Half
 Precision of the density textures. More...
 
FluidTexturePrecision velocityPrecision = FluidTexturePrecision.Half
 Precision of the velocity textures. More...
 
List< Framebufferframebuffers = new List<Framebuffer>()
 List of framebuffers being managed. Might contain null entries. More...
 

Member Function Documentation

void Fluxy.FluxyStorage.DisposeFramebuffer ( int  framebufferID,
bool  expand = true 
)

Disposes of a framebuffer storage. Optionally reallocates all other framebuffers to take full advantage of the memory budget.

Parameters
framebufferID
expand
Framebuffer Fluxy.FluxyStorage.GetFramebuffer ( int  framebufferID)

Returns a framebuffer given its ID.

Parameters
framebufferID
Returns
int Fluxy.FluxyStorage.RequestFramebuffer ( int  desiredResolution,
int  stateSupersampling 
)

Requests a framebuffer of a specific resolution. A smaller framebuffer might be returned, depending on the amount of available memory.

Parameters
desiredResolution
void Fluxy.FluxyStorage.ResizeStorage ( )

Resizes all existing framebuffers to meet the memory budget.

Member Data Documentation

FluidTexturePrecision Fluxy.FluxyStorage.densityPrecision = FluidTexturePrecision.Half

Precision of the density textures.

List<Framebuffer> Fluxy.FluxyStorage.framebuffers = new List<Framebuffer>()

List of framebuffers being managed. Might contain null entries.

int Fluxy.FluxyStorage.memoryBudget = 32

Memory budget, expressed in megabytes. The combined memory used by all solvers sharing this asset will not be larger than this value. Note that supersampling is not taken into account.

FluidTexturePrecision Fluxy.FluxyStorage.velocityPrecision = FluidTexturePrecision.Half

Precision of the velocity textures.


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