Class MeshRenderer
Renders a mesh on the screen.
Inheritance
MeshRenderer
Implements
Inherited Members
Namespace: Evergine.Components.Graphics3D
Assembly: Evergine.Framework.dll
Syntax
public class MeshRenderer : Drawable3D, IDependencyObject
Fields
Materials
Materials used for rendering the MeshComponent.
Declaration
[BindComponent(true, true, BindComponentSource.Owner, null, true)]
public List<MaterialComponent> Materials
Field Value
Type | Description |
---|---|
List<MaterialComponent> |
MeshComponent
Renders the MeshComponent.
Declaration
[BindComponent(false, true, BindComponentSource.Owner, null, true)]
public MeshComponent MeshComponent
Field Value
Type | Description |
---|---|
MeshComponent |
renderMeshes
The rendered meshes.
Declaration
protected RenderMeshInfo[] renderMeshes
Field Value
Type | Description |
---|---|
RenderMeshInfo[] |
Methods
DestroyMeshes()
Destroys the current meshes array.
Declaration
protected void DestroyMeshes()
Draw(DrawContext)
Draws the model.
Declaration
public override void Draw(DrawContext drawContext)
Parameters
Type | Name | Description |
---|---|---|
DrawContext | drawContext | The drawing context. |
Overrides
OnActivated()
Invoked when the object is activated once it is attached.
Declaration
protected override void OnActivated()
Overrides
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if everything is OK. |
Overrides
OnDeactivated()
Invoked when the object is deactivated.
Declaration
protected override void OnDeactivated()
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()
Overrides
RefreshMaterial(MaterialComponent)
Refreshes the material.
Declaration
protected void RefreshMaterial(MaterialComponent materialComponent)
Parameters
Type | Name | Description |
---|---|---|
MaterialComponent | materialComponent | Material component instance. |
RefreshMeshes()
Generates a new RenderMeshInfo collection.
Declaration
protected virtual void RefreshMeshes()