Search Results for

    Show / Hide Table of Contents

    Class Drawable

    Represents a Component that can be painted.

    Inheritance
    object
    IdentifiableObject
    DependencyObject
    AttachableObject
    PrefabInstanceObject
    Component
    Drawable
    Drawable3D
    Implements
    IDependencyObject
    Inherited Members
    Component.Owner
    Component.Managers
    Component.ShouldBeActivated
    Component.Clone()
    Component.Attach(Entity)
    Component.OnLoaded()
    Component.OnActivated()
    Component.Start()
    Component.OnDeactivated()
    Component.OnDestroy()
    PrefabInstanceObject.PrefabSource
    PrefabInstanceObject.RefreshPrefab(Prefab)
    PrefabInstanceObject.PrefabElementId
    PrefabInstanceObject.IsPrefabInstance
    PrefabInstanceObject.IsMissingPrefabSource
    AttachableObject.AttachableStateChanged
    AttachableObject.IsEnabled
    AttachableObject.State
    AttachableObject.IsLoaded
    AttachableObject.IsAttached
    AttachableObject.IsActivated
    AttachableObject.IsStarted
    AttachableObject.IsDestroyed
    AttachableObject.Destroy()
    AttachableObject.DependencyBroken()
    DependencyObject.Dependencies
    DependencyObject.OnDependencyRemoved
    IdentifiableObject.Id
    IdentifiableObject.IdHasChanged(Guid)
    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

    true if culling is enabled; otherwise, false.

    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 BaseRenderManager RenderManager { get; set; }
    Property Value
    Type Description
    BaseRenderManager

    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:

    • The entity passes the culling test.
    • The parent of the owner Entity of the Drawable cascades its visibility to its children and is visible.
    • The Drawable is active.
    • The owner Entity of the Drawable is active and visible.

    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
    Component.OnAttached()

    OnDetach()

    Invoked when the object is detached.

    Declaration
    protected override void OnDetach()
    Overrides
    Component.OnDetach()

    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()

    Implements

    IDependencyObject

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX