src/ldrawalgorithm.h

Sat, 05 Mar 2022 13:59:54 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 05 Mar 2022 13:59:54 +0200
changeset 166
8857351912d0
parent 154
47cb50cfa9ad
child 183
97b591813c8b
permissions
-rw-r--r--

Fix rendering of cursor coordinates on bright background

#pragma once
#include "modeleditor.h"

namespace ldraw
{
	/// Determines how quadrilaterals are split into triangles
	enum class Diagonal
	{
		Diagonal_13,
		Diagonal_24
	};

	// Splits the specified quadrilateral into triangles.
	// If it is not a quadrilateral then no action is performed
	auto splitQuadrilateral(ModelEditor& editor,
		quadrilateralid_t quadrilateral_id,
		Diagonal splitType = Diagonal::Diagonal_13
	) -> std::optional<std::pair<triangleid_t, triangleid_t>>;

	void invert(ModelEditor& editor, ldraw::id_t id);
	void makeUnofficial(ModelEditor &editor);
}

mercurial