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

em.video.collision_detection

Class EM_3D_SPHERE_COLLIDABLE


Direct ancestors

EM_COLLIDABLE_3D, EM_COLLIDE_3D_SPHERE, EM_COLLIDE_3D_SKYBOX

Features

Invariants

indexing

description

Objects of type EM_3D_SPHERE_COLLIDABLE implement a collision detection based on bounding spheres.
This objects can collide with other objects of the same type and also objects of type EM_3D_SKYBOX_COLLIDABLE

date

$Date: 2005/10/23 10:49:44 $

revision

$Revision: 1.3 $

deferred class

EM_3D_SPHERE_COLLIDABLE

inherit

EM_COLLIDABLE_3D
EM_COLLIDE_3D_SPHERE
EM_COLLIDE_3D_SKYBOX

feature -- Status report

bounding_sphere_center: EM_3D_VECT

-- Center of the bounding sphere

bounding_sphere_radius: DOUBLE

-- Radius of the bounding sphere

does_collide (other: EM_COLLIDABLE_3D): BOOLEAN

-- Does current collide with other?

-- (From EM_COLLIDABLE_3D)

require
other_not_void: other /= void
does_collide_skybox (other: EM_3D_SKYBOX_COLLIDABLE): BOOLEAN

-- Do we collide with the axis aligned skybox?

-- (From EM_COLLIDE_3D_SKYBOX)

does_collide_sphere (other: EM_3D_SPHERE_COLLIDABLE): BOOLEAN

-- do we collide with another sphere?

-- (From EM_COLLIDE_3D_SPHERE)

type_id: INTEGER

-- The id given to all instances of current generating class

-- (From EM_COLLIDABLE_3D)

feature {EM_COLLISION_DETECTOR_3D} -- Implementation

on_collide (other: EM_COLLIDABLE_3D)

-- current collided with other

-- (From EM_COLLIDABLE_3D)

require
other_not_void: other /= void

invariant


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

end