Daikon Forge GUI  v1.0.16
Daikon Forge user interface library for Unity
 All Classes Functions Variables Enumerations Enumerator Properties Events Pages
dfRenderData Class Reference

Encapsulates the information needed to render a control as a Mesh. GUI Controls will fill this structure with all of the information needed to render the control on-screen as a Mesh, with the implicit assumption that all vertex coordinates are parent-relative coordinates and that all uv coordinates refer to locations within a common texture atlas or Material.mainTexture. More...

Inheritance diagram for dfRenderData:

Detailed Description

Encapsulates the information needed to render a control as a Mesh. GUI Controls will fill this structure with all of the information needed to render the control on-screen as a Mesh, with the implicit assumption that all vertex coordinates are parent-relative coordinates and that all uv coordinates refer to locations within a common texture atlas or Material.mainTexture.

Public Member Functions

void Clear ()
 Used to reset all lists in preparation for filling with new or updated rendering data. NOTE: While this function does appear to empty the data lists, it does not free the internal memory used to hold the information, with the assumption that this will glyphData in fewer garbage collections. More...
 
void Dispose ()
 
void EnsureCapacity (int capacity)
 Ensures that the lists have enough memory allocated to store the number of elements indicated by capacity , to reduce memory thrashing More...
 
bool IsValid ()
 Returns a value indicating whether the data in this object can be used to create a valid Mesh. More...
 
void Merge (dfRenderData buffer)
 Merges another dfRenderData instance with this instance More...
 
void Merge (dfRenderData buffer, bool transformVertices)
 Merges another dfRenderData instance with this instance More...
 
void Release ()
 Returns the dfRenderData instance to the object pool More...
 

Static Public Member Functions

static void FlushObjectPool ()
 Flushes the dfRenderData object pool, freeing all memory. This operation should only be performed when a new level is loaded. More...
 
static dfRenderData Obtain ()
 Obtains a dfRenderData instance from the object pool More...
 

Public Attributes

uint Checksum
 Used by GUIManager to determine whether cached data is still valid More...
 
dfList< Color32 > Colors
 A list of colors for each vertex More...
 
dfIntersectionType Intersection
 Contains the cached results from the last intersection test performed on the contained render data. Used by GUIManager to determine whether a new intersection test needs to be performed for triangle clipping More...
 
Material Material
 The UnityEngine.Material which will be used as the source Material for rendering More...
 
dfList< Vector3 > Normals
 The list of normals used when rendering the mesh More...
 
Shader Shader
 The specific Shader that will be used to render the data in this render buffer. Only used when overriding the Shader for the Material, most of the time this property will be NULL. More...
 
dfList< Vector4 > Tangents
 
Matrix4x4 Transform
 The transformation matrix (if any) that needs to be applied to the vertices before rendering. Typically this will be a "local to world" matrix. More...
 
dfList< int > Triangles
 A list of triangle indices More...
 
dfList< Vector2 > UV
 The list of UV coordinates for each vertex More...
 
dfList< Vector3 > Vertices
 The list of vertices used to render the mesh More...
 

Member Function Documentation

void dfRenderData.Clear ( )

Used to reset all lists in preparation for filling with new or updated rendering data. NOTE: While this function does appear to empty the data lists, it does not free the internal memory used to hold the information, with the assumption that this will glyphData in fewer garbage collections.

void dfRenderData.Dispose ( )
void dfRenderData.EnsureCapacity ( int  capacity)

Ensures that the lists have enough memory allocated to store the number of elements indicated by capacity , to reduce memory thrashing

Parameters
capacity
static void dfRenderData.FlushObjectPool ( )
static

Flushes the dfRenderData object pool, freeing all memory. This operation should only be performed when a new level is loaded.

bool dfRenderData.IsValid ( )

Returns a value indicating whether the data in this object can be used to create a valid Mesh.

Returns
void dfRenderData.Merge ( dfRenderData  buffer)

Merges another dfRenderData instance with this instance

Parameters
bufferThe render data to be appended to this instance
transformVerticesIf set to TRUE, the render data in buffer will be transformed by its Transform before being merged with this instance. If set to FALSE, the data will be merged without tranforming.
void dfRenderData.Merge ( dfRenderData  buffer,
bool  transformVertices 
)

Merges another dfRenderData instance with this instance

Parameters
bufferThe render data to be appended to this instance
transformVerticesIf set to TRUE, the render data in buffer will be transformed by its Transform before being merged with this instance. If set to FALSE, the data will be merged without tranforming.
static dfRenderData dfRenderData.Obtain ( )
static

Obtains a dfRenderData instance from the object pool

Returns
A dfRenderData instance that can be used to receive dfControl render data
void dfRenderData.Release ( )

Returns the dfRenderData instance to the object pool