Skip to content

Commit

Permalink
[#72] Render neckline
Browse files Browse the repository at this point in the history
  • Loading branch information
Orchaldir committed Sep 17, 2023
1 parent 7c20a5b commit 526e816
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions rpg_tools_rendering/src/rendering/equipment/shirt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ fn add_neckline(
builder.add_mirrored_points(&aabb, width, 0.0, true);
builder.add_mirrored_points(&aabb, width, 0.1, false);
}
Neckline::DeepV => {}
Neckline::DeepV => add_v(&aabb, torso, builder, 0.4),
Neckline::Scoop => {}
Neckline::V => {
let width = torso.shoulder_width / 3.0;
builder.add_mirrored_points(&aabb, width, 0.0, true);
builder.add_point(aabb.get_point(0.5, 0.2), true);
}
Neckline::V => add_v(&aabb, torso, builder, 0.2),
}
}

fn add_v(aabb: &&AABB, torso: &TorsoConfig, builder: &mut Polygon2dBuilder, depth: f32) {
let width = torso.shoulder_width / 3.0;
builder.add_mirrored_points(&aabb, width, 0.0, true);
builder.add_point(aabb.get_point(0.5, depth), true);
}

0 comments on commit 526e816

Please sign in to comment.