A block of two triangles in a dynamic mesh. The triangles are positioned to create a flat 2D rectangle. The colour and position can be adjusted to fit content onto the block.
Public Member Functions | |
MeshBlock (Renderman renderer) | |
void | SetBatchIndex (UIBatch batch, int blockIndex) |
Sets an index in a batch. Used in paint mode. More... | |
void | SetColour (Color colour) |
Sets the vertex colours of this block. More... | |
void | SetClipped (BoxRegion boundary, BoxRegion block, Renderman renderer, float zIndex) |
Sets the vertices of this box to that specified by the given block but clipped to fit within a boundary. More... | |
UVBlock | SetClipped (BoxRegion boundary, BoxRegion block, Renderman renderer, float zIndex, AtlasLocation imgLocation, UVBlock uvBlock) |
Sets the vertices of this box to that specified by the given block but clipped to fit within a boundary. At the same time, an image is applied to the block and its UV coordinates are also clipped. More... | |
void | ApplyOutline () |
Applies the SDF outline "location", essentially the thickness of an outline, to this block. More... | |
void | SetSolidColourUV () |
Sets the UV and image on this block to that of the solid colour pixel. More... | |
void | Next () |
Advances to the following block. More... | |
void | TransformVertices (Matrix4x4 delta) |
Applies the given delta matrix to the verts. More... | |
void | PaintColour (Color colour) |
Writes out the given colour right now. More... | |
void | Done (Transformation transform) |
Writes out the data to the meshes buffers. More... | |
Public Attributes | |
int | BlockIndex |
The index of this block in the buffer. More... | |
BlockBuffer | Buffer |
The buffer that the current block is from. More... | |
Color | Colour |
The colour of the whole block. Applied to vertex colours. More... | |
UVBlock | TextUV |
The UV coordinate block for a letter off the atlas. More... | |
UVBlock | ImageUV |
The UV coordinate for an image off the atlas. More... | |
Vector3 | VertexTopLeft |
The vertex in the top left corner. More... | |
Vector3 | VertexTopRight |
The vertex in the top right corner. More... | |
Vector3 | VertexBottomLeft |
The vertex in the bottom left corner. More... | |
Vector3 | VertexBottomRight |
The vertex in the bottom right corner. More... | |
readonly Renderman | Renderer |
The renderer used by this meshblock. More... | |
Package Functions | |
void | ApplyVertices (BoxRegion block, Renderman renderer, float zIndex) |
This locates the vertices of this block in world space to the position defined by the given box. More... | |
Properties | |
int | VertexIndex [get] |
The index of the first vertex in the buffer. More... | |
int | TriangleIndex [get] |
The first triangle index. More... | |
Private Attributes | |
DynamicMesh | Mesh |
The batch mesh. Used in paint mode instead of Buffer. More... | |
Static Private Attributes | |
static UVBlock | BlankUV =new UVBlock(2f,2f,2f,2f) |
|
inline |
|
inline |
Applies the SDF outline "location", essentially the thickness of an outline, to this block.
|
inlinepackage |
This locates the vertices of this block in world space to the position defined by the given box.
block | The position of the vertices in screen coordinates. |
renderer | The renderer used when rendering this block. |
zIndex | The depth of the vertices. |
|
inline |
Writes out the data to the meshes buffers.
|
inline |
Advances to the following block.
|
inline |
Writes out the given colour right now.
|
inline |
Sets an index in a batch. Used in paint mode.
|
inline |
Sets the vertices of this box to that specified by the given block but clipped to fit within a boundary.
boundary | The clipping boundary. The vertices will be clipped to within this. |
block | The position of the vertices. |
zIndex | The depth of the vertices. |
|
inline |
Sets the vertices of this box to that specified by the given block but clipped to fit within a boundary. At the same time, an image is applied to the block and its UV coordinates are also clipped.
boundary | The clipping boundary. The vertices will be clipped to within this. |
block | The position of the vertices. |
renderer | The renderer that will render this block. |
zIndex | The depth of the vertices. |
imgLocation | The location of the image on the meshes atlas. |
|
inline |
Sets the vertex colours of this block.
colour | The colour to set them to. |
|
inline |
Sets the UV and image on this block to that of the solid colour pixel.
|
inline |
Applies the given delta matrix to the verts.
int PowerUI.MeshBlock.BlockIndex |
The index of this block in the buffer.
BlockBuffer PowerUI.MeshBlock.Buffer |
The buffer that the current block is from.
Color PowerUI.MeshBlock.Colour |
The colour of the whole block. Applied to vertex colours.
UVBlock PowerUI.MeshBlock.ImageUV |
The UV coordinate for an image off the atlas.
|
private |
The batch mesh. Used in paint mode instead of Buffer.
readonly Renderman PowerUI.MeshBlock.Renderer |
The renderer used by this meshblock.
UVBlock PowerUI.MeshBlock.TextUV |
The UV coordinate block for a letter off the atlas.
Vector3 PowerUI.MeshBlock.VertexBottomLeft |
The vertex in the bottom left corner.
Vector3 PowerUI.MeshBlock.VertexBottomRight |
The vertex in the bottom right corner.
Vector3 PowerUI.MeshBlock.VertexTopLeft |
The vertex in the top left corner.
Vector3 PowerUI.MeshBlock.VertexTopRight |
The vertex in the top right corner.
|
get |
The first triangle index.
|
get |
The index of the first vertex in the buffer.