0022627: Change OCCT memory management defaults
[occt.git] / src / Graphic3d / Graphic3d_AspectMarker3d.cxx
CommitLineData
7fd59977 1
2// File Graphic3d_AspectMarker3d.cxx
3// Created Fevrier 1992
4// Author NW,JPB,CAL
5
6//-Copyright MatraDatavision 1991,1992
7
8//-Version
9
81bba717 10//-Design Declaration of variables specific to the context
11// of trace of markers 3d
12
13// Rappels Context of trace of markers 3d inherits the context
14// defined by :
15// - the color
16// - the type of marker
17// - the scale
7fd59977 18
19//-Warning
20
21//-References
22
23//-Language C++ 2.0
24
25//-Declarations
26
27// for the class
28#include <Graphic3d_AspectMarker3d.ixx>
29#include <TColStd_Array1OfByte.hxx>
30
31//-Aliases
32
33//-Global data definitions
34
35//-Constructors
36
37//-Destructors
38
39//-Methods, in order
40
41Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d ()
42 :Aspect_AspectMarker(), MyTextureWidth(0), MyTextureHeight(0)
43{
44}
45
46Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d (const Aspect_TypeOfMarker AType, const Quantity_Color& AColor, const Standard_Real AScaleOrId ):
47Aspect_AspectMarker( AColor, AType, AScaleOrId ), MyTextureWidth(0), MyTextureHeight(0)
48{
49}
50
51
52Graphic3d_AspectMarker3d::Graphic3d_AspectMarker3d (const Aspect_TypeOfMarker AType,
53 const Quantity_Color& AColor,
54 const Standard_Real AScaleOrId,
55 const Standard_Integer AWidth,
56 const Standard_Integer AHeight,
57 const Handle(TColStd_HArray1OfByte)& ATexture ):
58Aspect_AspectMarker( AColor, AType, AScaleOrId ), MyTexture( ATexture ), MyTextureWidth(AWidth), MyTextureHeight(AHeight)
59{
60 /*for( Standard_Integer aIndex = ATexture.Lower(); aIndex <= ATexture.Upper(); aIndex++ )
61 {
62 MyTexture.SetValue( aIndex, ATexture.Value( aIndex ) );
63 }
64 */
65
66}
67
68void Graphic3d_AspectMarker3d::GetTextureSize(Standard_Integer& AWidth, Standard_Integer& AHeight)
69{
70 AWidth = MyTextureWidth;
71 AHeight = MyTextureHeight;
72}
73
74const Handle(TColStd_HArray1OfByte)& Graphic3d_AspectMarker3d::GetTexture()
75{
76 return MyTexture;
77}
78
79void Graphic3d_AspectMarker3d::SetTexture (const Standard_Integer AWidth,
80 const Standard_Integer AHeight,
81 const Handle(TColStd_HArray1OfByte)& ATexture )
82{
83 MyTextureWidth = AWidth;
84 MyTextureHeight = AHeight;
85
86 MyTexture = ATexture;
87}