C# Class Axiom.Core.Billboard

A billboard is a primitive which always faces the camera in every frame.
Billboards can be used for special effects or some other trickery which requires the triangles to always facing the camera no matter where it is. The engine groups billboards into sets for efficiency, so you should never create a billboard on it's own (it's ok to have a set of one if you need it).

Billboards have their geometry generated every frame depending on where the camera is. It is most beneficial for all billboards in a set to be identically sized since the engine can take advantage of this and save some calculations - useful when you have sets of hundreds of billboards as is possible with special effects. You can deviate from this if you wish (example: a smoke effect would probably have smoke puffs expanding as they rise, so each billboard will legitimately have it's own size) but be aware the extra overhead this brings and try to avoid it if you can.

Billboards are just the mechanism for rendering a range of effects such as particles. It is other classes which use billboards to create their individual effects, so the methods here are quite generic.

Datei anzeigen Open project: WolfgangSt/axiom Class Usage Examples

Public Properties

Property Type Description
Color ColorEx
Direction Vector3
ParentSet BillboardSet
Position Vector3
rotationInRadians float

Protected Properties

Property Type Description
hasOwnDimensions bool
texcoordIndex short
texcoordRect RectangleF
useTexcoordRect bool

Public Methods

Method Description
Billboard ( ) : System

Default constructor.

Billboard ( Vector3 position, BillboardSet owner ) : System

Billboard ( Vector3 position, BillboardSet owner, ColorEx color ) : System

ResetDimensions ( ) : void

Resets this billboard to use the parent BillboardSet's dimensions instead of it's own.

SetDimensions ( float width, float height ) : void

Sets the width and height for this billboard.

Private Methods

Method Description
NotifyOwner ( BillboardSet owner ) : void

Internal method for notifying a billboard of it's owner.

Method Details

Billboard() public method

Default constructor.
public Billboard ( ) : System
return System

Billboard() public method

public Billboard ( Vector3 position, BillboardSet owner ) : System
position Vector3
owner BillboardSet
return System

Billboard() public method

public Billboard ( Vector3 position, BillboardSet owner, ColorEx color ) : System
position Vector3
owner BillboardSet
color ColorEx
return System

ResetDimensions() public method

Resets this billboard to use the parent BillboardSet's dimensions instead of it's own.
public ResetDimensions ( ) : void
return void

SetDimensions() public method

Sets the width and height for this billboard.
public SetDimensions ( float width, float height ) : void
width float Width of the billboard.
height float Height of the billboard.
return void

Property Details

Color public_oe property

public ColorEx,Axiom.Core Color
return ColorEx

Direction public_oe property

public Vector3 Direction
return Vector3

ParentSet public_oe property

public BillboardSet,Axiom.Core ParentSet
return BillboardSet

Position public_oe property

public Vector3 Position
return Vector3

hasOwnDimensions protected_oe property

protected bool hasOwnDimensions
return bool

rotationInRadians public_oe property

Needed for particle systems
public float rotationInRadians
return float

texcoordIndex protected_oe property

protected short texcoordIndex
return short

texcoordRect protected_oe property

protected RectangleF,Axiom.Core texcoordRect
return RectangleF

useTexcoordRect protected_oe property

protected bool useTexcoordRect
return bool