Table of Contents

Class FrustumCulling

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll
public class FrustumCulling
Inheritance
FrustumCulling
Inherited Members

Fields

ViewDistanceSq

public int ViewDistanceSq

Field Value

int

lod0BiasSq

public float lod0BiasSq

Field Value

float

lod2BiasSq

If distance squared is above this fraction of ViewDistanceSq, switch to LOD2. Default value corresponds to distances beyond around 67% of the player's view distance. At default, approximately 55% of the total rendered chunks will use LOD2.

public double lod2BiasSq

Field Value

double

shadowRangeX

public double shadowRangeX

Field Value

double

shadowRangeZ

public double shadowRangeZ

Field Value

double

Methods

CalcFrustumEquations(BlockPos, double[], double[])

public void CalcFrustumEquations(BlockPos playerPos, double[] projectionMatrix, double[] cameraMatrix)

Parameters

playerPos BlockPos
projectionMatrix double[]
cameraMatrix double[]

InFrustum(Sphere)

public bool InFrustum(Sphere sphere)

Parameters

sphere Sphere

Returns

bool

InFrustumAndRange(Sphere, bool, int)

public bool InFrustumAndRange(Sphere sphere, bool nowVisible, int lodLevel = 0)

Parameters

sphere Sphere
nowVisible bool
lodLevel int

Returns

bool

InFrustumShadowPass(Sphere)

public bool InFrustumShadowPass(Sphere sphere)

Parameters

sphere Sphere

Returns

bool

SphereInFrustum(double, double, double, double)

public bool SphereInFrustum(double x, double y, double z, double radius)

Parameters

x double
y double
z double
radius double

Returns

bool

UpdateViewDistance(int)

public void UpdateViewDistance(int newValue)

Parameters

newValue int