aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/client/fx_line.h
blob: 59752716dcf72a68b1584c8531a7eaadde32a0e8 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $Workfile:     $
// $Date:         $
//
//-----------------------------------------------------------------------------
// $Log: $
//
// $NoKeywords: $
//=============================================================================//

#if !defined( FXLINE_H )
#define FXLINE_H
#ifdef _WIN32
#pragma once
#endif

struct FXLineData_t
{
	Vector		m_vecStart;
	Vector		m_vecEnd;
	Vector		m_vecStartVelocity;
	Vector		m_vecEndVelocity;
	float		m_flStartAlpha;
	float		m_flEndAlpha;
	float		m_flStartScale;
	float		m_flEndScale;
	float		m_flDieTime;
	float		m_flLifeTime;
	
	IMaterial	*m_pMaterial;
};

#include "fx_staticline.h"

class CFXLine : public CClientSideEffect
{
public:

	CFXLine( const char *name, const FXLineData_t &data );
	
	~CFXLine( void );

	virtual void	Draw( double frametime );
	virtual bool	IsActive( void );
	virtual void	Destroy( void );
	virtual	void	Update( double frametime );

protected:

	FXLineData_t	m_FXData;
};

void FX_DrawLine( const Vector &start, const Vector &end, float scale, IMaterial *pMaterial, const color32 &color );
void FX_DrawLineFade( const Vector &start, const Vector &end, float scale, IMaterial *pMaterial, const color32 &color, float fadeDist );

#endif	//FXLINE_H