Class Drawable
Represents a Component that can be painted.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Framework
Assembly: Evergine.Framework.dll
Syntax
public abstract class Drawable : Component, IDependencyObject
Constructors
Drawable()
Initializes a new instance of the Drawable class.
Declaration
public Drawable()
Properties
BoundingBox
Gets or sets the drawable bounding box.
Declaration
public BoundingBox? BoundingBox { get; protected set; }
Property Value
Type | Description |
---|---|
BoundingBox? |
Remarks
It is used in the culling phase. If you not specify any BoundingBox, the drawable will not culled.
DebugBoundingbox
Gets or sets a value indicating whether the bounding box will be drawn.
Declaration
public bool DebugBoundingbox { get; set; }
Property Value
Type | Description |
---|---|
bool |
DrawableType
Gets the drawable type.
Declaration
public DrawableType DrawableType { get; }
Property Value
Type | Description |
---|---|
DrawableType |
IsCullingEnabled
Gets or sets a value indicating whether the culling is enabled.
Declaration
public bool IsCullingEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
|
OrderBias
Gets or sets the order bias of the material. This value is used to modify the rendering order of the meshes.
Declaration
[RenderPropertyAsInput(-512, 511, AsSlider = true, DesiredChange = 1, DesiredLargeChange = 5)]
public int OrderBias { get; set; }
Property Value
Type | Description |
---|---|
int |
RenderManager
Gets or sets the render manager.
Declaration
[BindSceneManager(false, true)]
public RenderManager RenderManager { get; set; }
Property Value
Type | Description |
---|---|
RenderManager |
Methods
BaseDraw(DrawContext)
Allows to perform custom drawing.
Declaration
public void BaseDraw(DrawContext drawContext)
Parameters
Type | Name | Description |
---|---|---|
DrawContext | drawContext | The draw context. |
Draw(DrawContext)
Allows to perform custom drawing.
Declaration
public abstract void Draw(DrawContext drawContext)
Parameters
Type | Name | Description |
---|---|---|
DrawContext | drawContext | The draw context. |
Remarks
This method will only be called if all the following points are true:
DrawDebugLines()
Helper method that draws debug lines.
Declaration
protected virtual void DrawDebugLines()
Remarks
This method will only work on debug mode and if RenderManager.DebugLines />
is set to true
.
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
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()