Category Mechanism Design, Object ProSnapshot

Function ProSnapshotConstraintEvaluate


Description
evaluate a constraint of type PRO_SNAP_MOTION_AXIS_POS for the model shown on screen. The function does not depend on the current snapshot, and it is not important whether the snapshot contains the constraint or not.
Synopsis
#include <ProKinDrag.h>
ProErrorProSnapshotConstraintEvaluate(
const ProSnapshotConstraint* constraint
/* (In)
Pointer to the constraint of type PRO_SNAP_MOTION_AXIS_POS with sel_array field filled up before calling the function. The fields constraint->user_active and constraint->valid are ignored.
*/
double* position
/* (Out)
The current motion axis position.
*/
)
Returns
PRO_TK_NO_ERRORThe function was successful.
PRO_TK_BAD_INPUTSThe constraint is incorrect or it is not of type PRO_SNAP_MOTION_AXIS_POS.
PRO_TK_GENERAL_ERRORThe function failed.

Manual References:

  1. Assembly: Kinematic Dragging and Creating Snapshots: Snapshot Constraints

Sample Code References:

  1. pt_examples ( TestDrag.c )