class Vector3D extends AnyRef
- Alphabetic
- By Inheritance
- Vector3D
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Vector3D(from: Coordinate, to: Coordinate)
Creates a vector with the direction and magnitude of the difference between the to and from {link Coordinate}s.
Creates a vector with the direction and magnitude of the difference between the to and from {link Coordinate}s.
- from
the origin Coordinate
- to
the destination Coordinate return a new vector
- new Vector3D(v: Coordinate)
Creates a new 3D vector from a {link Coordinate}.
Creates a new 3D vector from a {link Coordinate}. The coordinate should have the X,Y and Z ordinates specified.
- new Vector3D(x: Double = 0, y: Double = 0, z: Double = 0)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def add(v: Vector3D): Vector3D
Computes a vector which is the sum of this vector and the given vector.
Computes a vector which is the sum of this vector and the given vector.
- v
the vector to add return the sum of this and
v
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def divide(d: Double): Vector3D
Creates a new vector which has the same direction and with length equals to the length of this vector divided by the scalar value
d.Creates a new vector which has the same direction and with length equals to the length of this vector divided by the scalar value
d.- d
the scalar divisor return a new vector with divided length
- def dot(v: Vector3D): Double
Computes the dot-product of two vectors
Computes the dot-product of two vectors
- v
a vector return the dot product of the vectors
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(o: Any): Boolean
Tests if a vector o has the same values for the components.
Tests if a vector o has the same values for the components.
- o
a Vector3D with which to do the comparison. return true if other is a Vector3D with the same values for the x and y components.
- Definition Classes
- Vector3D → AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getX: Double
Gets the X component of this vector.
Gets the X component of this vector.
return the value of the X component
- def getY: Double
Gets the Y component of this vector.
Gets the Y component of this vector.
return the value of the Y component
- def getZ: Double
Gets the Z component of this vector.
Gets the Z component of this vector.
return the value of the Z component
- def hashCode(): Int
Gets a hashcode for this vector.
Gets a hashcode for this vector.
return a hashcode for this vector
- Definition Classes
- Vector3D → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def length: Double
Computes the length of this vector.
Computes the length of this vector.
return the length of the vector
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def normalize: Vector3D
Computes a vector having identical direction but normalized to have length 1.
Computes a vector having identical direction but normalized to have length 1.
return a new normalized vector
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def subtract(v: Vector3D): Vector3D
Computes a vector which is the difference of this vector and the given vector.
Computes a vector which is the difference of this vector and the given vector.
- v
the vector to subtract return the difference of this and
v
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
Gets a string representation of this vector
Gets a string representation of this vector
return a string representing this vector
- Definition Classes
- Vector3D → AnyRef → Any
- 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()
- val x: Double
- Attributes
- protected
- val y: Double
- Attributes
- protected
- val z: Double
- Attributes
- protected