indexing description: "[ This class describes a skybox ]" date: "$Date$" revision: "$Revision$" "This class describes a skybox" date: "$Date$" revision: "$Revision$" class SKYBOX inherit EM_3D_SKYBOX_COLLIDABLE EM_3D_OBJECT GLU_FUNCTIONS export {NONE} all end DOUBLE_MATH export {NONE} all end create make feature {NONE} -- Initialization make (a_model: EM_3D_OBJECT) is -- Initilalise with 'a_model'. do model := a_model width := model.width height := model.height depth := model.depth scale.set(1,1,1) end feature -- Status type_id: INTEGER is 3 -- The id given to all instances of `current' generating class feature -- Collision detection min_x: DOUBLE is -- Min x of the skybox do result := origin.x end max_x: DOUBLE is -- Max x of the skybox do result := origin.x + width end min_y: DOUBLE is -- Min y of the skybox do -- We add some reserve because the car is on the ground result := origin.y - 1 end max_y: DOUBLE is -- Max y of the skybox do result := origin.y + height end min_z: DOUBLE is -- Min z of the skybox do -- because of the differenct z coordinate directions this is exchanged result := (origin.z - depth) end max_z: DOUBLE is -- Max z of the skybox do -- because of the differenct z coordinate directions this is exchanged result := origin.z end feature {EM_3D_OBJECT} -- Implementation of the 3d object draw_object is do model.draw_object end feature {EM_COLLISION_DETECTOR_3D} -- Implementation of collision detection on_collide (other: EM_COLLIDABLE_3D) is -- `current' collided with `other' do end feature {NONE} -- Implementation model: EM_3D_OBJECT -- The skybox model end