Bexel Manager API Documentation
Bexel.Api.Vector3D Struct Reference

Represents a vector in 3-dimensional space. More...

Inheritance diagram for Bexel.Api.Vector3D:
IEquatable

Public Member Functions

override int GetHashCode ()
 
override bool Equals (object obj)
 
bool Equals (Vector3D other)
 
bool Equals (Vector3D other, float tolerance)
 Indicates if this vector is within tolerance of the given vector. More...
 
float GetLength ()
 Retrieves the length of the vector. More...
 
float GetLengthSquared ()
 Retrieves the squared length of the vector. More...
 
Vector3D Add (Vector3D other)
 Returns the sum of this vector and the given vector. More...
 
Vector3D Subtract (Vector3D other)
 Returns the difference between this vector and the given vector. More...
 
Vector3D CrossProduct (Vector3D other)
 Returns the cross product between this vector and the given vector. More...
 
float DotProduct (Vector3D other)
 Returns the dot product of this vector and the given vector. More...
 
Vector3D Scale (float scalar)
 Returns a copy of this vector scaled by the given scalar. More...
 
Vector3D Normalized ()
 Returns a normalized copy of this vector. More...
 
float DistanceTo (Vector3D other)
 Returns the distance between this vector and the given vector. More...
 

Static Public Member Functions

static Vector3D Create (float x, float y, float z)
 Creates a new instance of Bexel.Api.Vector3D. More...
 
static Vector3D operator- (Vector3D other)
 
static bool operator== (Vector3D v1, Vector3D v2)
 
static bool operator!= (Vector3D v1, Vector3D v2)
 
static Vector3D operator+ (Vector3D v1, Vector3D v2)
 
static Vector3D operator- (Vector3D v1, Vector3D v2)
 
static Vector3D operator* (Vector3D other, float scalar)
 
static Vector3D operator* (float scalar, Vector3D other)
 

Properties

static Vector3D XAxis = Vector3F.XAxis.ToVector3D() [get]
 Returns global X axis (1,0,0). More...
 
static Vector3D YAxis = Vector3F.YAxis.ToVector3D() [get]
 Returns global Y axis (0,1,0). More...
 
static Vector3D ZAxis = Vector3F.ZAxis.ToVector3D() [get]
 Returns global Z axis (0,0,1). More...
 
static Vector3D Zero = Vector3F.Zero.ToVector3D() [get]
 Returns zero vector (0,0,0). More...
 
float X [get]
 Returns the X coordinate of the vector. More...
 
float Y [get]
 Returns the Y coordinate of the vector. More...
 
float Z [get]
 Returns the Z coordinate of the vector. More...
 

Detailed Description

Represents a vector in 3-dimensional space.

Member Function Documentation

◆ Add()

Vector3D Bexel.Api.Vector3D.Add ( Vector3D  other)

Returns the sum of this vector and the given vector.

Parameters
otherThe vector with which the sum is computed.
Returns
The sum of this vector and the given vector.

◆ Create()

static Vector3D Bexel.Api.Vector3D.Create ( float  x,
float  y,
float  z 
)
static

Creates a new instance of Bexel.Api.Vector3D.

Parameters
xX coordinate of the vector.
yY coordinate of the vector.
zZ coordinate of the vector.
Returns
Newly created vector.

◆ CrossProduct()

Vector3D Bexel.Api.Vector3D.CrossProduct ( Vector3D  other)

Returns the cross product between this vector and the given vector.

Parameters
otherThe vector with which the cross product is computed.
Returns
The cross product of this vector and the given vector.

◆ DistanceTo()

float Bexel.Api.Vector3D.DistanceTo ( Vector3D  other)

Returns the distance between this vector and the given vector.

Parameters
otherThe vector to which the distance is computed.
Returns
The distance between this vector and the given vector.

◆ DotProduct()

float Bexel.Api.Vector3D.DotProduct ( Vector3D  other)

Returns the dot product of this vector and the given vector.

Parameters
otherThe vector with which the dot product is computed.
Returns
The dot product of this vector and the given vector.

◆ Equals()

bool Bexel.Api.Vector3D.Equals ( Vector3D  other,
float  tolerance 
)

Indicates if this vector is within tolerance of the given vector.

Parameters
otherThe vector with which this vector is compared for approximate equality.
toleranceThe allowed deviation between this vector and the given vector.
Returns
True if this vector is within tolerance of the given vector, False otherwise.

◆ GetLength()

float Bexel.Api.Vector3D.GetLength ( )

Retrieves the length of the vector.

Returns
The length of the vector.

◆ GetLengthSquared()

float Bexel.Api.Vector3D.GetLengthSquared ( )

Retrieves the squared length of the vector.

Returns
The squared length of the vector.

◆ Normalized()

Vector3D Bexel.Api.Vector3D.Normalized ( )

Returns a normalized copy of this vector.

Returns
A normalized copy of this vector.

◆ Scale()

Vector3D Bexel.Api.Vector3D.Scale ( float  scalar)

Returns a copy of this vector scaled by the given scalar.

Parameters
scalarThe scalar by which the returned vector is scaled.
Returns
A copy of this vector scaled by the given scalar.

◆ Subtract()

Vector3D Bexel.Api.Vector3D.Subtract ( Vector3D  other)

Returns the difference between this vector and the given vector.

Parameters
otherThe vector with which the difference is computed.
Returns
The difference of this vector and the given vector.

Property Documentation

◆ X

float Bexel.Api.Vector3D.X
get

Returns the X coordinate of the vector.

◆ XAxis

Vector3D Bexel.Api.Vector3D.XAxis = Vector3F.XAxis.ToVector3D()
staticget

Returns global X axis (1,0,0).

◆ Y

float Bexel.Api.Vector3D.Y
get

Returns the Y coordinate of the vector.

◆ YAxis

Vector3D Bexel.Api.Vector3D.YAxis = Vector3F.YAxis.ToVector3D()
staticget

Returns global Y axis (0,1,0).

◆ Z

float Bexel.Api.Vector3D.Z
get

Returns the Z coordinate of the vector.

◆ ZAxis

Vector3D Bexel.Api.Vector3D.ZAxis = Vector3F.ZAxis.ToVector3D()
staticget

Returns global Z axis (0,0,1).

◆ Zero

Vector3D Bexel.Api.Vector3D.Zero = Vector3F.Zero.ToVector3D()
staticget

Returns zero vector (0,0,0).