Test for 0022778: Bug in BRepMesh
[occt.git] / src / Graphic3d / Graphic3d_VertexN.cxx
CommitLineData
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// Modified: 03-02-98 : FMN ; Add Flag Normal
22// Modified: 15-09-98 : CAL ; Modification champ definissant la normale
23// pour permettre l'entrelacement des coordonnees dans Optimizer.
24
7fd59977 25
26//-Version
27
28//-Design Declaration des variables specifiques aux points
29
30//-Warning Un point est defini par ses coordonnees et sa normale
31
32//-References
33
34//-Language C++ 2.0
35
36//-Declarations
37
38// for the class
39#include <Graphic3d_VertexN.ixx>
40
41//-Aliases
42
43//-Global data definitions
44
45//-Constructors
46
47//-Destructors
48
49//-Methods, in order
50
51Graphic3d_VertexN::Graphic3d_VertexN ():
52Graphic3d_Vertex (0.0, 0.0, 0.0) {
53 MyDX = 0.0,
54 MyDY = 0.0,
55 MyDZ = 1.0;
56}
57
58Graphic3d_VertexN::Graphic3d_VertexN (const Standard_Real AX, const Standard_Real AY, const Standard_Real AZ, const Standard_Real ANX, const Standard_Real ANY, const Standard_Real ANZ, const Standard_Boolean FlagNormalise):
59Graphic3d_Vertex (AX, AY, AZ) {
60 MyDX = (Standard_ShortReal ) ANX,
61 MyDY = (Standard_ShortReal ) ANY,
62 MyDZ = (Standard_ShortReal ) ANZ;
63}
64
65Graphic3d_VertexN::Graphic3d_VertexN (const Graphic3d_Vertex& APoint, const Graphic3d_Vector& AVector, const Standard_Boolean FlagNormalise):
66Graphic3d_Vertex (APoint) {
67Standard_Real ANX, ANY, ANZ;
68 AVector.Coord (ANX, ANY, ANZ);
69 MyDX = (Standard_ShortReal ) ANX,
70 MyDY = (Standard_ShortReal ) ANY,
71 MyDZ = (Standard_ShortReal ) ANZ;
72}
73
74void Graphic3d_VertexN::SetNormal (const Standard_Real ANX, const Standard_Real ANY, const Standard_Real ANZ, const Standard_Boolean FlagNormalise) {
75 MyDX = (Standard_ShortReal ) ANX,
76 MyDY = (Standard_ShortReal ) ANY,
77 MyDZ = (Standard_ShortReal ) ANZ;
78}
79
80void Graphic3d_VertexN::Normal (Standard_Real& ANX, Standard_Real& ANY, Standard_Real& ANZ) const {
81 ANX = MyDX,
82 ANY = MyDY,
83 ANZ = MyDZ;
84}