All Products
Search
Document Center

PolarDB:MESHGEOM

Last Updated:Mar 28, 2026

MESHGEOM is a 3D mesh geometry format used in PolarDB for Oracle. It organizes data in two layers:

  • Geometry topology — defined by PATCH, which holds one or more geometry objects.

  • Vertex attributes — defined by NORMAL and TEXCOORD, which attach normal vectors and texture coordinates to the vertices in a patch.

The following example shows all three keywords together:

-- A triangle strip with normal vectors and texture coordinates
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)
  )
)

Keywords

The following table summarizes the three keywords and their format requirements:

KeywordDataCoordinate dimensionsFormatConstraint
PATCHOne or more geometry objectsDetermined by geometry typeGeometries separated by commas (,) inside PATCH(...)All patches in the same MESHGEOM must use the same dimensions
NORMALNormal vectors for 3D points3D (X Y Z)Points separated by commas (,); each geometry object enclosed in ()Point count must equal the vertex count in the patch
TEXCOORDTexture coordinates for 2D points2D, with optional Z and M dimensionsPoints separated by commas (,); each geometry object enclosed in ()Point count must equal the vertex count in the patch

PATCH

PATCH holds one or more geometry objects. Separate multiple geometries with commas (,).

The following geometry types are supported:

TypeDescription
PointA single point in 2D or 3D space.
LineStringA sequence of points connected by line segments.
PolygonA closed ring of line segments forming a planar surface.
MultiPointA collection of points.
MultiLineStringA collection of line strings.
MultiPolygonA collection of polygons.
IndexSurfaceA surface defined by a vertex list (VERTEX) and an index list (INDEX) that specifies how vertices are connected into faces. Useful when vertices are shared across multiple faces.
TriangleStripA sequence of triangles where each new vertex, together with the two preceding vertices, forms the next triangle. Vertices are shared between adjacent triangles.
TriangleFanA sequence of triangles that all share a common center vertex. Each new vertex, together with the center vertex and the previous vertex, forms the next triangle.

Example: two patches (Point and 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)))
  )
)

NORMAL

NORMAL contains a set of normal vectors for the 3D vertices in the patch. Points are separated by commas (,), and each geometry object is enclosed in parentheses ().

The number of points in NORMAL must equal the number of vertices in the patch.

TEXCOORD

TEXCOORD contains a set of texture coordinates for the 2D vertices in the patch. Points are separated by commas (,), and each geometry object is enclosed in parentheses ().

The number of points in TEXCOORD must equal the number of vertices in the patch.

TEXCOORD also supports the Z and M dimensions. All patches in a MESHGEOM must use the same dimensions.

Example: M dimension

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)))
  )
)

Reference another MESHGEOM object

MESHGEOM can reference another MESHGEOM object stored in a table. Use the following keywords to identify the target object:

KeywordRequiredDescription
schemaNoSchema name.
tableYesTable name.
columnYesColumn name.
keyYesWHERE clause that identifies the row.

Enclose each value in at signs (@).

Format

MESHGEOM(
  schema(@schema_name@),
  table(@table_name@),
  column(@column_name@),
  key(@where_clause@)
)

Example

MESHGEOM(
  schema(@public@),
  table(@mytable@),
  column(@mycolumn@),
  key(@id=1@)
)