Class

com.sparkcorr.Geometry

Point3D

Related Doc: package Geometry

Permalink

class Point3D extends Point

Specialization of Point to 3D case.

contains further functions to deal with corrresponding angles in space.

Example:
  1. val p=Point(1,2,3)
    val pnorm=new Point3D(p/p.norm)
    val (r,theta,phi)=pnorm.toAngle()
    print(r,pnorm.x)
Linear Supertypes
Point, AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Point3D
  2. Point
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Point3D(theta: Double, phi: Double)

    Permalink

    create a 3D point from 2 angles on the unit sphere

    create a 3D point from 2 angles on the unit sphere

    theta

    co-latitude 0<theta<Pi

    phi

    longitude 0<phi<2Pi

  2. new Point3D(p: Point)

    Permalink

    conversion from a Point to Point3D

  3. new Point3D(x: Double, y: Double, z: Double)

    Permalink

    create 3D point specifying the 3 cartesian coordinates.

    create 3D point specifying the 3 cartesian coordinates. You can get access to them with x,y or z values

    x

    1st coordinate

    y

    2d coordinate

    z

    3d coordinate

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def *(s: Double): Point

    Permalink

    scale all coordinates by s

    scale all coordinates by s

    Definition Classes
    Point
  4. def +(p: Point): Point

    Permalink

    addition

    addition

    Definition Classes
    Point
  5. def -(p: Point): Point

    Permalink

    substraction

    substraction

    Definition Classes
    Point
  6. def /(s: Double): Point

    Permalink

    inverse-scale (divide) all coordinates by s

    inverse-scale (divide) all coordinates by s

    Definition Classes
    Point
  7. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def apply(i: Int): Double

    Permalink

    direct access to coordinates

    direct access to coordinates

    Definition Classes
    Point
    Example:
    1. val p=new Point(1,2,3); p(0)=3

  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. val coord: List[Double]

    Permalink

    coordinates list

    coordinates list

    Definition Classes
    Point
  12. val dim: Int

    Permalink

    dimension

    dimension

    Definition Classes
    Point
  13. def dist(p: Point): Double

    Permalink

    distance to other point

    distance to other point

    Definition Classes
    Point
  14. def dist2(p: Point): Double

    Permalink

    squared distance to some other point

    squared distance to some other point

    Definition Classes
    Point
  15. def dot(p: Point): Double

    Permalink

    dot product

    dot product

    Definition Classes
    Point
  16. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. def norm(): Double

    Permalink

    norm of the vector

    norm of the vector

    Definition Classes
    Point
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toAngle(): (Double, Double, Double)

    Permalink

    spherical coordinates of the point

    spherical coordinates of the point

    returns

    [R,theta,phi] tuple with 0<theta<Pi,0<phi<2Pi

  28. def toString(): String

    Permalink

    pretty printing

    pretty printing

    Definition Classes
    Point → AnyRef → Any
  29. def unitAngle(): (Double, Double)

    Permalink

    Angles of the 3D point on the unit sphere

    Angles of the 3D point on the unit sphere

    returns

    [theta,phi] tuple with 0<theta<Pi,0<phi<2Pi

  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. val x: Double

    Permalink

    1st coordinate

  34. val y: Double

    Permalink

    2d coordinate

  35. val z: Double

    Permalink

    3d coordinate

Inherited from Point

Inherited from AnyRef

Inherited from Any

Ungrouped