summaryrefslogtreecommitdiff
path: root/game/client/tf2/env_objecteffects.h
blob: 94571458879f9ba3c443e391ad2b72aa264b7286 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

#ifndef ENV_OBJECTEFFECTS_H
#define ENV_OBJECTEFFECTS_H
#ifdef _WIN32
#pragma once
#endif

//-----------------------------------------------------------------------------
// Purpose: Object smoke particles. They float upward.
//-----------------------------------------------------------------------------
class ObjectSmokeParticle : public SimpleParticle
{
public:
	Vector		m_vecAcceleration;
};

//-----------------------------------------------------------------------------
// Purpose: Object smoke particle emitter.
//-----------------------------------------------------------------------------
class CObjectSmokeParticles : public CSimpleEmitter
{
public:

	CObjectSmokeParticles( const char *pDebugName ) : CSimpleEmitter( pDebugName ) {}
	static CSmartPtr<CObjectSmokeParticles> Create( const char *pDebugName )	{return new CObjectSmokeParticles( pDebugName );}

	virtual void SimulateParticles( CParticleSimulateIterator *pIterator );
	virtual void RenderParticles( CParticleRenderIterator *pIterator );

	//Setup for point emission
	virtual void		Setup( const Vector &origin, const Vector *direction, float angularSpread, float minSpeed, float maxSpeed, float gravity, float dampen, int flags = 0 );

	CParticleCollision m_ParticleCollision;

private:
	CObjectSmokeParticles( const CObjectSmokeParticles & ); // not defined, not accessible
};

//-----------------------------------------------------------------------------
// Purpose: Object fire particles. They know how to attach themselves to heirarchy.
//-----------------------------------------------------------------------------
class ObjectFireParticle : public SimpleParticle
{
public:
	EHANDLE		m_hParent;
	int			m_iAttachmentPoint;
};

//-----------------------------------------------------------------------------
// Purpose: Object smoke particle emitter.
//-----------------------------------------------------------------------------
class CObjectFireParticles : public CSimpleEmitter
{
public:
	CObjectFireParticles( const char *pDebugName ) : CSimpleEmitter( pDebugName ) {}
	static CSmartPtr<CObjectFireParticles> Create( const char *pDebugName )	{return new CObjectFireParticles( pDebugName );}

	virtual void SimulateParticles( CParticleSimulateIterator *pIterator );
	virtual void RenderParticles( CParticleRenderIterator *pIterator );

	//Setup for point emission
	virtual void		Setup( const Vector &origin, const Vector *direction, float angularSpread, float minSpeed, float maxSpeed, float gravity, float dampen, int flags = 0 );

private:
	CObjectFireParticles( const CObjectFireParticles & ); // not defined, not accessible
};

#endif // ENV_OBJECTEFFECTS_H