PolygonM3

ostrat.geom.PolygonM3
See thePolygonM3 companion object
final class PolygonM3(val unsafeArray: Array[Double]) extends AnyVal with PolygonLikeDbl3[PtM3]

A quasi Polygon specified in 3D metre points. This is not a proper polygon as the points do not have to lie within the same plane. I'm not sure how useful this class will prove. It has been created for the intermediary step of converting from LatLongss to PolygonM2s on world maps.

Attributes

Companion:
object
Graph
Supertypes
trait SpecialT
trait SeqSpec[PtM3]
trait SeqLike[PtM3]
class AnyVal
trait Matchable
class Any

Members list

Concise view

Type members

Types

override type SideT = LineSegM3
override type ThisT = PolygonM3

Gives the final type of this class.

Gives the final type of this class.

Attributes

Value members

Concrete methods

override def fElemStr: PtM3 => String

Attributes

Definition Classes
override def fromArray(array: Array[Double]): PolygonM3

Attributes

Definition Classes
override def sidesForeach[U](f: LineSegM3 => U): Unit

Attributes

Definition Classes
override def ssElem(d1: Double, d2: Double, d3: Double): PtM3

Method for creating new elements of the specifying-sequence from 3 Doubles.

Method for creating new elements of the specifying-sequence from 3 Doubles.

Attributes

Definition Classes
override def typeStr: String

String specifying the type of this object.

String specifying the type of this object.

Attributes

Definition Classes
override def vertsFold[B](init: B)(f: (B, PtM3) => B): B

Folds over the vertices.

Folds over the vertices.

Attributes

B

type of the accumulator return value of this method.

Definition Classes
override def vertsForeach[U](f: PtM3 => U): Unit

Performs the side effecting function on the PtM3 value of each vertex.

Performs the side effecting function on the PtM3 value of each vertex.

Attributes

Definition Classes
override def vertsIForeach[U](f: (Int, PtM3) => U): Unit

Index with foreach on each vertx. Applies the side effecting function on the index with the value of each vertex. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Index with foreach on each vertx. Applies the side effecting function on the index with the value of each vertex. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

Definition Classes
override def vertsMap[B, ArrB <: Arr[B]](f: PtM3 => B)(implicit builder: ArrMapBuilder[B, ArrB]): ArrB

Maps the vertices of this polygon to an immutable Array like sequence of type B.

Maps the vertices of this polygon to an immutable Array like sequence of type B.

Attributes

ArrB

The type of the immutable Array like sequence of B.

B

The element type of the returned sequence.

Returns:

the immutable sequence collection by applying the supplied function to each vertex.

Definition Classes
override def vertsPrevForEach[U](f: (PtM3, PtM3) => U): Unit

This method does nothing if the vertNum < 2. Foreach PtM3 vertex applies the side effecting function to the previous PtM3 vertex with each vertex. The previous vertex to the first vertex is the last vertex of this PolygonM3. Note the function signature (previous, vertex) => U follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

This method does nothing if the vertNum < 2. Foreach PtM3 vertex applies the side effecting function to the previous PtM3 vertex with each vertex. The previous vertex to the first vertex is the last vertex of this PolygonM3. Note the function signature (previous, vertex) => U follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

Definition Classes

All vertices have a non negative Z component.

All vertices have a non negative Z component.

Attributes

Inherited methods

def appendArray(appendProductsLength: Int): Array[Double]

Builder helper method that provides a longer array, with the underlying array copied into the new extended Array.

Builder helper method that provides a longer array, with the underlying array copied into the new extended Array.

Attributes

Inherited from:
DblNSeqSpec
override def dblBufferAppend(buffer: ArrayBuffer[Double], elem: PtM3): Unit

Utility method to append element on to an ArrayBuffer[Double]. End users should rarely need to use this method.

Utility method to append element on to an ArrayBuffer[Double]. End users should rarely need to use this method.

Attributes

Definition Classes
Inherited from:
Dbl3SeqLike
override def elemProdSize: Int

The number of atomic values, Ints, Doubles, Longs etc that specify / construct an element of this immutable flat Array based collection class.

The number of atomic values, Ints, Doubles, Longs etc that specify / construct an element of this immutable flat Array based collection class.

Attributes

Definition Classes
Inherited from:
Dbl3SeqLike
override def elemsStr: String

The element String allows the composition of toString for the whole collection. The syntax of the output will be reworked.

The element String allows the composition of toString for the whole collection. The syntax of the output will be reworked.

Attributes

Definition Classes
Inherited from:
SeqSpec
def flatMap[B <: ValueNElem, BB <: PolygonLike[B]](f: PtM3 => SeqLike[B])(implicit build: PolygonLikeFlatBuilder[B, BB]): BB

FlatMaps the vertices of this PolygonLike to a new to PolygonLike class of type BB.

FlatMaps the vertices of this PolygonLike to a new to PolygonLike class of type BB.

Attributes

Inherited from:
PolygonLike
def map[B <: ValueNElem, BB <: PolygonLike[B]](f: PtM3 => B)(implicit build: PolygonLikeMapBuilder[B, BB]): BB

Maps the vertices of this PolygonLike to a new to PolygonLike class of type BB.

Maps the vertices of this PolygonLike to a new to PolygonLike class of type BB.

Attributes

Inherited from:
PolygonLike
override def ssElemEq(a1: PtM3, a2: PtM3): Boolean

Checks if 2 values of the specifying sequence are equal.

Checks if 2 values of the specifying sequence are equal.

Attributes

Definition Classes
Inherited from:
Dbl3SeqSpec
def ssFold[B](initVal: B)(f: (B, PtM3) => B): B

specifying -sequence fold.

specifying -sequence fold.

Attributes

Inherited from:
SeqSpec

Attributes

Inherited from:
ValueNSeqSpec
def ssForeach[U](f: PtM3 => U): Unit

Performs a side effecting function on each element of the specifying sequence in order.

Performs a side effecting function on each element of the specifying sequence in order.

Attributes

Inherited from:
SeqSpec
def ssIForeach[U](initIndex: Int)(f: (Int, PtM3) => U): Unit

Index with foreach on the data elements. Performs a side effecting function on the index and each element of the data sequence. It takes a function as a parameter. The function may return Unit. If it does return a non Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Index with foreach on the data elements. Performs a side effecting function on the index and each element of the data sequence. It takes a function as a parameter. The function may return Unit. If it does return a non Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

Inherited from:
SeqSpec
def ssIForeach[U](f: (Int, PtM3) => Any): Unit

Index with foreach on the the specifying sequence elements. Performs a side effecting function on the index and each element of the specifying sequence. It takes a function as a parameter. The function may return Unit. If it does return a non Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Index with foreach on the the specifying sequence elements. Performs a side effecting function on the index and each element of the specifying sequence. It takes a function as a parameter. The function may return Unit. If it does return a non Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users. The method has 2 versions / name overloads. The default start for the index is 0 if just the function parameter is passed. The second version name overload takes an Int for the first parameter list, to set the start value of the index. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.

Attributes

Inherited from:
SeqSpec
override def ssIndex(index: Int): A

Accesses the specifying sequence element by a 0 based index.

Accesses the specifying sequence element by a 0 based index.

Attributes

Definition Classes
Inherited from:
Dbl3SeqSpec
def ssLast: A

Last element of the specifying sequence.

Last element of the specifying sequence.

Attributes

Inherited from:
SeqSpec
override def ssLength: Int

The number of product elements in this collection. For example in a [[PolygonImp], this is the number of Pt2s in the Polygon

The number of product elements in this collection. For example in a [[PolygonImp], this is the number of Pt2s in the Polygon

Attributes

Definition Classes
Inherited from:
ValueNSeqSpec
def ssMap[B, ArrB <: Arr[B]](f: PtM3 => B)(implicit ev: ArrMapBuilder[B, ArrB]): ArrB

Specialised map to an immutable Arr of B. For Sequ dataMap is the same as map, but for other structures it will be different, for example a PolygonLike will map to another PolygonLike.

Specialised map to an immutable Arr of B. For Sequ dataMap is the same as map, but for other structures it will be different, for example a PolygonLike will map to another PolygonLike.

Attributes

Inherited from:
SeqSpec
override def ssReverse: ThisT

Reverses the order of the elements of the specifying sequence.

Reverses the order of the elements of the specifying sequence.

Attributes

Definition Classes
Inherited from:
DblNSeqSpec
def ssReverseForeach[U](f: PtM3 => U): Unit

Performs a side effecting function on each element of the specifying-sequence in reverse order. The function may return Unit. If it does return a non Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users.

Performs a side effecting function on each element of the specifying-sequence in reverse order. The function may return Unit. If it does return a non Unit value it is discarded. The [U] type parameter is there just to avoid warnings about discarded values and can be ignored by method users.

Attributes

Inherited from:
SeqSpec
def ssTailFold[B](initial: B)(f: (B, PtM3) => B): B

FoldLeft over the tail of the specifying sequence.

FoldLeft over the tail of the specifying sequence.

Attributes

Inherited from:
SeqSpec
def ssTailForeach[U](f: PtM3 => U): Unit

Foreachs over the tail of the specifying sequence. Performs a side effecting function on each element of the tail of the specifying sequence in order.

Foreachs over the tail of the specifying sequence. Performs a side effecting function on each element of the tail of the specifying sequence in order.

Attributes

Inherited from:
SeqSpec
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
SeqLike -> Any
Inherited from:
SeqLike
final def unsafeLength: Int

The total number of atomic values, Ints, Doubles, Longs etc in the backing Array.

The total number of atomic values, Ints, Doubles, Longs etc in the backing Array.

Attributes

Inherited from:
DblNSeqLike

Reverses the order of the elements in a new Array[Double] which is returned.

Reverses the order of the elements in a new Array[Double] which is returned.

Attributes

Inherited from:
DblNSeqSpec
def unsafeSameSize(length: Int): ThisT

Attributes

Inherited from:
DblNSeqLike
override def unsafeSetElem(index: Int, newElem: PtM3): Unit

Sets / mutates an element in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Sets / mutates an element in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Attributes

Definition Classes
Inherited from:
Dbl3SeqLike
def unsafeSetElems(index: Int, elems: PtM3*): Unit

Sets / mutates elements in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Sets / mutates elements in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Attributes

Inherited from:
SeqLike
def vert(index: Int): VT

Returns the vertex of the given index. Throws if the index is out of range, if it less than 1 or greater than the number of vertices.

Returns the vertex of the given index. Throws if the index is out of range, if it less than 1 or greater than the number of vertices.

Attributes

Inherited from:
PolygonLike

This method should be overridden in final classes.

This method should be overridden in final classes.

Attributes

Inherited from:
PolygonLike

Checks this polygon has at least 3 vertices.

Checks this polygon has at least 3 vertices.

Attributes

Inherited from:
PolygonLike
override def vertsNum: Int

The number of vertices and also the number of sides in this Polygon.

The number of vertices and also the number of sides in this Polygon.

Attributes

Definition Classes
Inherited from:
PolygonValueN

Concrete fields