Table of Contents

Class ShapeUtil

Namespace
Vintagestory.API.MathTools
Assembly
VintagestoryAPI.dll
public static class ShapeUtil
Inheritance
ShapeUtil
Inherited Members

Fields

maxShells

public static int maxShells

Field Value

int

Methods

GenCubicShellVectors(int)

public static Vec3i[] GenCubicShellVectors(int r)

Parameters

r int

Returns

Vec3i[]

GetCachedCubicShellNormalizedVectors(int)

public static Vec3f[] GetCachedCubicShellNormalizedVectors(int radius)

Parameters

radius int

Returns

Vec3f[]

GetHollowSquarePoints(int)

Returns a square outline of given radius (only for odd lengths)

public static Vec2i[] GetHollowSquarePoints(int halflength)

Parameters

halflength int

Returns

Vec2i[]

GetOctagonPoints(int, int, int)

public static Vec2i[] GetOctagonPoints(int x, int y, int r)

Parameters

x int
y int
r int

Returns

Vec2i[]

GetPointsOfCircle(int, int, int)

public static Vec2i[] GetPointsOfCircle(int xm, int ym, int r)

Parameters

xm int
ym int
r int

Returns

Vec2i[]

GetSquarePointsSortedByMDist(int)

Returns an array of vectors for each point in a square, sorted by manhatten distance to center, exluding the center point

public static Vec2i[] GetSquarePointsSortedByMDist(int halflength)

Parameters

halflength int

Returns

Vec2i[]

LoadOctagonIndices(ICollection<long>, int, int, int, int)

public static void LoadOctagonIndices(ICollection<long> list, int x, int y, int r, int mapSizeX)

Parameters

list ICollection<long>
x int
y int
r int
mapSizeX int