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 rendering the MeshComponent.
Declaration
[BindComponent(true, true, BindComponentSource.Owner, null, true)]
public List<MaterialComponent> Materials
Field Value
Type | Description |
---|---|
List<MaterialComponent> |
MeshComponent
MeshComponent to render.
Declaration
[BindComponent(false, true, BindComponentSource.Owner, null, true)]
public MeshComponent MeshComponent
Field Value
Type | Description |
---|---|
MeshComponent |
Transform
Transform of the MeshRenderer.
Declaration
[BindComponent(true, true, BindComponentSource.Owner, null, true)]
public Transform3D Transform
Field Value
Type | Description |
---|---|
Transform3D |
renderMeshes
The render meshes.
Declaration
protected RenderMeshInfo[] renderMeshes
Field Value
Type | Description |
---|---|
RenderMeshInfo[] |
Methods
DestroyMeshes()
Destroy 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 draw context. |
Overrides
OnActivated()
Invoked when the object is activated once 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 all 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)
Refresh 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()