C# 클래스 MyGame.BillboardSystem

This class represent a Billboard System a group of 2D textures(pictures) that are always drawn facing the camera
상속: Microsoft.Xna.Framework.DrawableGameComponent
파일 보기 프로젝트 열기: mahmoudbahaa/XNA-Game-project 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
EnsureOcclusion bool
Mode BillboardMode

공개 메소드들

메소드 설명
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

메소드 상세

BillboardSystem() 공개 메소드

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
리턴 System

Draw() 공개 메소드

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

drawBillboards() 공개 메소드

public drawBillboards ( ) : void
리턴 void

drawOpaquePixels() 공개 메소드

public drawOpaquePixels ( ) : void
리턴 void

drawTransparentPixels() 공개 메소드

public drawTransparentPixels ( ) : void
리턴 void

generateParticles() 공개 메소드

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

setEffectParameters() 공개 메소드

Set the billboard effect paramaters
public setEffectParameters ( ) : void
리턴 void

프로퍼티 상세

EnsureOcclusion 공개적으로 프로퍼티

public bool EnsureOcclusion
리턴 bool

Mode 공개적으로 프로퍼티

public BillboardMode Mode
리턴 BillboardMode