Table of Contents

Class Vec4f

Namespace
Vintagestory.API.MathTools
Assembly
VintagestoryAPI.dll
public class Vec4f
Inheritance
Vec4f
Inherited Members
Extension Methods

Constructors

Vec4f()

public Vec4f()

Vec4f(float, float, float, float)

public Vec4f(float x, float y, float z, float w)

Parameters

x float
y float
z float
w float

Fields

W

public float W

Field Value

float

X

public float X

Field Value

float

Y

public float Y

Field Value

float

Z

public float Z

Field Value

float

Properties

A

Synonum for W

public float A { get; set; }

Property Value

float

B

Synonum for Z

public float B { get; set; }

Property Value

float

G

Synonum for Y

public float G { get; set; }

Property Value

float

this[int]

Returns the n-th coordinate

public float this[int index] { get; set; }

Parameters

index int

Property Value

float

R

Synonum for X

public float R { get; set; }

Property Value

float

XYZ

public Vec3f XYZ { get; }

Property Value

Vec3f

Methods

Clone()

public Vec4f Clone()

Returns

Vec4f

LengthXYZ()

Returns the length of this vector

public float LengthXYZ()

Returns

float

Mul(Vec4f)

public Vec4f Mul(Vec4f vec)

Parameters

vec Vec4f

Returns

Vec4f

NormalizeXYZ()

Turns the vector into a unit vector with length 1, but only if length is non-zero

public Vec4f NormalizeXYZ()

Returns

Vec4f

Set(float, float, float, float)

public Vec4f Set(float x, float y, float z, float w)

Parameters

x float
y float
z float
w float

Returns

Vec4f

Set(float[])

public Vec4f Set(float[] vec)

Parameters

vec float[]

Returns

Vec4f

Set(Vec4f)

public Vec4f Set(Vec4f vec)

Parameters

vec Vec4f

Returns

Vec4f

Operators

operator +(Vec4f, float)

public static Vec4f operator +(Vec4f left, float right)

Parameters

left Vec4f
right float

Returns

Vec4f

operator +(Vec4f, Vec4f)

public static Vec4f operator +(Vec4f left, Vec4f right)

Parameters

left Vec4f
right Vec4f

Returns

Vec4f

operator +(Vec4f, Vec4i)

public static Vec4f operator +(Vec4f left, Vec4i right)

Parameters

left Vec4f
right Vec4i

Returns

Vec4f

operator /(Vec4f, float)

public static Vec4f operator /(Vec4f left, float right)

Parameters

left Vec4f
right float

Returns

Vec4f

operator *(float, Vec4f)

public static Vec4f operator *(float left, Vec4f right)

Parameters

left float
right Vec4f

Returns

Vec4f

operator *(Vec4f, float)

public static Vec4f operator *(Vec4f left, float right)

Parameters

left Vec4f
right float

Returns

Vec4f

operator *(Vec4f, Vec4f)

public static double operator *(Vec4f left, Vec4f right)

Parameters

left Vec4f
right Vec4f

Returns

double

operator -(float, Vec4f)

public static Vec4f operator -(float left, Vec4f right)

Parameters

left float
right Vec4f

Returns

Vec4f

operator -(Vec4f, float)

public static Vec4f operator -(Vec4f left, float right)

Parameters

left Vec4f
right float

Returns

Vec4f

operator -(Vec4f, Vec4f)

public static Vec4f operator -(Vec4f left, Vec4f right)

Parameters

left Vec4f
right Vec4f

Returns

Vec4f