Defines how an object is rotated and tilted when displayed. More...
#import <deCartaRotationTilt.h>
Public Member Functions | |
| (id) | - initWithRotateRelative:tiltRelative: |
Static Public Member Functions | |
| (id) | + rotationTilt |
| (id) | + rotationTiltWithRotateRelative:tiltRelative: |
Properties | |
| RotateRelativeEnum | rotateRelativeTo |
| TiltRelativeEnum | tiltRelativeTo |
| float | rotation |
| float | tilt |
| float | cosR |
| float | sinR |
| float | cosT |
| float | sinT |
Defines how an object is rotated and tilted when displayed.
This class defines how an object (such as a deCartaPin or deCartaInfoWindow) is rotated and tilted. Rotation is defined as the rotation around the Z-axis using the right-hand rule, meaning that positive angles rotate the object a specified number of degrees clockwise. This rotation can be specified as an absolute rotation, or as a rotation that is added to the map's rotation (see the rotateRelativeTo property). Tilt is defined as the rotation around the X-axis using the right-hand rule, meaning that a negative angle tilts the top of the object away from the viewer. This tilt can be specified as an absolute tilt, or as a tilt that is added to the map's tilt (see the tiltRelativeTo property).
| - (id) initWithRotateRelative: | (RotateRelativeEnum) | inRotateRelativeTo | ||
| tiltRelative: | (TiltRelativeEnum) | inTiltRelativeTo | ||
Initializes the deCartaRotationTilt object with the desired rotation and tilt settings.
| inRotateRelativeTo | Set to ROTATE_RELATIVE_TO_SCREEN to have the rotation of this object be independent of the map's rotation, or set to ROTATE_RELATIVE_TO_MAP to have the rotation of the object be relative to the map's rotation. | |
| inTiltRelativeTo | Set to TILT_RELATIVE_TO_SCREEN to have the tilt of this object be independent of the map's tilt, or set to TILT_RELATIVE_TO_MAP to have the tilt of the object be relative to the map's tilt. |
| + (id) rotationTilt |
Returns the ID of this deCartaRotationTilt object.
| + (id) rotationTiltWithRotateRelative: | (RotateRelativeEnum) | inRotateRelativeTo | ||
| tiltRelative: | (TiltRelativeEnum) | inTiltRelativeTo | ||
Sets the deCartaRotationTilt object's properties with the desired rotation and tilt settings.
| inRotateRelativeTo | Set to ROTATE_RELATIVE_TO_SCREEN to have the rotation of this object be independent of the map's rotation, or set to ROTATE_RELATIVE_TO_MAP to have the rotation of the object be relative to the map's rotation. | |
| inTiltRelativeTo | Set to TILT_RELATIVE_TO_SCREEN to have the tilt of this object be independent of the map's tilt, or set to TILT_RELATIVE_TO_MAP to have the tilt of the object be relative to the map's tilt. |
- (float) cosR [read, assign] |
The cosine of the rotation
- (float) cosT [read, assign] |
The cosine of the tilt
- (RotateRelativeEnum) rotateRelativeTo [read, assign] |
Set to ROTATE_RELATIVE_TO_SCREEN to have the rotation of this object be independent of the map's rotation, or set to ROTATE_RELATIVE_TO_MAP to have the rotation of the object be relative to the map's rotation.
- (float) rotation [read, write, assign] |
Rotation can be any angle, and will automatically be normalized to an angle from -180.0 to 180.0 degrees. Positive angles rotate the object clockwise.
- (float) sinR [read, assign] |
The sine of the rotation
- (float) sinT [read, assign] |
The sine of the tilt
- (float) tilt [read, write, assign] |
Tilt must be an angle from 0.0 to -45.0, with 0.0 indicating no tilt, and -45.0 indicating that the top of the object tilts away from the viewer at a 45-degree angle.
- (TiltRelativeEnum) tiltRelativeTo [read, assign] |
Set to TILT_RELATIVE_TO_SCREEN to have the tilt of this object be independent of the map's tilt, or set to TILT_RELATIVE_TO_MAP to have the tilt of the object be relative to the map's tilt.
1.6.1