ConeView and direction

Hi gurus.

Do you know the ApplyForce example? There is a kind triangular character you can control with "wasd" right?

I want to implement a cone view to check what the character is viewing?
I guess the best way to do that is to cast several rays in the direction the character is facing, correct?

How can I calculate those rays direction?

And how can I render those rays(lines), just to visually check if they are accurated.

PLEASE, PLEASE, PLEASE help me.
Please help!

Original thread: https://box2d.org/forum/viewtopic.php?t=10190