public readonly record struct TriangleHitEverything a ray found, rather than only whether it found anything.
Remarks
docs/plan/41-automatic-retopology.md § D12's bake casts along the output's interpolated normal and writes what it struck into an atlas texel: the source normal there, and how far along the ray it was. Both of those are Barycentric and Distance, and the Raycast that predates this reports neither — it exists for a sign vote, which asks only whether the nearest face was struck from behind.
⚠ Distance is in units of the direction handed in, not of the model. A caller that passes a unit normal reads a length; one that passes an un-normalised direction reads a fraction of it. The bake passes a direction whose length is its search radius, so the answer it wants is the fraction.
Fields and properties (5)
public int TriangleWhich triangle, indexed as the caller's indices were, or -1 for a miss.
public Vector3 PointWhere on it the ray struck, or the origin for a miss.
public float DistanceHow far along the ray, in units of the direction, or PositiveInfinity for a miss.
public Vector3 BarycentricThe weights of the triangle's three vertices at .
public bool BackfaceWhether the face was struck from behind.
Methods (1)
Used by (4)
- MapBakerVixen.Geometry.Remeshing
- TriangleTreeVixen.Core.Mathematics
- TriangleTreeTestsVixen.Core.Mathematics.Tests
- PaintProjectionVixen.Editor.Texturing