Class Billboard
Represents a 2D image. Such image is loaded from a content file (.wpk), which is generated from a main PNG or JPEG file format.
Inheritance
Implements
Inherited Members
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 can not be null.  | 
      
Fields
sampler
The billboard sampler.
Declaration
protected SamplerState sampler
  Field Value
| Type | Description | 
|---|---|
| SamplerState | 
texture
The billboard texture.
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. Such values are percentages where 1 means the 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. Such 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 such 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 all is OK.  | 
      
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()
  Overrides
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> |