0024023: Revamp the OCCT Handle -- general
[occt.git] / src / Graphic3d / Graphic3d_TextureEnv.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 class TextureEnv from Graphic3d
18
19 inherits TextureRoot from Graphic3d
20
21   ---Purpose: This class provides environment texture usable only in Visual3d_ContextView
22
23 uses
24
25   NameOfTextureEnv from Graphic3d,
26   AsciiString      from TCollection,
27   PixMap_Handle    from Image
28
29 raises
30
31   OutOfRange from Standard
32
33 is
34
35   Create (theFileName : AsciiString from TCollection) returns TextureEnv from Graphic3d;
36   ---Purpose: Creates an environment texture from a file.
37
38   Create (theName : NameOfTextureEnv from Graphic3d) returns TextureEnv from Graphic3d;
39   ---Purpose: Creates an environment texture from a predefined texture name set.
40
41   Create (thePixMap : PixMap_Handle from Image) returns TextureEnv from Graphic3d;
42   ---Purpose: Creates an environment texture from the pixmap.
43
44   Name (me) returns NameOfTextureEnv from Graphic3d;
45   ---Purpose:
46   -- Returns the name of the predefined textures or NOT_ENV_UNKNOWN
47   -- when the name is given as a filename.
48   ---Level: Public
49
50   NumberOfTextures (myclass) returns Integer from Standard;
51   ---Purpose:
52   -- Returns the number of predefined textures.
53   ---Level: Public
54
55   TextureName (myclass; theRank: Integer from Standard)
56   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 : NameOfTextureEnv from Graphic3d;
66
67 end TextureEnv;