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 ​
ClusterCount ​
Gets the number of clusters, excluding any rows stored past them.
int ClusterCount { get; }Property Value ​
HasVisibilityData ​
Gets whether this holds visibility that can be queried.
bool HasVisibilityData { get; }Property Value ​
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 ​
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 ​
GetVisClustersForBox(Vector3, Vector3, Span<uint>) ​
Fills a bitfield with every cluster the given box overlaps.
void GetVisClustersForBox(Vector3 min, Vector3 max, Span<uint> clusterBits)Parameters ​
min Vector3
Minimum corner of the box.
max Vector3
Maximum corner of the box.
Destination bitfield, at least words long.
GetVisibilityRowForPoint(Vector3) ​
Gets the visibility row for the cluster at a point, empty when the point resolves to nothing.
ReadOnlyMemory<byte> GetVisibilityRowForPoint(Vector3 point)Parameters ​
point Vector3
World-space point.

