Otter  0.9.88
2d Game Development Framework based on SFML.Net
 All Classes Namespaces Functions Variables Enumerations Properties
Otter.Vector2 Struct Reference

Struct for representing a Vector2. More...

Inherits IEquatable< Vector2 >.

Public Member Functions

 Vector2 (float x, float y)
 
 Vector2 (float value)
 
override bool Equals (object obj)
 
bool Equals (Vector2 other)
 
override int GetHashCode ()
 
float LengthSquared ()
 
void Normalize ()
 
Vector2 Normalized ()
 
Vector2 Normalized (float value)
 
void Normalize (float value)
 
override string ToString ()
 

Static Public Member Functions

static Vector2 Add (Vector2 value1, Vector2 value2)
 
static void Add (ref Vector2 value1, ref Vector2 value2, out Vector2 result)
 
static Vector2 Barycentric (Vector2 value1, Vector2 value2, Vector2 value3, float amount1, float amount2)
 
static void Barycentric (ref Vector2 value1, ref Vector2 value2, ref Vector2 value3, float amount1, float amount2, out Vector2 result)
 
static Vector2 CatmullRom (Vector2 value1, Vector2 value2, Vector2 value3, Vector2 value4, float amount)
 
static void CatmullRom (ref Vector2 value1, ref Vector2 value2, ref Vector2 value3, ref Vector2 value4, float amount, out Vector2 result)
 
static Vector2 Clamp (Vector2 value1, Vector2 min, Vector2 max)
 
static void Clamp (ref Vector2 value1, ref Vector2 min, ref Vector2 max, out Vector2 result)
 
static float Distance (Vector2 value1, Vector2 value2)
 
static void Distance (ref Vector2 value1, ref Vector2 value2, out float result)
 
static float DistanceSquared (Vector2 value1, Vector2 value2)
 
static void DistanceSquared (ref Vector2 value1, ref Vector2 value2, out float result)
 
static Vector2 Divide (Vector2 value1, Vector2 value2)
 
static void Divide (ref Vector2 value1, ref Vector2 value2, out Vector2 result)
 
static Vector2 Divide (Vector2 value1, float divider)
 
static void Divide (ref Vector2 value1, float divider, out Vector2 result)
 
static float Dot (Vector2 value1, Vector2 value2)
 
static void Dot (ref Vector2 value1, ref Vector2 value2, out float result)
 
static Vector2 Reflect (Vector2 vector, Vector2 normal)
 
static void Reflect (ref Vector2 vector, ref Vector2 normal, out Vector2 result)
 
static Vector2 Hermite (Vector2 value1, Vector2 tangent1, Vector2 value2, Vector2 tangent2, float amount)
 
static void Hermite (ref Vector2 value1, ref Vector2 tangent1, ref Vector2 value2, ref Vector2 tangent2, float amount, out Vector2 result)
 
static Vector2 Lerp (Vector2 value1, Vector2 value2, float amount)
 
static void Lerp (ref Vector2 value1, ref Vector2 value2, float amount, out Vector2 result)
 
static Vector2 Max (Vector2 value1, Vector2 value2)
 
static void Max (ref Vector2 value1, ref Vector2 value2, out Vector2 result)
 
static Vector2 Min (Vector2 value1, Vector2 value2)
 
static void Min (ref Vector2 value1, ref Vector2 value2, out Vector2 result)
 
static Vector2 Multiply (Vector2 value1, Vector2 value2)
 
static Vector2 Multiply (Vector2 value1, float scaleFactor)
 
static void Multiply (ref Vector2 value1, float scaleFactor, out Vector2 result)
 
static void Multiply (ref Vector2 value1, ref Vector2 value2, out Vector2 result)
 
static Vector2 Negate (Vector2 value)
 
static void Negate (ref Vector2 value, out Vector2 result)
 
static Vector2 Normalize (Vector2 value)
 
static void Normalize (ref Vector2 value, out Vector2 result)
 
static Vector2 SmoothStep (Vector2 value1, Vector2 value2, float amount)
 
static void SmoothStep (ref Vector2 value1, ref Vector2 value2, float amount, out Vector2 result)
 
static Vector2 Subtract (Vector2 value1, Vector2 value2)
 
static void Subtract (ref Vector2 value1, ref Vector2 value2, out Vector2 result)
 
static Vector2 Transform (Vector2 position, Matrix matrix)
 
static void Transform (ref Vector2 position, ref Matrix matrix, out Vector2 result)
 
static Vector2 Transform (Vector2 position, Quaternion quat)
 
static void Transform (ref Vector2 position, ref Quaternion quat, out Vector2 result)
 
static void Transform (Vector2[] sourceArray, ref Matrix matrix, Vector2[] destinationArray)
 
static void Transform (Vector2[] sourceArray, int sourceIndex, ref Matrix matrix, Vector2[] destinationArray, int destinationIndex, int length)
 
static Vector2 TransformNormal (Vector2 normal, Matrix matrix)
 
static void TransformNormal (ref Vector2 normal, ref Matrix matrix, out Vector2 result)
 
static Vector2 operator- (Vector2 value)
 
static bool operator== (Vector2 value1, Vector2 value2)
 
static bool operator!= (Vector2 value1, Vector2 value2)
 
static Vector2 operator+ (Vector2 value1, Vector2 value2)
 
static Vector2 operator- (Vector2 value1, Vector2 value2)
 
static Vector2 operator* (Vector2 value1, Vector2 value2)
 
static Vector2 operator* (Vector2 value, float scaleFactor)
 
static Vector2 operator* (float scaleFactor, Vector2 value)
 
static Vector2 operator/ (Vector2 value1, Vector2 value2)
 
static Vector2 operator/ (Vector2 value1, float divider)
 

Public Attributes

float X
 
float Y
 

Properties

static Vector2 Zero [get]
 
static Vector2 One [get]
 
static Vector2 UnitX [get]
 
static Vector2 UnitY [get]
 
static Vector2 MaxValue [get]
 
float Length [get, set]
 

Detailed Description

Struct for representing a Vector2.


The documentation for this struct was generated from the following file: