Category Windows and views, Object ProView

Function ProViewMatrixSet


Description
Sets the orientation of a model in a view. The matrix argument specifies the transformation between model coordinates and screen coordinates. Each row of the matrix must have a length of 1.0, and the bottom row must be 0,0,0,1.

Creo Parametric applies its own shift and scaling to the specified view matrix to ensure that the model fits properly into the view. Thus, subsequent calls to ProViewMatrixGet() don't return the original matrix, though its rotation will be the same.

NOTE:

You must normalize the matrix you pass to ProViewMatrixSet() so that it has no scaling or origin shift. ProViewMatrixSet() rejects non-normalized matrices. See function UserMatrixNormalize.

Replacement in Object TOOLKIT: pfcView::Transform
Synopsis
#include <ProView.h>
ProErrorProViewMatrixSet(
ProMdl model
/* (In)
The handle to part, assembly, or drawing. If this is NULL, the function uses the current object.
*/
ProView view_handle
/* (In)
The view handle. If the view is NULL, the function uses the current view.
*/
ProMatrix matrix
/* (In)
The view transformation matrix.
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully set the orientation.
PRO_TK_INVALID_MATRIXThe matrix is invalid or NULL.
PRO_TK_BAD_INPUTSThe specified object pointer is not a handle to a part, assembly, or drawing.

Manual References:

  1. Pro/DEVELOP to Creo Toolkit Function Mapping: Equivalent Pro/DEVELOP Functions
  2. User Interface: Basic Graphics: Solid Orientation
  3. User Interface: Basic Graphics: Getting and Setting the View Matrix
  4. Core: Coordinate Systems and Transformations: Transforming Solid to Screen Coordinates

Sample Code References:

  1. pt_examples ( TestExtrude.c )
  2. pt_examples ( TestView.c )
  3. pt_geardesign ( GearDesign.c )
  4. pt_userguide ( UgGraphViewsSave.c )