Class ModelHelper
Namespace: ValveResourceFormat.Renderer.Editor.Helpers
Assembly: Renderer.dll
The model an entity is drawn as: the one its class names, or the one its model key does. A class declares it as editormodel where the model only stands in for the entity in the editor. Words after the name of the model, or in its place, and the block the class declares it with change how it is drawn.
public class ModelHelper : EntityHelperInheritance
object ← EntityHelper ← ModelHelper
Inherited Members
EntityHelper.Owner, EntityHelper.Declaration, EntityHelper.IsVisual, EntityHelper.NeedsShowHelpers, EntityHelper.HiddenInGameObjectsOnly, EntityHelper.RequiresSelection, EntityHelper.IsStandIn, EntityHelper.IsToolShape, EntityHelper.ObjectBounds, EntityHelper.GetObjectBounds(in Matrix4x4), EntityHelper.VisibilityLayerName, EntityHelper.AddToScene(), EntityHelper.GetMetadataColor(string), EntityHelper.GetMetadataFlag(string, bool), EntityHelper.HasArgument(string), EntityHelper.GetColorArguments(int), EntityHelper.Link(), EntityHelper.GetStringKey(string), EntityHelper.GetFloatKey(string, float), EntityHelper.GetBooleanKey(string, bool), EntityHelper.GetIntegerKey(string, int), EntityHelper.GetVector2Key(string), EntityHelper.GetVector3Key(string, Vector3), EntityHelper.GetMetadata(string), EntityHelper.GetArgument(int)
Properties
HiddenInGameObjectsOnly
Gets whether the helper is hidden while only what the game shows is, unless its entity is selected.
public override bool HiddenInGameObjectsOnly { get; }Property Value
bool
IsEditorModel
Gets whether the model only stands in for the entity in the editor.
public bool IsEditorModel { get; }Property Value
bool
IsStandIn
Gets whether the helper stands in for its entity in the editor, rather than drawing what the game shows of it. The game draws an entity of a compiled map, so of its helpers these are what is drawn in its place.
public override bool IsStandIn { get; }Property Value
bool
Model
Gets the model, or null when the entity names none that loads.
public Model? Model { get; }Property Value
ModelBounds
Gets the bounds of the model in the space of the entity, or null before it is added.
public AABB? ModelBounds { get; }Property Value
AABB?
ModelNode
Gets the model as it is drawn, once it is in the scene.
public ModelSceneNode? ModelNode { get; }Property Value
ObjectBounds
Gets the bounds the helper adds to those of its entity in the world, which a selection is boxed by, or null where it adds none. Most helpers add none: a sphere or a line around an entity does not make the entity any larger. An entity none of whose helpers adds any is boxed at its origin.
public override AABB? ObjectBounds { get; }Property Value
AABB?
Methods
AddToScene()
Adds what the helper draws to the scene of the entity.
public override void AddToScene()GetDeclaredModelName(HelperDeclaration)
Gets the model a class names in the declaration of a model helper.
public static string? GetDeclaredModelName(HelperDeclaration declaration)Parameters
declaration HelperDeclaration
The helper as a class declares it.
Returns
string?
The name as it is declared, or null when the model is the one each entity names.
GetModelName(string)
Gets the model a class or an entity names, as a vmdl.
public static string GetModelName(string name)Parameters
name string
The name as it is declared.
Returns
string
The name of the model.
GetObjectBounds(in Matrix4x4)
Gets EntityHelper.ObjectBounds boxed in another space, where the helper knows them more tightly.
public override AABB? GetObjectBounds(in Matrix4x4 worldToSpace)Parameters
worldToSpace Matrix4x4
The transform from the world into the space.
Returns
AABB?
Link()
Finds the entities the helper names. Called once every entity of the map exists, and again whenever one of them changes.
public override void Link()
