IShapeOps
Public / Methods
Absolute
Returns a shape that returns the absolute distance value (i.e. the outline of this shape).
This method modifies the distance field of the shape. No geometric processing is performed.
Compile
Compiles this shape into the most compact form.
Calling this method will not modify the geometry or distance field of a shape, only the object model structure. Deferred computations are resolved, where possible.
Convert
Converts this shape to the given type.
The following conversions are possible:
From / To | Implicit | Points | Graph | Polygon | Mesh ----------+----------+--------+-------+---------+------ Implicit | (1) | n/a | (2) | n/a | n/a ----------+----------+--------+-------+---------+------ Points | n/a | (1) | n/a | n/a | (3) ----------+----------+--------+-------+---------+------ Graph | n/a | (4) | (1) | (5) | (6) ----------+----------+--------+-------+---------+------ Polygon | n/a | (4) | (7) | (1) | (8) ----------+----------+--------+-------+---------+------ Mesh | n/a | (4) | (9) | (10) | (1)
These are the conversion methods:
-
The conversion to the same type is a no-op, the method will return
this
. -
The signed distance field is traced in order to generate edges that approximate the contour at distance zero.
This conversion is not implemented yet and will returnnull
! -
A Delaunay triangulation is computed for the point soup.
This conversion is not implemented yet and will returnnull
! -
The edges resp. triangles are discarded, the vertices are used as a point soup.
-
First, all pairs of flipped edges (AB, BA) are dropped from the graph. Then, each island of connected edges in the graph must represent a polyline (closed or non-closed). Those will be interpreted as polygon contours.
-
Each triplet of connected edges in the graph is interpreted as a triangle. All other edges are discarded.
-
The polygon contour edges and vertices are used to build a graph.
-
The polygon is triangulated using the Ear-Cutting algorithm.
-
The triangle edges and vertices are used to build a graph.
-
All triangle edges without an adjacent triangle are output as contour edges.
The following conversions will round-trip without losing information:
- See also
Invert
Inverts this shape.
This method modifies the distance field of the shape. No geometric processing is performed.
Maximum
Returns a composite shape that returns the maximum distance value (i.e. intersection of this shape and the given one).
This method modifies the distance field of the shape. No geometric processing is performed.
Minimum
Returns a composite shape that returns the minimum distance value (i.e. the union of this shape and the given one).
This method modifies the distance field of the shape. No geometric processing is performed.
Offset
Applies a distance offset to this shape.
This method modifies the distance field of the shape. No geometric processing is performed.
PrepareLazy
Prepares all lazy-loaded resp. lazy-generated data for this shape.
- IOException
-
If an I/O error has occurred while lazy-loading model data.
- GeorefException
-
If the required geo-reference parameters are incomplete or invalid.
- ValidatingException
-
If a validation error has occurred for the shape data or a shape reader object.
TransformCoordinates
Transforms this shape using the given 2D homogeneous matrix.
Shape coordinates of this shape are multiplied with matrix in using Mat3D.Mul22 (w = 1
) in order to produce shape coordinates of the returned shape.
TransformCoordinateSystem
Transforms this shape to the given coordinate system.
Transformation cannot be performed from resp. to a local coordinate system (see CoordinateSystem.IsLocal). A transformation between two local coordinate system is possible, but only a conversion regarding unit of measure (see CoordinateSystem.LocalUnit) and coordinate system flags (see CoordinateSystemFlags) is done.
Implicit shapes cannot be transformed (see IShape).
- See also
TransformGeometry
Transforms this shape to the given coordinate system.
Transformation cannot be performed from resp. to a local coordinate system (see CoordinateSystem.IsLocal). A transformation between two local coordinate system is possible, but only a conversion regarding unit of measure (see CoordinateSystem.LocalUnit) and coordinate system flags (see CoordinateSystemFlags) is done.
If both transform in and geocentric opt are not null
, the caller is responsible for making sure that the given transform in correlates with the source coordinate system (see IShapeInfo.Georef) and the target coordinate system (see Geocentric.Coordinates).
Implicit shapes cannot be transformed (see IShape).
Extensions
Outline
Returns a shape that covers the outline of this shape.
This method modifies the distance field of the shape. No geometric processing is performed.
RenderPrepare
Prepares this shape for geometric rendering (i.e. triangles, and lines).
The method will convert this shape to ShapeType.Graph (for the lines) and to ShapeType.Mesh (for the triangles). The resulting shapes are returned as a compiled shape group.