|
|
|||
File indexing completed on 2026-09-14 09:16:28
0001 // Created on: 2006-05-26 0002 // Created by: Alexander GRIGORIEV 0003 // Copyright (c) 2006-2014 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef VrmlData_Normal_HeaderFile 0017 #define VrmlData_Normal_HeaderFile 0018 0019 #include <VrmlData_ArrayVec3d.hxx> 0020 0021 /** 0022 * Implementation of the node Normal 0023 */ 0024 class VrmlData_Normal : public VrmlData_ArrayVec3d 0025 { 0026 public: 0027 // ---------- PUBLIC METHODS ---------- 0028 0029 /** 0030 * Empty constructor 0031 */ 0032 inline VrmlData_Normal() = default; 0033 0034 /** 0035 * Constructor 0036 */ 0037 inline VrmlData_Normal(const VrmlData_Scene& theScene, 0038 const char* theName, 0039 const size_t nVec = 0, 0040 const gp_XYZ* arrVec = nullptr) 0041 : VrmlData_ArrayVec3d(theScene, theName, nVec, arrVec) 0042 { 0043 } 0044 0045 /** 0046 * Query one normal 0047 * @param i 0048 * index in the array of normals [0 .. N-1] 0049 * @return 0050 * the normal value for the index. If index irrelevant, returns (0., 0., 0.) 0051 */ 0052 inline const gp_XYZ& Normal(const int i) const { return Value(i); } 0053 0054 /** 0055 * Create a copy of this node. 0056 * If the parameter is null, a new copied node is created. Otherwise new node 0057 * is not created, but rather the given one is modified. 0058 */ 0059 Standard_EXPORT occ::handle<VrmlData_Node> Clone( 0060 const occ::handle<VrmlData_Node>& theOther) const override; 0061 0062 /** 0063 * Read the Node from input stream. 0064 */ 0065 Standard_EXPORT VrmlData_ErrorStatus Read(VrmlData_InBuffer& theBuffer) override; 0066 0067 /** 0068 * Write the Node to the Scene output. 0069 */ 0070 Standard_EXPORT VrmlData_ErrorStatus Write(const char* thePrefix) const override; 0071 0072 public: 0073 // Declaration of CASCADE RTTI 0074 DEFINE_STANDARD_RTTI_INLINE(VrmlData_Normal, VrmlData_ArrayVec3d) 0075 }; 0076 0077 // Definition of HANDLE object using Standard_DefineHandle.hxx 0078 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|