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 do not specify any BoundingBox, the drawable will not be culled.
DebugBoundingbox
Gets or sets a value indicating whether the bounding box is drawn.
Declaration
public bool DebugBoundingbox { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsCullingEnabled
Gets or sets a value indicating whether 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 mesh.
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 |
Transform
Gets or sets the Transform component associated with the owner entity.
Declaration
[BindComponent(true, false, BindComponentSource.Owner, null, true)]
public Transform3D Transform { get; set; }
Property Value
Type | Description |
---|---|
Transform3D |
Methods
BaseDraw(DrawContext)
Allows performing custom drawing.
Declaration
public void BaseDraw(DrawContext drawContext)
Parameters
Type | Name | Description |
---|---|---|
DrawContext | drawContext | The draw context. |
Draw(DrawContext)
Allows 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 in 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 everything is OK. |
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()
Overrides
UpdatePreWorldMatrix()
Updated the Pre World Matrix with the Word Matrix value. This operation must happen in the end of the each frame.
Declaration
public virtual void UpdatePreWorldMatrix()