# PSF-LoginServer - master - net.psforever.types.Vector3
PSF - LoginServer - master - net.psforever.types.Vector3
Keywords: PSF LoginServer master net.psforever.types.Vector3

PSF-LoginServer - master < Back


# Packages

-  package root
  Definition Classes
    root
-  package net
  Definition Classes
    root
-  package psforever
  Definition Classes
    net
-  package types
  Definition Classes
    psforever
- Angular
- BailType
- CapacitorStateType
- CargoStatus
- CharacterSex
- CharacterVoice
- ChatMessageType
- DriveState
- EmoteType
- ExoSuitType
- GrenadeState
- HartSequence
- ImplantType
- LazeWaypoint
- LoadoutType
- MeritCommendation
- OxygenState
- PlanetSideEmpire
- PlanetSideGUID
- PlanetSideGeneratorState
- SpawnGroup
- SquadRequestType
- SquadResponseType
- SquadWaypoint
- StalePlanetSideGUID
- StandardWaypoint
- TransactionType
- ValidPlanetSideGUID
- Vector3
- WaypointSubtype

o

net.psforever.types

# Vector3 

###
Companion class Vector3

#### object Vector3 extends Serializable

Source
  Vector3.scala

Linear Supertypes
Serializable, AnyRef, Any

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. Vector3
2. Serializable
3. AnyRef
4. Any

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##: Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  def CrossProduct(vec1: Vector3, vec2: Vector3): Vector3

   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

   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

   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

   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

   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

   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 PlanarRotateAroundPoint(point: Vector3, axis: Vector3, radians: Float): Vector3

    Perform a standard z-axis rotation of a `Vector3` element representing a point in space around a `Vector3` element representing a point representing an axis of rotation where the angle of rotation is assumed in radians.

    Perform a standard z-axis rotation of a `Vector3` element representing a point in space around a `Vector3` element representing a point representing an axis of rotation where the angle of rotation is assumed in radians. This follows number circle rotation (counterclockwise) instead of compass rose rotation (clockwise). It can not be substituted with `(Rz(point - axis, radians) + center).xy + z(point.z)`.

    point

      a mathematical vector representing a point in space

    axis

      a mathematical vector representing an axis of rotation

    radians

      a rotation angle, in radians

    returns

      the rotated point

    See also

      `Vector3.Rz(Vector3, Double)`

11.  def Rx(vec: Vector3, ang: Double): Vector3

    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)`

12.  def Rx(vec: Vector3, ang: Float): Vector3

    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)`

13.  def Ry(vec: Vector3, ang: Double): Vector3

    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)`

14.  def Ry(vec: Vector3, ang: Float): Vector3

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

    Perform the y-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)`

15.  def Rz(vec: Vector3, ang: Double): Vector3

    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)`

16.  def Rz(vec: Vector3, ang: Float): Vector3

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

    Perform the z-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)`

17.  def ScalarProjection(vec1: Vector3, vec2: Vector3): Float

    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`

18.  def Unit(vec: Vector3): Vector3

    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

19.  def VectorProjection(vec1: Vector3, vec2: Vector3): Vector3

    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`

20.  final val Zero: Vector3
21.  final def asInstanceOf[T0]: T0
    Definition Classes
      Any
22.  def clone(): AnyRef
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.CloneNotSupportedException]) @native()
23.  implicit val codec_float: Codec[Vector3]
24.  implicit val codec_pos: Codec[Vector3]
25.  implicit val codec_vel: Codec[Vector3]
26.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
27.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
28.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
29.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
30.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
31.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
32.  def midpoint(p1: Vector3, p2: Vector3): Vector3

    Find the center between two points.

    Find the center between two points.

    p1

      the first point

    p2

      the second point

    returns

      the point that is the mean position directly between the first point and the second point

33.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
34.  def neg(v: Vector3): Vector3

    Calculate the negation of this vector, the same vector in the antiparallel direction.

    Calculate the negation of this vector, the same vector in the antiparallel direction.

    v

      the original vector

    returns

      the negation of the original vector

35.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
36.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
37.  def relativeUp(orient: Vector3, up: Vector3): Vector3

    Given a `Vector3` element composed of Euler angles and a `Vector3` element in the vector direction of "up", find a standard unit vector that points in the direction of the entity's "up" after rotating by the Euler angles.

    Given a `Vector3` element composed of Euler angles and a `Vector3` element in the vector direction of "up", find a standard unit vector that points in the direction of the entity's "up" after rotating by the Euler angles. Compass direction rules apply for the z-axis (North is 0 degrees, East is 90 degrees, etc.).

    orient

      three Euler angles representing rotation

    up

      a mathematical vector representing "up"

    returns

      a mathematical vector representing a relative "up" direction

    See also

      `Vector3.Rx(Float)`

      `Vector3.Ry(Float)`

      `Vector3.Rz(Float)`

38.  def relativeUp(orient: Vector3): Vector3

    Given a `Vector3` element composed of Euler angles, find a standard unit vector that points in the direction of "up" after rotating by the Euler angles.

    Given a `Vector3` element composed of Euler angles, find a standard unit vector that points in the direction of "up" after rotating by the Euler angles. Compass direction rules apply (North is 0 degrees, East is 90 degrees, etc.).

    orient

      three Euler angles representing rotation

    returns

      a mathematical vector representing a relative "up" direction

    See also

      `Vector3.relativeUp(Vector3, Vector3)`

39.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
40.  def toString(): String
    Definition Classes
      AnyRef → Any
41.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
42.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
43.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()
44.  def z(value: Float): Vector3

    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 AnyRef

### Inherited from Any

### Ungrouped