ShapeType

Description

enum Tinman.Terrain.Shapes.ShapeType

Enumeration of shape types.

Public / Constants

Implicit

public constant Implicit → (0:int32)

An implicit shape.

The signed distance field of an implicit shape is defined by the custom arithmetic that is implied by the implementation class of the IShape interface.

An implicit shape may expose vertices of its aggregated shapes, either all of them or any subset thereof, so that some implicit shape vertices may be mapped to aggregated shape vertices via IShape.ShapeVertex.

Group

public constant Group → (1:int32)

A group shape that aggregates one or more other shapes.

The signed distance field of a group shape is defined as the minimum distance from a given point to any aggregated shape (distance point to shape).

All shapes in a group have the same geo-reference. If necessary, the IShapeOps.TransformCoordinateSystem method is used to transform a shape to the group geo-reference, when it is being added or prepared via IShape.ShapeAdd resp. IShape.ShapePrepare.

A shape group exposes all vertices of all the shapes that it aggregates, so that each shape group vertex can be mapped to an aggregated shape vertex via IShape.ShapeVertex. If an aggregated shape does not expose any vertices, the shape group exposes a pseudo-vertex for it, which is defined as the center of the bounding box (i.e. Box2D.Center of IShape.Bounds) of the corresponding aggregated shape.

Cube

public constant Cube → (2:int32)

A cubemap shape that aggregates a shape for each cubemap face.

Cubemap shapes are empty (see IShape.IsEmpty) and do not have a signed distance field. There is an aggregated shape for each cubemap face that must be used instead.

The geo-reference of a cubemap shape is a projected coordinate system (see CoordinateSystem.IsProjection) that uses the cubemap face projection for CubemapFace.NegZ (see CoordinateOperationMethod.Face). To find an aggregated shape for a specific CubemapFace, the IShape.ShapeFind method may be used.

Points

public constant Points → (3:int32)

A shape that is made of individual points.

The signed distance field of a point shape is defined as the minimum distance from a given point to any point in the shape (distance point to point).

Graph

public constant Graph → (4:int32)

A shape that is made of individual edges.

The signed distance field of a graph shape is defined as the minimum distance from a given point to any edge in the shape (distance point to line-segment).

Polygon

public constant Polygon → (5:int32)

A shape that is made of one or more contours (i.e. a sequence of connected and non-intersecting edges) and defines one or more polygons with zero or more holes.

The signed distance field of a polygon shape is defined as the minimum distance from a given point to any edge on a contour (distance point to line-segment), scaled with the sign of the contour (1 on the outside, -1 on the inside).

Mesh

public constant Mesh → (6:int32)

A shape that is made of individual triangles.

The signed distance field of a mesh shape is defined as the minimum distance from a given point to any triangle in the shape (distance point to triangle).