C# Класс SharpNav.Geometry.Vector3Extensions

A class that provides extension methods to fix discrepancies between Vector3 implementations.
Показать файл Открыть проект Примеры использования класса

Приватные методы

Метод Описание
AlmostEqual ( Microsoft.Xna.Framework.Vector3 &a, Microsoft.Xna.Framework.Vector3 &b ) : bool
AlmostEqual ( Microsoft.Xna.Framework.Vector3 &a, Microsoft.Xna.Framework.Vector3 &b, float threshold ) : bool
CalculateSlopeAngle ( Microsoft.Xna.Framework.Vector3 &vec, float &angle ) : void
ComponentMax ( Microsoft.Xna.Framework.Vector3 &left, Microsoft.Xna.Framework.Vector3 &right, Microsoft.Xna.Framework.Vector3 &result ) : void

Calculates the component-wise maximum of two vectors.

ComponentMin ( Microsoft.Xna.Framework.Vector3 &left, Microsoft.Xna.Framework.Vector3 &right, Microsoft.Xna.Framework.Vector3 &result ) : void

Calculates the component-wise minimum of two vectors.

Cross2D ( Microsoft.Xna.Framework.Vector3 p1, Microsoft.Xna.Framework.Vector3 p2, Microsoft.Xna.Framework.Vector3 p3 ) : float

Calculates the cross product of two vectors (formed from three points)

Cross2D ( Microsoft.Xna.Framework.Vector3 &p1, Microsoft.Xna.Framework.Vector3 &p2, Microsoft.Xna.Framework.Vector3 &p3, float &result ) : void

Calculates the cross product of two vectors (formed from three points)

Distance2D ( Microsoft.Xna.Framework.Vector3 a, Microsoft.Xna.Framework.Vector3 b ) : float

Calculates the distance between two points on the XZ plane.

Distance2D ( Microsoft.Xna.Framework.Vector3 &a, Microsoft.Xna.Framework.Vector3 &b, float &dist ) : void

Calculates the distance between two points on the XZ plane.

Dot2D ( Microsoft.Xna.Framework.Vector3 &left, Microsoft.Xna.Framework.Vector3 &right ) : float

Calculates the dot product of two vectors projected onto the XZ plane.

Dot2D ( Microsoft.Xna.Framework.Vector3 &left, Microsoft.Xna.Framework.Vector3 &right, float &result ) : void

Calculates the dot product of two vectors projected onto the XZ plane.

Length ( this v ) : float

Gets the length of a Vector3.

LengthSquared ( this v ) : float

Gets the squared length of a Vector3. This avoids the square root operation and is suitable for comparisons.

PerpDotXZ ( Microsoft.Xna.Framework.Vector3 &a, Microsoft.Xna.Framework.Vector3 &b, float &result ) : void

Calculates the perpendicular dot product of two vectors projected onto the XZ plane.