0026912: CLang 3.6.2 compiler warning [-Winconsistent-missing-override]
[occt.git] / src / VrmlData / VrmlData_Normal.hxx
CommitLineData
b311480e 1// Created on: 2006-05-26
2// Created by: Alexander GRIGORIEV
973c2be1 3// Copyright (c) 2006-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
16#ifndef VrmlData_Normal_HeaderFile
17#define VrmlData_Normal_HeaderFile
18
19#include <VrmlData_ArrayVec3d.hxx>
20
21/**
22 * Implementation of the node Normal
23 */
24class VrmlData_Normal : public VrmlData_ArrayVec3d
25{
26 public:
27 // ---------- PUBLIC METHODS ----------
28
29 /**
30 * Empty constructor
31 */
32 inline VrmlData_Normal () {}
33
34 /**
35 * Constructor
36 */
37 inline VrmlData_Normal (const VrmlData_Scene& theScene,
38 const char * theName,
39 const size_t nVec = 0,
40 const gp_XYZ * arrVec = 0L)
41 : VrmlData_ArrayVec3d (theScene, theName, nVec, arrVec)
42 {}
43
44 /**
45 * Query one normal
46 * @param i
47 * index in the array of normals [0 .. N-1]
48 * @return
49 * the normal value for the index. If index irrelevant, returns (0., 0., 0.)
50 */
51 inline const gp_XYZ& Normal (const Standard_Integer i) const
52 { return Value(i); }
53
54 /**
55 * Create a copy of this node.
56 * If the parameter is null, a new copied node is created. Otherwise new node
57 * is not created, but rather the given one is modified.
58 */
59 Standard_EXPORT virtual Handle(VrmlData_Node)
79104795 60 Clone (const Handle(VrmlData_Node)& theOther)const Standard_OVERRIDE;
7fd59977 61
62 /**
63 * Read the Node from input stream.
64 */
65 Standard_EXPORT virtual VrmlData_ErrorStatus
79104795 66 Read (VrmlData_InBuffer& theBuffer) Standard_OVERRIDE;
7fd59977 67
68 /**
69 * Write the Node to the Scene output.
70 */
71 Standard_EXPORT virtual VrmlData_ErrorStatus
79104795 72 Write (const char * thePrefix) const Standard_OVERRIDE;
7fd59977 73
74
75 private:
76 // ---------- PRIVATE FIELDS ----------
77
78
79 public:
80// Declaration of CASCADE RTTI
ec357c5c 81DEFINE_STANDARD_RTTI (VrmlData_Normal, VrmlData_ArrayVec3d)
7fd59977 82};
83
84// Definition of HANDLE object using Standard_DefineHandle.hxx
85DEFINE_STANDARD_HANDLE (VrmlData_Normal, VrmlData_ArrayVec3d)
86
87
88#endif