collapse_all
expand_all
collapse_allexpand_alldropdowndropdownHovercopycodecopycodeHighlight

collapse_all Collapse AllExpand All     dropdown Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++

[TCheckBoxFormControlObj]C#

[TCheckBoxFormControlObj]Visual Basic

[TCheckBoxFormControlObj]

Visual C++

DPSF API Documentation
DPSFDefaultSpriteParticleSystem
<

(Of

<
(<'Particle, Vertex>)>)>..::..UpdateParticleSystemToSortParticlesByDepth Method
gradient

Sorts the Particle System's Active Particles so that the Particles at the back (i.e. Position.Z = 1.0) are drawn before the Particles at the front (i.e. Position.Z = 0.0).

NOTE: This operation is very expensive and should only be used when you are using a Shader (i.e. Effect and Technique).

If you are not using a Shader and want the Particles sorted by Depth, use SpriteSortMode.BackToFront.

Merge Sort is the sorting algorithm used, as it tends to be best for linked lists. TODO - WHILE MERGE SORT SHOULD BE USED, DUE TO TIME CONSTRAINTS A (PROBABLY) SLOWER METHOD (QUICK-SORT) IS BEING USED INSTEAD. THIS FUNCTION NEEDS TO BE UPDATED TO USE MERGE SORT STILL. THE LINKED LIST MERGE SORT ALGORITHM CAN BE FOUND AT http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html

Namespace: DPSF

Assembly: DPSF (in DPSF.dll) Version: 2.5.0.0

collapse_allSyntax

C#

protected void UpdateParticleSystemToSortParticlesByDepth(

 float fElapsedTimeInSeconds

)

Visual Basic

Protected Sub UpdateParticleSystemToSortParticlesByDepth (

 fElapsedTimeInSeconds As Single

)

Visual C++

protected:

void UpdateParticleSystemToSortParticlesByDepth(

 float fElapsedTimeInSeconds

)

Parameters

fElapsedTimeInSeconds

Type: System..::..Single

How long it has been since the last update

collapse_allSee Also

DPSFDefaultSpriteParticleSystem<(Of <(<'Particle, Vertex>)>)> Class

DPSFDefaultSpriteParticleSystem<(Of <(<'Particle, Vertex>)>)> Members

DPSF Namespace

footer

Send comments on this topic to
Dan@DansKingdom.com