note
	description: "[
							Represent the direction that an effect come from (an not where
							it goes, be carefull). Direction is encoded by hundredths of a
							degree starting north and turning clockwise. Cardinal directions
							of the haptic device are relative to the positioning of the device. 
							North is considered to be away from the user, south is toward the user, 
							east is right, and west is left of the user:
		
							               .--.
							               |__| .-------.
							               |=.| |.-----.|
							               |--| ||     ||
							               |  | |'-----'|
							               |__|~')_____('
							                [ COMPUTER ]
							
							
							                 North (0)
							                      ^
							                      |
							                      |
							(9000) West <----[ HAPTIC ]----> East (27000)
							                      |
							                      |
							                      v
							                 South (18000)
							
							
							                 [ USER ]
							                   \|||/
							                   (o o)
							             ---ooO-(_)-Ooo---
	]"
	author: "Louis Marchand"
	date: "Tue, 03 Mar 2015 15:22:37 +0000"
	revision: "2.0"

class interface
	GAME_HAPTIC_POLAR_DIRECTION

create {GAME_HAPTIC_EFFECT}
	make_from_other


create 
	make,
	make_with_angle

feature -- Initialization

	make
			-- Initialization of Current
		ensure then
			exists: exists
			type_is_valid: type = {GAME_SDL_EXTERNAL}.sdl_haptic_polar
			angle_valid: angle = 0
	
feature -- Access

	angle: INTEGER_32 assign set_angle
			-- The angle in polar coordinate (encoded by hundredths of a degree
			-- starting north and turning clockwise).
		require
			exists: exists

	set_angle (a_angle: INTEGER_32)
			-- Assign angle with the value of a_angle
		require
			exists: exists
		ensure
			is_assign: angle = a_angle

	is_values_equal (a_other: GAME_HAPTIC_DIRECTION): BOOLEAN
			-- Are the important values inside Current are equvalent
	
invariant
	type_valid: type = {GAME_SDL_EXTERNAL}.sdl_haptic_polar

end -- class GAME_HAPTIC_POLAR_DIRECTION

Generated by ISE EiffelStudio