Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

em.goof.force

Class EM_GOOF_ROUND_AREA


Direct ancestors

EM_GOOF_AREA

Creation

Features

Invariants

indexing

description

A round EM_GOOF_AREA.

date

$Date: 2005/10/23 09:39:25 $

revision

$Revision: 1.5 $

class

EM_GOOF_ROUND_AREA

inherit

EM_GOOF_AREA

create

make (a_center: EM_VECTOR_2D a_radius: DOUBLE)

-- Make round area with center and radius

ensure
center_set: center = a_center
radius_set: radius = a_radius

feature {EM_GOOF_FORCE, EM_GOOF_PHYSICS} -- init

make (a_center: EM_VECTOR_2D a_radius: DOUBLE)

-- Make round area with center and radius

ensure
center_set: center = a_center
radius_set: radius = a_radius

feature {EM_GOOF_FORCE, EM_GOOF_PHYSICS} -- properties

center: EM_VECTOR_2D

-- Center of the round area

radius: DOUBLE

-- Radius of the round area

set_center (a_center: EM_VECTOR_2D)

-- Set position

require
a_center_not_void: a_center /= void
ensure
center_set: center = a_center
set_radius (a_radius: DOUBLE)

-- Set position

ensure
radius_set: radius = a_radius

feature {EM_GOOF_FORCE, EM_GOOF_PHYSICS} -- status

is_in_area (point: EM_VECTOR_2D): BOOLEAN

-- Is 'point' in the area?

-- (From EM_GOOF_AREA)

require
point_not_void: point /= void

invariant

positive_radius: radius > 0
is_center: center /= void

-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end