Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
UndergroundEffectClass.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#ifndef TT_INCLUDE__UNDERGROUNDEFFECTCLASS_H
13#define TT_INCLUDE__UNDERGROUNDEFFECTCLASS_H
14
15#include "MaterialEffectClass.h"
16#include "Vector3.h"
17class ChunkSaveClass;
18class ChunkLoadClass;
19class Vector3;
20class MatrixMapperClass;
21
22class UndergroundEffectClass : public MaterialEffectClass
23{
24public:
25 UndergroundEffectClass(void);
26 ~UndergroundEffectClass(void);
27
28 virtual void Timestep(float dt);
29 virtual void Render_Push(RenderInfoClass & rinfo,PhysClass * obj);
30 virtual void Render_Pop(RenderInfoClass & rinfo);
31
32 void Set_Underground(bool onoff);
33 void Set_Visible(bool onoff);
34 bool Is_Underground() { return IsUnderground; }
35 bool Is_Visible() { return IsVisible; }
36 void Set_Fade_Distance(float d) { FadeDistance = d; }
37 float Get_Fade_Distance() const { return FadeDistance; }
38 void Set_Color(Vector3 &color) {Color = color;}
39 Vector3 & Get_Color() {return Color;}
40
41 static const char* Get_Underground_Shader_Name() { return UndergroundShaderName; };
42 static void Set_Underground_Shader_Name(const char* new_name);
43
44protected:
45
46 bool IsUnderground;
47 bool WasUnderground;
48 bool IsVisible;
49 float FadeDistance;
50 float CurrentFraction;
51 bool RenderStealthMaterial;
52 float IntensityScale;
53 MaterialPassClass* MaterialPass;
54 MatrixMapperClass* Mapper;
55 Vector3 Color;
56
57 static char UndergroundShaderName[64];
58
59
60 void Update_Target_Fraction(void);
61};
62
63#endif