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
109
110
|
// File Graphic3d_Group.cxx
// Created Fevrier 1992
// Author NW,JPB,CAL
// 11/97 ; CAL : retrait DownCast
//-Copyright MatraDatavision 1991,1992
//-Version
//-Design Declaration of variables specific to groups
// of primitives
//-Warning A group is definedv in a structure
// This is the smallest editable entity
//-References
//-Language C++ 2.0
//-Declarations
// for the class
#include <Graphic3d_Group.ixx>
#include <Graphic3d_Group.pxx>
#include <Graphic3d_GraphicDevice.hxx>
#include <Graphic3d_GraphicDriver.hxx>
#include <Graphic3d_StructureManager.hxx>
#include <Graphic3d_TransModeFlags.hxx>
//-Aliases
//-Global data definitions
//-Constructors
//-Destructors
//-Methods, in order
Graphic3d_Group::Graphic3d_Group (const Handle(Graphic3d_Structure)& AStructure):
MyListOfPArray()
{
MyBounds.XMin = ShortRealLast (),
MyBounds.YMin = ShortRealLast (),
MyBounds.ZMin = ShortRealLast ();
MyBounds.XMax = ShortRealFirst (),
MyBounds.YMax = ShortRealFirst (),
MyBounds.ZMax = ShortRealFirst ();
//
// A small commentary on the usage of This !
//
// Graphic3d_Group is created in a structure. Graphic3d_Structure is a
// manager of Graphic3d_Group. In the constructor of Graphic3d_Group
// a method Add of Graphic3d_Structure is called. It allows adding
// the instance of Graphic3d_Group in its manager. So there are 2 references
// to <me> and everything works well.
//
// This () is the instance of the class, the current groupe
//Handle(Graphic3d_Group) me = Handle(Graphic3d_Group)::DownCast (This ());
Standard_Integer TheLabelBegin, TheLabelEnd;
// MyStructure = AStructure;
MyPtrStructure = (void *) AStructure.operator->();
MyStructure->GroupLabels (TheLabelBegin, TheLabelEnd);
MyStructure->Add (this);
MyContainsFacet = Standard_False,
MyIsEmpty = Standard_True;
MyCGroup.Struct = (CALL_DEF_STRUCTURE *) (MyStructure->CStructure ());
MyCGroup.Struct->Id = int (MyStructure->Identification ());
MyCGroup.IsDeleted = 0;
MyCGroup.IsOpen = 0;
MyCGroup.LabelBegin = int (TheLabelBegin);
MyCGroup.LabelEnd = int (TheLabelEnd);
MyCGroup.StructureEnd = Structure_END;
MyCGroup.ContextLine.IsDef = 0,
MyCGroup.ContextText.IsDef = 0,
MyCGroup.ContextMarker.IsDef = 0,
MyCGroup.ContextFillArea.IsDef = 0;
MyCGroup.ContextLine.IsSet = 0,
MyCGroup.ContextText.IsSet = 0,
MyCGroup.ContextMarker.IsSet = 0,
MyCGroup.ContextFillArea.IsSet = 0;
MyCGroup.PickId.IsDef = 0,
MyCGroup.PickId.IsSet = 0,
MyCGroup.PickId.Value = 0;
Handle(Aspect_GraphicDriver) agd =
((MyStructure->StructureManager ())->GraphicDevice ())->GraphicDriver ();
MyGraphicDriver = *(Handle(Graphic3d_GraphicDriver) *) &agd;
MyGraphicDriver->Group (MyCGroup);
//MyCGroup.TransformPersistenceFlag = Graphic3d_TMF_None;
//MyCGroup.Struct->TransformPersistenceFlag = Graphic3d_TMF_None;
MyMarkWidth = 0;
MyMarkHeight = 0;
MyMarkArray.Nullify();
}
|