Class TFB_Context

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TFB_Context = class(TObject)

Description

Particle generation context

Hierarchy

Overview

Methods

Public constructor Create;
Public destructor Destroy; override;
Public procedure Update(ADeltaTime: Single);
Public procedure Render(APrepareGL: Boolean = true);
Public procedure Enable(ATarget: Cardinal);
Public procedure Disable(ATarget: Cardinal);
Public procedure FloatParameter(ATarget: Cardinal; AValue: PSingle);
Public procedure GetFloat(ATarget: Cardinal; ADest: PSingle);
Public procedure GetBool(ATarget: Cardinal; ADest: PBoolean);
Public procedure ResetContext;
Public procedure PreallocateMemory(AParticleCount: Cardinal);
Public procedure ReleaseMemory;
Public procedure SetContextUserData(ARef: Pointer);
Public procedure AddMagnet(AMagnet: TFB_Magnet);
Public procedure RemoveMagnet(AMagnet: TFB_Magnet);
Public procedure RemoveMagnets;
Public procedure AddCollisionTree(ACollisionTree: TFB_CollisionTree);
Public procedure RemoveCollisionTree(ACollisionTree: TFB_CollisionTree);
Public procedure RemoveCollisionTrees;
Public procedure SetBlendFunc(ASrc, ADst: TGLUInt);
Public procedure SetSkeletonResolution(AValue: Cardinal);
Public procedure SetVertexStorage(AStorageType: Cardinal);
Public procedure SetPhysicsModel(APhysicsModel: Cardinal);
Public procedure AddTexture(AGLName: TGLUInt; ARows, ACols: Integer);
Public procedure BindTexture(ATextureIndex: Integer);
Public procedure ResetParticlePrototype;
Public procedure pp_Texture(ATileIndex: Cardinal);
Public procedure pp_AppearanceModel(AModel: TFB_AppearanceModel);
Public procedure pp_Size(w, h: Single); overload;
Public procedure pp_Size(ARef: PSingle); overload;
Public procedure pp_Color(r, g, b, a: Single); overload;
Public procedure pp_Color(ARef: PSingle); overload;
Public procedure pp_Velocity(x, y, z: Single); overload;
Public procedure pp_Velocity(ARef: PSingle); overload;
Public procedure pp_Force(x, y, z: Single); overload;
Public procedure pp_Force(ARef: PSingle); overload;
Public procedure pp_Mass(AValue: Single);
Public procedure pp_Material(AMaterial: TFB_Material);
Public procedure pp_AirResistance(AValue: Single);
Public procedure pp_NormalContrast(AValue: Single);
Public procedure pp_Omega(AValue: Single);
Public procedure pp_LifeSpan(AValue: Single);
Public procedure pp_UserData(AValue: Pointer);
Public procedure pp_CalculatedEvent(AValue: TFB_NotifyEvent);
Public procedure pp_DestroyedEvent(AValue: TFB_NotifyEvent);
Public procedure pp_GravitatedEvent(AValue: TFB_GravitatedEvent);
Public procedure pp_CollidedEvent(AValue: TFB_CollidedEvent);
Public procedure AddParticle(x, y, z: Single); overload;
Public procedure AddParticle(ARef: PSingle); overload;

Properties

Public property ParticleCount: Cardinal read GetParticleCount;
Public property AllocationIncrement: Cardinal read GetAllocationIncrement write SetAllocationIncrement;

Description

Methods

Public constructor Create;
 
Public destructor Destroy; override;
 
Public procedure Update(ADeltaTime: Single);

Recalculates all particles.

Parameters
ADeltaTime
Time since last call in seconds
Public procedure Render(APrepareGL: Boolean = true);

Renders all particles. activated and deactivated.

Parameters
APrepareGL
If true, OpenGL functions like blending, texturing and other will be
Public procedure Enable(ATarget: Cardinal);

Enables a FireBlade function.

See also
FB_FRUSTUM
FB_APPEARANCE
FB_PHYSICS
FB_VERTICES
FB_NORMALS
FB_POINTSPRITES
FB_SMEAR
FB_COLLISION_DETECTION
FB_CONCURRENT_DEPTHSORT
FB_TEXTURE_BLEND
Public procedure Disable(ATarget: Cardinal);

Disables a FireBlade function.

See also
TFB_Context.Enable
Public procedure FloatParameter(ATarget: Cardinal; AValue: PSingle);

Sets a context float parameter.

Parameters
ATarget
Parameter target
AValue
Pointer to the value itself
See also
FB_FLOWDENSITY
FB_SMEARINTENSITY
FB_SMEARSHIFT
FB_WIND
Public procedure GetFloat(ATarget: Cardinal; ADest: PSingle);

Writes a float parameter's value to a destination.

Parameters
ATarget
Parameter target
ADest
Pointer to the storage
See also
FB_FLOWDENSITY
FB_SMEARINTENSITY
FB_SMEARSHIFT
FB_WIND
FB_MINBOUND
FB_MAXBOUND
FB_ARITHAVERAGE
Public procedure GetBool(ATarget: Cardinal; ADest: PBoolean);

Writes the boolean state of a FireBlade function to a destination.

Parameters
ATarget
Parameter target
ADest
Pointer to the storage
See also
TFB_Context.Enable
TFB_Context.Disable
Public procedure ResetContext;

Resets all values to default and calls TFB_Context.ReleaseMemory and TFB_Context.ResetParticlePrototype

Public procedure PreallocateMemory(AParticleCount: Cardinal);

Sets the particle count to be preallocated and the allocation increment.

Parameters
AParticleCount
The particle count for which memory shall be allocated.
Public procedure ReleaseMemory;

Removes all particles from the container

Public procedure SetContextUserData(ARef: Pointer);

Sets user data for the context.

Parameters
ARef
Pointer to the user data
Public procedure AddMagnet(AMagnet: TFB_Magnet);

Adds the magnet to the context.

Public procedure RemoveMagnet(AMagnet: TFB_Magnet);

Removes the magnet from the context, if existing.

Public procedure RemoveMagnets;

Removes all magnets from the context.

Public procedure AddCollisionTree(ACollisionTree: TFB_CollisionTree);

Adds the collision tree to the context.

Public procedure RemoveCollisionTree(ACollisionTree: TFB_CollisionTree);

Removes the collision tree from the context, if existing.

Public procedure RemoveCollisionTrees;

Removes all collision trees from the context.

Public procedure SetBlendFunc(ASrc, ADst: TGLUInt);

Sets the OpenGL blending functions for rendering.

Parameters
ASrc
Source function
ADst
Destination function
Public procedure SetSkeletonResolution(AValue: Cardinal);

Sets the skeleton resolution for a particle. Only legal if FB_SMEAR is enabled

Public procedure SetVertexStorage(AStorageType: Cardinal);

Sets the vertex storage type.

See also
FB_VERTEXSTORAGE_VBO
FB_VERTEXSTORAGE_VA
FB_VERTEXSTORAGE_USER
Public procedure SetPhysicsModel(APhysicsModel: Cardinal);

Sets the physics model to use.

See also
FB_PHYSICSMODEL_SIMPLE
FB_PHYSICSMODEL_REALISTIC
Public procedure AddTexture(AGLName: TGLUInt; ARows, ACols: Integer);

Adds a texture to the context.

Parameters
AGLName
OpenGL texture name
ARows
Texture tile rows
ACols
Texture tile columns
Public procedure BindTexture(ATextureIndex: Integer);

Sets a registered texture to use.

Parameters
ATextureIndex
Texture index, following the order of added textures starting with 0.
Public procedure ResetParticlePrototype;

Resets all values of the particle prototype to default.

Public procedure pp_Texture(ATileIndex: Cardinal);

Particle Prototype setting. Tile index in the current texture. This may make sense if FB_APPEARANCE is disabled.

Public procedure pp_AppearanceModel(AModel: TFB_AppearanceModel);

Particle Prototype setting. Color sequence.

Public procedure pp_Size(w, h: Single); overload;

Particle Prototype setting. Initial size. This may make sense if FB_APPEARANCE is disabled.

Public procedure pp_Size(ARef: PSingle); overload;

Particle Prototype setting. Initial size. This may make sense if FB_APPEARANCE is disabled.

Parameters
ARef
Pointer to a sequence of two floating point values with single precision in width,height format.
Public procedure pp_Color(r, g, b, a: Single); overload;

Particle Prototype setting. Initial color. This may make sense if FB_APPEARANCE is disabled.

Public procedure pp_Color(ARef: PSingle); overload;

Particle Prototype setting. Initial color. This may make sense if FB_APPEARANCE is disabled.

Parameters
ARef
Pointer to a sequence of four floating point values with single precision in rgba format.
Public procedure pp_Velocity(x, y, z: Single); overload;

Particle Prototype setting. Initial Velocity.

Public procedure pp_Velocity(ARef: PSingle); overload;

Particle Prototype setting. Initial Velocity.

Parameters
ARef
Pointer to a sequence of three floating point values with single precision in xyz format.
Public procedure pp_Force(x, y, z: Single); overload;

Particle Prototype setting. Permanent force.

Public procedure pp_Force(ARef: PSingle); overload;

Particle Prototype setting. Permanent force,

Parameters
ARef
Pointer to a sequence of three floating point values with single precision in xyz format.
Public procedure pp_Mass(AValue: Single);

Particle Prototype setting. Mass of a particle in kilograms (megatons for realistic magnet mode).

Public procedure pp_Material(AMaterial: TFB_Material);

Particle Prototype setting. Material of a particle (only necessary for collision detection).

Public procedure pp_AirResistance(AValue: Single);

Particle Prototype setting. CD-Value of a particle.

Public procedure pp_NormalContrast(AValue: Single);

Particle Prototype setting. Z-Coordinate divisor, Must not be zero.

Public procedure pp_Omega(AValue: Single);

Particle Prototype setting. Angle speed, radians.

Public procedure pp_LifeSpan(AValue: Single);

Particle Prototype setting. Lifespan.

Public procedure pp_UserData(AValue: Pointer);

Particle Prototype setting. User Data.

Public procedure pp_CalculatedEvent(AValue: TFB_NotifyEvent);

Particle Prototype setting. Calculated Event. Fired after the particle was recalculated.

Public procedure pp_DestroyedEvent(AValue: TFB_NotifyEvent);

Particle Prototype setting. Destroyed Event. Fired after the particle was destroyed.

Public procedure pp_GravitatedEvent(AValue: TFB_GravitatedEvent);

Particle Prototype setting. Gravitated Event. Fired while the particle is gravitated by a magnet.

Public procedure pp_CollidedEvent(AValue: TFB_CollidedEvent);

Particle Prototype setting. Collided Event. Fired after the particle collided with a collision tree.

Public procedure AddParticle(x, y, z: Single); overload;

Adds a Particle to the context.

Parameters
x
Position x coordinate of the new particle.
y
Position y coordinate of the new particle.
z
Position z coordinate of the new particle.
Public procedure AddParticle(ARef: PSingle); overload;

Adds a Particle to the context.

Parameters
ARef
Pointer to a sequence of three Single values in xyz format, which contain the Position.

Properties

Public property ParticleCount: Cardinal read GetParticleCount;

Current particle count in the context

Public property AllocationIncrement: Cardinal read GetAllocationIncrement write SetAllocationIncrement;

The allocation size increment when new memory has to be allocated.


Generated by PasDoc 0.11.0 on 2009-06-29 23:12:36