Yage3D.net
 

yage.gui.surfacegeometry

Authors:
Eric Poggel

License:
LGPL v3

class SurfaceGeometry : yage.resource.geometry.Geometry;
SurfaceGeometry defines vertices and meshes for drawing a surface, including borders/border textures. The vertices and triangles are laid out in a 4x4 grid in column-major order, just like the 4x4 matrices. Eleven are defined, one for each border region and 3 for the center.
 0_4__8__12
 |\ |\ |\ |
 1\5\9\13
 |\ |\ |\ |
 2\6\10\14
 |\ |\ |\ |
 3\7\11\15


Vertices used for center2 Mesh, which is used for background-color and the border-image center.
 1618
 |\ |
 17\19


Vertices used for text Mesh, which renders any text.
 2022
 |\ |
 21\23


Rendering occurs in up to 4 passes. First, render the borders and center1 with colors enabled and texturing disabled, for the borders and background-color Second, render center2 with texturing enabled, for the background-image Third, render the borders and center3 with colors disabled and texturing enabled for the border-image. Finally, the text itself is rendered

See:
CSS 3's border image property

this();
Create the vertices, texture coordinates, meshes, and materials used for rendering a surface.

Geometry getClipGeometry ();
Get the geometry used for clipping (usually rendered to a stencil buffer).

void setColors (Color center, Color[4u] borderColor, float opacity);
Set the colors for the center and the top, right, bottom, and left borders

TODO:


void setDimensions (Vec!(2,float) dimensions, Vec!(4,float) borders, Vec!(4,float) padding);
Set the dimensions of the surface's geometry

Params:
Vec!(2,float) dimensions Used to set the width and the height in pixels
Vec!(4,float) borders Used to set the size of each border in pixels (top, right, bottom, left)
Vec!(4,float) padding Used to se the size of teh padding in pixels (top, right, bottom, left)

Yage source files are copywritten by their specified authors and available under the terms of the GNU LGPL.
Documentation generated with CandyDoc on Wed Aug 11 11:14:27 2010