Skip to main content
1 of 2
AgentFire
  • 347
  • 2
  • 14

Segment-Cylinder intersection

What is the complete code (C#, pseudo, does not matter) for calculating the resulting segment (or its absence) for the intersection of the segment and the cylinder?

The segment is defined by Vector3(x,y,z) as Start and Vector3(x,y,z) as End.

The cylinder is defined by the same parameters plus floating-point value as Radius.

AgentFire
  • 347
  • 2
  • 14