Struct Hull ​
Namespace: ValveResourceFormat.ResourceTypes.RubikonPhysics.Shapes
Assembly: ValveResourceFormat.dll
Represents a convex hull shape.
public readonly struct HullConstructors ​
Hull(KVObject) ​
Initializes a new instance of the Hull struct.
public Hull(KVObject data)Parameters ​
data KVObject
Properties ​
Centroid ​
Gets the centroid of the hull.
public Vector3 Centroid { get; }Property Value ​
Data ​
Gets the raw data.
public KVObject Data { get; }Property Value ​
KVObject
Flags ​
Gets the hull flags.
public uint Flags { get; }Property Value ​
uint
MassProperties ​
Gets the mass properties: a 3x3 inertia tensor in the upper-left block, with the mass-centre offset in the 4th column.
public Matrix4x4 MassProperties { get; }Property Value ​
Max ​
Gets the maximum bounds.
public Vector3 Max { get; }Property Value ​
MaxAngularRadius ​
Angular radius for CCD
public float MaxAngularRadius { get; }Property Value ​
float
Min ​
Gets the minimum bounds.
public Vector3 Min { get; }Property Value ​
OrthographicAreas ​
Fraction 0..1 of coverage along YZ,ZX,XY sides of AABB
public Vector3 OrthographicAreas { get; }Property Value ​
RegionSVM ​
Gets the region SVM data.
public Hull.Region? RegionSVM { get; }Property Value ​
SurfaceArea ​
Gets the surface area of the hull. Zero on older compiled hulls.
public float SurfaceArea { get; }Property Value ​
float
Volume ​
Gets the volume of the hull.
public float Volume { get; }Property Value ​
float
Methods ​
GetEdges() ​
Hull half edges order such that each edge e is followed by its twin e' (e1, e1', e2, e2', ...)
public ReadOnlySpan<Hull.HalfEdge> GetEdges()Returns ​
GetFaceTriangles(ReadOnlySpan<HalfEdge>, Face) ​
Triangulates one face as a fan from the first vertex of its edge loop, returning vertex index triples.
public static Hull.FaceTriangleEnumerable GetFaceTriangles(ReadOnlySpan<Hull.HalfEdge> edges, Hull.Face face)Parameters ​
edges ReadOnlySpan<Hull.HalfEdge>
The hull's half edges, from Hull.GetEdges().
The face to triangulate.
Returns ​
GetFaceVertices(ReadOnlySpan<HalfEdge>, Face) ​
Walks one face's edge loop and returns its vertex indices, in winding order. A face is a polygon of any size; see Hull.GetFaceTriangles(ReadOnlySpan<HalfEdge>, Face) for triangles.
public static Hull.FaceVertexEnumerable GetFaceVertices(ReadOnlySpan<Hull.HalfEdge> edges, Hull.Face face)Parameters ​
edges ReadOnlySpan<Hull.HalfEdge>
The hull's half edges, from Hull.GetEdges().
The face to walk.
Returns ​
GetFaces() ​
Hull faces.
public ReadOnlySpan<Hull.Face> GetFaces()Returns ​
GetPlanes() ​
Hull face planes with outward pointing normals (n1, -d1, n2, -d2, ...)
public ReadOnlySpan<Hull.Plane> GetPlanes()Returns ​
GetVertexPositions() ​
Hull vertex positions.
public ReadOnlySpan<Vector3> GetVertexPositions()Returns ​
GetVertices() ​
Hull vertex indices. Hulls can have up to 255 vertices.
public Span<byte> GetVertices()Returns ​
Span<byte>
Remarks ​
Empty for resources compiled before 2023-11-04.

