Reply To: C++ Engine
Home › Forums › TimelineFX Module › C++ Engine › Reply To: C++ Engine
pward84020
I’ve just completed a cpp conversion, and have it working in my custom engine.
This is not a stand alone port, as it still needs to be integrated into other engines. However, this should be simple as their are only a few methods related to graphics.
Because I intend to use this in games and need maximum performance, I removed the interpolation method of graphs, and only support look-up tables.
If anyone is interested in looking at this, as a starting point for your own conversion, please let me know
Peter
Ex: tlParticle looks like this:
class tlParticle : public tlEntity
{
public:
	tlParticle();
	~tlParticle();
	f32 GetCurrentFrame();
	void SetCurrentFrame( f32 frame );
	void Update();
	void Reset();
	void Destroy();
public:
	// ———————————
	tlEmitter * m_Emitter;								// emitter it belongs to
	// ———————————
	f32 m_WeightVariation;								// Particle weight variation
	f32 m_GSizeX;										// Particle global size x
	f32 m_GSizeY;										// Particle global size y
	// ———————————
	//f32 m_VelVariation;								// velocity variation
	//f32 m_VelSeed;									// rnd seed
	// ———————————
	f32 m_CurrentFrame;									// current frame of animation
	// ———————————
	FontChar * m_Avatar;								// link to the glyph that represents the entity
	// ———————————
	f32 m_SpinVariation;								// variation of spin speed
	// ———————————
	f32 m_DirectionVariation;							// Direction variation at spawn time
	f32 m_TimeTracker;									// This is used to keep track of game ticks so that some things can be updated between specific time intervals
	f32 m_RandomDirection;								// current direction of the random motion that pulls the particle in different directions
	f32 m_RandomSpeed;									// random speed to apply to the particle movement
	f32 m_EmissionAngle;								// Direction variation at spawn time
	int m_ReleaseSingleParticle; 						// set to true to release single particles and let them decay and die
	// ———————————
	int m_Layer;										// layer the particle belongs to
	bool m_GroupParticles;								// whether the particle is added the PM pool or kept in the emitter’s pool
	tlParticle * m_Prev;								// for linked lists of active/inactive particle objects.
	tlParticle * m_Next;
};