void peval_view_ori_matrix3(
const Ppoint3 *view_ref /* view reference point in WC */ const Pvec3 *view_norm /* view plane normal */ const Pvec3 *view_up /* view up vector */ Pint *error_ind /* (out) error indicator */ Pmatrix3 result /* (out) view orientation matrix */
)
typedef struct {
Pfloat x; /* x coordinate */
Pfloat y; /* y coordinate */
Pfloat z; /* z coordinate */
} Ppoint3;
typedef struct {
Pfloat delta_x; /* delta x */ Pfloat delta_y; /* delta y */
Pfloat delta_z; /* delta z */
} Pvec3;
typedef Pfloat Pmatrix3[4][4];
Returns a matrix allowing passage from world coordinates (WC) to view reference coordinates (VRC). This matrix is calculated from: - view reference point - view plane normal
- view up vector.
This matrix is used in the SET VIEW REPRESENTATION 3 function to define the WC transformation (see SET VIEW REPRESENTATION 3 function).
The 3D point view_ref defines the view reference point in WC. This point becomes the VRC origin. Generally, it is near the object to be displayed. Moving this point is equivalent to moving the object with respect to the display surface.
The vector specified by view_norm, is the view plane normal; it is defined in WC. It defines the VRC N axis. This axis defines the view front-back orientation. The WC plane containing the view reference point and orthogonal to N, defines the view reference plane.
The vector specified by view_up is the view up vector; it is defined in WC. The vector is projected on the view reference plane parallel to the view plane normal. This vector defines the VRC V axis and the top-bottom orientation of the view.
The third axis, U, defining the VRC is defined in such a way that UVN is a direct reference.
set view representation 3, evaluate view mapping matrix 3