A mesh made up of a dynamic number of "blocks". Each block always consists of two triangles and 4 vertices. This is used for displaying the content in 3D with a single mesh.
Public Member Functions | |
DynamicMesh (UIBatch batch) | |
Creates a new dynamic mesh which uses the hybrid shader and a texture atlas. More... | |
void | NextBuffer () |
Gets the next vertex buffer. More... | |
void | SetFontAtlas (TextureAtlas atlas) |
Changes the font atlas used by the default material. More... | |
void | SetGraphicsAtlas (TextureAtlas atlas) |
Sets a default material to this mesh. More... | |
void | SetGlobalMaterial (Shader shader) |
void | SetMaterial (Material material) |
Applies the given material to this mesh. More... | |
void | RequireNormals () |
Let the mesh know that normals are required. More... | |
void | RequireUV3 () |
Let the mesh know that UV3 is required. More... | |
void | ChangeParent () |
Called to update the parenting of this mesh. More... | |
void | PrepareForLayout () |
Let the mesh know it's about to undergo a layout routine. PowerUI.Renderman.Layout. More... | |
void | CompletedLayout () |
After the draw pass, builds flat buffers. More... | |
void | Flatten (BlockBuffer current, int blockCount) |
Called with the first buffer in a set. Flattens the set of verts into the provided mesh. More... | |
MeshBlock | Allocate (Renderman renderer) |
Allocates a block from this mesh. Note that the block object is actually shared. The block can then have its vertices/triangles edited. Changes will be outputted visually when MeshBlock.Done is called. More... | |
void | Flush () |
Outputs all the verts/triangles etc to the underlying unity mesh. More... | |
void | Destroy () |
Permanently destroys this mesh. More... | |
Public Attributes | |
UIBatch | Batch |
The batch this mesh belongs to. More... | |
int | BlockCount |
The number of blocks that have been allocated. More... | |
Mesh | OutputMesh |
The unity mesh that this will be flushed into. More... | |
Material | Material |
The material to use when rendering. More... | |
Transform | OutputTransform |
The transform of this mesh. More... | |
GameObject | OutputGameObject |
The gameobjec that holds this mesh. More... | |
FixedSizeBuffer< Vector2 > | UV |
An array of uv coordinates. More... | |
FixedSizeBuffer< Vector2 > | UV2 |
An array of uv coordinates. More... | |
FixedSizeBuffer< Vector2 > | UV3 |
An array of uv coordinates. More... | |
FixedSizeBuffer< int > | Triangles |
An array of triangles. More... | |
FixedSizeBuffer< Color > | Colours |
An array of vertex colours. More... | |
FixedSizeBuffer< Vector3 > | Normals |
An array of normals. More... | |
FixedSizeBuffer< Vector3 > | Vertices |
An array of vertex coordinates. More... | |
BlockBuffer | LastBuffer |
The raw vertex buffer linked list. Data is written into these. If we create too many verts, it simply creates another buffer. Flatten is used to convert this flexible structure into the actual vector3[] etc. More... | |
BlockBuffer | FirstBuffer |
The raw vertex buffer linked list. Data is written into these. If we create too many verts, it simply creates another buffer. Flatten is used to convert this flexible structure into the actual vector3[] etc. More... | |
int | CurrentBufferBlocks |
# of blocks in the current buffer. More... | |
int | FullBufferCount |
Total number of full buffers. More... | |
Properties | |
int | TotalBlockCount [get] |
Total number of allocated blocks. More... | |
Private Member Functions | |
void | Setup () |
Called only by constructors. This creates the actual mesh and the buffers for verts/tris etc. More... | |
Private Attributes | |
int | LastBlockCount |
The number of blocks that were allocated last UI update. More... | |
MeshRenderer | Renderer |
The renderer being used to layout the blocks. More... | |
Material | GlobalMaterial |
The material used by this mesh when it is using an atlas. More... | |
|
inline |
Creates a new dynamic mesh which uses the hybrid shader and a texture atlas.
Allocates a block from this mesh. Note that the block object is actually shared. The block can then have its vertices/triangles edited. Changes will be outputted visually when MeshBlock.Done is called.
|
inline |
Called to update the parenting of this mesh.
|
inline |
After the draw pass, builds flat buffers.
|
inline |
Permanently destroys this mesh.
|
inline |
Called with the first buffer in a set. Flattens the set of verts into the provided mesh.
|
inline |
Outputs all the verts/triangles etc to the underlying unity mesh.
|
inline |
Gets the next vertex buffer.
|
inline |
Let the mesh know it's about to undergo a layout routine. PowerUI.Renderman.Layout.
|
inline |
Let the mesh know that normals are required.
|
inline |
Let the mesh know that UV3 is required.
|
inline |
Changes the font atlas used by the default material.
|
inline |
|
inline |
Sets a default material to this mesh.
|
inline |
Applies the given material to this mesh.
material | The material to apply. |
|
inlineprivate |
Called only by constructors. This creates the actual mesh and the buffers for verts/tris etc.
UIBatch PowerUI.DynamicMesh.Batch |
The batch this mesh belongs to.
int PowerUI.DynamicMesh.BlockCount |
The number of blocks that have been allocated.
FixedSizeBuffer<Color> PowerUI.DynamicMesh.Colours |
An array of vertex colours.
int PowerUI.DynamicMesh.CurrentBufferBlocks |
# of blocks in the current buffer.
BlockBuffer PowerUI.DynamicMesh.FirstBuffer |
The raw vertex buffer linked list. Data is written into these. If we create too many verts, it simply creates another buffer. Flatten is used to convert this flexible structure into the actual vector3[] etc.
int PowerUI.DynamicMesh.FullBufferCount |
Total number of full buffers.
|
private |
The material used by this mesh when it is using an atlas.
|
private |
The number of blocks that were allocated last UI update.
BlockBuffer PowerUI.DynamicMesh.LastBuffer |
The raw vertex buffer linked list. Data is written into these. If we create too many verts, it simply creates another buffer. Flatten is used to convert this flexible structure into the actual vector3[] etc.
Material PowerUI.DynamicMesh.Material |
The material to use when rendering.
FixedSizeBuffer<Vector3> PowerUI.DynamicMesh.Normals |
An array of normals.
GameObject PowerUI.DynamicMesh.OutputGameObject |
The gameobjec that holds this mesh.
Mesh PowerUI.DynamicMesh.OutputMesh |
The unity mesh that this will be flushed into.
Transform PowerUI.DynamicMesh.OutputTransform |
The transform of this mesh.
|
private |
The renderer being used to layout the blocks.
FixedSizeBuffer<int> PowerUI.DynamicMesh.Triangles |
An array of triangles.
FixedSizeBuffer<Vector2> PowerUI.DynamicMesh.UV |
An array of uv coordinates.
FixedSizeBuffer<Vector2> PowerUI.DynamicMesh.UV2 |
An array of uv coordinates.
FixedSizeBuffer<Vector2> PowerUI.DynamicMesh.UV3 |
An array of uv coordinates.
FixedSizeBuffer<Vector3> PowerUI.DynamicMesh.Vertices |
An array of vertex coordinates.
|
get |
Total number of allocated blocks.