1 #ifndef _POINT_TO_CAM_H_
2 #define _POINT_TO_CAM_H_
26 float OffsetByThisPercent,
28 Matrix *local_transformation = NULL )
34 double offz = -OLDR.Dot( offset );
35 if (OffsetByThisPercent != 0) {
36 double offmag = offset.Magnitude();
37 double rad = wid > hei ? wid : hei;
39 if ( (!moveiftoofar) || offz < rad+.4*
g_game.
zfar ) {
42 offset *= OffsetByThisPercent*rad;
49 offz += OLDR.Dot( offset );
51 if (local_transformation) {
52 Vector q1( local_transformation->r[1], local_transformation->r[4], local_transformation->r[7] );
53 Vector p1( ( q1.Dot( q ) )*q );
54 q = ( q1.Dot( p ) )*p+p1;
57 posit = posit-local_transformation->p;
63 ScaledCrossProduct( q, r, p );
64 ScaledCrossProduct( r, p, q );