Class BaseModelEntity
Namespace: ValveResourceFormat.Renderer.Entities
Assembly: Renderer.dll
An entity with something to draw, Source's CBaseModelEntity.
public abstract class BaseModelEntity : BaseEntityInheritance
object ← BaseEntity ← BaseModelEntity
Derived
AmbientEffectEntity, BaseToggle, BaseTrigger, FuncBreakable, FuncBrush, FuncRotating, GenericModelEntity, PostProcessingVolume, PropDynamic, XenFloraAnimatedMover
Inherited Members
BaseEntity.Scene, BaseEntity.RootNode, BaseEntity.Transform, BaseEntity.RigidTransform, BaseEntity.LayerName, BaseEntity.EntitySystem, BaseEntity.Data, BaseEntity.KeyValues, BaseEntity.Classname, BaseEntity.TargetName, BaseEntity.SpawnFlags, BaseEntity.ParentTransform, BaseEntity.Owner, BaseEntity.MoveParent, BaseEntity.EntityScale, BaseEntity.ModelName, BaseEntity.Origin, BaseEntity.Angles, BaseEntity.Velocity, BaseEntity.AngularVelocity, BaseEntity.NextThink, BaseEntity.MoveDoneTime, BaseEntity.IsRemoved, BaseEntity.Collider, BaseEntity.IsSolid, BaseEntity.IsTrigger, BaseEntity.IsDrawn, 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.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.IsPusher, BaseEntity.PusherForcesThrough, BaseEntity.GetSurfaceVelocity(Vector3), BaseEntity.TurnBody(Vector3, Vector3), BaseEntity.SetOriginAndAngles(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 . Its hulls are drawn either way. Read while the entity is constructed, so an override must not depend on its own state.
protected virtual bool BuildsCollider { get; }Property Value
ModelNode
Gets the node this entity draws as, or null when its model has no meshes. A brush compiled for collision alone is the usual reason.
public ModelSceneNode? ModelNode { 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. Source's SetModel, done for the entity rather than by it: deriving from this class is the statement that there is a model to set up. 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 when there is nothing to draw, so an entity compiled for collision alone 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

