GroupRotator

Properties

The GroupRotator and its associated classes are complementery custom coded files which need to be included in your vassal module to be functioning. You should have a source or a binary release to include the files for usage. The custom classes can be found in the com.fightingchaos.VASSAL classpath. The subpackag structure is the same as the original VASSAL package structure. To incorporate custom classes into your module please take a look at the VASSAL documentation.
The custom classes consist of the following in VASSAL usable classes:
In addition there are several classes, which are not directly used by the developers/modder. They are just presented for completeness.

GroupRotator

GroupRotator is a property for GamePieces to be able to free rotate all pieces of a group around a special pivot and wheel point, or rotate all pieces of a group around the center of the group by a fixed degree. For details on configuration of this custom class have a look at the GroupRotator documentation.
GroupRotator uses a Globalproperty with the name Inch in Vassal to determin the scale to be displayed besides the interactive rotation. If no scale is present a preset value of  45 is used. It is multiplied with the angle by 2*Math.PI/scale/360.0 to represent the length along the arc of the rotation. Certain games use the rotation distance along the longest arc as the movement indicator, the Inch property represent so one unit of size on your game board, with the default of 45 pixels representing one unit (whatever it may be).

Have a look at the example below for a configuration of a GamePiece prototype using the GroupRotator property.


The GroupRotator provides two possible configuration types. One is the configuration of the rotation property for interactive arbitrary rotations (default) which is activated by the checkbox Allow arbitrary rotations. The other is a definition of N fixed angles which you can rotate to activated by deselecting the Allow arbitrary rotations checkbox.

Arbitrary/interactive rotation


You can specify a Description, a Key combination and a menu text for the right click menu. The checkbox  toggles between free and interactive rotation.
The arbitrary rotation is an extension of the normal Can Rotate property. It works with three clicks. The first click decides where the pivot point should be (the point around which the rotation will be executed), the second click decides on the wheel point (the point where your rotation arc should start from). The third click sets the angle of the rotation. While holding down the mouse button for the third click you can see a rotatin arce beeing drawn. On releasing the mouse button on the third click  will set the rotation angles needed in each piece to perform the rotation of each individual GamePiece in your group along the specified arc.

Fixed rotation



Unchecking the Allow arbitrary rotations checkbox activates the fixed rotation configuration of the GroupRotator. You can specify here the number of allowed facings, a key command for clockwise and one for counterclockwise rotation and their menu entries.
By specifying N facings you divide 360° into N positions your GamePieces can be rotated to. The commands to rotate clockwise/counterclockwise will step your pieces through the N facings increasing or decreasing the angle as defined.
In a group this configuration works a little bit different from the normal rotation, as the center of the grouped pieces is used to rotate the GamePieces.

Distance configuration


There is an indicator to show the length of the path rotated in an interactive rotation, as you can see in the image below.
1 indicates the pivot point
2 indicates the wheel point
3 indicates the arc position
4 indicates the arc lenth/distance

For this feature to work properly you must configure VASSAL with a Global Property named Inch as shown below.

If no Inch property is set the distance is configured to a value of 45 internally, meaning one unit of distance on your map is set to 45 pixels.