blob: c458374778d241e0be54a46940e15c2159eedbde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
-- File: Graphic3d_TextureRoot.cdl
-- Created: Mon Jul 28 10:26:12 1997
-- Author: Pierre CHALAMET
-- <pct@sgi93>
-- Modified: GG 10/01/2000 IMP add Path() & Type() methods.
-- GG 10/11/2000 IMP add Image() & LoadTexture() methods.
-- Remove MyIsDone field
-- Add MyImage field
---Copyright: Matra Datavision 1997
deferred class TextureRoot from Graphic3d
inherits TShared from MMgt
---Purpose: This is the texture root class enable the dialog with the GraphicDriver
-- allows the loading of texture too supported formats:
-- X, SunRaster, Aida, Euclid, SGI rgb
uses
CInitTexture from Graphic3d,
GraphicDriver from Graphic3d,
StructureManager from Graphic3d,
TypeOfTexture from Graphic3d,
AlienImage from AlienImage,
Path from OSD,
HArray1OfReal from TColStd
is
Initialize(SM : StructureManager from Graphic3d;
Path : CString from Standard;
FileName : CString from Standard;
Type : TypeOfTexture from Graphic3d);
---Purpose: Creates a texture from a file
-- Warning: Note that if <FileName> is NULL the texture must be realized
-- using LoadTexture(image) method.
Destroy(me);
---C++ : alias ~
--
-- public methods
--
IsDone(me) returns Boolean from Standard;
---Level: public
---Purpose: Checks if a texture class is valide or not
-- returns true if the construction of the class is correct
Path(me) returns Path from OSD;
---Level: public
---Purpose:
-- Returns the full path of the defined texture.
---C++: return const &
Type(me) returns TypeOfTexture from Graphic3d;
---Level: public
---Purpose:
-- Returns the texture type.
--
-- private methods
--
Update(me) is protected;
LoadTexture(me : mutable; anImage: AlienImage from AlienImage);
---Level: advanced
---Purpose:
-- Updates the current texture from a requested alien image.
LoadTexture(me)
returns AlienImage from AlienImage
is private;
TextureId(me) returns Integer from Standard;
---Level: advanced
---Purpose:
-- returns the Texture ID which references the
-- texture to use for drawing. Used by the
-- graphic driver.
Image(me) returns AlienImage from AlienImage;
---Level: advanced
---Purpose:
-- Returns the created image texture.
GetTexUpperBounds(me) returns HArray1OfReal from TColStd;
---Level: advanced
---Purpose:
---Gets upper bounds of texture coordinates. This is used when sizes
---of texture are not equal to the powers of two
-- internal fields for managing the class
fields
MyGraphicDriver : GraphicDriver from Graphic3d;
MyTexId : Integer from Standard;
MyCInitTexture : CInitTexture from Graphic3d is protected;
-- MyIsDone : Boolean from Standard;
MyPath : Path from OSD;
MyType : TypeOfTexture from Graphic3d;
MyImage : AlienImage from AlienImage;
MyTexUpperBounds : HArray1OfReal from TColStd;
end TextureRoot;
|