C# Class MyGame.BillboardSystem

This class represent a Billboard System a group of 2D textures(pictures) that are always drawn facing the camera
Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Afficher le fichier Open project: mahmoudbahaa/XNA-Game-project Class Usage Examples

Méthodes publiques

Свойство Type Description
EnsureOcclusion bool
Mode BillboardMode

Méthodes publiques

Méthode Description
BillboardSystem ( Game game, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 billboardSize, Vector3 particlePositions ) : System

Constructor that initialize the billboard attributes

Draw ( GameTime gameTime ) : void

This method renders the current state.

drawBillboards ( ) : void
drawOpaquePixels ( ) : void
drawTransparentPixels ( ) : void
generateParticles ( Vector3 particlePositions ) : void

Generate the particles (vertex and index array) for each billboard

setEffectParameters ( ) : void

Set the billboard effect paramaters

Method Details

BillboardSystem() public méthode

Constructor that initialize the billboard attributes
public BillboardSystem ( Game game, Microsoft.Xna.Framework.Graphics.Texture2D texture, Vector2 billboardSize, Vector3 particlePositions ) : System
game Game Instance of MyGame this drawable game component is attached to
texture Microsoft.Xna.Framework.Graphics.Texture2D The Texture2D(2D picture) that is drawn at every position
billboardSize Vector2 Size of billboard
particlePositions Vector3 Positions of the billboards
Résultat System

Draw() public méthode

This method renders the current state.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime The elapsed game time.
Résultat void

drawBillboards() public méthode

public drawBillboards ( ) : void
Résultat void

drawOpaquePixels() public méthode

public drawOpaquePixels ( ) : void
Résultat void

drawTransparentPixels() public méthode

public drawTransparentPixels ( ) : void
Résultat void

generateParticles() public méthode

Generate the particles (vertex and index array) for each billboard
public generateParticles ( Vector3 particlePositions ) : void
particlePositions Vector3 Positions of the billboards
Résultat void

setEffectParameters() public méthode

Set the billboard effect paramaters
public setEffectParameters ( ) : void
Résultat void

Property Details

EnsureOcclusion public_oe property

public bool EnsureOcclusion
Résultat bool

Mode public_oe property

public BillboardMode Mode
Résultat BillboardMode