C# Class 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.

Inheritance: Axiom.Core.MovableObject, IRenderable
Afficher le fichier Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Свойство Type Description
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

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

Clear() public méthode

Empties all of the active billboards from this set.
public Clear ( ) : void
Résultat void

CreateBillboard() public méthode

Overloaded method.
public CreateBillboard ( Vector3 position ) : Billboard
position Vector3
Résultat Billboard

CreateBillboard() public méthode

Creates a new billboard and adds it to this set.
public CreateBillboard ( Vector3 position, ColorEx color ) : Billboard
position Vector3
color ColorEx
Résultat Billboard

GenerateBillboardAxes() protected méthode

Overloaded method.
protected GenerateBillboardAxes ( Vector3 &x, Vector3 &y ) : void
x Vector3
y Vector3
Résultat void

GenerateBillboardAxes() protected méthode

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
Résultat void

GenerateVertexOffsets() protected méthode

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
Résultat void

GenerateVertices() protected méthode

protected GenerateVertices ( Vector3 offsets, Billboard bb ) : void
offsets Vector3
bb Billboard
Résultat void

GetBillboard() protected méthode

protected GetBillboard ( int index ) : Billboard
index int
Résultat Billboard

GetParametricOffsets() protected méthode

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
Résultat void

IncreasePool() protected méthode

Internal method for increasing pool size.
protected IncreasePool ( int size ) : void
size int
Résultat void

IsBillboardVisible() protected méthode

Determines whether the supplied billboard is visible in the camera or not.
protected IsBillboardVisible ( Camera camera, Billboard billboard ) : bool
camera Camera
billboard Billboard
Résultat bool

NotifyBillboardResized() protected méthode

Callback used by Billboards to notify their parent that they have been resized.
protected NotifyBillboardResized ( ) : void
Résultat void

NotifyBillboardRotated() protected méthode

Callback used by Billboards to notify their parent that they have been resized.
protected NotifyBillboardRotated ( ) : void
Résultat void

NotifyBillboardTextureCoordsModified() protected méthode

Notifies the billboardset that texture coordinates will be modified for this set.
protected NotifyBillboardTextureCoordsModified ( ) : void
Résultat void

RemoveBillboard() protected méthode

protected RemoveBillboard ( Billboard bill ) : void
bill Billboard
Résultat void

RemoveBillboard() protected méthode

protected RemoveBillboard ( int index ) : void
index int
Résultat void

SetBounds() protected méthode

protected SetBounds ( AxisAlignedBox box, float radius ) : void
box Axiom.Math.AxisAlignedBox
radius float
Résultat void

SetTextureStacksAndSlices() protected méthode

protected SetTextureStacksAndSlices ( int stacks, int slices ) : void
stacks int
slices int
Résultat void

UpdateBounds() public méthode

Update the bounds of the BillboardSet.
public UpdateBounds ( ) : void
Résultat void

dispose() protected méthode

protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
Résultat void

Property Details

aab protected_oe property

Bounds of all billboards in this set
protected AxisAlignedBox,Axiom.Math aab
Résultat Axiom.Math.AxisAlignedBox

accurateFacing protected_oe property

protected bool accurateFacing
Résultat bool

activeBillboards protected_oe property

protected List activeBillboards
Résultat List

allDefaultRotation protected_oe property

protected bool allDefaultRotation
Résultat bool

allDefaultSize protected_oe property

protected bool allDefaultSize
Résultat bool

autoExtendPool protected_oe property

protected bool autoExtendPool
Résultat bool

billboardPool protected_oe property

protected List billboardPool
Résultat List

billboardType protected_oe property

Type of billboard to render.
protected BillboardType billboardType
Résultat BillboardType

boundingRadius protected_oe property

The local bounding radius of this object.
protected float boundingRadius
Résultat float

camPos protected_oe property

protected Vector3 camPos
Résultat Vector3

camQ protected_oe property

protected Quaternion,Axiom.Math camQ
Résultat Axiom.Math.Quaternion

camX protected_oe property

protected Vector3 camX
Résultat Vector3

colorIndex protected_oe property

protected int colorIndex
Résultat int

commonDirection protected_oe property

Common direction for billboard oriented with type Common.
protected Vector3 commonDirection
Résultat Vector3

commonUpVector protected_oe property

Common up vector for billboard oriented with type Perpendicular.
protected Vector3 commonUpVector
Résultat Vector3

cullIndividual protected_oe property

Indicates whether or not each billboard should be culled individually.
protected bool cullIndividual
Résultat bool

currentCamera protected_oe property

protected Camera,Axiom.Core currentCamera
Résultat Camera

customParams protected_oe property

protected List customParams
Résultat List

defaultParticleHeight protected_oe property

protected float defaultParticleHeight
Résultat float

defaultParticleWidth protected_oe property

Default width/height of each billboard.
protected float defaultParticleWidth
Résultat float

fixedTextureCoords protected_oe property

Are tex coords fixed? If not they have been modified.
protected bool fixedTextureCoords
Résultat bool

freeBillboards protected_oe property

protected List freeBillboards
Résultat List

indexData protected_oe property

protected IndexData,Axiom.Graphics indexData
Résultat Axiom.Graphics.IndexData

leftOff protected_oe property

protected float leftOff
Résultat float

lockPtr protected_oe property

protected IntPtr,System lockPtr
Résultat System.IntPtr

mainBuffer protected_oe property

protected HardwareVertexBuffer,Axiom.Graphics mainBuffer
Résultat Axiom.Graphics.HardwareVertexBuffer

material protected_oe property

Reference to the material to use
protected Material,Axiom.Graphics material
Résultat Axiom.Graphics.Material

materialName protected_oe property

Name of the material to use
protected string materialName
Résultat string

numVisibleBillboards protected_oe property

protected int numVisibleBillboards
Résultat int

originType protected_oe property

Origin of each billboard
protected BillboardOrigin originType
Résultat BillboardOrigin

pointRendering protected_oe property

protected bool pointRendering
Résultat bool

posIndex protected_oe property

protected int posIndex
Résultat int

ptrOffset protected_oe property

protected int ptrOffset
Résultat int

rotationType protected_oe property

protected BillboardRotationType rotationType
Résultat BillboardRotationType

sphere protected_oe property

protected Sphere,Axiom.Math sphere
Résultat Axiom.Math.Sphere

texIndex protected_oe property

protected int texIndex
Résultat int

vOffset protected_oe property

protected Vector3[] vOffset
Résultat Vector3[]

vertexData protected_oe property

protected VertexData,Axiom.Graphics vertexData
Résultat Axiom.Graphics.VertexData

world protected_oe property

protected Matrix4[],Axiom.Math world
Résultat Axiom.Math.Matrix4[]

worldSpace protected_oe property

True if particles follow the object the ParticleSystem is attached to.
protected bool worldSpace
Résultat bool