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 (DynamicMesh parentMesh) | |
Creates a new block that belongs to a given mesh. More... | |
bool | Overlaps (MeshBlock block) |
void | AddToParent () |
Adds this block to the parent meshes linked list. Call this during a reflow to reuse this same block again. More... | |
void | SetColour (Color colour) |
Sets the vertex colours of this block. More... | |
void | Layout () |
Writes the vertices to the meshes buffer. Called during a layout event. 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 (float location) |
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 | Paint () |
Writes out the UV and vertex colours to the meshes buffers. More... | |
Public Attributes | |
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... | |
int | VertexIndex |
The index of the first vertex in the meshes vertex array. More... | |
MeshBlock | BlockAfter |
Blocks are stored as a linked list. This is the block following this one. More... | |
DynamicMesh | ParentMesh |
The dynamic mesh that this block was Allocated from. More... | |
Transformation | Transform |
The transform to apply to this blocks vertices as a post process. More... | |
MeshBlock | LocalBlockAfter |
The block following this one in a display property linked list. More... | |
Private Member 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... | |
Static Private Attributes | |
static UVBlock | BlankUV =new UVBlock(2f,2f,2f,2f) |
|
inline |
Creates a new block that belongs to a given mesh.
parentMesh | The mesh the block will belong to. |
|
inline |
Adds this block to the parent meshes linked list. Call this during a reflow to reuse this same block again.
|
inline |
Applies the SDF outline "location", essentially the thickness of an outline, to this block.
|
inlineprivate |
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 the vertices to the meshes buffer. Called during a layout event.
|
inline |
|
inline |
Writes out the UV and vertex colours to the meshes buffers.
|
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.
MeshBlock PowerUI.MeshBlock.BlockAfter |
Blocks are stored as a linked list. This is the block following this one.
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.
MeshBlock PowerUI.MeshBlock.LocalBlockAfter |
The block following this one in a display property linked list.
DynamicMesh PowerUI.MeshBlock.ParentMesh |
The dynamic mesh that this block was Allocated from.
UVBlock PowerUI.MeshBlock.TextUV |
The UV coordinate block for a letter off the atlas.
Transformation PowerUI.MeshBlock.Transform |
The transform to apply to this blocks vertices as a post process.
Vector3 PowerUI.MeshBlock.VertexBottomLeft |
The vertex in the bottom left corner.
Vector3 PowerUI.MeshBlock.VertexBottomRight |
The vertex in the bottom right corner.
int PowerUI.MeshBlock.VertexIndex |
The index of the first vertex in the meshes vertex array.
Vector3 PowerUI.MeshBlock.VertexTopLeft |
The vertex in the top left corner.
Vector3 PowerUI.MeshBlock.VertexTopRight |
The vertex in the top right corner.