I guess the D matrix is mysterious in the previous post, the original poster talked about angles in degrees. Let’s say we are in the XY plane and have a heading rotation in the plane H and a pitch rotation P upward. The camera roll angle doesn’t influence the target position. Given further the camera position as X, Y, Z, we get a target position:
Xt = X+cos(H)*cos§
Yt = Y+sin(H)*cos§
Zt = Z+sin§
The only thing worth noting is that you may have to convert your angles to radians (OpenGL uses degrees in glRotate, but the C math lib uses radians!!!) by multiplying with PI/180 beforehand, e.g.
H=h180/PI, P=p180/PI, where h and p are the angles expressed in degrees.