C# Класс 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.

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Color ColorEx
Direction Vector3
ParentSet BillboardSet
Position Vector3
rotationInRadians float

Защищенные свойства (Protected)

Свойство Тип Описание
hasOwnDimensions bool
texcoordIndex short
texcoordRect RectangleF
useTexcoordRect bool

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
NotifyOwner ( BillboardSet owner ) : void

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

Описание методов

Billboard() публичный Метод

Default constructor.
public Billboard ( ) : System
Результат System

Billboard() публичный Метод

public Billboard ( Vector3 position, BillboardSet owner ) : System
position Vector3
owner BillboardSet
Результат System

Billboard() публичный Метод

public Billboard ( Vector3 position, BillboardSet owner, ColorEx color ) : System
position Vector3
owner BillboardSet
color ColorEx
Результат System

ResetDimensions() публичный Метод

Resets this billboard to use the parent BillboardSet's dimensions instead of it's own.
public ResetDimensions ( ) : void
Результат void

SetDimensions() публичный Метод

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.
Результат void

Описание свойств

Color публичное свойство

public ColorEx,Axiom.Core Color
Результат ColorEx

Direction публичное свойство

public Vector3 Direction
Результат Vector3

ParentSet публичное свойство

public BillboardSet,Axiom.Core ParentSet
Результат BillboardSet

Position публичное свойство

public Vector3 Position
Результат Vector3

hasOwnDimensions защищенное свойство

protected bool hasOwnDimensions
Результат bool

rotationInRadians публичное свойство

Needed for particle systems
public float rotationInRadians
Результат float

texcoordIndex защищенное свойство

protected short texcoordIndex
Результат short

texcoordRect защищенное свойство

protected RectangleF,Axiom.Core texcoordRect
Результат RectangleF

useTexcoordRect защищенное свойство

protected bool useTexcoordRect
Результат bool