class Vector3D extends PhysicalVector with PhysicalVectorOps[Vector3D]
Simple 3 dimensional vector class. Objective is to keep this class concise and fast. Standard operations are defined such as vectorial summation and subtraction , scala multiplication/division/summation7subtraction and operations like normalization, dot product, etc.
- Alphabetic
- By Inheritance
- Vector3D
- PhysicalVectorOps
- PhysicalVector
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Vector3D(X: Double, Y: Double, Z: Double)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
*(i: Double): Vector3D
Scalar multiplication.
Scalar multiplication. Multiples both components by the argument.
- returns
PhysicalVector after the multiplication
- Definition Classes
- Vector3D → PhysicalVectorOps
-
def
+(i: Double): Vector3D
Scalar summation.
Scalar summation. Adds a scala to both components.
- returns
PhysicalVector of the sum
- Definition Classes
- Vector3D → PhysicalVectorOps
-
def
+(that: Vector3D): Vector3D
summation of two PhysicalVector
summation of two PhysicalVector
- that
the other to sum
- returns
PhysicalVector equal to the sum of both vectors
- Definition Classes
- Vector3D → PhysicalVectorOps
-
def
-(i: Double): Vector3D
Scalar subtraction.
Scalar subtraction. Removes the argument from this vector
- returns
the difference between this and that scalar
- Definition Classes
- Vector3D → PhysicalVectorOps
-
def
-(that: Vector3D): Vector3D
Subtraction of a Vector2D from this vector.
Subtraction of a Vector2D from this vector.
- that
the Vector2D to subtract from this vector
- returns
the result of this minus that
- Definition Classes
- Vector3D → PhysicalVectorOps
-
def
/(i: Double): Vector3D
Division by a scalar.
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val X: Double
- val Y: Double
- val Z: Double
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
canEqual(other: Any): Boolean
Checks whether we are allowed to compare this object to another
Checks whether we are allowed to compare this object to another
- other
Vector to compare to
- Definition Classes
- Vector3D → PhysicalVectorOps
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
distanceTo(that: Vector3D): Double
Computes the distance between this and that assuming both PhysicalVector represent points.
Computes the distance between this and that assuming both PhysicalVector represent points.
- that
point to compute the distance to
- returns
L2 distance between both points
- Definition Classes
- Vector3D → PhysicalVectorOps
-
def
dot(that: Vector3D): Double
Copmutes the dot product between both vectors.
Copmutes the dot product between both vectors.
- that
PhysicalVector to compute the dot product with
- returns
dot product between both vectors
- Definition Classes
- Vector3D → PhysicalVectorOps
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(other: Any): Boolean
Checks whether another object equals this one
Checks whether another object equals this one
- other
another object to test equality for
- returns
boolean indicating if the two objects are the same
- Definition Classes
- Vector3D → PhysicalVectorOps → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode: Int
Definition of equality.
Definition of equality.
- returns
Int representing the object
- Definition Classes
- Vector3D → PhysicalVectorOps → AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
norm: Double
Computes the L2 norm of this vector.
-
def
normalized: Vector3D
Returns the same vector except with unit length.
Returns the same vector except with unit length.
- Definition Classes
- Vector3D → PhysicalVectorOps
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Vector3D → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )