b311480e |
1 | // Created by: NW,JPB,CAL |
2 | // Copyright (c) 1991-1999 Matra Datavision |
3 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
4 | // |
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. |
9 | // |
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. |
12 | // |
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 | |
7fd59977 |
21 | |
7fd59977 |
22 | |
23 | //-Version |
24 | |
81bba717 |
25 | //-Design Declaration of variables specific to points |
7fd59977 |
26 | |
81bba717 |
27 | //-Warning A point is defined by its coordinates and color |
7fd59977 |
28 | |
29 | //-References |
30 | |
31 | //-Language C++ 2.0 |
32 | |
33 | //-Declarations |
34 | |
35 | // for the class |
36 | #include <Graphic3d_VertexC.ixx> |
37 | |
38 | //-Aliases |
39 | |
40 | //-Global data definitions |
41 | |
81bba717 |
42 | // -- point color |
7fd59977 |
43 | // MyColor : Color; |
44 | |
45 | //-Constructors |
46 | |
47 | //-Destructors |
48 | |
49 | //-Methods, in order |
50 | |
51 | Graphic3d_VertexC::Graphic3d_VertexC () { |
52 | } |
53 | |
81bba717 |
54 | // :(AX, AY, AZ) as VertexC inherits Vertex and it is necessary to call |
55 | // constructor of Vertex with AX, AY and AZ to update fields MyX, MyY, MyZ. |
7fd59977 |
56 | |
57 | Graphic3d_VertexC::Graphic3d_VertexC (const Standard_Real AX, const Standard_Real AY, const Standard_Real AZ, const Quantity_Color& AColor): |
58 | Graphic3d_Vertex (AX, AY, AZ), |
59 | MyColor (AColor) { |
60 | } |
61 | |
81bba717 |
62 | // :(APoint) as VertexC inherits Vertex and it is necessary to call |
63 | // constructor of Vertex with APoint to update fields MyX, MyY, MyZ. |
7fd59977 |
64 | |
65 | Graphic3d_VertexC::Graphic3d_VertexC (const Graphic3d_Vertex& APoint, const Quantity_Color& AColor): |
66 | Graphic3d_Vertex (APoint), |
67 | MyColor (AColor) { |
68 | } |
69 | |
70 | Quantity_Color Graphic3d_VertexC::Color () const { |
71 | |
72 | return (MyColor); |
73 | |
74 | } |
75 | |
76 | void Graphic3d_VertexC::SetColor (const Quantity_Color& ColorNew) { |
77 | |
78 | MyColor = ColorNew; |
79 | |
80 | } |