Table of Contents

Struct Sphere

Namespace
Vintagestory.API.MathTools
Assembly
VintagestoryAPI.dll

Not really a sphere, actually now an AABB centred on x,y,z, but we keep the name for API consistency

public struct Sphere
Inherited Members

Constructors

Sphere(float, float, float, float, float, float)

public Sphere(float x1, float y1, float z1, float dx, float dy, float dz)

Parameters

x1 float
y1 float
z1 float
dx float
dy float
dz float

Fields

radius

public float radius

Field Value

float

radiusY

public float radiusY

Field Value

float

radiusZ

public float radiusZ

Field Value

float

sqrt3half

public const float sqrt3half = 0.8660254

Field Value

float

x

public float x

Field Value

float

y

public float y

Field Value

float

z

public float z

Field Value

float

Methods

BoundingSphereForCube(float, float, float, float)

public static Sphere BoundingSphereForCube(float x, float y, float z, float size)

Parameters

x float
y float
z float
size float

Returns

Sphere