Class BaseModelEntity
Namespace: ValveResourceFormat.Renderer.Entities
Assembly: Renderer.dll
An entity with something to draw.
public abstract class BaseModelEntity : BaseEntityInheritance
object ← BaseEntity ← BaseModelEntity
Derived
AmbientEffectEntity, BaseToggle, BaseTrigger, FuncBreakable, FuncBrush, FuncRotating, FuncShatterglass, FuncTrackTrain, FuncWater, GenericModelEntity, NpcBossTier3, NpcVrCitizen, PostProcessingVolume, PropDynamic, XenFloraAnimatedMover
Inherited Members
BaseEntity.Scene, BaseEntity.RootNode, BaseEntity.Transform, BaseEntity.RigidTransform, BaseEntity.EntitySystem, BaseEntity.Data, BaseEntity.SpawnData, BaseEntity.NameFixup, BaseEntity.SpawnGroup, BaseEntity.KeyValues, BaseEntity.Classname, BaseEntity.TargetName, BaseEntity.SpawnFlags, BaseEntity.SpawnTransform, BaseEntity.Owner, BaseEntity.MoveParent, BaseEntity.EntityScale, BaseEntity.ModelName, BaseEntity.Origin, BaseEntity.Angles, BaseEntity.WorldOrigin, BaseEntity.WorldAngles, BaseEntity.Velocity, BaseEntity.AngularVelocity, BaseEntity.NextThink, BaseEntity.MoveDoneTime, BaseEntity.IsRemoved, BaseEntity.Collider, BaseEntity.IsSolid, BaseEntity.IsTrigger, BaseEntity.IsDrawn, BaseEntity.IsShown, BaseEntity.IsCollidable, BaseEntity.TouchingEntities, BaseEntity.CreateRootNode(), BaseEntity.CreateEditorNode(ObjectTypeFlags), BaseEntity.CreateEffect(string?, ParticleSnapshot?, bool), BaseEntity.HasSpawnFlags<TSpawnFlags>(TSpawnFlags), BaseEntity.Spawn(), BaseEntity.Activate(), BaseEntity.Think(), BaseEntity.RoundStart(), BaseEntity.MoveDone(), BaseEntity.TryGetTouchBounds(out Vector3, out Vector3), BaseEntity.AcceptsTouchFrom(BaseEntity), BaseEntity.OnStartTouch(BaseEntity), BaseEntity.OnTouch(BaseEntity), BaseEntity.OnEndTouch(BaseEntity), BaseEntity.ObjectCaps, BaseEntity.Use(BaseEntity?), BaseEntity.Teleport(Vector3, Vector3?), BaseEntity.JumpTo(Vector3, Vector3), BaseEntity.AcceptInput(string, EntityInputData), BaseEntity.InputKill(EntityInputData), BaseEntity.InputFireUser1(EntityInputData), BaseEntity.InputFireUser2(EntityInputData), BaseEntity.InputFireUser3(EntityInputData), BaseEntity.InputFireUser4(EntityInputData), BaseEntity.SetNextThink(float), BaseEntity.SetMoveDoneTime(float), BaseEntity.PhysicsSimulate(float), BaseEntity.TurnsByAngleComponents, BaseEntity.IsPusher, BaseEntity.IsUnblockableByPlayer, BaseEntity.MovesWithoutPushing, BaseEntity.PushesPlayerAsTrain, BaseEntity.HasVPhysicsSolid, BaseEntity.OnStartBlocked(BaseEntity), BaseEntity.OnBlocked(BaseEntity), BaseEntity.OnEndBlocked(), BaseEntity.GetSurfaceVelocity(Vector3), BaseEntity.TurnBody(Vector3, Vector3), BaseEntity.SetOriginAndAngles(Vector3, Vector3), BaseEntity.SetWorldOriginAndAngles(Vector3, Vector3), BaseEntity.AddNode(SceneNode, bool), BaseEntity.OnRemove(), BaseEntity.UpdateTransform(), BaseEntity.UpdateColliderTransform(), BaseEntity.UpdateRenderTransform(float), BaseEntity.SnapInterpolation(), BaseEntity.AngleMod(float)
Constructors
BaseModelEntity(EntitySystem, EntitySpawnInfo)
Initializes a model entity from its keyvalues.
protected BaseModelEntity(EntitySystem system, EntitySpawnInfo spawnInfo)Parameters
system EntitySystem
spawnInfo EntitySpawnInfo
Properties
BuildsCollider
Gets whether the model's physics becomes a BaseEntity.Collider; its hulls are drawn either way. Read during construction, so overrides must not depend on instance state.
protected virtual bool BuildsCollider { get; }Property Value
bool
LoadedModel
Gets the model this entity loaded, or null when it names none or it failed to load.
public Model? LoadedModel { get; }Property Value
ModelNode
Gets the node this entity draws as, or null when its model has no meshes, as with a brush compiled for collision alone.
public ModelSceneNode? ModelNode { get; }Property Value
Physics
Gets the physics of the model, or null when it has none.
public PhysAggregateData? Physics { get; }Property Value
Solid
Gets the solid type.
public BaseModelEntity.SolidType Solid { get; protected set; }Property Value
Methods
CreateRootNode()
Loads the model and makes it this entity's own node. Brush entities carry their geometry this way, in a model compiled next to the map.
protected override SceneNode? CreateRootNode()Returns
The model node, or the editor box from BaseEntity.CreateRootNode() when there is nothing to draw, so a collision-only entity can still be seen and picked.
InputAlpha(EntityInputData)
Sets the model's alpha from 0-255.
[EntityInput("Alpha")]
protected void InputAlpha(EntityInputData data)Parameters
data EntityInputData
InputColor(EntityInputData)
Tints the model with "R G B" in 0-255.
[EntityInput("Color")]
protected void InputColor(EntityInputData data)Parameters
data EntityInputData
InputLightingOrigin(EntityInputData)
Lights the model as if it stood at the named entity. The position is sampled once and does not follow it.
[EntityInput("LightingOrigin")]
protected void InputLightingOrigin(EntityInputData data)Parameters
data EntityInputData

