MESHGEOM contains three types of keywords: PATCH, NORMAL, and TEXCOORD.
PATCH
,). The following types of geometries are supported:- Point
- LineString
- Polygon
- MultiPoint
- MultiLineString
- MultiPolygon
- IndexSurface
- TriangleStrip
- TriangleFan
NORMAL
NORMAL contains a set of normal vectors for 3D points. The coordinates of points are separated by commas (,). Each geometry object is enclosed by parentheses (). The number of points in a normal must be the same as the number of vertices in a patch.
TEXCOORD
TEXCOORD contains a set of texture coordinates for 2D points. The coordinates of points are separated by commas (,). Each geometry object is enclosed by parentheses (). The number of points in a texture coordinate (TEXCOORD) must be the same as the number of vertices in a patch.
-- 2 patches, 1 is point and 2 is indexsurface
MESHGEOM(
PATCH(POINT(0 0 1),
INDEXSURFACE(VERTEX(0 0 1,0 10 2,10 10 3,10 0 4), INDEX((0,1,2),(1,2,3)))
)
)
-- With Norma and texcoord
MESHGEOM(
PATCH(
TRIANGLESTRIP(0 0 1,0 10 2,10 10 3,10 0 4)
),
NORMAL(
(0 0 0, 1 1 1,2 2 2, 3 3 3)
),
TEXCOORD(
(0 0, 1 1, 2 2, 3 3)
)
)TEXCOORD also supports the Z and M dimensions. The dimensions of all patches in MESHGEOM must be the same.
-- 2 patches, 1 is point and 2 is indexsurface
MESHGEOM(
PATCH(
POINT M(0 0 1),
INDEXSURFACE M(VERTEX(0 0 1,0 10 2,10 10 3,10 0 4), INDEX((0,1,2),(1,2,3)))
)
)MESHGEOM allows you to reference other meshgeom objects. In this case, MESHGEOM contains the following keywords: schema, table, column, and key. The last three of the keywords are required. The value for each keyword is enclosed by at signs (@).
/*
Format
MESHGEOM(
schema(@schema_name@),
table(@table_name@),
column(@column_name@),
key(@where_clause@)
)
*/
MESHGEOM(
schema(@public@),
table(@mytable@),
column(@mycolumn@),
key(@id=1@)
)