6#include "Systems/ComponentSystem.h"
8#include "Components/Geometry/AdaptivePlanarGridComponent.h"
10#include "Resources/Resources.h"
28 static const int DeadEnd = -1;
29 static const int Leaf = -2;
32 const int NoParent = -1;
44 uint8_t adjacentLevels[4];
45 glm::vec4 texCoordWorldTransform;
46 glm::vec4 texCoordUnitTransform;
56 ConstantBufferKey bufferKey;
62 InitMaterialInstanceCallback * initMaterialInstanceCallback =
nullptr;
63 void * initMaterialInstanceData =
nullptr;
71 glm::mat2 texCoordLinearTransform = glm::mat2(1.f, 0.f, 0.f, 1.f);
72 glm::vec2 texCoordPeriod = glm::vec2(std::numeric_limits<float>::quiet_NaN());
74 glm::dvec2 currentExtentMin = glm::dvec2(0.0);
75 glm::dvec2 currentExtentMax = glm::dvec2(0.0);
77 glm::dvec3 currentOrigin = glm::dvec3(-1);
79 unsigned objectId = 0;
83 int tileResolutionLog2 = -1;
84 int tessellations = 8;
88 bool initialized =
false;
89 bool materialInstancesChanged =
false;
96 std::vector<AdaptivePlanarGridTile> tiles;
98 std::vector<MaterialInstanceHandle> materialPool;
99 std::vector<EntityPtr> entityPool;
109 void COGSCORE_DLL_API registerMaterial(
const AdaptivePlanarGridComponent * gridComp,
MaterialHandle material, AdaptivePlanarGridMaterialData::InitMaterialInstanceCallback * initMaterialInstanceCallback,
void* initMaterialInstanceData);
Container for components, providing composition of dynamic entities.
Context * context
Pointer to the Context instance the system lives in.
void update()
Updates the system state to that of the current frame.
Component system with parallel data per component stored in a pool similar to how the components them...
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Base allocator implementation.
std::shared_ptr< ComponentModel::Entity > EntityPtr
Smart pointer for Entity access.
uint16_t VariableKey
Used to lookup material properties.
Contains all Cogs related functionality.
ComponentIndex SizeType
Type used to track the size of pools.
Material instances represent a specialized Material combined with state for all its buffers and prope...