case class Vec(x: Double, y: Double, z: Double) extends Vertex with Product with Serializable
- Alphabetic
- By Inheritance
- Vec
- Serializable
- Product
- Equals
- Vertex
- AnyRef
- Any
- by richDrxAny
- by DrxBoundOps
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def *(s: Double): Vec
scalar multiplication
- def *(that: Vec): Double
dot product
- def +(that: Vec): Vec
- def +-(that: Vec): Line
- def -(that: Vec): Vec
- def ->[B](y: B): (Vec, B)
- def /(s: Double): Vec
scalar division
- def :*(that: Vec): Vec
element wise multiplication
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def a: Double
- def angle(a: Angle): Vec
keep the magnitude but use a new angle (in the x,y axis)
- def angleBetween(that: Vec): Angle
the smallest angle between two vectors
- def applyIf(t: Boolean, f: (Vec) => Vec): Vec
- Implicit
- This member is added by an implicit conversion from Vec toDrxAny[Vec] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def applyIf(t: (Vec) => Boolean)(f: (Vec) => Vec): Vec
better chaining for types
better chaining for types
- Implicit
- This member is added by an implicit conversion from Vec toDrxAny[Vec] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def b: Double
- def c: Double
- def ceil: Vec
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def colinear(a: Vec, b: Vec): Boolean
- lazy val cos: Double
- def d: Double
- def dependent(that: Vec): Boolean
colinear in 3d
- def dist(that: Vec): Double
euclidean distance
- def dist2(that: Vec): Double
- def e: Double
- def elementOf(xs: Set[Vec]): Boolean
- Implicit
- This member is added by an implicit conversion from Vec toDrxAny[Vec] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def ensuring(cond: (Vec) => Boolean, msg: => Any): Vec
- def ensuring(cond: (Vec) => Boolean): Vec
- def ensuring(cond: Boolean, msg: => Any): Vec
- def ensuring(cond: Boolean): Vec
- def eps: Double
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def floor: Vec
- def formatted(fmtstr: String): String
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- lazy val heading: Angle
heading assuming a xyz => ned direction, or Cartesian chalk board: x->right, y->up, z->out of board
- def headingDelta(that: Vec): Angle
- def is2d: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def last: Vec
- def lerp(that: Vec)(amt: Double): Vec
linear interpolation (Euclidean)
- def lineTo(that: Vec): Line
- def mag(m: Double): Vec
keep the angle but use a new magnitude
- def map(f: (Double) => Double): Vec
Collections like map func
- def max: Double
- def min: Double
- def mx(a: Double): Vec
Move/set the x value
- def my(a: Double): Vec
Move/set the y value
- def mz(a: Double): Vec
Move/set the z value
- def n: Double
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noneIf(f: (Vec) => Boolean): Option[Vec]
- Implicit
- This member is added by an implicit conversion from Vec toDrxAny[Vec] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- lazy val norm: Double
norm |v|
- lazy val normSq: Double
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def optionIf(f: (Vec) => Boolean): Option[Vec]
optionally wrap an object
optionally wrap an object
- Implicit
- This member is added by an implicit conversion from Vec toDrxAny[Vec] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def p: Double
- def point(that: Vec)(func: (Double, Double) => Double): Vec
pointwise operations ex: a point b {_ max _}
- def preApply[B](f: (Vec) => B): B
a preApply f => f(a)
a preApply f => f(a)
- Implicit
- This member is added by an implicit conversion from Vec toDrxAny[Vec] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def projOn(that: Vec): Vec
- def q: Double
- def r: Double
- lazy val range: Double
- def round: Vec
- def rx(a: Angle): Vec
Rotate around the x axis
- def ry(a: Angle): Vec
Rotate around the y axis
- def rz(a: Angle): Vec
Rotate around the z axis
- def rzAt(a: Angle, pivot: Vec): Vec
Rotate around the z axis relative to a point i.e 1) translate pivot point *at* to origin 2) apply rotation *at* vec 3) shift *to* a new location
- def rzLeft: Vec
Rotate by a negative right Angle around the z axis (no trig)
- def rzRight: Vec
Rotate by a right Angle around the z axis (no trig)
- def rzTo(a: Angle, pivot: Vec, to: Vec): Vec
Rotate around the z axis relative to a point and then move(translate) to a new point i.e 1) translate pivot point *at* to origin 2) apply rotation *at* vec 3) shift *to* a new location
- def sat(max: Double): Vec
- def sat(min: Double, max: Double): Vec
- def segmentFrom(that: Vec): Line
- def sideEffect(f: (Vec) => Unit): Vec
side effect filter
side effect filter
- Implicit
- This member is added by an implicit conversion from Vec toDrxAny[Vec] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- lazy val sin: Double
- def slerp(that: Vec)(amt: Double): Vec
spherical interpolation (great circle) wikipedia://Slerp
- def someIf(f: (Vec) => Boolean): Option[Vec]
- Implicit
- This member is added by an implicit conversion from Vec toDrxAny[Vec] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def sq: Vec
element wise square
- def swap: Vec
swap the x and y values
- def sx(a: Double): Vec
Scale the x axis
- def sy(a: Double): Vec
Scale the y axis
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def sz(a: Double): Vec
Scale the z axis
- lazy val tan: Double
- val thisAny: Vec
- Implicit
- This member is added by an implicit conversion from Vec toDrxAny[Vec] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- def till(maxArg: Vec): Bound[Vec]
Bound construction since the Range constructor is deprecated
Bound construction since the Range constructor is deprecated
- Implicit
- This member is added by an implicit conversion from Vec toBoundOps[Vec] performed by method DrxBoundOps in cc.drx.predef.Enrich.
- Definition Classes
- BoundOps
- def toArray: Array[Double]
- def toComplex: Complex
- def toPair: (Double, Double)
- def toTuple: (Double, Double, Double)
- def toVector: Vector[Double]
- def tx(a: Double): Vec
Translate in the x axis
- def ty(a: Double): Vec
Translate in the y axis
- def tz(a: Double): Vec
Translate in the z axis
- def u: Double
- def unary_-: Vec
negate the vector
- lazy val unit: Vec
v/|v|
- def v: Double
- def w: Double
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def x(that: Vec): Vec
cross product
- val x: Double
- def x2d(that: Vec): Double
- def xx: Double
- val y: Double
- def yy: Double
- val z: Double
- def zz: Double
- def ~(that: Vec): Line
- def ~(r: Double): Circ
- def ~>(that: Vec): Line
- def θ: Double
- def φ: Double
- def ψ: Double
Shadowed Implicit Value Members
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from Vec toany2stringadd[Vec] performed by method any2stringadd in scala.Predef.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(vec: any2stringadd[Vec]).+(other)
- Definition Classes
- any2stringadd
Deprecated Value Members
- def ?>(f: (Vec) => Boolean): Option[Vec]
alias for option if
alias for option if
- Implicit
- This member is added by an implicit conversion from Vec toDrxAny[Vec] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- Annotations
- @deprecated
- Deprecated
(Since version v0.2.15) to many symbols are hard to undertand
- lazy val deg: Double
- Annotations
- @deprecated
- Deprecated
(Since version 0.2.0-angle) use the more direct heading.deg
- lazy val degPos: Double
- Annotations
- @deprecated
- Deprecated
(Since version 0.2.0-angle) use the more direct heading.pos.deg
- lazy val norm2: Double
norm squared (useful for calculations that do not need the square root operation)
norm squared (useful for calculations that do not need the square root operation)
- Annotations
- @deprecated
- Deprecated
(Since version 0.2.13) use normSq instead
- lazy val rad: Double
- Annotations
- @deprecated
- Deprecated
(Since version 0.2.0-angle) use the more direct heading.rad
- lazy val radPos: Double
- Annotations
- @deprecated
- Deprecated
(Since version 0.2.0-angle) use the more direct heading.pos.rad
- def |>[B](f: (Vec) => B): B
- Implicit
- This member is added by an implicit conversion from Vec toDrxAny[Vec] performed by method richDrxAny in cc.drx.predef.Enrich.
- Definition Classes
- DrxAny
- Annotations
- @deprecated
- Deprecated
(Since version v0.2.15) use
preApply
if you must (symbols are concise without concision)
- def ~(string: String): Text
- Annotations
- @deprecated
- Deprecated
(Since version v0.1.20) use string ~ vec vec instead (higher priority to the string)
- def →[B](y: B): (Vec, B)
- Implicit
- This member is added by an implicit conversion from Vec toArrowAssoc[Vec] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.