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.
The following data will not be modified by this method, i.e. the returned IShape object will return the same values as this
object does:
The shape object structure may be modified. As a result, the following data may be different in the returned IShape object and this
object:
Convert
Converts this shape to the given type.
The following conversions are possible:
From, To | Implicit | Points | Graph | Polygon | Mesh | Group | Cube ---------+----------+--------+-------+---------+------+-------+----- Implicit | (1) | n/a | (2) | n/a | n/a | (11) | (12) ---------+----------+--------+-------+---------+------+-------+----- Points | n/a | (1) | n/a | n/a | (3) | (11) | (12) ---------+----------+--------+-------+---------+------+-------+----- Graph | n/a | (4) | (1) | (5) | (6) | (11) | (12) ---------+----------+--------+-------+---------+------+-------+----- Polygon | n/a | (4) | (7) | (1) | (8) | (11) | (12) ---------+----------+--------+-------+---------+------+-------+----- Mesh | n/a | (4) | (9) | (10) | (1) | (11) | (12) ---------+----------+--------+-------+---------+------+-------+----- Group | (13) | (13) | (13) | (13) | (13) | (1) | (12) ---------+----------+--------+-------+---------+------+-------+----- Cube | n/a | n/a | n/a | n/a | n/a | (11) | (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, using the accuracy opt.
This conversion is not implemented yet and will returnnull
! -
Treats the shape vertices as a point soup and computes a Delaunay triangulation for them, see Delaunay.
-
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 with negative edge parity.
-
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. For polygons with positive edge parity, the direction of the edges will be reversed.
-
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 shape is wrapped in a shape group by delegating to the Group method.
-
The shape is transformed to a cubemap by delegating to the TransformCubemap method, using the given accuracy opt.
-
Each aggregated shape is converted with the Convert method, passing the given type in and accuracy opt values. The resulting shapes are returns as a new shape group.
The following conversions will round-trip without losing information:
- See also
Group
Converts this shape into a shape group, if necessary.
If this
shape is not of type ShapeType.Group, this method will first create a shape group with Shape.Group, passing the IShapeInfo.Georef value of this
shape. Then, this
shape will be added to the shape group with IShape.ShapeAdd.
- 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 (with w = 1
) in order to produce shape coordinates of the returned shape. Scalar distance field offsets of implicit shapes will be scaled, which will introduce spatial distortions if matrix in is not an affine transformation.
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.
Scalar distance field offsets of implicit shapes will be scaled, which will introduce spatial distortions of a scale that depends on how much the coordinate system transformation resembles an affine transformation (e.g. a simple unit conversion will not introduce any distortion).
- See also
TransformCubemap
Transforms this shape to a geographic cubemap coordinate system.
Scalar distance field offsets of implicit shapes will be scaled, which will introduce spatial distortions of a scale that depends on how much the coordinate system transformation resembles an affine transformation (e.g. a simple unit conversion will not introduce any distortion).
Depending on the location, the cubemap target coordinate system exhibits inherent distortions (skewed / non-orthogonal coordinate axes), which will cause distortions in the distance field. This should be taken into account when transforming implicit shapes.
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).
Transforming implicit shapes may introduce spatial distortions (see IShape).