0024622: Add method to AIS_TexturedShape class to assign texture data directly from...
[occt.git] / src / Graphic3d / Graphic3d_Texture2D.cdl
1 -- Created on: 1997-07-28
2 -- Created by: Pierre CHALAMET
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 deferred class Texture2D from Graphic3d
18
19 inherits TextureMap from Graphic3d
20
21   ---Purpose: This abstract class for managing 2D textures
22
23 uses
24
25   TypeOfTexture   from Graphic3d,
26   NameOfTexture2D from Graphic3d,
27   AsciiString     from TCollection,
28   PixMap_Handle   from Image
29
30 raises
31
32   OutOfRange from Standard
33
34 is
35
36   Initialize (theFileName : AsciiString from TCollection;
37               theType     : TypeOfTexture from Graphic3d);
38
39   Initialize (theName : NameOfTexture2D from Graphic3d;
40               theType : TypeOfTexture   from Graphic3d);
41
42   Initialize (thePixMap : PixMap_Handle from Image;
43               theType   : TypeOfTexture from Graphic3d);
44
45   Name (me) returns NameOfTexture2D from Graphic3d;
46   ---Purpose:
47   -- Returns the name of the predefined textures or NOT_2D_UNKNOWN
48   -- when the name is given as a filename.
49   ---Level: Public
50
51   NumberOfTextures (myclass) returns Integer from Standard;
52   ---Purpose:
53   -- Returns the number of predefined textures.
54   ---Level: Public
55
56   TextureName (myclass; theRank: Integer from Standard) returns AsciiString from TCollection
57   raises OutOfRange from Standard;
58   ---Purpose:
59   -- Returns the name of the predefined texture of rank <aRank>
60   ---Trigger: when <aRank> is < 1 or > NumberOfTextures.
61   ---Level: Public
62
63 fields
64
65   myName : NameOfTexture2D from Graphic3d;
66
67 end Texture2D;