0024192: Adding support for shaders to OCCT visualization toolkit
[occt.git] / src / Graphic3d / Graphic3d_AspectMarker3d.cdl
CommitLineData
b311480e 1-- Created by: NW,JPB,CAL
2-- Copyright (c) 1991-1999 Matra Datavision
3-- Copyright (c) 1999-2012 OPEN CASCADE SAS
7fd59977 4--
b311480e 5-- The content of this file is subject to the Open CASCADE Technology Public
6-- License Version 6.5 (the "License"). You may not use the content of this file
7-- except in compliance with the License. Please obtain a copy of the License
8-- at http://www.opencascade.org and read it completely before using this file.
7fd59977 9--
b311480e 10-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
7fd59977 12--
b311480e 13-- The Original Code and all software distributed under the License is
14-- distributed on an "AS IS" basis, without warranty of any kind, and the
15-- Initial Developer hereby disclaims all such warranties, including without
16-- limitation, any warranties of merchantability, fitness for a particular
17-- purpose or non-infringement. Please see the License for the specific terms
18-- and conditions governing the rights and limitations under the License.
19
7fd59977 20
21class AspectMarker3d from Graphic3d inherits AspectMarker from Aspect
22
a577aaab 23 ---Version:
7fd59977 24
a577aaab 25 ---Purpose: Creates and updates an attribute group for
26 -- marker type primitives. This group contains the type
27 -- of marker, its colour, and its scale factor.
28 ---Keywords: Marker, Color, Scale, Type
7fd59977 29
a577aaab 30 ---Warning:
31 ---References:
7fd59977 32
33uses
34
30f0ad28 35 Color from Quantity,
36 TypeOfMarker from Aspect,
37 HArray1OfByte from TColStd,
38 PixMap_Handle from Image,
39 MarkerImage_Handle from Graphic3d,
40 ShaderProgram_Handle from Graphic3d
7fd59977 41
42is
43
a577aaab 44 Create
45 returns mutable AspectMarker3d from Graphic3d;
46 ---Level: Public
47 ---Purpose: Creates a context table for marker primitives
48 -- defined with the following default values:
49 --
50 -- Marker type : TOM_X
51 -- Colour : YELLOW
52 -- Scale factor: 1.0
53
54 Create (theType : TypeOfMarker from Aspect;
55 theColor : Color from Quantity;
56 theScale : Real from Standard)
57 returns mutable AspectMarker3d from Graphic3d;
58
59 Create (theColor : Color from Quantity;
60 theWidth : Integer from Standard;
61 theHeight : Integer from Standard;
62 theTextureBitmap : HArray1OfByte from TColStd)
63 returns mutable AspectMarker3d from Graphic3d;
64 ---Level: Public
65 ---Purpose: Creates a context table for marker primitives
66 -- defined with the specified values.
67
68 Create (theTextureImage : PixMap_Handle from Image)
69 returns mutable AspectMarker3d from Graphic3d;
70 ---Level: Public
71 ---Purpose: Creates a context table for marker primitives
72 -- defined with the specified values.
73
74 GetTextureSize (me;
75 theWidth : out Integer from Standard;
76 theHeight: out Integer from Standard);
77 ---Level: Public
78 ---Purpose: Returns marker's texture size.
79
80 GetMarkerImage (me)
81 returns MarkerImage_Handle from Graphic3d;
82 ---Level: Public
83 ---Purpose: Returns marker's image texture.
84 --- Could be null handle if marker aspect has been initialized as
85 --- default type of marker.
86 ---C++: return const &
87
88 SetBitMap (me: mutable;
89 theWidth : Integer from Standard;
90 theHeight : Integer from Standard;
91 theTexture: HArray1OfByte from TColStd ) is static;
7fd59977 92
30f0ad28 93 SetShaderProgram ( me : mutable;
94 theProgram : ShaderProgram_Handle from Graphic3d );
95 ---Level: Public
96 ---Purpose: Sets up OpenGL/GLSL shader program.
97
98 ShaderProgram ( me )
99 returns ShaderProgram_Handle from Graphic3d;
100 ---C++: return const &
101
7fd59977 102fields
103
104--
a577aaab 105-- Class: Graphic3d_AspectMarker3d
7fd59977 106--
a577aaab 107-- Purpose: Declaration of context-specific variables
108-- for drawing 3d markers.
7fd59977 109--
a577aaab 110-- Reminder: A context for drawing 3d markers inherits:
111-- - the colour
112-- - the type of marker
113-- - the scale factor
114-- defined by AspectMarker.
115
116myMarkerImage : MarkerImage_Handle from Graphic3d is protected;
117
30f0ad28 118MyShaderProgram : ShaderProgram_Handle from Graphic3d;
119
7fd59977 120end AspectMarker3d;