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

em.video.opengl

Class EM_3D_OBJ_LOADER


Direct ancestors

EM_3D_OBJECT_FACTORY, EM_CONSTANTS, GL_FUNCTIONS, EM_SHARED_FILE_LOADER

Creation

Features

Invariants

indexing

description

This factory loads objects from files in the 'wavefront obj' format.

date

$Date$

revision

$Revision$

class

EM_3D_OBJ_LOADER

inherit

EM_3D_OBJECT_FACTORY

create

feature -- Initialization

feature -- Commands

create_object: EM_3D_OBJECT

-- Creates a new object;
-- TODO: Rename to new_object.

-- (From EM_3D_OBJECT_FACTORY)

ensure
unchanged: unchanged
load_file (a_filename: STRING)

-- Load an object from 'a_filename'

ensure
changed: not unchanged
set_color ( a_r: REAL; a_g: REAL; a_b: REAL; a_a: REAL )

-- As we don't support the mtllib command, this command set's the collor of the whole object

ensure
changed: not unchanged

feature {EM_3D_OBJECT_FACTORY} -- Deferred features that should not be accessible from the outside

specify_object

-- Specify an object that can be drawn in the origin
-- (front, left, lower corner of bounding box = 0,0,0)

-- (From EM_3D_OBJECT_FACTORY)

feature -- Status

color: ARRAY[REAL]

-- Color of the object

object_depth: DOUBLE

-- The size of the bounding box in z direction of created objects

-- (From EM_3D_OBJECT_FACTORY)

ensure
result >= 0
object_height: DOUBLE

-- The size of the bounding box in y direction of created objects

-- (From EM_3D_OBJECT_FACTORY)

ensure
result >= 0
object_width: DOUBLE

-- The size of the bounding box in x direction of created objects

-- (From EM_3D_OBJECT_FACTORY)

ensure
result >= 0
unchanged: BOOLEAN

-- Are the model informations unchanged?

-- (From EM_3D_OBJECT_FACTORY)

invariant


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

end