Sander van Rossen🇺🇦 on Nostr: I do the same thing, you just have an additional array with indices that point to the ...
I do the same thing, you just have an additional array with indices that point to the next vertex or itself. It's nice because you know the maximum possible size. If you also have triangles or quads you can infer the next/prev vertices based on their position in the arrays (so no need to store them) and you just need an additional array for each edge to point to it's opposite/twin edge
Published at
2024-01-12 21:15:54Event JSON
{
"id": "e2cc44b97be599e9dde730ba28cc2ee560c2f6194b284391b5c6dfdcee0a1ad8",
"pubkey": "41ac9a386ae93cb734caa676927b072cd04d3d4f9a6bbe87195023ce71f6c44d",
"created_at": 1705094154,
"kind": 1,
"tags": [
[
"e",
"a9e97846b9d827bd3cde414b9adbdcacc93247ea8d9ce88963bd040fce23c6f1",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://mastodon.gamedev.place/users/logicalerror/statuses/111745050480162684",
"activitypub"
]
],
"content": "I do the same thing, you just have an additional array with indices that point to the next vertex or itself. It's nice because you know the maximum possible size. If you also have triangles or quads you can infer the next/prev vertices based on their position in the arrays (so no need to store them) and you just need an additional array for each edge to point to it's opposite/twin edge",
"sig": "b6da2a516cce977b8c16179d3f226bd729217d7a81103ff024d828fc8183849c32ce00d25e58f58c81124beb5696ec849babc5afee8081aa5d02966eff9c1890"
}