Overview
The MhSnapperSpawner
class is responsible for creating and populating MhSnapper
s with their MhSnapperShape
and MhBehavior
s. MhSnapperSpawner
s are used by the library to insert MhSnapper
s into the drawing, as well as by the MhEngine
and its MhSystemEngineFunction
s to generate MhSnapper
s automatically.
Important Methods
shapeClass
Provides the class of the MhSnapperShape
to be used by the MhSnapper
that the MhSnapperSpawner
creates. This is used to instantiate the MhSnapperShape
and provide it to the MhSnapper
.
... public Class shapeClass() { //Use custom shape here return MhSnapperShape; } ...
relationship
The realationship
method on MhSnapperSpawner
is used to provide the SnapperRelationship
for the MhSnapper
that the MhSnapperSpawner
creates. The SnapperRelationship
is used to determine the specifics of Snapper
adoption.
... public SnapperRelationship relationship() { //Use custom relationship here if needed return SnapperRelationship; } ...
Custom Behavior Methods
MhSnapperSpawner
provides many methods which can be overridden to add custom behaviors to the MhSnapper
that it creates. These methods are split into categories based on the type of behavior they add. The methods are as follows:
-
customGfxBehavior
: Behaviors to add graphics -
customPartBehavior
: Behaviors for parts -
customEngineBehavior
: Add custom engine behaviors (For Engine Entries) -
customAnimationBehavior
: Behaviors for custom animations (Insert, Drag, Stretch, etc.) -
customConfigBehavior
: Custom behavior for defining configuration equivalency -
customArrowbehavior
: Custom behavior for animation arrows -
customOtherBehavior
: Any other custom behaviors
Comments
0 comments
Please sign in to leave a comment.