CVB.Net 15.0
Point3Df Struct Reference

Multi-purpose 3D float vector struct. More...

Inherits IEquatable< Point3Df >.

Public Member Functions

 Point3Df (float x, float y, float z)
 Constructor. More...
 
override bool Equals (object obj)
 Indicates whether this instance and the given obj are equal. More...
 
bool Equals (Point3Df obj)
 Indicates whether this instance and the given obj are equal. More...
 
override int GetHashCode ()
 Returns the hash code for this instance. More...
 
override string ToString ()
 String conversion. More...
 
Point3Df CrossProduct (Point3Df v2)
 Calculates the crossproduct of this vector and the given v2 . More...
 

Static Public Member Functions

static Point3Df operator+ (Point3Df lhs, Point3Df rhs)
 Addition operator. More...
 
static Point3Df operator- (Point3Df lhs, Point3Df rhs)
 Subtraction operator. More...
 
static float operator* (Point3Df lhs, Point3Df rhs)
 Multiplication operator. Gets the inner product of the given lhs and rhs . More...
 
static Point3Df operator* (float lhs, Point3Df rhs)
 Multiplication operator. More...
 
static Point3Df operator* (Point3Df lhs, float rhs)
 Multiplication operator. More...
 
static Point3Df operator/ (Point3Df lhs, float rhs)
 Division operator. More...
 
static Point3Df operator* (Matrix3D lhs, Point3Df rhs)
 Multiply a Matrix with a PointD rhs. More...
 
static Point3Df operator* (AffineMatrix3D m, Point3Df p)
 Transform a point using an affine matrix (= coordinate system). More...
 
static bool operator== (Point3Df lhs, Point3Df rhs)
 Equality comparison operator. More...
 
static bool operator!= (Point3Df lhs, Point3Df rhs)
 Inequality comparison operator. More...
 

Properties

float X [get, set]
 X-coordinate.
 
float Y [get, set]
 Y-coordinate.
 
float Z [get, set]
 Z-coordinate.
 
float this[int row] [get, set]
 Index access. More...
 
float Length [get]
 Gets the length of this point.
 

Detailed Description

Multi-purpose 3D float vector struct.

Constructor & Destructor Documentation

◆ Point3Df()

Point3Df ( float  x,
float  y,
float  z 
)

Constructor.

Parameters
xX-coordinate.
yY-Coordinate.
zZ-coordinate

Member Function Documentation

◆ CrossProduct()

Point3Df CrossProduct ( Point3Df  v2)

Calculates the crossproduct of this vector and the given v2 .

Parameters
v2Vector to build crossproduct with.
Returns
Crossproduct of this vector and v2 .

◆ Equals() [1/2]

override bool Equals ( object  obj)

Indicates whether this instance and the given obj are equal.

Parameters
objObject to compare to.
Returns
True if obj and this instance are the same type and represent the same value; otherwise, false.

◆ Equals() [2/2]

bool Equals ( Point3Df  obj)

Indicates whether this instance and the given obj are equal.

Parameters
objObject to compare to.
Returns
True if obj and this instance represent the same value; otherwise, false.

◆ GetHashCode()

override int GetHashCode ( )

Returns the hash code for this instance.

Returns
A 32-bit signed integer that is the hash code for this instance.

◆ operator!=()

static bool operator!= ( Point3Df  lhs,
Point3Df  rhs 
)
static

Inequality comparison operator.

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
True if lhs != rhs , otherwise false.

◆ operator*() [1/5]

static Point3Df operator* ( AffineMatrix3D  m,
Point3Df  p 
)
static

Transform a point using an affine matrix (= coordinate system).

Parameters
maffine matrix to transform with
ppoint to transform
Returns
Product of m and p .

◆ operator*() [2/5]

static Point3Df operator* ( float  lhs,
Point3Df  rhs 
)
static

Multiplication operator.

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
Product of lhs and rhs .

◆ operator*() [3/5]

static Point3Df operator* ( Matrix3D  lhs,
Point3Df  rhs 
)
static

Multiply a Matrix with a PointD rhs.

Parameters
lhsmatrix
rhsrhs
Returns
Product of lhs and rhs .

◆ operator*() [4/5]

static Point3Df operator* ( Point3Df  lhs,
float  rhs 
)
static

Multiplication operator.

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
Product of lhs and rhs .

◆ operator*() [5/5]

static float operator* ( Point3Df  lhs,
Point3Df  rhs 
)
static

Multiplication operator. Gets the inner product of the given lhs and rhs .

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
Inner product of lhs and rhs .

◆ operator+()

static Point3Df operator+ ( Point3Df  lhs,
Point3Df  rhs 
)
static

Addition operator.

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
Sum of lhs and rhs .

◆ operator-()

static Point3Df operator- ( Point3Df  lhs,
Point3Df  rhs 
)
static

Subtraction operator.

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
Difference of lhs and rhs .

◆ operator/()

static Point3Df operator/ ( Point3Df  lhs,
float  rhs 
)
static

Division operator.

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
Ratio of lhs and rhs .

◆ operator==()

static bool operator== ( Point3Df  lhs,
Point3Df  rhs 
)
static

Equality comparison operator.

Parameters
lhsLeft hand side operand.
rhsRight hand side operand.
Returns
True if lhs == rhs , otherwise false.

◆ ToString()

override string ToString ( )

String conversion.

Returns
string representation of this PointD

Property Documentation

◆ this[int row]

float this[int row]
getset

Index access.

Parameters
rowThe element to access (0 is X).
Returns