Hello, I have a poorly performaning piece of code that I'd love to use as an excuse to get into Jobs. I'm hoping someone doesn't mind giving me a super broad rundown of what I would want for this.
I have a meshified terrain where i've converted all the verts into a list of this
struct Triangle
{
Vector3[] Verts
Vector3[] Normals
int[] Indicies
}
I then have a second struct to be used as kinda like a wrapped additional piece of information which is
struct TriangleRelationshipInfo
{
Triangle Triangle
List<Triangle> AdjacentTriangles
}
I generate these TriangleRelationshipInfo's by iterating through the list of triangles twice and seeing if both triangles share 2 identical verts.
Now obviously we are dealing with quite a few triangles here so the amount of comparisons and related stuff end up amounting to roughly 4 seconds of raw processing time to complete. I know there's a couple ways I could optimize this logically but for now I'm just curious how I would go about translating this work into a job. Not looking for someone to give me the code 1:1 but some rough pseudocode and api pointers would be kindly appreciated