Simulation and Rendering
To perform the actual cable simulation, a technique called Verlet Integration, which is well known in game development. The idea is to represent the cable as a series of particles, with distance constraints between them. The particles at the ends are fixed, moving with whatever they are attached to. The ones in the middle are free, falling with gravity. For each step, you update the velocity and position of each particle, and then move them to satisfy the constraints. The stiffness of the cable is controlled by the number of times we iterate to enforce the constraints (each step).
Now that there is a nice chain of connected particles bouncing around, they need to be rendered. To render a cable, a class called FCableSceneProxy was created to represent the render of the cable. Each end of the Sim particles' positions (done on the main thread, inside of TickComponent) are then passed to this proxy via the SendRenderDynamicData_Concurrent function. Next, update is locked on the render thread, and then the index and vertex buffers are updated, thereby making a tube mesh. For each vertex on this tube mesh, we need to calculate a position, a Texture UV, and three Tangent Basis vectors. When doing this, X will point along the cable, Z will point straight out from the cable (the normal) and Y is perpendicular to X and Z. These properties have been exposed to the components, giving you the ability to control the number of sides, the radius of the tube, and how many times the UVs can tile along the cable.