Search Results for

    Show / Hide Table of Contents

    Class Billboard

    Represents a 2D image. This image is loaded from a content file (.wpk), which is generated from a primary PNG or JPEG file format.

    Inheritance
    object
    IdentifiableObject
    DependencyObject
    AttachableObject
    PrefabInstanceObject
    Component
    Billboard
    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.Components.Graphics3D
    Assembly: Evergine.Components.dll
    Syntax
    public class Billboard : Component, IDependencyObject

    Constructors

    Billboard()

    Initializes a new instance of the Billboard class based on a content file.

    Declaration
    public Billboard()

    Billboard(Texture)

    Initializes a new instance of the Billboard class based on a texture. See Texture for more information.

    Declaration
    public Billboard(Texture texture)
    Parameters
    Type Name Description
    Texture texture

    The texture.

    Exceptions
    Type Condition
    ArgumentException

    Texture cannot be null.

    Fields

    sampler

    The billboard sampler.

    Declaration
    protected SamplerState sampler
    Field Value
    Type Description
    SamplerState

    texture

    The texture of the billboard.

    Declaration
    protected Texture texture
    Field Value
    Type Description
    Texture

    Properties

    BillboardType

    Gets or sets the billboard look-at camera type.

    Declaration
    public BillboardType BillboardType { get; set; }
    Property Value
    Type Description
    BillboardType

    FlipMode

    Gets or sets the flip mode.

    Declaration
    public FlipMode FlipMode { get; set; }
    Property Value
    Type Description
    FlipMode

    Origin

    Gets or sets the Billboard Origin. The origin (also known as pivot) from where the entity scales, rotates, and translates. Its values are included in [0, 1], where (0, 0) indicates the top left corner. These values are percentages, where 1 means 100% of the rectangle's width/height.

    Declaration
    public Vector2 Origin { get; set; }
    Property Value
    Type Description
    Vector2

    Rotation

    Gets or sets the billboard rotation.

    Declaration
    public float Rotation { get; set; }
    Property Value
    Type Description
    float

    Sampler

    Gets or sets the sampler. See SamplerState for more information.

    Declaration
    public SamplerState Sampler { get; set; }
    Property Value
    Type Description
    SamplerState

    Texture

    Gets or sets the texture. This is the in-memory representation for the given asset. See Texture for more information.

    Declaration
    public Texture Texture { get; set; }
    Property Value
    Type Description
    Texture

    The texture.

    TintColor

    Gets or sets the tint color. Each pixel of the Billboard will be multiplied by this color during the drawing. By default, it is white.

    Declaration
    public Color TintColor { get; set; }
    Property Value
    Type Description
    Color

    The tint color.

    Methods

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

    Events

    SamplerChanged

    Event fired when this sprite sampler is changed.

    Declaration
    public event EventHandler<SamplerState> SamplerChanged
    Event Type
    Type Description
    EventHandler<SamplerState>

    TextureChanged

    Event fired when this sprite texture is changed

    Declaration
    public event EventHandler<Texture> TextureChanged
    Event Type
    Type Description
    EventHandler<Texture>

    Implements

    IDependencyObject

    Extension Methods

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