MaplyShapeExtruded

Objective-C

@interface MaplyShapeExtruded : MaplyShape

Swift

class MaplyShapeExtruded : MaplyShape

An extruded shape with an arbitrary outline.

This object represents an extruded shape with the given thickness. It can be oriented according to the pitch, roll, yaw and height.

  • Construct with the coordinates for the outline to extrude.

    Pass in pairs of doubles that correspond to the

    Declaration

    Objective-C

    - (nonnull instancetype)initWithOutline:(NSArray *_Nonnull)coords;

    Swift

    init(outline coords: [Any])
  • Construct with the coordinates for the outline to extrude.

    Pass in pairs of doubles that correspond to the

    Declaration

    Objective-C

    - (nonnull instancetype)initWithOutline:(double *_Nonnull)coords
                              numCoordPairs:(int)numCoordPairs;

    Swift

    init(outline coords: UnsafeMutablePointer<Double>, numCoordPairs: Int32)
  • Number of coordinate pairs in this shape.

    Declaration

    Objective-C

    @property (nonatomic, readonly) int numCoordPairs;

    Swift

    var numCoordPairs: Int32 { get }
  • Array of coordinate values.

    Declaration

    Objective-C

    @property (nonatomic, readonly) double *_Nullable coordData;

    Swift

    var coordData: UnsafeMutablePointer<Double>? { get }
  • Where we’d like to place the extruded shape.

    This is the center of the object in geographic radians.

    Declaration

    Objective-C

    @property (nonatomic) MaplyCoordinate center;

    Swift

    var center: MaplyCoordinate { get set }
  • Scale for coordinates. Set to 1/EarthRadiusInMeters by default.

    The coordinates will be scaled by this before creating the geometry. By default this is set to 1/EarthRadius(m) so you can build your shape in meters. Also applies to thickness and height.

    Declaration

    Objective-C

    @property (nonatomic) double scale;

    Swift

    var scale: Double { get set }
  • Thickness for the resulting shape.

    We build an extruded shape out of this information and this is its thickness. If this is zero, you just get a double sided polygon.

    Declaration

    Objective-C

    @property (nonatomic) double thickness;

    Swift

    var thickness: Double { get set }
  • Height to place the resulting shape at.

    We’ll put this shape at the given height above the surface of the globe or map.

    Declaration

    Objective-C

    @property (nonatomic) double height;

    Swift

    var height: Double { get set }
  • The transform to apply to this shape.

    If set, this transform is applied before placing the feature. You can set a transform matrix up with roll, pitch, and yaw.

    Declaration

    Objective-C

    @property (nonatomic, strong) MaplyMatrix *_Nullable transform;

    Swift

    var transform: MaplyMatrix? { get set }