C# Класс Axiom.Core.BillboardSet

A collection of billboards (faces which are always facing the camera) with the same (default) dimensions, material and which are fairly close proximity to each other.
Billboards are rectangles made up of 2 tris which are always facing the camera. They are typically used for special effects like particles. This class collects together a set of billboards with the same (default) dimensions, material and relative locality in order to process them more efficiently. The entire set of billboards will be culled as a whole (by default, although this can be changed if you want a large set of billboards which are spread out and you want them culled individually), individual Billboards have locations which are relative to the set (which itself derives it's position from the SceneNode it is attached to since it is a SceneObject), they will be rendered as a single rendering operation, and some calculations will be sped up by the fact that they use the same dimensions so some workings can be reused.

A BillboardSet can be created using the SceneManager.CreateBillboardSet method. They can also be used internally by other classes to create effects.

Наследование: Axiom.Core.MovableObject, IRenderable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
aab Axiom.Math.AxisAlignedBox
accurateFacing bool
activeBillboards List
allDefaultRotation bool
allDefaultSize bool
autoExtendPool bool
billboardPool List
billboardType BillboardType
boundingRadius float
camPos Vector3
camQ Axiom.Math.Quaternion
camX Vector3
colorIndex int
commonDirection Vector3
commonUpVector Vector3
cullIndividual bool
currentCamera Camera
customParams List
defaultParticleHeight float
defaultParticleWidth float
fixedTextureCoords bool
freeBillboards List
indexData Axiom.Graphics.IndexData
leftOff float
lockPtr System.IntPtr
mainBuffer Axiom.Graphics.HardwareVertexBuffer
material Axiom.Graphics.Material
materialName string
numVisibleBillboards int
originType BillboardOrigin
pointRendering bool
posIndex int
ptrOffset int
rotationType BillboardRotationType
sphere Axiom.Math.Sphere
texIndex int
vOffset Vector3[]
vertexData Axiom.Graphics.VertexData
world Axiom.Math.Matrix4[]
worldSpace bool

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

Метод Описание
Clear ( ) : void

Empties all of the active billboards from this set.

CreateBillboard ( Vector3 position ) : Billboard

Overloaded method.

CreateBillboard ( Vector3 position, ColorEx color ) : Billboard

Creates a new billboard and adds it to this set.

UpdateBounds ( ) : void

Update the bounds of the BillboardSet.

Защищенные методы

Метод Описание
GenerateBillboardAxes ( Vector3 &x, Vector3 &y ) : void

Overloaded method.

GenerateBillboardAxes ( Vector3 &x, Vector3 &y, Billboard bb ) : void

Generates billboard corners.

Billboard param only required for type OrientedSelf

GenerateVertexOffsets ( float left, float right, float top, float bottom, float width, float height, Vector3 &x, Vector3 &y, Vector3 destVec ) : void

Generates vertex offsets.

Takes in parametric offsets as generated from GetParametericOffsets, width and height values and billboard x and y axes as generated from GenerateBillboardAxes. Fills output array of 4 vectors with vector offsets from origin for left-top, right-top, left-bottom, right-bottom corners.

GenerateVertices ( Vector3 offsets, Billboard bb ) : void
GetBillboard ( int index ) : Billboard
GetParametricOffsets ( float &left, float &right, float &top, float &bottom ) : void

Generate parametric offsets based on the origin.

IncreasePool ( int size ) : void

Internal method for increasing pool size.

IsBillboardVisible ( Camera camera, Billboard billboard ) : bool

Determines whether the supplied billboard is visible in the camera or not.

NotifyBillboardResized ( ) : void

Callback used by Billboards to notify their parent that they have been resized.

NotifyBillboardRotated ( ) : void

Callback used by Billboards to notify their parent that they have been resized.

NotifyBillboardTextureCoordsModified ( ) : void

Notifies the billboardset that texture coordinates will be modified for this set.

RemoveBillboard ( Billboard bill ) : void
RemoveBillboard ( int index ) : void
SetBounds ( AxisAlignedBox box, float radius ) : void
SetTextureStacksAndSlices ( int stacks, int slices ) : void
dispose ( bool disposeManagedResources ) : void

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

Метод Описание
BeginBillboards ( ) : void

Generate the vertices for all the billboards relative to the camera Also take the opportunity to update the vertex colours May as well do it here to save on loops elsewhere

BillboardSet ( string name, int poolSize ) : System

Public constructor. Should not be created manually, must be created using a SceneManager.

BillboardSet ( string name, int poolSize, bool externalData ) : System

Public constructor. Should not be created manually, must be created using a SceneManager.

CreateBuffers ( ) : void

Allocate / reallocate vertex data Note that we allocate enough space for ALL the billboards in the pool, but only issue rendering operations for the sections relating to the active billboards

DestroyBuffers ( ) : void
EndBillboards ( ) : void
IndexData ( ) : System
InjectBillboard ( Billboard bb ) : void
VertexData ( ) : System

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

Clear() публичный метод

Empties all of the active billboards from this set.
public Clear ( ) : void
Результат void

CreateBillboard() публичный метод

Overloaded method.
public CreateBillboard ( Vector3 position ) : Billboard
position Vector3
Результат Billboard

CreateBillboard() публичный метод

Creates a new billboard and adds it to this set.
public CreateBillboard ( Vector3 position, ColorEx color ) : Billboard
position Vector3
color ColorEx
Результат Billboard

GenerateBillboardAxes() защищенный метод

Overloaded method.
protected GenerateBillboardAxes ( Vector3 &x, Vector3 &y ) : void
x Vector3
y Vector3
Результат void

GenerateBillboardAxes() защищенный метод

Generates billboard corners.
Billboard param only required for type OrientedSelf
protected GenerateBillboardAxes ( Vector3 &x, Vector3 &y, Billboard bb ) : void
x Vector3
y Vector3
bb Billboard
Результат void

GenerateVertexOffsets() защищенный метод

Generates vertex offsets.
Takes in parametric offsets as generated from GetParametericOffsets, width and height values and billboard x and y axes as generated from GenerateBillboardAxes. Fills output array of 4 vectors with vector offsets from origin for left-top, right-top, left-bottom, right-bottom corners.
protected GenerateVertexOffsets ( float left, float right, float top, float bottom, float width, float height, Vector3 &x, Vector3 &y, Vector3 destVec ) : void
left float
right float
top float
bottom float
width float
height float
x Vector3
y Vector3
destVec Vector3
Результат void

GenerateVertices() защищенный метод

protected GenerateVertices ( Vector3 offsets, Billboard bb ) : void
offsets Vector3
bb Billboard
Результат void

GetBillboard() защищенный метод

protected GetBillboard ( int index ) : Billboard
index int
Результат Billboard

GetParametricOffsets() защищенный метод

Generate parametric offsets based on the origin.
protected GetParametricOffsets ( float &left, float &right, float &top, float &bottom ) : void
left float
right float
top float
bottom float
Результат void

IncreasePool() защищенный метод

Internal method for increasing pool size.
protected IncreasePool ( int size ) : void
size int
Результат void

IsBillboardVisible() защищенный метод

Determines whether the supplied billboard is visible in the camera or not.
protected IsBillboardVisible ( Camera camera, Billboard billboard ) : bool
camera Camera
billboard Billboard
Результат bool

NotifyBillboardResized() защищенный метод

Callback used by Billboards to notify their parent that they have been resized.
protected NotifyBillboardResized ( ) : void
Результат void

NotifyBillboardRotated() защищенный метод

Callback used by Billboards to notify their parent that they have been resized.
protected NotifyBillboardRotated ( ) : void
Результат void

NotifyBillboardTextureCoordsModified() защищенный метод

Notifies the billboardset that texture coordinates will be modified for this set.
protected NotifyBillboardTextureCoordsModified ( ) : void
Результат void

RemoveBillboard() защищенный метод

protected RemoveBillboard ( Billboard bill ) : void
bill Billboard
Результат void

RemoveBillboard() защищенный метод

protected RemoveBillboard ( int index ) : void
index int
Результат void

SetBounds() защищенный метод

protected SetBounds ( AxisAlignedBox box, float radius ) : void
box Axiom.Math.AxisAlignedBox
radius float
Результат void

SetTextureStacksAndSlices() защищенный метод

protected SetTextureStacksAndSlices ( int stacks, int slices ) : void
stacks int
slices int
Результат void

UpdateBounds() публичный метод

Update the bounds of the BillboardSet.
public UpdateBounds ( ) : void
Результат void

dispose() защищенный метод

protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
Результат void

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

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

Bounds of all billboards in this set
protected AxisAlignedBox,Axiom.Math aab
Результат Axiom.Math.AxisAlignedBox

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

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

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

protected List activeBillboards
Результат List

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

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

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

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

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

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

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

protected List billboardPool
Результат List

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

Type of billboard to render.
protected BillboardType billboardType
Результат BillboardType

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

The local bounding radius of this object.
protected float boundingRadius
Результат float

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

protected Vector3 camPos
Результат Vector3

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

protected Quaternion,Axiom.Math camQ
Результат Axiom.Math.Quaternion

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

protected Vector3 camX
Результат Vector3

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

protected int colorIndex
Результат int

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

Common direction for billboard oriented with type Common.
protected Vector3 commonDirection
Результат Vector3

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

Common up vector for billboard oriented with type Perpendicular.
protected Vector3 commonUpVector
Результат Vector3

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

Indicates whether or not each billboard should be culled individually.
protected bool cullIndividual
Результат bool

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

protected Camera,Axiom.Core currentCamera
Результат Camera

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

protected List customParams
Результат List

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

protected float defaultParticleHeight
Результат float

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

Default width/height of each billboard.
protected float defaultParticleWidth
Результат float

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

Are tex coords fixed? If not they have been modified.
protected bool fixedTextureCoords
Результат bool

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

protected List freeBillboards
Результат List

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

protected IndexData,Axiom.Graphics indexData
Результат Axiom.Graphics.IndexData

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

protected float leftOff
Результат float

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

protected IntPtr,System lockPtr
Результат System.IntPtr

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

protected HardwareVertexBuffer,Axiom.Graphics mainBuffer
Результат Axiom.Graphics.HardwareVertexBuffer

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

Reference to the material to use
protected Material,Axiom.Graphics material
Результат Axiom.Graphics.Material

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

Name of the material to use
protected string materialName
Результат string

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

protected int numVisibleBillboards
Результат int

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

Origin of each billboard
protected BillboardOrigin originType
Результат BillboardOrigin

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

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

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

protected int posIndex
Результат int

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

protected int ptrOffset
Результат int

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

protected BillboardRotationType rotationType
Результат BillboardRotationType

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

protected Sphere,Axiom.Math sphere
Результат Axiom.Math.Sphere

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

protected int texIndex
Результат int

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

protected Vector3[] vOffset
Результат Vector3[]

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

protected VertexData,Axiom.Graphics vertexData
Результат Axiom.Graphics.VertexData

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

protected Matrix4[],Axiom.Math world
Результат Axiom.Math.Matrix4[]

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

True if particles follow the object the ParticleSystem is attached to.
protected bool worldSpace
Результат bool