src/ldrawalgorithm.h

Sat, 05 Mar 2022 00:51:23 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 05 Mar 2022 00:51:23 +0200
changeset 157
869fe95c4e5e
parent 154
47cb50cfa9ad
child 183
97b591813c8b
permissions
-rw-r--r--

improve grid rendering

154
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #pragma once
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2 #include "modeleditor.h"
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
3
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4 namespace ldraw
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 {
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 /// Determines how quadrilaterals are split into triangles
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7 enum class Diagonal
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8 {
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
9 Diagonal_13,
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 Diagonal_24
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 };
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
12
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
13 // Splits the specified quadrilateral into triangles.
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
14 // If it is not a quadrilateral then no action is performed
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
15 auto splitQuadrilateral(ModelEditor& editor,
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
16 quadrilateralid_t quadrilateral_id,
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
17 Diagonal splitType = Diagonal::Diagonal_13
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
18 ) -> std::optional<std::pair<triangleid_t, triangleid_t>>;
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20 void invert(ModelEditor& editor, ldraw::id_t id);
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
21 void makeUnofficial(ModelEditor &editor);
47cb50cfa9ad add missing files
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
22 }

mercurial