OpenClonk
C4FoWBeamTriangle.h
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 2014-2016, The OpenClonk Team and contributors
5  *
6  * Distributed under the terms of the ISC license; see accompanying file
7  * "COPYING" for details.
8  *
9  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
10  * See accompanying file "TRADEMARK" for details.
11  *
12  * To redistribute this file separately, substitute the full license texts
13  * for the above references.
14  */
15 
16 #ifndef C4FOWBEAMTRIANGLE_H
17 #define C4FOWBEAMTRIANGLE_H
18 
23 {
24 public:
25  C4FoWBeamTriangle() = default;
26 
27  // whether this triangle is the last one in a row because the triangle
28  // that would normally be left/right of it is clipped
29  bool clipLeft{false}, clipRight{false};
30 
31  // Result of C4FoWLightSection::CalculateTriangles:
32  float fanLX, fanLY, // left point of the triangle that has 100% light
33  fanRX, fanRY, // right point of the triangle that has 100% light
34  fadeLX, fadeLY, // left point of the quad in which the light fades out
35  fadeRY, fadeRX; // right point of the quad in which the light fades out
36 
37  // Added by C4FoWLight::CalculateFanMaxed:
38  float nfanLX, nfanLY, // left point of the triangle that has 100% light and normals aren't maxed-out
39  nfanRX, nfanRY; // right point of the triangle that has 100% light and normals aren't maxed-out
40 
41  // Filled in by C4FoWLight::CalculateIntermediateFadeTriangles
42  float fadeIX, fadeIY; // intermediate fade point filling the space between the fade quads
43 
44  // whether the next triangle's edge is shorter than the edge of this one
45  bool descending;
46 };
47 
48 #endif
C4FoWBeamTriangle()=default