For grids, remove divisions outward to infinity implemented
This commit is contained in:
parent
ad4e5af294
commit
83ff3f689d
5 changed files with 260 additions and 69 deletions
|
|
@ -17,8 +17,22 @@ class WorldGrid {
|
|||
WorldScalar size{50000000};
|
||||
bool visible = true;
|
||||
WorldVec offset{0, 0};
|
||||
unsigned subdivisions = 0;
|
||||
bool removeDivisionsOutwards = false;
|
||||
private:
|
||||
static sk_sp<SkShader> get_shader(GridType gType, const SkColor4f& gridColor, float gridScale, const Vector2f& gridClosestPoint, float gridPointSize);
|
||||
struct ShaderData {
|
||||
SkColor4f gridColor;
|
||||
float mainGridScale;
|
||||
Vector2f mainGridClosestPoint;
|
||||
float mainGridPointSize;
|
||||
|
||||
float divGridAlphaFrac;
|
||||
float divGridScale;
|
||||
Vector2f divGridClosestPoint;
|
||||
float divGridPointSize;
|
||||
};
|
||||
static Vector2f get_closest_grid_point(const WorldVec& gridOffset, const WorldScalar& gridSize, const DrawData& drawData);
|
||||
static sk_sp<SkShader> get_shader(GridType gType, const ShaderData& shaderData);
|
||||
static sk_sp<SkRuntimeEffect> compile_effect_shader_init(const char* shaderName, const char* shaderCode);
|
||||
static Vector2f oldWindowSize;
|
||||
static sk_sp<SkRuntimeEffect> circlePointEffect;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue