src/ldrawalgorithm.h

Wed, 09 Mar 2022 14:07:58 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Wed, 09 Mar 2022 14:07:58 +0200
changeset 176
cd9d6bf6f649
parent 154
47cb50cfa9ad
child 183
97b591813c8b
permissions
-rw-r--r--

Simplify parsing (removed header parsing)
Removed ldraw::Comment (MetaCommand handles line type 0)

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