C# Class Ensage.Common.Extensions.SharpDX.Vector3Extensions

SharpDX/Vector3 Extensions
Afficher le fichier Open project: EnsageSharp/Ensage.Common

Méthodes publiques

Méthode Description
AngleBetween ( this vector3, System.Vector2 toVector2 ) : float

Returns the angle between two vectors.

AngleBetween ( this vector3, System.Vector3 toVector3 ) : float

Returns the angle between two vectors.

AngleBetween ( this vector3, System.Vector4 toVector4 ) : float

Returns the angle between two vectors.

Closest ( this vector3, IEnumerable array ) : System.Vector2

Seeks for the closest Vector2 to the extended Vector3.

Closest ( this vector3, IEnumerable array ) : System.Vector3

Seeks for the closest Vector3 to the extended Vector3.

Closest ( this vector3, IEnumerable array ) : System.Vector4

Seeks for the closest Vector4 to the extended Vector3.

Distance ( this vector3, System.Vector2 toVector2 ) : float

Calculates the distance between the extended Vector3 and a Vector3.

Distance ( this vector3, System.Vector3 toVector3 ) : float

Calculates the distance between the extended Vector3 and a Vector3.

Distance ( this vector3, System.Vector4 toVector4 ) : float

Calculates the distance between the extended Vector3 and a Vector4.

DistanceSquared ( this vector3, System.Vector2 toVector2 ) : float

Calculates the squared distance between two vectors.

DistanceSquared ( this vector3, System.Vector3 toVector3 ) : float

Calculates the squared distance between two vectors.

DistanceSquared ( this vector3, System.Vector4 toVector4 ) : float

Calculates the squared distance between two vectors.

Extend ( this vector3, System.Vector2 toVector2, float distance ) : System.Vector3

Extends a Vector3 to a Vector2.

Extend ( this vector3, System.Vector3 toVector3, float distance ) : System.Vector3

Extends a Vector3 to another Vector3.

Extend ( this vector3, System.Vector4 toVector4, float distance ) : System.Vector3

Extends a Vector3 to a Vector4.

GetPathLength ( this path ) : float

Gets the total distance of a list of vectors.

IsOnScreen ( this vector3 ) : bool

Returns if the Vector3 is on the screen.

IsOrthogonal ( System.Vector3 vector3, System.Vector2 toVector2 ) : bool

Returns if the angle is orthogonal.

IsOrthogonal ( System.Vector3 vector3, System.Vector3 toVector3 ) : bool

Returns if the angle is orthogonal.

IsOrthogonal ( System.Vector3 vector3, System.Vector4 toVector4 ) : bool

Returns if the angle is orthogonal.

IsUnderTurret ( this position, bool enemyTurretsOnly ) : bool

Returns whether the given position is under a turret

IsValid ( this vector3 ) : bool

Checks for if the extended Vector3 is valid.

IsWall ( this vector3 ) : bool

Returns if the Vector3 position is a wall.

Magnitude ( this vector3 ) : float

Returns the calculated magnitude of the given Vector3.

Normalized ( this vector3 ) : System.Vector3

Normalizes a Vector3.

PathLength ( this path ) : float

Returns the total distance of a path.

Perpendicular ( this vector3, int offset ) : System.Vector3

Returns the Perpendicular Vector3 to the Extended Vector3.

Polar ( this vector3 ) : float

Returns the polar for vector angle (in Degrees).

ProjectOn ( this point, System.Vector3 segmentStart, System.Vector3 segmentEnd ) : ProjectionInfo

Converts the points to 2D, then returns the projection of the Vector2 on the segment.

Rotated ( this vector3, float angle ) : System.Vector3

Rotates the Vector3 to a set angle.

SetZ ( this v, float value = null ) : System.Vector3

Returns the modified Vector3 with a quick changed Z-axis value.

ToVector2 ( this path ) : List

Transforms an extended Vector3 List into a Vector2 List.

ToVector2 ( this vector3 ) : System.Vector2

Transforms an extended Vector3 into a Vector2.

ToVector4 ( this path ) : List

Transforms an extended Vector3 List into a Vector4 List.

ToVector4 ( this vector3, float w = 1f ) : System.Vector4

Transforms an extended Vector3 into a Vector4.

Method Details

AngleBetween() public static méthode

Returns the angle between two vectors.
public static AngleBetween ( this vector3, System.Vector2 toVector2 ) : float
vector3 this Extended SharpDX Vector3
toVector2 System.Vector2 SharpDX Vector2
Résultat float

AngleBetween() public static méthode

Returns the angle between two vectors.
public static AngleBetween ( this vector3, System.Vector3 toVector3 ) : float
vector3 this Extended SharpDX Vector3
toVector3 System.Vector3 SharpDX Vector3
Résultat float

AngleBetween() public static méthode

Returns the angle between two vectors.
public static AngleBetween ( this vector3, System.Vector4 toVector4 ) : float
vector3 this Extended SharpDX Vector3
toVector4 System.Vector4 SharpDX Vector4
Résultat float

Closest() public static méthode

Seeks for the closest Vector2 to the extended Vector3.
public static Closest ( this vector3, IEnumerable array ) : System.Vector2
vector3 this Extended SharpDX Vector3
array IEnumerable Vector2 Collection
Résultat System.Vector2

Closest() public static méthode

Seeks for the closest Vector3 to the extended Vector3.
public static Closest ( this vector3, IEnumerable array ) : System.Vector3
vector3 this Extended SharpDX Vector3
array IEnumerable Vector3 Collection
Résultat System.Vector3

Closest() public static méthode

Seeks for the closest Vector4 to the extended Vector3.
public static Closest ( this vector3, IEnumerable array ) : System.Vector4
vector3 this Extended SharpDX Vector3
array IEnumerable Vector4 Collection
Résultat System.Vector4

Distance() public static méthode

Calculates the distance between the extended Vector3 and a Vector3.
public static Distance ( this vector3, System.Vector2 toVector2 ) : float
vector3 this SharpDX Vector3 (From)
toVector2 System.Vector2 SharpDX Vector2 (To)
Résultat float

Distance() public static méthode

Calculates the distance between the extended Vector3 and a Vector3.
public static Distance ( this vector3, System.Vector3 toVector3 ) : float
vector3 this SharpDX Vector3 (From)
toVector3 System.Vector3 SharpDX Vector3 (To)
Résultat float

Distance() public static méthode

Calculates the distance between the extended Vector3 and a Vector4.
public static Distance ( this vector3, System.Vector4 toVector4 ) : float
vector3 this SharpDX Vector3 (From)
toVector4 System.Vector4 SharpDX Vector4 (To)
Résultat float

DistanceSquared() public static méthode

Calculates the squared distance between two vectors.
public static DistanceSquared ( this vector3, System.Vector2 toVector2 ) : float
vector3 this Extended SharpDX Vector3
toVector2 System.Vector2 SharpDX Vector2
Résultat float

DistanceSquared() public static méthode

Calculates the squared distance between two vectors.
public static DistanceSquared ( this vector3, System.Vector3 toVector3 ) : float
vector3 this Extended SharpDX Vector3
toVector3 System.Vector3 SharpDX Vector3
Résultat float

DistanceSquared() public static méthode

Calculates the squared distance between two vectors.
public static DistanceSquared ( this vector3, System.Vector4 toVector4 ) : float
vector3 this Extended SharpDX Vector3
toVector4 System.Vector4 SharpDX Vector4
Résultat float

Extend() public static méthode

Extends a Vector3 to a Vector2.
public static Extend ( this vector3, System.Vector2 toVector2, float distance ) : System.Vector3
vector3 this Extended SharpDX Vector3 (From)
toVector2 System.Vector2 SharpDX Vector2 (To)
distance float Distance (float units)
Résultat System.Vector3

Extend() public static méthode

Extends a Vector3 to another Vector3.
public static Extend ( this vector3, System.Vector3 toVector3, float distance ) : System.Vector3
vector3 this Extended SharpDX Vector3 (From)
toVector3 System.Vector3 SharpDX Vector3 (To)
distance float Distance (float units)
Résultat System.Vector3

Extend() public static méthode

Extends a Vector3 to a Vector4.
public static Extend ( this vector3, System.Vector4 toVector4, float distance ) : System.Vector3
vector3 this Extended SharpDX Vector3 (From)
toVector4 System.Vector4 SharpDX Vector4 (To)
distance float Distance (float units)
Résultat System.Vector3

GetPathLength() public static méthode

Gets the total distance of a list of vectors.
public static GetPathLength ( this path ) : float
path this The path
Résultat float

IsOnScreen() public static méthode

Returns if the Vector3 is on the screen.
public static IsOnScreen ( this vector3 ) : bool
vector3 this Extended SharpDX Vector3
Résultat bool

IsOrthogonal() public static méthode

Returns if the angle is orthogonal.
public static IsOrthogonal ( System.Vector3 vector3, System.Vector2 toVector2 ) : bool
vector3 System.Vector3 Extended SharpDX Vector3
toVector2 System.Vector2 SharpDX Vector2
Résultat bool

IsOrthogonal() public static méthode

Returns if the angle is orthogonal.
public static IsOrthogonal ( System.Vector3 vector3, System.Vector3 toVector3 ) : bool
vector3 System.Vector3 Extended SharpDX Vector3
toVector3 System.Vector3 SharpDX Vector3
Résultat bool

IsOrthogonal() public static méthode

Returns if the angle is orthogonal.
public static IsOrthogonal ( System.Vector3 vector3, System.Vector4 toVector4 ) : bool
vector3 System.Vector3 Extended SharpDX Vector3
toVector4 System.Vector4 SharpDX Vector2
Résultat bool

IsUnderTurret() public static méthode

Returns whether the given position is under a turret
public static IsUnderTurret ( this position, bool enemyTurretsOnly ) : bool
position this Extended SharpDX Vector3
enemyTurretsOnly bool Include Enemy Turret Only
Résultat bool

IsValid() public static méthode

Checks for if the extended Vector3 is valid.
public static IsValid ( this vector3 ) : bool
vector3 this /// SharpDX Vector3 ///
Résultat bool

IsWall() public static méthode

Returns if the Vector3 position is a wall.
public static IsWall ( this vector3 ) : bool
vector3 this Extended SharpDX Vector3
Résultat bool

Magnitude() public static méthode

Returns the calculated magnitude of the given Vector3.
public static Magnitude ( this vector3 ) : float
vector3 this Extended SharpDX Vector3
Résultat float

Normalized() public static méthode

Normalizes a Vector3.
public static Normalized ( this vector3 ) : System.Vector3
vector3 this SharpDX Vector3
Résultat System.Vector3

PathLength() public static méthode

Returns the total distance of a path.
public static PathLength ( this path ) : float
path this /// The path. ///
Résultat float

Perpendicular() public static méthode

Returns the Perpendicular Vector3 to the Extended Vector3.
public static Perpendicular ( this vector3, int offset ) : System.Vector3
vector3 this Extended SharpDX Vector3
offset int Axis Offset (0 = X, 1 = Y)
Résultat System.Vector3

Polar() public static méthode

Returns the polar for vector angle (in Degrees).
public static Polar ( this vector3 ) : float
vector3 this Extended SharpDX Vector2
Résultat float

ProjectOn() public static méthode

Converts the points to 2D, then returns the projection of the Vector2 on the segment.
public static ProjectOn ( this point, System.Vector3 segmentStart, System.Vector3 segmentEnd ) : ProjectionInfo
point this The point
segmentStart System.Vector3 Start of Segment
segmentEnd System.Vector3 End of Segment
Résultat ProjectionInfo

Rotated() public static méthode

Rotates the Vector3 to a set angle.
public static Rotated ( this vector3, float angle ) : System.Vector3
vector3 this Extended SharpDX Vector2
angle float Angle (in radians)
Résultat System.Vector3

SetZ() public static méthode

Returns the modified Vector3 with a quick changed Z-axis value.
public static SetZ ( this v, float value = null ) : System.Vector3
v this Extended SharpDX Vector3
value float Switched Z value in float-units
Résultat System.Vector3

ToVector2() public static méthode

Transforms an extended Vector3 List into a Vector2 List.
public static ToVector2 ( this path ) : List
path this /// The path. ///
Résultat List

ToVector2() public static méthode

Transforms an extended Vector3 into a Vector2.
public static ToVector2 ( this vector3 ) : System.Vector2
vector3 this SharpDX Vector3
Résultat System.Vector2

ToVector4() public static méthode

Transforms an extended Vector3 List into a Vector4 List.
public static ToVector4 ( this path ) : List
path this /// The path. ///
Résultat List

ToVector4() public static méthode

Transforms an extended Vector3 into a Vector4.
public static ToVector4 ( this vector3, float w = 1f ) : System.Vector4
vector3 this SharpDX Vector3
w float Float W-axis (default = 0f)
Résultat System.Vector4