Object/Class

net.psforever.types

Vector3

Related Docs: class Vector3 | package types

Permalink

object Vector3 extends Serializable

Source
Vector3.scala
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Vector3
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def CrossProduct(vec1: Vector3, vec2: Vector3): Vector3

    Permalink

    For two vectors, find a vector that is simultaneously parallel to both vectors.

    The magnitude of the cross product is equal to the product of the magnitudes of both vectors and the sine of the angle between them.

    For two vectors, find a vector that is simultaneously parallel to both vectors.

    The magnitude of the cross product is equal to the product of the magnitudes of both vectors and the sine of the angle between them. If the two original vectors are parallel or antiparallel, the cross product is a zero vector. Due to handiness rules, two non-zero cross product vectors that are antiparallel to each other can be calculated.

    vec1

    the first vector

    vec2

    the second vector

    returns

    the cross product

  5. def Distance(pos1: Vector3, pos2: Vector3): Float

    Permalink

    Calculate the actual distance between two points.

    Calculate the actual distance between two points.

    pos1

    the first point

    pos2

    the second point

    returns

    the distance

  6. def DistanceSquared(pos1: Vector3, pos2: Vector3): Float

    Permalink

    Calculate the squared distance between two points.

    Calculate the squared distance between two points. Though some time is saved care must be taken that any comparative distance is also squared.

    pos1

    the first point

    pos2

    the second point

    returns

    the distance

  7. def DotProduct(vec1: Vector3, vec2: Vector3): Float

    Permalink

    Given two vectors, find their dot product.

    The dot product is the sum of the products of the corresponding component parts of two vectors.

    Given two vectors, find their dot product.

    The dot product is the sum of the products of the corresponding component parts of two vectors. It is equal to the product of the Euclidean magnitude of the vectors and cosine of the angle between them. If the dot product of two vectors of non-zero magnitude is 0, then the vectors are perpendicular to each other.

    vec1

    the first vector

    vec2

    the second vector

    returns

    the dot product

  8. def Magnitude(vec: Vector3): Float

    Permalink

    Calculate the actual magnitude of a vector.

    Calculate the actual magnitude of a vector.

    vec

    the vector

    returns

    the magnitude

  9. def MagnitudeSquared(vec: Vector3): Float

    Permalink

    Calculate the squared magnitude of a vector.

    Calculate the squared magnitude of a vector. Though some time is saved care must be taken that any comparative magnitude is also squared.

    vec

    the vector

    returns

    the magnitude

  10. def Rx(vec: Vector3, ang: Double): Vector3

    Permalink

    Perform the x-axis rotation of a Vector3 element where the angle of rotation is assumed in radians.

    Perform the x-axis rotation of a Vector3 element where the angle of rotation is assumed in radians.

    vec

    a mathematical vector representing direction

    ang

    a rotation angle, in radians

    returns

    the rotated vector

    See also

    Vector3.Rx(Vector3, Float)

  11. def Rx(vec: Vector3, ang: Float): Vector3

    Permalink

    Perform the x-axis rotation of a Vector3 element where the angle of rotation is assumed in degrees.

    Perform the x-axis rotation of a Vector3 element where the angle of rotation is assumed in degrees.

    vec

    a mathematical vector representing direction

    ang

    a rotation angle, in degrees

    returns

    the rotated vector

    See also

    Vector3.RxRadians(Vector3, Double)

  12. def Ry(vec: Vector3, ang: Double): Vector3

    Permalink

    Perform the y-axis rotation of a Vector3 element where the angle of rotation is assumed in radians.

    Perform the y-axis rotation of a Vector3 element where the angle of rotation is assumed in radians.

    vec

    a mathematical vector representing direction

    ang

    a rotation angle, in radians

    returns

    the rotated vector

    See also

    Vector3.Ry(Vector3, Float)

  13. def Ry(vec: Vector3, ang: Float): Vector3

    Permalink

    Perform the x-axis rotation of a Vector3 element where the angle of rotation is assumed in degrees.

    Perform the x-axis rotation of a Vector3 element where the angle of rotation is assumed in degrees.

    vec

    a mathematical vector representing direction

    ang

    a rotation angle, in degrees

    returns

    the rotated vector

    See also

    Vector3.Ry(Vector3, Double)

  14. def Rz(vec: Vector3, ang: Double): Vector3

    Permalink

    Perform the z-axis rotation of a Vector3 element where the angle of rotation is assumed in radians.

    Perform the z-axis rotation of a Vector3 element where the angle of rotation is assumed in radians.

    vec

    a mathematical vector representing direction

    ang

    a rotation angle, in radians

    returns

    the rotation vector

    See also

    Vector3.Rz(Vector3, Float)

  15. def Rz(vec: Vector3, ang: Float): Vector3

    Permalink

    Perform the x-axis rotation of a Vector3 element where the angle of rotation is assumed in degrees.

    Perform the x-axis rotation of a Vector3 element where the angle of rotation is assumed in degrees.

    vec

    a mathematical vector representing direction

    ang

    a rotation angle, in degrees

    returns

    the rotated vector

    See also

    Vector3.Rz(Vector3, Double)

  16. def ScalarProjection(vec1: Vector3, vec2: Vector3): Float

    Permalink

    Given two vectors, find the scalar value of the projection of one vector on the other.

    The value of the resulting scalar is the magnitude of the vector resulting from a vector projection of vec1 onto vec2.

    Given two vectors, find the scalar value of the projection of one vector on the other.

    The value of the resulting scalar is the magnitude of the vector resulting from a vector projection of vec1 onto vec2. For perpendicular vectors, the scalar projection result will be the same as the dot product result - zero. A positive value indicates a projected vector in the same direction as vec2; a negative value indicates an antiparallel vector.

    vec1

    the vector being projected

    vec2

    the vector projected onto

    returns

    the magnitude of the resulting projected vector

    See also

    VectorProjection

  17. def Unit(vec: Vector3): Vector3

    Permalink

    Given a vector, find that's vector's unit vector.

    A unit vector is a vector in the direction of the original vector but with a magnitude of 1.

    Given a vector, find that's vector's unit vector.

    A unit vector is a vector in the direction of the original vector but with a magnitude of 1.

    vec

    the original vector

    returns

    the unit vector; if the original vector has no magnitude, a zero-vector is returned

  18. def VectorProjection(vec1: Vector3, vec2: Vector3): Vector3

    Permalink

    Given two vectors, find the projection of one vector on the other.

    The vector projection of vec1 on vec2 produces a vector that is the direction of (parallel to) vec2 with a magnitude equal to the product of vec1 and the cosine of the angle between the two vectors.

    Given two vectors, find the projection of one vector on the other.

    The vector projection of vec1 on vec2 produces a vector that is the direction of (parallel to) vec2 with a magnitude equal to the product of vec1 and the cosine of the angle between the two vectors.

    vec1

    the vector being projected

    vec2

    the vector projected onto

    returns

    the resulting projected vector

    See also

    ScalarProjection

  19. final val Zero: Vector3

    Permalink
  20. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. implicit val codec_float: Codec[Vector3]

    Permalink
  23. implicit val codec_pos: Codec[Vector3]

    Permalink
  24. implicit val codec_vel: Codec[Vector3]

    Permalink
  25. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  32. final def notify(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def z(value: Float): Vector3

    Permalink

    A common vector object that only concerns itself with rotation around the world-up axis or the "world up" coordinate direction.

    A common vector object that only concerns itself with rotation around the world-up axis or the "world up" coordinate direction.

    value

    the third coordinate

    returns

    a Vector3 object

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped