summaryrefslogtreecommitdiff
path: root/src/Graphic3d/Graphic3d_VertexNC.cdl
blob: 2eac114e48daaedbf16a02cf1b367e347a90ba85 (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
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
--
-- File:	Graphic3d_VertexNC.cdl
-- Created:	Jeudi 22 Aout 1991
-- Author:	NW,JPB,CAL
-- Modified:	03-02-98 : FMN ; Add Flag Normal
--
---Copyright:	MatraDatavision 1991,1992,1993
--

class VertexNC from Graphic3d inherits VertexN from Graphic3d

	---Version:

	---Purpose: This class allows the creation of a vertex with
	--	    a colour and a 3D normal.

	---Keywords: Vertex, Normal, Color, Coordinate, Point

	---Warning:
	---References:

uses

	Color	from Quantity,

	Vector	from Graphic3d,
	Vertex	from Graphic3d

is

	Create
		returns VertexNC from Graphic3d;
	---Level: Public
	---Purpose: Creates a point with coordinates 0.0, 0.0, 0.0
	--	    for which the normal is 0.0, 0.0, 1.0 and
	--	    the colour is Quantity_NOC_WHITE.

	Create ( AX, AY, AZ	: Real from Standard;
		 ANX, ANY, ANZ	: Real from Standard;
		 AColor		: Color from Quantity;
		 FlagNormalise  : Boolean from Standard = Standard_True )
		returns VertexNC from Graphic3d;
	---Level: Public
	---Purpose: Creates a point with coordinates <AX>, <AY>, <AZ>
	--	    for which the normal is <ANX>, <ANY>, <ANZ> and
	--	    the colour is <AColor>.
	--	    If <FlagNormalise> is True the normal is already normalised
	--	    Else the normal is not normalised, the graphic do it.

	Create ( APoint		: Vertex from Graphic3d;
		 AVector	: Vector from Graphic3d;
		 AColor		: Color from Quantity;
		 FlagNormalise  : Boolean from Standard = Standard_True )
		returns VertexNC from Graphic3d;
	---Level: Public
	---Purpose: Creates a point in <APoint> for which the normal
	--	    is <AVector> and the colour is <AColor>.
	--	    If <FlagNormalise> is True the normal is already normalised
	--	    Else the normal is not normalised, the graphic do it.

	---------------------------------------------------
	-- Category: Methods to modify the class definition
	---------------------------------------------------

	SetColor ( me		: in out;
		   ColorNew	: Color from Quantity )
		is static;
	---Level: Public
	---Purpose: Modifies the colour of the point <me>.
	---Category: Methods to modify the class definition

	----------------------------
	-- Category: Inquire methods
	----------------------------

	Color ( me )
		returns Color from Quantity
		is static;
	---Level: Public
	---Purpose: Returns the colour of the point <me>.
	---Category: Inquire methods

--

fields

--
-- Class	:	Graphic3d_VertexNC
--
-- Purpose	:	Declaration of variables specific to points
--
-- Reminder	:	A point is defined by its coordinates, its normal
--			and its colour.

	-- the colour
	MyColor		:	Color from Quantity;

end VertexNC;