Typedefs | |
typedef void(* | ConsMod_ApplyCallback )(Cons *cons, CallbackArgP arg) |
Callback function used by mdlConsMod_apply. More... | |
Functions | |
nativeCode Cons * | mdlConsMod_add (ConsModel *pThis, Cons *pNode) |
mdlConsMod_add adds a constraint, construction, etc. More... | |
nativeCode void | mdlConsMod_concat (ConsModel *pThis, ConsModel *pModel2) |
The mdlConsMod_concat adds all of the objects in the second model to the first model. More... | |
nativeCode Cons * | mdlConsMod_drop (ConsModel *pThis, Cons *pNode) |
mdlConsMod_drop removes an object from a constraint model. More... | |
nativeCode ConsModel * | mdlConsMod_create (ConsModel *pThis) |
mdlConsMod_create defines an empty constraint model. More... | |
nativeCode void | mdlConsMod_destroy (ConsModel *pThis) |
mdlConsMod_destroy frees the memory allocated by | |
nativeCode void | mdlConsMod_destroyNodes (ConsModel *pThis) |
mdlConsMod_destroyNodes drops, destroys, and frees each constraint, construction frame, constraint parameter, equation and attachment which has been added to the model. More... | |
nativeCode void | mdlConsMod_chooseSolution (ConsModel *pThis, bool unused) |
mdlConsMod_chooseSolution directs the constraint model pModel to identify and track the solutions to the constraint problem closest to the model's current geometry. More... | |
nativeCode int | mdlConsMod_solve (ConsModel *pThis) |
mdlConsMod_solve solves a constraint problem by modifying the attribute variables of construction frames and constraint parameters as necessary. More... | |
nativeCode int | mdlConsMod_validate (ConsModel *pThis) |
mdlConsMod_validate diagnoses under-determined variables and redundant constraints in a constraint-solving problem. More... | |
nativeCode int | mdlConsMod_dof (ConsModel *pThis) |
mdlConsMod_dof returns the degrees of freedom left in a constraint problem. More... | |
nativeCode void | mdlConsMod_backupVars (ConsModel *pThis) |
mdlConsMod_backupVars commands each object in the constraint model to save the current values of its attribute variables. More... | |
nativeCode void | mdlConsMod_restoreVars (ConsModel *pThis) |
mdlConsMod_restoreVars commands each object in the constraint model to restore the values of its attribute variables. More... | |
nativeCode void | mdlConsMod_apply (ConsModel *pThis, ConsMod_ApplyCallback fp, CallbackArgP arg) |
mdlConsMod_apply applies the supplied MDL function to each object in the constraint model. More... | |
nativeCode bool | mdlConsMod_isFound (ConsModel *pThis, void *pNode) |
mdlConsMod_isFound looks for an object in the constraint model by its pointer value. More... | |
nativeCode int | mdlConsMod_transform (ConsModel *pThis, TransformP pTransform) |
mdlConsMod_transform transforms the geometry of all objects in the specified constraint model. More... | |
nativeCode int | mdlConsMod_offset (ConsModel *pThis, Dpoint3d *pOff) |
mdlConsMod_offset translates all objects in the specified constraint model by the specified offsets in the x and y directions in the current plane (the z offset is ignored, since the model is planar). More... | |
nativeCode void | mdlConsMod_mirror (ConsModel *pThis, Dpoint3d *pO, RotMatrixP pRot) |
mdlConsMod_mirror modifies the geometry of the objects in the specified constraint model by mirroring across the specified line of symmetry in the current plane. More... | |
nativeCode int | mdlCons_isChanged (Cons *pThis) |
mdlCons_isChanged queries if an object's attribute variables or targets have been changed, compared to their saved values. More... | |
nativeCode Var * | mdlCons_getVar (Cons *pThis, int i) |
mdlCons_getVar retrieves the ith attribute variable of the specified Cons object. More... | |
typedef void(* ConsMod_ApplyCallback)(Cons *cons, CallbackArgP arg) |
Callback function used by mdlConsMod_apply.
[in] | cons | An object in the constraint model. |
[in] | arg | Argument supplied to mdlConsMod_apply. |
nativeCode Var* mdlCons_getVar | ( | Cons * | pThis, |
int | i | ||
) |
mdlCons_getVar retrieves the ith attribute variable of the specified Cons object.
[in] | pThis | is the object to be accessed. |
[in] | i | is the index of the attribute to retrieve. |
nativeCode int mdlCons_isChanged | ( | Cons * | pThis | ) |
mdlCons_isChanged queries if an object's attribute variables or targets have been changed, compared to their saved values.
[out] | pThis | is the object to query. |
nativeCode Cons* mdlConsMod_add | ( | ConsModel * | pThis, |
Cons * | pNode | ||
) |
mdlConsMod_add adds a constraint, construction, etc.
to a constraint model.
[in,out] | pThis | is the constraint model to update. |
[in,out] | pNode | points to a constraint, construction frame, constraint parameter, equation constraint, or attachment. |
nativeCode void mdlConsMod_apply | ( | ConsModel * | pThis, |
ConsMod_ApplyCallback | fp, | ||
CallbackArgP | arg | ||
) |
mdlConsMod_apply applies the supplied MDL function to each object in the
constraint model.
All objects in the model are processed.
[in] | pThis | is the constraint model. |
[in] | fp | is a pointer to an MDL function |
[in] | arg | is passed to fp as its second argument. |
nativeCode void mdlConsMod_backupVars | ( | ConsModel * | pThis | ) |
mdlConsMod_backupVars commands each object in the constraint model to save the
current values of its attribute variables.
This then establishes the baseline for comparison and restoring for later calls to the solve function.
[out] | pThis | is the constraint model containing the construction frames, etc., which are to be backed up. |
nativeCode void mdlConsMod_chooseSolution | ( | ConsModel * | pThis, |
bool | unused | ||
) |
mdlConsMod_chooseSolution directs the constraint model pModel to identify and
track the solutions to the constraint problem closest to the model's current geometry.
[in,out] | pThis | the storage to be filled out. |
[in] | unused | is this to be a post-check? |
nativeCode void mdlConsMod_concat | ( | ConsModel * | pThis, |
ConsModel * | pModel2 | ||
) |
The mdlConsMod_concat adds all of the objects in the second model to the first
model.
Each object added is assigned a new model ID number in the process.
[in,out] | pThis | is the constraint model to which the objects are added. |
[in] | pModel2 | is the constraint model from which the objects are read. |
nativeCode ConsModel* mdlConsMod_create | ( | ConsModel * | pThis | ) |
mdlConsMod_create defines an empty constraint model.
[out] | pThis | is the storage to be filled out. |
nativeCode void mdlConsMod_destroy | ( | ConsModel * | pThis | ) |
mdlConsMod_destroy frees the memory allocated by
The constraint model is then invalid and should not be used.
[out] | pThis | is the constraint model. It is not freed. |
nativeCode void mdlConsMod_destroyNodes | ( | ConsModel * | pThis | ) |
mdlConsMod_destroyNodes drops, destroys, and frees each constraint, construction
frame, constraint parameter, equation and attachment which has been added to the model.
The model itself is not destroyed.
[out] | pThis | is the constraint model |
nativeCode int mdlConsMod_dof | ( | ConsModel * | pThis | ) |
mdlConsMod_dof returns the degrees of freedom left in a constraint problem.
If the degrees of freedom is zero and there are no redundant constraints in the model, then the problem is well constrained.
[in] | pThis | is the constraint model to diagnose. |
nativeCode Cons* mdlConsMod_drop | ( | ConsModel * | pThis, |
Cons * | pNode | ||
) |
mdlConsMod_drop removes an object from a constraint model.
The object is not destroyed. If the object is a constraint, its effects on the constraint-solving problem are removed.
[in,out] | pThis | is the constraint model. |
[in] | pNode | is the Cons object to drop from the model. |
nativeCode bool mdlConsMod_isFound | ( | ConsModel * | pThis, |
void * | pNode | ||
) |
mdlConsMod_isFound looks for an object in the constraint model by its pointer
value.
[in] | pThis | is the constraint model to be searched. |
[in] | pNode | is a pointer to the object to find. |
nativeCode void mdlConsMod_mirror | ( | ConsModel * | pThis, |
Dpoint3d * | pO, | ||
RotMatrixP | pRot | ||
) |
mdlConsMod_mirror modifies the geometry of the objects in the specified constraint
model by mirroring across the specified line of symmetry in the current plane.
[in] | pThis | is the model containing the construction frames, etc. which are to be modified. |
[in] | pO | start of a line of symmetry |
[in] | pRot | orientation of line of symmetry |
nativeCode int mdlConsMod_offset | ( | ConsModel * | pThis, |
Dpoint3d * | pOff | ||
) |
mdlConsMod_offset translates all objects in the specified constraint model by the
specified offsets in the x and y directions in the current plane (the z offset is ignored, since the model is planar).
[in,out] | pThis | is the model containing the construction frames, etc. which are to be modified. |
[in] | pOff | contains the x and y offsets to add to each object's location. |
nativeCode void mdlConsMod_restoreVars | ( | ConsModel * | pThis | ) |
mdlConsMod_restoreVars commands each object in the constraint model to restore
the values of its attribute variables.
This includes the attribute variables of constraints and constants.
[out] | pThis | is the constraint model containing the construction frames, etc., which are to be restored. |
nativeCode int mdlConsMod_solve | ( | ConsModel * | pThis | ) |
mdlConsMod_solve solves a constraint problem by modifying the attribute variables
of construction frames and constraint parameters as necessary.
If all constraints are already satisfied, nothing is done. Solve restores the values of all attribute variables to their saved values if the constraint problem cannot be solved.
[in,out] | pThis | is the constraint model to solve. |
nativeCode int mdlConsMod_transform | ( | ConsModel * | pThis, |
TransformP | pTransform | ||
) |
mdlConsMod_transform transforms the geometry of all objects in the specified
constraint model.
[in,out] | pThis | is the model containing the construction frames, etc. which are to be modified. |
[in] | pTransform | is the transformation matrix to apply to each object's geometry. |
nativeCode int mdlConsMod_validate | ( | ConsModel * | pThis | ) |
mdlConsMod_validate diagnoses under-determined variables and redundant
constraints in a constraint-solving problem.
The under-determined status of the attribute variables of construction frames and constraint parameters is updated, and the rGroup value of constraints is reset.
[in] | pThis | is the constraint model to diagnose. |