Interface IWorldVisibility ​
Namespace: ValveResourceFormat.Blocks
Assembly: ValveResourceFormat.dll
World VIS query.
public interface IWorldVisibilityProperties ​
ClusterBitfieldWordCount ​
Gets how many 32 bit words a cluster bitfield needs.
int ClusterBitfieldWordCount { get; }Property Value ​
int
ClusterCount ​
Gets the number of clusters, excluding any rows stored past them.
int ClusterCount { get; }Property Value ​
int
HasVisibilityData ​
Gets whether this holds visibility that can be queried.
bool HasVisibilityData { get; }Property Value ​
bool
MaxBounds ​
Gets the maximum bounds of the visibility volume.
Vector3 MaxBounds { get; }Property Value ​
MinBounds ​
Gets the minimum bounds of the visibility volume.
Vector3 MinBounds { get; }Property Value ​
SunVisibility ​
Gets the visibility row listing the clusters sunlight reaches, empty when the format has none.
ReadOnlyMemory<byte> SunVisibility { get; }Property Value ​
ReadOnlyMemory<byte>
Methods ​
BuildClusterChildBounds() ​
Builds the list of boxes making up each cluster, for debug drawing.
Dictionary<ushort, List<(Vector3 Min, Vector3 Max)>> BuildClusterChildBounds()Returns ​
Dictionary<ushort, List<(Vector3 Min, Vector3 Max)>>
GetClusterForPosition(Vector3) ​
Gets the cluster containing a point, or a value below zero when there is none.
int GetClusterForPosition(Vector3 position)Parameters ​
position Vector3
World-space point.
Returns ​
int
GetVisClustersForBox(Vector3, Vector3, Span<uint>) ​
Fills a bitfield with the clusters the given box belongs to, leaving it empty when the box only reaches solid space.
void GetVisClustersForBox(Vector3 min, Vector3 max, Span<uint> clusterBits)Parameters ​
min Vector3
Minimum corner of the box.
max Vector3
Maximum corner of the box.
clusterBits Span<uint>
Destination bitfield, at least IWorldVisibility.ClusterBitfieldWordCount words long.
GetVisibilityRowForPoint(Vector3) ​
Gets the visibility row seen from a point, or an empty row when there is none to cull with.
ReadOnlyMemory<byte> GetVisibilityRowForPoint(Vector3 point)Parameters ​
point Vector3
World-space point.
Returns ​
ReadOnlyMemory<byte>

