ArticulationGenerator.h header
#include <ew/app/ArticulationGenerator.h>
Namespace ew::app
ArticulationDerivation struct
struct ew::app::ArticulationDerivation
The derivation, stage by stage.
Every stage is returned, not just the glyph. A user cannot tell WHY a letter came out as it did – and so cannot adjust the input that produced it – from the finished shape alone; they need to see which channels crossed where, and which of those crossings the route took.
Members
std::vector<std::vector<ew::core::conlang::StrokePoint> > ew::app::script::ArticulationDerivation::channels
Each channel after its marks have deformed it: the geometry that actually gets intersected.
std::vector<ArticulationNode> ew::app::script::ArticulationDerivation::nodes
Every crossing found between them.
std::vector<ArticulationNode> ew::app::script::ArticulationDerivation::route
The nodes the route visited, in order.
ew::core::conlang::Stroke ew::app::script::ArticulationDerivation::glyph
The finished glyph, as an ordinary editable stroke.
bool ew::app::script::ArticulationDerivation::operator==(const ArticulationDerivation &other) const =default
Value equality over all fields.
ArticulationNode struct
struct ew::app::ArticulationNode
One crossing of two channels: a place the route can visit.
Members
double ew::app::script::ArticulationNode::x = 0.0
Where the crossing is, in glyph-box coordinates.
double ew::app::script::ArticulationNode::y = 0.0
Where the crossing is, in glyph-box coordinates.
int ew::app::script::ArticulationNode::firstChannel = 0
The index of the first channel that crossed here.
int ew::app::script::ArticulationNode::secondChannel = 0
The index of the second.
double ew::app::script::ArticulationNode::firstPosition = 0.0
How far along the first channel the crossing is, 0..1 – the "when" a by-time route follows.
bool ew::app::script::ArticulationNode::operator==(const ArticulationNode &other) const =default
Value equality over all fields.
Functions
ArticulationDerivation ew::app::script::deriveGlyph(const ew::core::conlang::GlyphArticulation &articulation)
The glyph articulation derives, with every intermediate stage.
A DRAFT: what comes back is an ordinary stroke the canvas can edit like any other, so a user can start from a systematic derivation and then adjust it by hand. That is the whole point of routing the generator through the canvas rather than treating its output as final.
std::vector< ew::core::conlang::StrokePoint > ew::app::script::expandChannel(const ew::core::conlang::ArticulationChannel &channel)
channel's path with its marks applied – the shape the crossings are actually found on.
A mark is not decoration on the finished letter; it changes what there is to intersect, which is how two phonemes differing only in voicing come out as visibly different glyphs.
std::vector< ArticulationNode > ew::app::script::findNodes(const std::vector< std::vector< ew::core::conlang::StrokePoint > > &channels)
Every place two of channels cross.
std::vector< ArticulationNode > ew::app::script::walkRoute(const std::vector< ArticulationNode > &nodes, const ew::core::conlang::GlyphArticulation &articulation)
nodes ordered by strategy, starting nearest start when the route is anchored.