API ReferenceSandbox
ModelRendererclass
Renders a model in the world
Constructors1
Showing 1 constructors
public ModelRenderer()
No results match this filter.
Methods16
Showing 16 methods
public void ClearMaterialOverrides()
Completely stop overriding materials
Returns:
void—public virtual void CopyFrom(Sandbox.Renderer other)
Copy everything from another renderer
| Parameter | Type | Description |
|---|---|---|
| other | Renderer | — |
Returns:
void—public virtual Sandbox.GameObject GetBoneObject(Sandbox.BoneCollection.Bone bone)
| Parameter | Type | Description |
|---|---|---|
| bone | Bone | — |
public virtual sealed Sandbox.Material GetMaterial(int triangle = -1)
| Parameter | Type | Description |
|---|---|---|
| triangle = -1 | int | — |
protected virtual void OnEnabled()
Returns:
void—protected virtual void OnRenderOptionsChanged()
Returns:
void—public virtual sealed void SetMaterial(Sandbox.Material material, int triangle = -1)
| Parameter | Type | Description |
|---|---|---|
| material | Material | — |
| triangle = -1 | int | — |
Returns:
void—public void SetMaterialOverride(Sandbox.Material material, string target)
Set a material override for a material with a specific attribute set. For example, if you have a model with lots of different materials, but one of them has an attribute "skin" set to "1", then calling this with a material and "skin" will override only that material.
| Parameter | Type | Description |
|---|---|---|
| material | Material | — |
| target | string | — |
Returns:
void—protected virtual void UpdateObject()
Returns:
void—No results match this filter.
Properties14
Showing 14 properties
public ulong Sandbox.ModelRenderer.BodyGroups { get; set; }
Returns:
ulong—public BBox Sandbox.ModelRenderer.Bounds { get; set; }
public bool Sandbox.ModelRenderer.CreateAttachments { get; set; }
Returns:
bool—public bool Sandbox.ModelRenderer.HasBodyGroups { get; set; }
Returns:
bool—public bool Sandbox.ModelRenderer.HasMaterialGroups { get; set; }
Returns:
bool—public BBox Sandbox.ModelRenderer.LocalBounds { get; set; }
public System.Nullable`1<int> Sandbox.ModelRenderer.LodOverride { get; set; }
Force a level of detail.
Returns:
Nullable<int>—public string Sandbox.ModelRenderer.MaterialGroup { get; set; }
Returns:
string—public Sandbox.Material Sandbox.ModelRenderer.MaterialOverride { get; set; }
public Sandbox.Engine.MaterialAccessor Sandbox.ModelRenderer.Materials { get; set; }
Access to the materials
public virtual sealed Sandbox.Model Sandbox.ModelRenderer.Model { get; set; }
public Sandbox.ModelRenderer.ShadowRenderType Sandbox.ModelRenderer.RenderType { get; set; }
public Sandbox.SceneObject Sandbox.ModelRenderer.SceneObject { get; set; }
public Color Sandbox.ModelRenderer.Tint { get; set; }
No results match this filter.