Physics: How to implement RayCast and ShapeCast as Unity?

I am currently working on a deterministic physics system in Unity. So I'm using fixed-point mathematics to implement part of the physics in Unity functions.

My main reference is a book on the development of the physics engine of the game.

However, the book does not mention anything about RayCast and ShapeCast.

I want to implement RayCast and ShapeCast as Unity.

I have searched for a while But only find an efficient and robust Ray-Box Intersection.

I think there can not be so few references on the subject. I must use the wrong keyword or I lack some experience in game physics.

I know there are tons of physics engine out there. But most of them are too big for me to understand without documentation.

Could someone please point me to an address? A book, a paper keyword or algorithm.