Description | Hierarchy | Fields | Methods | Properties |
type TAdParticle = class(TAdPersistent)
The main, abstract particle class. TAdParticle has methods to save and load settings from/to XML and gives chlidren class the ability to create vertex/index data for drawing. Do not use TAdParticle directly.
![]() |
class function VerticesPerParticle: integer; virtual; abstract; |
![]() |
class function IndicesPerParticle: integer; virtual; abstract; |
![]() |
class function DrawMode: TAd2DDrawMode; virtual; abstract; |
![]() |
constructor Create(ASystem: TAdParticleSystem); virtual; |
![]() |
procedure Dead; virtual; |
![]() |
procedure SetupMovement(AX, AY: integer); virtual; abstract; |
![]() |
procedure Assign(APart: TAdParticle); virtual; abstract; |
![]() |
procedure Move(ATimeGap: double); virtual; abstract; |
![]() |
procedure StoreData(AData: PAdParticleData); virtual; abstract; |
![]() |
procedure StoreMinMax(AData: PAdParticleData); virtual; abstract; |
![]() |
function SaveToXML(ARoot: TAdSimpleXMLElems):TAdSimpleXMLElem; virtual; |
![]() |
procedure LoadFromXML(ARoot: TAdSimpleXMLElem); virtual; |
![]() |
procedure SaveToStream(AStream: TStream); |
![]() |
procedure LoadFromStream(AStream: TStream); |
![]() |
procedure SaveToFile(AFile: string); |
![]() |
procedure LoadFromFile(AFile: string); |
![]() |
property Deaded: boolean read FDeaded; |
![]() |
class function VerticesPerParticle: integer; virtual; abstract; |
Returns the amount of vertices that is needed for one particle. |
![]() |
class function IndicesPerParticle: integer; virtual; abstract; |
Returns the amount of indices that is needed for one particle. |
![]() |
class function DrawMode: TAd2DDrawMode; virtual; abstract; |
Returns the mode the particle system should be drawn in. |
![]() |
constructor Create(ASystem: TAdParticleSystem); virtual; |
Creates an instance of TAdParticle. |
![]() |
procedure Dead; virtual; |
Calling this procedure will mark the particle as "dead". The particle system will remove it as soon as possible. |
![]() |
procedure SetupMovement(AX, AY: integer); virtual; abstract; |
Initializes the particle. |
![]() |
procedure Assign(APart: TAdParticle); virtual; abstract; |
Copys the properties from the given particle. |
![]() |
procedure Move(ATimeGap: double); virtual; abstract; |
Calculates the position of the particle. This step is done within the particle calculation thread. |
![]() |
procedure StoreData(AData: PAdParticleData); virtual; abstract; |
Stores the vertex/index data in AData. This step is done within the particle calculation thread. |
![]() |
procedure StoreMinMax(AData: PAdParticleData); virtual; abstract; |
Updates the particle system boundsrect. |
![]() |
function SaveToXML(ARoot: TAdSimpleXMLElems):TAdSimpleXMLElem; virtual; |
Saves the particle data to a new xml node. |
![]() |
procedure LoadFromXML(ARoot: TAdSimpleXMLElem); virtual; |
Loads the particle data from the given xml node. |
![]() |
procedure SaveToStream(AStream: TStream); |
Saves the particle object to any desired stream. |
![]() |
procedure LoadFromStream(AStream: TStream); |
Loads the particle object from any desired stream. |
![]() |
procedure SaveToFile(AFile: string); |
Saves the particle object to a file. |
![]() |
procedure LoadFromFile(AFile: string); |
Loads the particle object from a file. |
![]() |
property Deaded: boolean read FDeaded; |
Returns whether the particle is marked as dead. |