Class TAdParticle

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TAdParticle = class(TAdPersistent)

Description

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.

Hierarchy

Overview

Methods

Public class function VerticesPerParticle: integer; virtual; abstract;
Public class function IndicesPerParticle: integer; virtual; abstract;
Public class function DrawMode: TAd2DDrawMode; virtual; abstract;
Public constructor Create(ASystem: TAdParticleSystem); virtual;
Public procedure Dead; virtual;
Public procedure SetupMovement(AX, AY: integer); virtual; abstract;
Public procedure Assign(APart: TAdParticle); virtual; abstract;
Public procedure Move(ATimeGap: double); virtual; abstract;
Public procedure StoreData(AData: PAdParticleData); virtual; abstract;
Public procedure StoreMinMax(AData: PAdParticleData); virtual; abstract;
Public function SaveToXML(ARoot: TAdSimpleXMLElems):TAdSimpleXMLElem; virtual;
Public procedure LoadFromXML(ARoot: TAdSimpleXMLElem); virtual;
Public procedure SaveToStream(AStream: TStream);
Public procedure LoadFromStream(AStream: TStream);
Public procedure SaveToFile(AFile: string);
Public procedure LoadFromFile(AFile: string);

Properties

Public property Deaded: boolean read FDeaded;

Description

Methods

Public class function VerticesPerParticle: integer; virtual; abstract;

Returns the amount of vertices that is needed for one particle.

Public class function IndicesPerParticle: integer; virtual; abstract;

Returns the amount of indices that is needed for one particle.

Public class function DrawMode: TAd2DDrawMode; virtual; abstract;

Returns the mode the particle system should be drawn in.

Public constructor Create(ASystem: TAdParticleSystem); virtual;

Creates an instance of TAdParticle.

Public procedure Dead; virtual;

Calling this procedure will mark the particle as "dead". The particle system will remove it as soon as possible.

Public procedure SetupMovement(AX, AY: integer); virtual; abstract;

Initializes the particle.

Public procedure Assign(APart: TAdParticle); virtual; abstract;

Copys the properties from the given particle.

Public procedure Move(ATimeGap: double); virtual; abstract;

Calculates the position of the particle. This step is done within the particle calculation thread.

Public procedure StoreData(AData: PAdParticleData); virtual; abstract;

Stores the vertex/index data in AData. This step is done within the particle calculation thread.

Public procedure StoreMinMax(AData: PAdParticleData); virtual; abstract;

Updates the particle system boundsrect.

Public function SaveToXML(ARoot: TAdSimpleXMLElems):TAdSimpleXMLElem; virtual;

Saves the particle data to a new xml node.

Public procedure LoadFromXML(ARoot: TAdSimpleXMLElem); virtual;

Loads the particle data from the given xml node.

Public procedure SaveToStream(AStream: TStream);

Saves the particle object to any desired stream.

Public procedure LoadFromStream(AStream: TStream);

Loads the particle object from any desired stream.

Public procedure SaveToFile(AFile: string);

Saves the particle object to a file.

Public procedure LoadFromFile(AFile: string);

Loads the particle object from a file.

Properties

Public property Deaded: boolean read FDeaded;

Returns whether the particle is marked as dead.

SourceForge.net Logo


Generated by PasDoc 0.11.0 on 2008-12-31 14:31:59