Class ToolsMaterials
Namespace: ValveResourceFormat.IO
Assembly: ValveResourceFormat.dll
Hammer's tools materials, with the attributes that decide what their faces compile to, so their collision is known without the game that has them and compiled collision can be traced back to the material it came from.
public static class ToolsMaterialsInheritance
object ← ToolsMaterials
Fields
Nodraw
The material of faces that are not drawn, and of collision no other tools material is found for.
public const string Nodraw = "materials/tools/toolsnodraw.vmat"Field Value
string
Occluder
The material of occluders.
public const string Occluder = "materials/tools/toolsoccluder.vmat"Field Value
string
Trigger
The material volumes of entities are built from, unless their class applies another.
public const string Trigger = "materials/tools/toolstrigger.vmat"Field Value
string
Methods
GetCollision(string)
Gets the collision faces with a tools material compile to.
public static MaterialCollision? GetCollision(string material)Parameters
material string
The path of the material.
Returns
The collision, or null when it is not a tools material whose collision differs from that of other materials.
GetForCollision(KVObject, string?)
Gets the tools material whose faces compile to the given collision. Collision in the default group with no layers of its own is not traced back, as faces with any other material compile to it too.
public static string? GetForCollision(KVObject collisionAttributes, string? surfaceProperty = null)Parameters
collisionAttributes KVObject
Collision attributes of compiled physics, see PhysAggregateData.CollisionAttributes.
surfaceProperty string?
The surface property of the collision, which picks between materials that compile to the same attributes.
Returns
string?
The path of the material, or null when no tools material compiles to that collision.
GetForEntity(string?, IFileLoader)
Gets the tools material the volume of an entity is built from: the one its class applies, or ToolsMaterials.Trigger where it applies none.
public static string? GetForEntity(string? entityClassName, IFileLoader fileLoader)Parameters
entityClassName string?
The class of the entity.
fileLoader IFileLoader
The file loader of the map, which decides the game whose classes are used.
Returns
string?
The path of the material, or null when no class is given.

