1 ////////////////////////////////////////////////////////////////////////////////
2 // Scorched3D (c) 2000-2009
4 // This file is part of Scorched3D.
6 // Scorched3D is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // Scorched3D is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with Scorched3D; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 ////////////////////////////////////////////////////////////////////////////////
21 #if !defined(__INCLUDE_TargetRendererImplh_INCLUDE__)
22 #define __INCLUDE_TargetRendererImplh_INCLUDE__
24 #include <target/Target.h>
25 #include <target/TargetRenderer.h>
26 #include <common/Matrix16.h>
28 class TargetVisibilityPatch
;
29 class RenderObjectLists
;
30 class TargetRendererImpl
: public TargetRenderer
33 TargetRendererImpl(Target
*target
);
34 virtual ~TargetRendererImpl();
37 virtual void drawParticle(float distance
) = 0;
38 virtual void simulate(float frameTime
) = 0;
42 void setMakeParticle() { particleMade_
= false; }
51 static void setHighlightType(HighlightType type
) { highlightType_
= type
; }
52 void createParticle();
55 static HighlightType highlightType_
;
56 bool tree_
, matrixCached_
;
57 Matrix16 cachedMatrix_
;
59 TargetVisibilityPatch
*currentVisibilityPatch_
;
63 void drawShield(float shieldHit
, float totalTime
);
68 float getTargetSize();
69 float getTargetFade(float distance
, float size
);
70 void storeTarget2DPos();
72 void setMovedPatch(TargetVisibilityPatch
*newPatch
);
74 double posX_
, posY_
, posZ_
;
77 #endif // __INCLUDE_TargetRendererImplh_INCLUDE__