Gorilla.Particle.Emitter
Unit Gorilla.Particle.Emitter.pas
Remarks
For including particle effects like fire, smoke, explosion and so one, use TGorillaParticleEmitter. Every particle property is configurable.Classes
- TGorillaParticleEmitter = class ( TCustomMesh )
Records
- record TParticlePreset
- record TParticleVectorPreset
Enumerations
- enum TAllowedAxis = ( axX, axY, axZ ) ;
- enum TGorillaParticleBlending = ( pbAdditive, pbAlpha, pbMultiply ) ;
Constants
- const GORILLA_PARTICLE_TIME_DELTA : Integer = $3E8;
TParticlePreset
Fields
Methods
TParticleVectorPreset
TGorillaParticleEmitter
Basic particle emitter class.
Ancestors
Members
Fields
- private FCamera :
TCamera
- private FTimer :
TTimer
- private FFirstTick :
Int64
- private FLastTick :
Int64
- private FEmitting :
Boolean
- protected FReuse :
Boolean
- protected FAutoEmit :
Boolean
- protected FEmitParticles :
Integer
- protected FMaxParticles :
Integer
- protected FMaxAutoEmitTime :
Integer
- protected FParticlePosition :
TParticleVectorPreset
- protected FParticleVelocity :
TParticleVectorPreset
- protected FParticleSize :
TParticlePreset
- protected FParticleAngle :
TParticlePreset
- protected FParticleWeight :
TParticlePreset
- protected FParticleGrowth :
TParticlePreset
- protected FParticleLifeTime :
TParticlePreset
- protected FUnused :
TGorillaParticleList
- protected FParticles :
TGorillaParticleList
- protected FBlending :
TGorillaParticleBlending
- protected FInfluencers :
TGorillaParticleInfluencerList
- protected FOnStart :
TNotifyEvent
- protected FOnStop :
TNotifyEvent
- protected FOnProcess :
TOnAutoEmitProcess
- protected FOnEmitted :
TOnParticleEmittedEvent
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected function GetActive ( ) : Boolean ;
- protected function GetEmitTime ( ) : Integer ;
- protected procedure SetEmitTime ( const AValue : Integer ) ;
- protected function GetTime ( ) : Single ;
- protected function GetElapsedTime
(
)
: Int64
;
Returns the time between the first tick and the current tick count in milliseconds.
- protected function GetDeltaRawTime
(
)
: Int64
;
Returns the time between the latest tick and the current tick count in milliseconds.
- protected function GetDeltaTime
(
)
: Single
;
Returns the time between the latest tick and the current tick count divided by the GORILLA_PARTICLE_TIME_DELTA value (= 1000 ms)
- protected function GetMeshData
(
)
: TMeshData
;
Returns the mesh data object in which all particle vertices are stored.
- protected function GetReuse ( ) : Boolean ;
- protected procedure SetReuse ( const AValue : Boolean ) ;
- protected function GetAutoEmit ( ) : Boolean ;
- protected procedure SetAutoEmit ( const AValue : Boolean ) ;
- protected function GetEmitted ( ) : Integer ;
- protected function GetEmitParticles ( ) : Integer ;
- protected procedure SetEmitParticles ( const AValue : Integer ) ;
- protected function GetMaxParticles ( ) : Integer ;
- protected procedure SetMaxParticles ( const AValue : Integer ) ;
- protected function GetMaxAutoEmitTime ( ) : Integer ;
- protected procedure SetMaxAutoEmitTime ( const AValue : Integer ) ;
- protected function GetParticlePosition ( ) : TParticleVectorPreset ;
- protected function GetParticleVelocity ( ) : TParticleVectorPreset ;
- protected function GetParticleSize ( ) : TParticlePreset ;
- protected function GetParticleAngle ( ) : TParticlePreset ;
- protected function GetParticleWeight ( ) : TParticlePreset ;
- protected function GetParticleGrowth ( ) : TParticlePreset ;
- protected function GetParticleLifeTime ( ) : TParticlePreset ;
- protected procedure SetParticlePosition ( const AValue : TParticleVectorPreset ) ;
- protected procedure SetParticleVelocity ( const AValue : TParticleVectorPreset ) ;
- protected procedure SetParticleSize ( const AValue : TParticlePreset ) ;
- protected procedure SetParticleAngle ( const AValue : TParticlePreset ) ;
- protected procedure SetParticleGrowth ( const AValue : TParticlePreset ) ;
- protected procedure SetParticleWeight ( const AValue : TParticlePreset ) ;
- protected procedure SetParticleLifeTime ( const AValue : TParticlePreset ) ;
- protected function GetBlending ( ) : TGorillaParticleBlending ;
- protected procedure SetBlending ( const AValue : TGorillaParticleBlending ) ;
- protected procedure DoOnEmit ( ASender : TObject ) ;
- protected procedure Interpolate ( const ADeltaTime : Single; const AParticle : PGorillaParticle ) ; virtual;
- protected function IsAutoEmitExpired
(
)
: Boolean
;
Checks if the maximum auto emit time was reached and no more auto emittance is allowed.
- protected procedure Render ( ) ; override;
- protected procedure DoOnParticleListNotify ( ASender : TObject; const AItem : PGorillaParticle; AAction : TCollectionNotification ) ; virtual;
- protected procedure CreateParticleList ( ) ;
- protected procedure ApplyToBuffer ( ) ; virtual;
- protected function GetTextureAtlasFrameSize ( ) : TPointF ; virtual;
- protected function GetTextureAtlasOffset ( const ADeltaTime : Single ) : TPointF ; virtual;
- public procedure Start ( ) ; virtual;
- public procedure Stop ( ) ; virtual;
- public procedure ClearUnused ( ) ; virtual;
- public procedure Clear ( ) ; virtual;
- public function IsInsideOfObstacle ( const APos : TPoint3D ) : Boolean ;
- public function EmitParticle ( ) : PGorillaParticle ; overload virtual;
- public function EmitParticle ( const APosition : TPoint3D ) : PGorillaParticle ; overload virtual;
- public procedure SortByEyeDistance ( const APosition : TPoint3D ) ; virtual;
Properties
- public MeshData : TMeshData
- published MaterialSource : TMaterialSource
- published Cursor : TCursor
- published DragMode : TDragMode
- published Position : TPosition3D
- published Scale : TPosition3D
- published RotationAngle : TPosition3D
- published Locked : Boolean
- published Width : Single
- published Height : Single
- published Depth : Single
- published Opacity : Single
- published Projection : TProjection
- published HitTest : Boolean
- published VisibleContextMenu : Boolean
- published TwoSide : Boolean
- published Visible : Boolean
- published ZWrite : Boolean
- published Camera : TCamera
- published Active : Booleanread GetActive
- published EmitTime : Integer
- published Time : Singleread GetTime
- published DeltaTime : Singleread GetDeltaTime
- published Reuse : Boolean
- published AutoEmit : Boolean
- published Emitted : Integerread GetEmitted
- published EmitParticles : Integer
- published MaxParticles : Integer
- published MaxAutoEmitTime : Integer
- published ParticlePosition : TParticleVectorPreset
- published ParticleVelocity : TParticleVectorPreset
- published ParticleSize : TParticlePreset
- published ParticleAngle : TParticlePreset
- published ParticleWeight : TParticlePreset
- published ParticleGrowth : TParticlePreset
- published ParticleLifeTime : TParticlePreset
- published Blending : TGorillaParticleBlending
- published Influencers : TGorillaParticleInfluencerListread FInfluencers