summaryrefslogtreecommitdiff
path: root/src/Graphic3d/Graphic3d_Group_4.cxx
blob: 941c762d7b047894039747e76413891171f6ebdc (plain)
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

// File		Graphic3d_Group_4.cxx (PickId)
// Created	Fevrier 1992
// Author	NW,JPB,CAL

//-Copyright	MatraDatavision 1991,1992

//-Version	

//-Design	Declaration des variables specifiques aux groupes
//		de primitives

//-Warning	Un groupe est defini dans une structure
//		Il s'agit de la plus petite entite editable

//-References	

//-Language	C++ 2.0

//-Declarations

// for the class
#include <Graphic3d_Group.jxx>
#include <Graphic3d_Group.pxx>

//-Methods, in order

Standard_Integer Graphic3d_Group::PickId () const {

	return (Standard_Integer (MyCGroup.PickId.Value));

}

void Graphic3d_Group::RemovePickId () {

	if (IsDeleted ()) return;

	MyCGroup.PickId.IsDef	= 0;
	MyCGroup.PickId.Value	= 0;

	MyGraphicDriver->PickId (MyCGroup);

	MyCGroup.PickId.IsSet	= 0;

}

void Graphic3d_Group::SetPickId (const Standard_Integer Id) {

	if (IsDeleted ()) return;

	if (Id <= 0)
		Graphic3d_PickIdDefinitionError::Raise ("Bad value for PickId");

	MyCGroup.PickId.IsDef	= 1;
	MyCGroup.PickId.Value	= int (Id);

	MyGraphicDriver->PickId (MyCGroup);

	MyCGroup.PickId.IsSet	= 1;

}