PowerUI.UIBatch Class Reference

Detailed Description

A UI Batch represents a block of the UI that can be safely rendered with a single drawcall (i.e. all in one mesh). Batches can be isolated - that means it can have its own material or texture atlas. Batches are created on demand by the renderer and based on the requests of the elements being rendered. An animation, for example, will generate an isolated batch.

Public Member Functions

 UIBatch (Renderman renderer)
 Creates a new UI Batch which will be rendered with the given renderer. More...
 
void ChangeRenderer (Renderman renderer)
 Called when the renderer for this batch has changed. More...
 
void IsIsolated (DisplayableProperty property)
 Sets the isolated state of this batch. More...
 
void NotIsolated (TextureAtlas graphics, TextureAtlas font)
 Sets the isolated state of this batch. More...
 
void SetFontAtlas (TextureAtlas font)
 Sets the font atlas for this batch. More...
 
void SetGraphicsAtlas (TextureAtlas graphics)
 Sets the graphics atlas for this batch. More...
 
void SetPhysicsMode (bool isPhysics)
 Called when the physics input mode changes. More...
 
void SetRenderDepth (int index)
 
void Flush ()
 Flushes this batches mesh. PowerUI.DynamicMesh.Flush. More...
 
void CompletedLayout ()
 Tells the mesh that we're done laying it out. PowerUI.DynamicMesh.CompletedLayout. More...
 
void PrepareForLayout ()
 Tells the mesh that we are about to perform a layout. PowerUI.DynamicMesh.PrepareForLayout. More...
 
MeshBlock Allocate ()
 Allocates a block in this batches mesh. PowerUI.DynamicMesh.Allocate. More...
 
void RenderWithCamera (int id)
 Puts this batch into the given layer ID. More...
 
void Destroy ()
 Permanently destroys this UI batch. More...
 

Public Attributes

bool Setup
 True when this batch has been fully initialised. More...
 
bool PhysicsMode
 Are we in physics mode? More...
 
bool Isolated
 True if this batch is an isolated one; i.e. one with a custom material or atlas. More...
 
DynamicMesh Mesh
 The mesh for this batch. More...
 
bool PrepareCalled
 True if PrepareForLayout was called. More...
 
Renderman Renderer
 The renderer that will render this batch. More...
 
UIBatch BatchAfter
 Batches are stored as a linked list. This is the batch after this one. More...
 
UIBatch BatchBefore
 Batches are stored as a linked list. This is the batch before this one. More...
 
TextureAtlas FontAtlas
 The current font atlas applied to this batch. More...
 
TextureAtlas GraphicsAtlas
 The current graphics atlas applied to this batch. More...
 
DisplayableProperty IsolatedProperty
 If isolated, this is the property that created the isolated batch. More...
 

Constructor & Destructor Documentation

PowerUI.UIBatch.UIBatch ( Renderman  renderer)
inline

Creates a new UI Batch which will be rendered with the given renderer.

Parameters
rendererThe renderer that will render this batch.

Member Function Documentation

MeshBlock PowerUI.UIBatch.Allocate ( )
inline

Allocates a block in this batches mesh. PowerUI.DynamicMesh.Allocate.

void PowerUI.UIBatch.ChangeRenderer ( Renderman  renderer)
inline

Called when the renderer for this batch has changed.

void PowerUI.UIBatch.CompletedLayout ( )
inline

Tells the mesh that we're done laying it out. PowerUI.DynamicMesh.CompletedLayout.

void PowerUI.UIBatch.Destroy ( )
inline

Permanently destroys this UI batch.

void PowerUI.UIBatch.Flush ( )
inline

Flushes this batches mesh. PowerUI.DynamicMesh.Flush.

void PowerUI.UIBatch.IsIsolated ( DisplayableProperty  property)
inline

Sets the isolated state of this batch.

void PowerUI.UIBatch.NotIsolated ( TextureAtlas  graphics,
TextureAtlas  font 
)
inline

Sets the isolated state of this batch.

void PowerUI.UIBatch.PrepareForLayout ( )
inline

Tells the mesh that we are about to perform a layout. PowerUI.DynamicMesh.PrepareForLayout.

void PowerUI.UIBatch.RenderWithCamera ( int  id)
inline

Puts this batch into the given layer ID.

Parameters
idThe ID of the layer.
void PowerUI.UIBatch.SetFontAtlas ( TextureAtlas  font)
inline

Sets the font atlas for this batch.

void PowerUI.UIBatch.SetGraphicsAtlas ( TextureAtlas  graphics)
inline

Sets the graphics atlas for this batch.

void PowerUI.UIBatch.SetPhysicsMode ( bool  isPhysics)
inline

Called when the physics input mode changes.

Parameters
isPhysicsThe new input mode to use.
void PowerUI.UIBatch.SetRenderDepth ( int  index)
inline

Member Data Documentation

UIBatch PowerUI.UIBatch.BatchAfter

Batches are stored as a linked list. This is the batch after this one.

UIBatch PowerUI.UIBatch.BatchBefore

Batches are stored as a linked list. This is the batch before this one.

TextureAtlas PowerUI.UIBatch.FontAtlas

The current font atlas applied to this batch.

TextureAtlas PowerUI.UIBatch.GraphicsAtlas

The current graphics atlas applied to this batch.

bool PowerUI.UIBatch.Isolated

True if this batch is an isolated one; i.e. one with a custom material or atlas.

DisplayableProperty PowerUI.UIBatch.IsolatedProperty

If isolated, this is the property that created the isolated batch.

DynamicMesh PowerUI.UIBatch.Mesh

The mesh for this batch.

bool PowerUI.UIBatch.PhysicsMode

Are we in physics mode?

bool PowerUI.UIBatch.PrepareCalled

True if PrepareForLayout was called.

Renderman PowerUI.UIBatch.Renderer

The renderer that will render this batch.

bool PowerUI.UIBatch.Setup

True when this batch has been fully initialised.