8#include "Kanoop/kanoopcommon.h"
30Q_DECLARE_FLAGS(Sides,
Side)
31Q_DECLARE_OPERATORS_FOR_FLAGS(Sides)
45Q_DECLARE_OPERATORS_FOR_FLAGS(Directions)
64Q_DECLARE_OPERATORS_FOR_FLAGS(SpatialRelationships)
75Q_DECLARE_FLAGS(Axes,
Axis)
76Q_DECLARE_OPERATORS_FOR_FLAGS(Axes)
Geographic type enumerations and string-conversion helpers for Qt geometry types.
KANOOP_EXPORT Side directionToSide(Direction direction)
Convert a Direction to the corresponding Side value.
SpatialRelationship
Spatial relationship between two geometric objects.
@ IntersectsWith
Objects intersect.
@ ContainedBy
Origin is contained by other.
@ ToLeftOf
Origin is to the left of other.
@ Below
Origin is below other.
@ Towards
Moving toward other.
@ AwayFrom
Moving away from other.
@ NoRelationship
No defined relationship.
@ Contained
Origin is contained within other.
@ ToRightOf
Origin is to the right of other.
@ Above
Origin is above other.
@ Contains
Origin contains other.
Direction
Cardinal directions, aliased to the corresponding Side values.
@ ToRight
Rightward (toward larger X)
@ ToLeft
Leftward (toward smaller X)
@ Down
Downward (toward larger Y)
@ NoDirection
No direction.
@ Up
Upward (toward smaller Y)
Side
Bitmask identifying which side(s) of a rectangle are relevant.
@ BottomLeftCorner
Bottom-left corner.
@ TopLeftCorner
Top-left corner.
@ BottomRightCorner
Bottom-right corner.
@ TopRightCorner
Top-right corner.
KANOOP_EXPORT Direction sideToDirection(Side side)
Convert a Side to the corresponding Direction value.
KANOOP_EXPORT Direction oppositeDirection(Direction direction)
Return the opposite of a cardinal Direction.
KANOOP_EXPORT double directionToBearing(Direction direction)
Convert a cardinal Direction to a compass bearing in degrees.
KANOOP_EXPORT QList< Direction > allDirections()
Return a list of all four cardinal directions.
KANOOP_EXPORT Direction bearingToDirection(double bearing)
Convert a compass bearing to the nearest cardinal Direction.