blob: 4c65cfeb98093727fc96518c86029d29fb658ec7 (
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
74
75
76
77
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#ifndef PARTICLE_LITSMOKEEMITTER_H
#define PARTICLE_LITSMOKEEMITTER_H
#ifdef _WIN32
#pragma once
#endif
#include "particles_simple.h"
#include "tier0/memdbgon.h"
//==================================================
// CLitSmokeEmitter
//==================================================
class CLitSmokeEmitter : public CSimpleEmitter
{
public:
CLitSmokeEmitter( const char *pDebugName );
virtual void Update( float flTimeDelta );
virtual void StartRender( VMatrix &effectMatrix );
virtual void RenderParticles( CParticleRenderIterator *pIterator );
virtual void SimulateParticles( CParticleSimulateIterator *pIterator );
virtual void Init( const char *materialName, Vector sortOrigin );
// Get the material we were initialized with.
PMaterialHandle GetSmokeMaterial() const;
// Color values are 0-1.
virtual void SetDirectionalLight( Vector position, Vector color, float intensity );
virtual void SetLight( Vector position, Vector color, float intensity );
static CSmartPtr<CLitSmokeEmitter> Create( const char *pDebugName )
{
return new CLitSmokeEmitter( pDebugName );
}
CParticleSphereRenderer m_Renderer;
class LitSmokeParticle : public Particle
{
public:
Vector m_vecVelocity;
byte m_uchColor[4];
float m_flLifetime;
float m_flDieTime;
byte m_uchStartSize;
byte m_uchEndSize;
};
private:
CLitSmokeEmitter( const CLitSmokeEmitter & ); // not defined, not accessible
private:
bool m_bInitted;
PMaterialHandle m_hSmokeMaterial;
};
inline PMaterialHandle CLitSmokeEmitter::GetSmokeMaterial() const
{
return m_hSmokeMaterial;
}
#include "tier0/memdbgoff.h"
#endif // PARTICLE_LITSMOKEEMITTER_H
|