summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2023-01-22 18:59:38 -0500
committermattkae <mattkae@protonmail.com>2023-01-22 18:59:38 -0500
commit22c7d2cfa31d83eb81c5ab397e287c2212691e71 (patch)
tree38ba6db608beff7cbc1ed476531eb02befd44942
parent64a8d78225e6539ca25374596fe5de44e6252a62 (diff)
WIP on Wind Fields, and updated resume
-rw-r--r--_posts/plato_2.html4
-rw-r--r--_posts/postList.js16
-rw-r--r--_posts/processPosts.js14
-rw-r--r--download/build.js13
-rw-r--r--download/cv.pdfbin1161713 -> 1218523 bytes
-rw-r--r--download/resume_dl.css9
-rw-r--r--download/resume_dl.html74
-rw-r--r--generator/main.go24
-rwxr-xr-xresume.css4
-rwxr-xr-xresume.html49
-rwxr-xr-xthemes/dist/output.wasmbin139379 -> 139473 bytes
-rw-r--r--themes/src/Snowflake.cpp26
-rw-r--r--themes/src/Snowflake.h4
-rw-r--r--themes/src/Windfield.cpp28
-rw-r--r--themes/src/Windfield.hpp38
15 files changed, 241 insertions, 62 deletions
diff --git a/_posts/plato_2.html b/_posts/plato_2.html
new file mode 100644
index 0000000..25ceec6
--- /dev/null
+++ b/_posts/plato_2.html
@@ -0,0 +1,4 @@
+<h2>Introduction</h2>
+<p>
+ Continuing in my reading of <cite>A Plato Reader: Eight Essential Dialogues</cite>, I recently came across <i>Phaedo</i>.
+</p> \ No newline at end of file
diff --git a/_posts/postList.js b/_posts/postList.js
new file mode 100644
index 0000000..bc0f919
--- /dev/null
+++ b/_posts/postList.js
@@ -0,0 +1,16 @@
+module.exports = [
+ {
+ url: "_posts/hello_world.html",
+ title: "Hello, World!",
+ tags: [ "personal" ]
+ },
+ {
+ url: "_posts/plato_1.html",
+ title: "Euthyphro: the Pious and the God-loved",
+ tags: [ "books" ]
+ },
+ {
+ url: "_posts/plato2.html",
+ title: "Phaedo: Death and the Soul"
+ }
+];
diff --git a/_posts/processPosts.js b/_posts/processPosts.js
index 47b757c..2bd6ff1 100644
--- a/_posts/processPosts.js
+++ b/_posts/processPosts.js
@@ -2,6 +2,7 @@
const fs = require('fs');
const path = require('path');
+const posts = require('./postList');
const tags = [
{
@@ -22,19 +23,6 @@ const tags = [
}
]
-const posts = [
- {
- url: "_posts/hello_world.html",
- title: "Hello, World!",
- tags: [ "personal" ]
- },
- {
- url: "_posts/plato_1.html",
- title: "Euthyphro: the pious and the god-loved",
- tags: [ "books" ]
- }
-];
-
function createTagFile(tag) {
const dir = path.resolve(path.join(__dirname, '..', 'posts'));
diff --git a/download/build.js b/download/build.js
index 39c79cc..6c58162 100644
--- a/download/build.js
+++ b/download/build.js
@@ -18,8 +18,17 @@ const newHeader = `
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta charset="UTF-8" />
- <script src="https://twemoji.maxcdn.com/2/twemoji.min.js?11.2"></script>
- <script>window.onload = function () { twemoji.parse(document.body);}</script>
+ <style>
+img.emoji {
+ height: 1em;
+ width: 1em;
+ margin: 0 .05em 0 .1em;
+ vertical-align: -0.1em;
+}
+</style>
+<script src="https://unpkg.com/twemoji@latest/dist/twemoji.min.js" crossorigin="anonymous"></script>
+
+<script>window.onload = function () { twemoji.parse(document.body);}</script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,300" rel="stylesheet" type="text/css">
<style>
${resumeCss}
diff --git a/download/cv.pdf b/download/cv.pdf
index b3746ca..fe5fa44 100644
--- a/download/cv.pdf
+++ b/download/cv.pdf
Binary files differ
diff --git a/download/resume_dl.css b/download/resume_dl.css
index 46e79d0..ac685e7 100644
--- a/download/resume_dl.css
+++ b/download/resume_dl.css
@@ -18,4 +18,11 @@ img.emoji {
#resume {
font-family: "Open Sans", sans-serif !important;
-} \ No newline at end of file
+}
+
+img.emoji {
+ height: 1em;
+ width: 1em;
+ margin: 0 .05em 0 .1em;
+ vertical-align: -0.1em;
+}
diff --git a/download/resume_dl.html b/download/resume_dl.html
index 1136f59..c0c7f1d 100644
--- a/download/resume_dl.html
+++ b/download/resume_dl.html
@@ -4,8 +4,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta charset="UTF-8" />
- <script src="https://twemoji.maxcdn.com/2/twemoji.min.js?11.2"></script>
- <script>window.onload = function () { twemoji.parse(document.body);}</script>
+ <style>
+img.emoji {
+ height: 1em;
+ width: 1em;
+ margin: 0 .05em 0 .1em;
+ vertical-align: -0.1em;
+}
+</style>
+<script src="https://unpkg.com/twemoji@latest/dist/twemoji.min.js" crossorigin="anonymous"></script>
+
+<script>window.onload = function () { twemoji.parse(document.body);}</script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,300" rel="stylesheet" type="text/css">
<style>
html {
@@ -116,6 +125,10 @@ header {
justify-content: space-between;
}
+.experience-item ul {
+ margin-top: 0.5rem;
+}
+
.experience-item li {
width: 100%;
}
@@ -277,6 +290,14 @@ img.emoji {
#resume {
font-family: "Open Sans", sans-serif !important;
}
+
+img.emoji {
+ height: 1em;
+ width: 1em;
+ margin: 0 .05em 0 .1em;
+ vertical-align: -0.1em;
+}
+
</style>
</head>
@@ -320,11 +341,11 @@ img.emoji {
<tr>
<tr>
<td>C#</td>
- <td>2.5 yrs</td>
+ <td>2½ yrs</td>
</tr>
<tr>
<td>Python</td>
- <td>2.5 yrs</td>
+ <td>2½ yrs</td>
</tr>
<tr>
<td>C/C++</td>
@@ -349,15 +370,15 @@ img.emoji {
</tr>
<tr>
<td>node.js</td>
- <td>2.5 yrs</td>
+ <td>2½ yrs</td>
</tr>
<tr>
<td>Unity</td>
- <td>2.5 yrs</td>
+ <td>2½ yrs</td>
</tr>
<tr>
<td>ASP.NET</td>
- <td>2.5 yrs</td>
+ <td>2½ yrs</td>
</tr>
<tr>
<td>OpenGL</td>
@@ -382,15 +403,15 @@ img.emoji {
</tr>
<tr>
<td>VSCode</td>
- <td>2.5 yrs</td>
+ <td>2½ yrs</td>
</tr>
<tr>
<td>Visual Studio</td>
- <td>2.5 yr</td>
+ <td>2½ yr</td>
</tr>
<tr>
<td>Webpack</td>
- <td>2 yrs</td>
+ <td>2½ yrs</td>
</tr>
</tbody>
</table>
@@ -473,22 +494,25 @@ img.emoji {
</div>
<ul>
<li>
- Led a team in the development of industrial software applications including cobot palletizers, cartesian palletizers, and CNC machines
+ <b>Main Tech</b>: JavaScript, TypeScript, Python, Linux, Node.js
</li>
<li>
- Architected and developed the core application-level framework for all future client projects
+ Led a team in the development of client-facing industrial software applications including cobot palletizers, cartesian palletizers, and CNC machines
</li>
<li>
- Developed and deployed a number of client projects to factory floors
+ Developed and deployed several client projects valued over $100k+ USD each
</li>
<li>
- Interfaced with other teams on a daily basis to align on business goals and meet deadlines
+ Architected and developed the core framework for all future client projects
</li>
<li>
- Planned, scoped, and organized long-term projects and daily tasks via Asana and Github Projects
+ Interfaced with other teams on a daily basis including sales, customer success, application engineers, other software departments, and more
</li>
<li>
- Individually contributed across many aspects of the codebase, from the firmware to the application layer
+ Planned and organized long-term projects and daily tasks via Asana and Github Projects
+ </li>
+ <li>
+ Programmed thousands of lines across the codebase, from firmware running on a BeagleBone AI to the application layer running on the web
</li>
</ul>
</div>
@@ -514,6 +538,9 @@ img.emoji {
</div>
<ul>
<li>
+ <b>Main Tech</b>: C#, Unity, TypeScript, React
+ </li>
+ <li>
Developed and maintained the data pipeline - from data entry, to data validation, to data publishing - for <i>Arcane Showdown</i>
</li>
<li>
@@ -543,7 +570,10 @@ img.emoji {
</div>
<ul>
<li>
- Assisted beginner programmers in the development of 2D game engines using the SDL2 library
+ <b>Main Tech</b>: C++, SDL2
+ </li>
+ <li>
+ Assisted beginner programmers in the development of 2D game engines using SDL2
</li>
</ul>
</div>
@@ -566,6 +596,9 @@ img.emoji {
</div>
<ul>
<li>
+ <b>Main Tech</b>: C#, GTK, Unity
+ </li>
+ <li>
Developed a tool using C# and GTK to improve the workflow of the quality assurance team for <i>DomiNations</i>
</li>
<li>
@@ -589,6 +622,9 @@ img.emoji {
</div>
<ul>
<li>
+ <b>Main Tech</b>: C++
+ </li>
+ <li>
Developed a profiling framework for the game systems of <i>Dropzone</i>
</li>
</ul>
@@ -614,7 +650,7 @@ img.emoji {
3.53 GPA (Magna Cum Laude)
</li>
<li>
- <i>Relevant Coursework</i>: Computer Graphics, Object Oriented Software Engineering, Linear Algebra, Video Game Engines and Design, Operating Systems, Data Structures, Introduction to Renewable Energy Engineering
+ <i>Relevant Coursework</i>: Computer Graphics, Object Oriented Software Engineering, Linear Algebra, Video Game Engines and Design, Operating Systems, Data Structures
</li>
</ul>
</div>
@@ -625,7 +661,7 @@ img.emoji {
<h2>Projects</h2>
<ul>
<li>My <b>self-hosted personal website</b> where I do small projects in WebAssembly and OpenGL: <a href="https://matthewkosarek.xyz">matthewkosarek.xyz</a>
- <li>A <b>game engine</b> that I built from scrach in C++ and OpenGL: <a href="https://github.com/mattkae/MatteEngine"">github.com/mattkae/MatteEngine</a></li>
+ <li>A <b>game engine</b> that I built in C++ and OpenGL: <a href="https://github.com/mattkae/MatteEngine"">github.com/mattkae/MatteEngine</a></li>
<li>My <b>self-installing emacs configuration</b>: <a href="https://git.matthewkosarek.xyz/emacs_config/">git.matthewkosarek.xyz/emacs_config/</a> </li>
<li>Unfinished website about <b>realtime physics in video games</b>: <a href="https://physicsforgames.com/">physicsforgames.com/</a> </li>
</ul>
diff --git a/generator/main.go b/generator/main.go
new file mode 100644
index 0000000..d6f5c73
--- /dev/null
+++ b/generator/main.go
@@ -0,0 +1,24 @@
+package main
+
+import "fmt"
+
+/*
+
+ Form of the static site generator:
+ 1. Define a list of static items
+ 2. Define a global index.css
+ 3. Each static site item has a content.html file
+ 4. Each static site item has a content.css file
+ 5. Each static site item can have a content.js file
+ 6. Each static site item can have an optional build
+ 7. There will be some built-in blogging functionality if we do it right
+*/
+
+func main() {
+ doWork()
+}
+
+func doWork() {
+ fmt.Println("Hello, world!")
+
+}
diff --git a/resume.css b/resume.css
index a71be83..ba1ef6a 100755
--- a/resume.css
+++ b/resume.css
@@ -106,6 +106,10 @@ header {
justify-content: space-between;
}
+.experience-item ul {
+ margin-top: 0.5rem;
+}
+
.experience-item li {
width: 100%;
}
diff --git a/resume.html b/resume.html
index e1c79d7..ca10a3a 100755
--- a/resume.html
+++ b/resume.html
@@ -67,11 +67,11 @@
<tr>
<tr>
<td>C#</td>
- <td>2.5 yrs</td>
+ <td>2½ yrs</td>
</tr>
<tr>
<td>Python</td>
- <td>2.5 yrs</td>
+ <td>2½ yrs</td>
</tr>
<tr>
<td>C/C++</td>
@@ -96,15 +96,15 @@
</tr>
<tr>
<td>node.js</td>
- <td>2.5 yrs</td>
+ <td>2½ yrs</td>
</tr>
<tr>
<td>Unity</td>
- <td>2.5 yrs</td>
+ <td>2½ yrs</td>
</tr>
<tr>
<td>ASP.NET</td>
- <td>2.5 yrs</td>
+ <td>2½ yrs</td>
</tr>
<tr>
<td>OpenGL</td>
@@ -129,15 +129,15 @@
</tr>
<tr>
<td>VSCode</td>
- <td>2.5 yrs</td>
+ <td>2½ yrs</td>
</tr>
<tr>
<td>Visual Studio</td>
- <td>2.5 yr</td>
+ <td>2½ yr</td>
</tr>
<tr>
<td>Webpack</td>
- <td>2 yrs</td>
+ <td>2½ yrs</td>
</tr>
</tbody>
</table>
@@ -220,22 +220,25 @@
</div>
<ul>
<li>
- Led a team in the development of industrial software applications including cobot palletizers, cartesian palletizers, and CNC machines
+ <b>Main Tech</b>: JavaScript, TypeScript, Python, Linux, Node.js
</li>
<li>
- Architected and developed the core application-level framework for all future client projects
+ Led a team in the development of client-facing industrial software applications including cobot palletizers, cartesian palletizers, and CNC machines
</li>
<li>
- Developed and deployed a number of client projects to factory floors
+ Developed and deployed several client projects valued over $100k+ USD each
</li>
<li>
- Interfaced with other teams on a daily basis to align on business goals and meet deadlines
+ Architected and developed the core framework for all future client projects
</li>
<li>
- Planned, scoped, and organized long-term projects and daily tasks via Asana and Github Projects
+ Interfaced with other teams on a daily basis including sales, customer success, application engineers, other software departments, and more
</li>
<li>
- Individually contributed across many aspects of the codebase, from the firmware to the application layer
+ Planned and organized long-term projects and daily tasks via Asana and Github Projects
+ </li>
+ <li>
+ Programmed thousands of lines across the codebase, from firmware running on a BeagleBone AI to the application layer running on the web
</li>
</ul>
</div>
@@ -261,6 +264,9 @@
</div>
<ul>
<li>
+ <b>Main Tech</b>: C#, Unity, TypeScript, React
+ </li>
+ <li>
Developed and maintained the data pipeline - from data entry, to data validation, to data publishing - for <i>Arcane Showdown</i>
</li>
<li>
@@ -290,7 +296,10 @@
</div>
<ul>
<li>
- Assisted beginner programmers in the development of 2D game engines using the SDL2 library
+ <b>Main Tech</b>: C++, SDL2
+ </li>
+ <li>
+ Assisted beginner programmers in the development of 2D game engines using SDL2
</li>
</ul>
</div>
@@ -313,6 +322,9 @@
</div>
<ul>
<li>
+ <b>Main Tech</b>: C#, GTK, Unity
+ </li>
+ <li>
Developed a tool using C# and GTK to improve the workflow of the quality assurance team for <i>DomiNations</i>
</li>
<li>
@@ -336,6 +348,9 @@
</div>
<ul>
<li>
+ <b>Main Tech</b>: C++
+ </li>
+ <li>
Developed a profiling framework for the game systems of <i>Dropzone</i>
</li>
</ul>
@@ -361,7 +376,7 @@
3.53 GPA (Magna Cum Laude)
</li>
<li>
- <i>Relevant Coursework</i>: Computer Graphics, Object Oriented Software Engineering, Linear Algebra, Video Game Engines and Design, Operating Systems, Data Structures, Introduction to Renewable Energy Engineering
+ <i>Relevant Coursework</i>: Computer Graphics, Object Oriented Software Engineering, Linear Algebra, Video Game Engines and Design, Operating Systems, Data Structures
</li>
</ul>
</div>
@@ -372,7 +387,7 @@
<h2>Projects</h2>
<ul>
<li>My <b>self-hosted personal website</b> where I do small projects in WebAssembly and OpenGL: <a href="https://matthewkosarek.xyz">matthewkosarek.xyz</a>
- <li>A <b>game engine</b> that I built from scrach in C++ and OpenGL: <a href="https://github.com/mattkae/MatteEngine"">github.com/mattkae/MatteEngine</a></li>
+ <li>A <b>game engine</b> that I built in C++ and OpenGL: <a href="https://github.com/mattkae/MatteEngine"">github.com/mattkae/MatteEngine</a></li>
<li>My <b>self-installing emacs configuration</b>: <a href="https://git.matthewkosarek.xyz/emacs_config/">git.matthewkosarek.xyz/emacs_config/</a> </li>
<li>Unfinished website about <b>realtime physics in video games</b>: <a href="https://physicsforgames.com/">physicsforgames.com/</a> </li>
</ul>
diff --git a/themes/dist/output.wasm b/themes/dist/output.wasm
index fd874f8..ab6ef25 100755
--- a/themes/dist/output.wasm
+++ b/themes/dist/output.wasm
Binary files differ
diff --git a/themes/src/Snowflake.cpp b/themes/src/Snowflake.cpp
index 1eb6b74..452a716 100644
--- a/themes/src/Snowflake.cpp
+++ b/themes/src/Snowflake.cpp
@@ -4,6 +4,16 @@
#include "list.h"
#include <cstdio>
+/*
+
+ What else to do?
+
+ - Windstream that blows a certain selection of snowflakes in a loop-dee-loop pattern
+ - Snowflakes that land on the ground and melt
+ - Snowflakes that spin along the Y-axis for a three dimensional effect
+
+ */
+
const Vector4 snowColor = Vector4(1.0, 0.98, 0.98, 1);
const Vector2 NUM_ARMS_RANGE = Vector2(6.f, 8.f);
const Vector2 RADIUS_RANGE = Vector2(8.f, 32.f);
@@ -65,10 +75,11 @@ inline void generateSnowflakeShape(matte::List<Vertex2D>* vertices, i32 numArms,
}
inline void initFlake(SnowflakeParticleRenderer* renderer, SnowflakeUpdateData* ud) {
+ ud->radius = randomFloatBetween(RADIUS_RANGE.x, RADIUS_RANGE.y);
ud->vtxIdx = renderer->vertices.numElements;
generateSnowflakeShape(&renderer->vertices,
randomFloatBetween(NUM_ARMS_RANGE.x, NUM_ARMS_RANGE.y),
- randomFloatBetween(RADIUS_RANGE.x, RADIUS_RANGE.y));
+ ud->radius);
ud->numVertices = renderer->vertices.numElements - ud->vtxIdx;
ud->velocity = Vector2(randomFloatBetween(VELOCITY_RANGE_X.x, VELOCITY_RANGE_X.y), randomFloatBetween(VELOCITY_RANGE_Y.x, VELOCITY_RANGE_Y.y));
@@ -126,9 +137,10 @@ void SnowflakeParticleRenderer::load(SnowflakeLoadParameters params, Renderer2d*
inline void resetFlake(SnowflakeParticleRenderer* renderer, SnowflakeUpdateData* ud) {
ud->position.y = 2 * renderer->yMax;
ud->velocity = Vector2(randomFloatBetween(-10, 10), randomFloatBetween(-100, -85));
+ ud->rotation = 0;
}
-inline void updateFlake(SnowflakeParticleRenderer* renderer, SnowflakeUpdateData* ud, i32 s, f32 dtSeconds, bool addWind) {
+inline void updateFlake(SnowflakeParticleRenderer* renderer, SnowflakeUpdateData* ud, i32 s, f32 dtSeconds) {
ud->velocity = ud->velocity + Vector2(0, -(GRAVITY * dtSeconds));
if (addWind) ud->velocity += renderer->windSpeed;
ud->position += ud->velocity * dtSeconds;
@@ -139,24 +151,20 @@ inline void updateFlake(SnowflakeParticleRenderer* renderer, SnowflakeUpdateData
renderer->vertices.data[v].vMatrix = m;
}
- if (ud->position.y <= -256) {
+ if (ud->position.y <= -ud->radius) {
resetFlake(renderer, ud);
}
}
void SnowflakeParticleRenderer::update(f32 dtSeconds) {
- bool addWind = false;
timeUntilNextWindSeconds -= dtSeconds;
if (timeUntilNextWindSeconds < 0) {
- timeUntilNextWindSeconds = windIntervalSeconds;
- windSpeed = Vector2(randomFloatBetween(WIND_VELOCITY_RANGE_X.x, WIND_VELOCITY_RANGE_X.y),
- randomFloatBetween(WIND_VELOCITY_RANGE_Y.x, WIND_VELOCITY_RANGE_Y.y));
- addWind = true;
+ timeUntilNextWindSeconds = randomFloatBetween(2.5f, 10.f);
}
for (i32 s = 0; s < numSnowflakes; s++) {
SnowflakeUpdateData* ud = &updateData[s];
- updateFlake(this, ud, s, dtSeconds, addWind);
+ updateFlake(this, ud, s, dtSeconds);
}
}
diff --git a/themes/src/Snowflake.h b/themes/src/Snowflake.h
index 2524483..c147469 100644
--- a/themes/src/Snowflake.h
+++ b/themes/src/Snowflake.h
@@ -4,6 +4,7 @@
#include "types.h"
#include "mathlib.h"
#include "list.h"
+#include "Windfield.hpp"
struct Renderer2d;
struct Vertex2D;
@@ -18,6 +19,7 @@ struct SnowflakeUpdateData {
Vector2 position;
f32 rotateVelocity = 0.f;
f32 rotation = 0;
+ f32 radius;
i32 vtxIdx = 0;
i32 numVertices = 0;
@@ -28,8 +30,8 @@ struct SnowflakeParticleRenderer {
f32 yMax = 0;
f32 windIntervalSeconds = 1.5;
i32 numSnowflakes = 0;
- Vector2 windSpeed;
f32 timeUntilNextWindSeconds = 0;
+ WindField wind;
SnowflakeUpdateData* updateData;
u32 vao;
diff --git a/themes/src/Windfield.cpp b/themes/src/Windfield.cpp
new file mode 100644
index 0000000..3a7563f
--- /dev/null
+++ b/themes/src/Windfield.cpp
@@ -0,0 +1,28 @@
+#include "Windfield.hpp"
+
+
+template <i32 Width, i32 Height, i32 CellDimension>
+void WindField<Width, Height, CellDimension>::load(f32 ttl, Vector2 origin) {
+ this->ttl = ttl;
+ this->origin = origin;
+ this->end = this->origin + Vector2(Width * CellDimension, Height * CellDimension);
+}
+
+template <i32 Width, i32 Height, i32 CellDimension>
+bool WindField<Width, Height, CellDimension>::addVector(i32 x, i32 y, Vector2& v) {
+ field[x][y] = v;
+ return false;
+}
+
+template <i32 Width, i32 Height, i32 CellDimension>
+Vector2 WindField<Width, Height, CellDimension>::getWindFactor(Vector2& v) {
+ if (v.x >= origin.x && v.x <= end.x
+ && v.y >= origin.y && v.y <= end.y) {
+ Vector2 positionInField = v - this->origin;
+ i32 cellX = static_cast<i32>(Width / positionInField.x);
+ i32 cellY = static_cast<i32>(Height / positionInField.y);
+ return field[cellX, cellY];
+ }
+
+ return Vector2();
+}
diff --git a/themes/src/Windfield.hpp b/themes/src/Windfield.hpp
new file mode 100644
index 0000000..5935c5d
--- /dev/null
+++ b/themes/src/Windfield.hpp
@@ -0,0 +1,38 @@
+#ifndef WIND_FIELD_HPP
+#define WIND_FIELD_HPP
+#include "types.h"
+#include "mathlib.h"
+
+/**
+ A Windfield represents a field of vectors in a rectangular region.
+ The Width and Height are given in units of CellDimenions. The CellDimension
+ is given in pixels.
+ */
+struct WindField {
+ f32 ttl = 0.f;
+ Vector2 origin;
+ Vector2 end;
+
+ /*
+ Granularity of each cell in pixels.
+ */
+ const f32 cellDimension = CellDimension;
+
+ /*
+ Width of the vector field in CellDimensions.
+ */
+ const f32 width = Width;
+
+ /*
+ Height of the vector vield in CellDimensions.
+ */
+ const f32 height = Height;
+
+ Vector2** field;
+
+ void load(f32 cellSizePixels, i32 fieldWithCells, i32 fieldHeightCells, f32 ttl, Vector2 origin);
+ bool addVector(i32 x, i32 y, Vector2& v);
+ Vector2 getWindFactor(Vector2& v);
+};
+
+#endif