ClipmapVisibility.h
1 #pragma once
2 
3 #include "mapindex.h"
4 #include "CellData.h"
5 #include "Vector.h"
6 #include "MatrixAlg.h"
7 
8 namespace VoxelFarm
9 {
11  {
12  public:
13  /*
14  Occluder sides
15 
16  +-----------+
17  /| /|
18  / | 2 / |
19  +-----------+ |
20  | 3| | 1|
21  | +--------|--+
22  | / 0 | /
23  |/ |/
24  +-----------+
25 
26  */
27  struct Occluders
28  {
29  float sides[4];
30  float minBounds[3];
31  float maxBounds[3];
32  bool bottom;
33  };
34  typedef unsigned short DepthValue;
35  public:
38  public:
39  static void computeCellOccluders(VoxelFarm::CCellData& cellData, Occluders& occluders);
40  static void rasterOccluder(float v1x, float v1y, float v2x, float v2y, float v3x, float v3y, DepthValue depth, DepthValue* buffer, int bufferWidth);
41  static bool testOccluded(float v1x, float v1y, float v2x, float v2y, float v3x, float v3y, DepthValue depth, DepthValue* buffer, int bufferWidth);
42  };
43 }
Contains all classes and functions for the VoxelFarm engine.
Stores the information for a Cell that has already been converted to a polygonal mesh.
Definition: CellData.h:107