[This is preliminary documentation and is subject to change.]
Defines a three component vector.
Namespace: Rage
Assembly: RagePluginHook (in RagePluginHook.dll) Version: 0.0.0.0 (0.56.1131.11510)
Syntax
The Vector3 type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| Vector3(Single) |
Initializes a new instance of the Vector3 class.
| |
| Vector3(Vector2, Single) |
Initializes a new instance of the Vector3 class.
| |
| Vector3(Single, Single, Single) |
Initializes a new instance of the Vector3 class.
|
Properties
| Name | Description | |
|---|---|---|
| Item | ||
| RandomUnit |
Returns a unit vector pointing in a random direction on the X and Y axes.
| |
| RandomUnit2D |
Returns a unit vector pointing in a random direction on the X and Y axes.
| |
| RelativeBack |
Returns the relative Back vector. (0,-1,0)
| |
| RelativeBottom |
Returns the relative Bottom vector. (0,0,-1)
| |
| RelativeFront |
Returns the relative Front vector. (0,1,0)
| |
| RelativeLeft |
Returns the relative Left vector. (-1,0,0)
| |
| RelativeRight |
Returns the relative Right vector. (1,0,0)
| |
| RelativeTop |
Returns the relative Top vector. (0,0,1)
| |
| SizeInBytes |
Gets the size of the Vector3 type, in bytes.
| |
| UnitX |
Gets the X unit Vector3 (1, 0, 0).
| |
| UnitY |
Gets the Y unit Vector3 (0, 1, 0).
| |
| UnitZ |
Gets the Z unit Vector3 (0, 0, 1).
| |
| WorldDown |
Returns the world Down vector. (0,0,-1)
| |
| WorldEast |
Returns the world East vector. (1,0,0)
| |
| WorldNorth |
Returns the world North vector. (0,1,0)
| |
| WorldSouth |
Returns the world South vector. (0,-1,0)
| |
| WorldUp |
Returns the world Up vector. (0,0,1)
| |
| WorldWest |
Returns the world West vector. (-1,0,0)
| |
| Zero |
Gets a Vector3 with all of its components set to zero.
|
Methods
| Name | Description | |
|---|---|---|
| Add(Vector3, Vector3) |
Adds two vectors.
| |
| Add(Vector3, Vector3, Vector3) |
Adds two vectors.
| |
| Around(Single) |
Gets a position that's exactly the specified distance from this position.
| |
| Around(Single, Single) |
Gets a position that's between the specified minimum and maximum distances from this position.
| |
| Around2D(Single) |
Gets a position that's exactly the specified distance from this position, with the same value on the Z-axis as this position.
| |
| Around2D(Single, Single) |
Gets a position that's between the specified minimum and maximum distances from this position, with the same value on the Z-axis as this position.
| |
| Barycentric(Vector3, Vector3, Vector3, Single, Single) |
Returns a Vector3 containing the 3D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 3D triangle.
| |
| Barycentric(Vector3, Vector3, Vector3, Single, Single, Vector3) |
Returns a Vector3 containing the 3D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 3D triangle.
| |
| CatmullRom(Vector3, Vector3, Vector3, Vector3, Single) |
Performs a Catmull-Rom interpolation using the specified positions.
| |
| CatmullRom(Vector3, Vector3, Vector3, Vector3, Single, Vector3) |
Performs a Catmull-Rom interpolation using the specified positions.
| |
| Clamp(Vector3, Vector3, Vector3) |
Restricts a value to be within a specified range.
| |
| Clamp(Vector3, Vector3, Vector3, Vector3) |
Restricts a value to be within a specified range.
| |
| Cross(Vector3, Vector3) |
Calculates the cross product of two vectors.
| |
| Cross(Vector3, Vector3, Vector3) |
Calculates the cross product of two vectors.
| |
| Distance(Vector3, ISpatial) |
Calculates the distance between a vector and a ISpatial | |
| Distance(Vector3, Vector3) |
Calculates the distance between two vectors.
| |
| Distance2D(Vector3, ISpatial) |
Calculates the distance between a vector and a ISpatial, ignoring the Z-component.
| |
| Distance2D(Vector3, Vector3) |
Calculates the distance between two vectors, ignoring the Z-component.
| |
| DistanceSquared(Vector3, ISpatial) |
Calculates the distance between a vector and a ISpatial, ignoring the Z-component.
| |
| DistanceSquared(Vector3, Vector3) |
Calculates the squared distance between two vectors.
| |
| DistanceTo(ISpatial) | ||
| DistanceTo(Vector3) | ||
| DistanceTo2D(ISpatial) | ||
| DistanceTo2D(Vector3) | ||
| Divide(Vector3, Single) |
Scales a vector by the given value.
| |
| Divide(Vector3, Single, Vector3) |
Scales a vector by the given value.
| |
| Dot |
Calculates the dot product of two vectors.
| |
| Equals(Object) |
Returns a value that indicates whether the current instance is equal to a specified object.
(Overrides ValueTypeEquals(Object).) | |
| Equals(Vector3) |
Returns a value that indicates whether the current instance is equal to the specified object.
| |
| Equals(Vector3, Vector3) |
Determines whether the specified object instances are considered equal.
| |
| GetHashCode |
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.) | |
| Hermite(Vector3, Vector3, Vector3, Vector3, Single) |
Performs a Hermite spline interpolation.
| |
| Hermite(Vector3, Vector3, Vector3, Vector3, Single, Vector3) |
Performs a Hermite spline interpolation.
| |
| Length |
Calculates the length of the vector.
| |
| LengthSquared |
Calculates the squared length of the vector.
| |
| Lerp(Vector3, Vector3, Single) |
Performs a linear interpolation between two vectors.
| |
| Lerp(Vector3, Vector3, Single, Vector3) |
Performs a linear interpolation between two vectors.
| |
| Maximize(Vector3, Vector3) |
Returns a vector containing the largest components of the specified vectors.
| |
| Maximize(Vector3, Vector3, Vector3) |
Returns a vector containing the smallest components of the specified vectors.
| |
| Minimize(Vector3, Vector3) |
Returns a vector containing the smallest components of the specified vectors.
| |
| Minimize(Vector3, Vector3, Vector3) |
Returns a vector containing the smallest components of the specified vectors.
| |
| Modulate(Vector3, Vector3) |
Modulates a vector by another.
| |
| Modulate(Vector3, Vector3, Vector3) |
Modulates a vector by another.
| |
| Multiply(Vector3, Single) |
Scales a vector by the given value.
| |
| Multiply(Vector3, Single, Vector3) |
Scales a vector by the given value.
| |
| Negate(Vector3) |
Reverses the direction of a given vector.
| |
| Negate(Vector3, Vector3) |
Reverses the direction of a given vector.
| |
| Normalize |
Converts the vector into a unit vector.
| |
| Normalize(Vector3) |
Converts the vector into a unit vector.
| |
| Normalize(Vector3, Vector3) |
Converts the vector into a unit vector.
| |
| Project(Vector3, Single, Single, Single, Single, Single, Single, Matrix) |
Projects a 3D vector from object space into screen space.
| |
| Project(Vector3, Single, Single, Single, Single, Single, Single, Matrix, Vector3) |
Projects a 3D vector from object space into screen space.
| |
| ProjectOnTo |
Gets a new vector representing this vector projected onto the target vector.
| |
| Reflect(Vector3, Vector3) |
Returns the reflection of a vector off a surface that has the specified normal.
| |
| Reflect(Vector3, Vector3, Vector3) |
Returns the reflection of a vector off a surface that has the specified normal.
| |
| SmoothStep(Vector3, Vector3, Single) |
Performs a cubic interpolation between two vectors.
| |
| SmoothStep(Vector3, Vector3, Single, Vector3) |
Performs a cubic interpolation between two vectors.
| |
| Subtract(Vector3, Vector3) |
Subtracts two vectors.
| |
| Subtract(Vector3, Vector3, Vector3) |
Subtracts two vectors.
| |
| ToNormalized | ||
| ToQuaternion | ||
| ToRotator | ||
| ToString |
Converts the value of the object to its equivalent string representation.
(Overrides ValueTypeToString.) | |
| Transform(Vector3, Matrix) |
Transforms a 3D vector by the given Matrix.
| |
| Transform(Vector3, Quaternion) |
Transforms a 3D vector by the given Quaternion rotation.
| |
| Transform(Vector3, Matrix) |
Transforms an array of 3D vectors by the given Matrix.
| |
| Transform(Vector3, Quaternion) |
Transforms an array of 3D vectors by the given Quaternion rotation.
| |
| Transform(Vector3, Matrix, Vector4) |
Transforms a 3D vector by the given Matrix.
| |
| Transform(Vector3, Quaternion, Vector4) |
Transforms a 3D vector by the given Quaternion rotation.
| |
| Transform(Vector3, Matrix, Vector4) |
Transforms an array of 3D vectors by the given Matrix.
| |
| Transform(Vector3*, Matrix*, Vector4*, Int32) |
Transforms an array of 3D vectors by the given Matrix.
| |
| Transform(Vector3, Matrix, Vector4, Int32, Int32) |
Transforms an array of 3D vectors by the given Matrix.
| |
| Transform(Vector3*, Int32, Matrix*, Vector4*, Int32, Int32) |
Transforms an array of 3D vectors by the given Matrix.
| |
| TransformCoordinate(Vector3, Matrix) |
Performs a coordinate transformation using the given Matrix.
| |
| TransformCoordinate(Vector3, Matrix) |
Performs a coordinate transformation using the given Matrix.
| |
| TransformCoordinate(Vector3, Matrix, Vector3) |
Performs a coordinate transformation using the given Matrix.
| |
| TransformCoordinate(Vector3, Matrix, Vector3) |
Performs a coordinate transformation using the given Matrix.
| |
| TransformCoordinate(Vector3*, Matrix*, Vector3*, Int32) |
Performs a coordinate transformation using the given Matrix.
| |
| TransformCoordinate(Vector3, Matrix, Vector3, Int32, Int32) |
Performs a coordinate transformation using the given Matrix.
| |
| TransformCoordinate(Vector3*, Int32, Matrix*, Vector3*, Int32, Int32) |
Performs a coordinate transformation using the given Matrix.
| |
| TransformNormal(Vector3, Matrix) |
Performs a normal transformation using the given Matrix.
| |
| TransformNormal(Vector3, Matrix) |
Performs a normal transformation using the given Matrix.
| |
| TransformNormal(Vector3, Matrix, Vector3) |
Performs a normal transformation using the given Matrix.
| |
| TransformNormal(Vector3, Matrix, Vector3) |
Performs a normal transformation using the given Matrix.
| |
| TransformNormal(Vector3*, Matrix*, Vector3*, Int32) |
Performs a normal transformation using the given Matrix.
| |
| TransformNormal(Vector3, Matrix, Vector3, Int32, Int32) |
Performs a normal transformation using the given Matrix.
| |
| TransformNormal(Vector3*, Int32, Matrix*, Vector3*, Int32, Int32) |
Performs a normal transformation using the given Matrix.
| |
| TravelDistance(Vector3, ISpatial) | ||
| TravelDistance(Vector3, Vector3) | ||
| TravelDistanceTo(ISpatial) | ||
| TravelDistanceTo(Vector3) | ||
| Unproject(Vector3, Single, Single, Single, Single, Single, Single, Matrix) |
Projects a 3D vector from screen space into object space.
| |
| Unproject(Vector3, Single, Single, Single, Single, Single, Single, Matrix, Vector3) |
Projects a 3D vector from screen space into object space.
|
Operators
| Name | Description | |
|---|---|---|
| Addition |
Adds two vectors.
| |
| Division |
Scales a vector by the given value.
| |
| Equality |
Tests for equality between two objects.
| |
| Inequality |
Tests for inequality between two objects.
| |
| Multiply(Single, Vector3) |
Scales a vector by the given value.
| |
| Multiply(Vector3, Single) |
Scales a vector by the given value.
| |
| Subtraction |
Subtracts two vectors.
| |
| UnaryNegation |
Reverses the direction of a given vector.
|
Fields
| Name | Description | |
|---|---|---|
| X |
Gets or sets the X component of the vector.
| |
| Y |
Gets or sets the Y component of the vector.
| |
| Z |
Gets or sets the Z component of the vector.
|
See Also