|
||||
File indexing completed on 2025-01-18 10:05:32
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_Coordinate_HeaderFile 0017 #define VrmlData_Coordinate_HeaderFile 0018 0019 #include <VrmlData_ArrayVec3d.hxx> 0020 0021 /** 0022 * Implementation of the node Coordinate 0023 */ 0024 class VrmlData_Coordinate : public VrmlData_ArrayVec3d 0025 { 0026 public: 0027 // ---------- PUBLIC METHODS ---------- 0028 0029 /** 0030 * Empty Constructor 0031 */ 0032 inline VrmlData_Coordinate () {} 0033 0034 /** 0035 * Constructor 0036 */ 0037 inline VrmlData_Coordinate (const VrmlData_Scene& theScene, 0038 const char * theName, 0039 const size_t nPoints = 0, 0040 const gp_XYZ * arrPoints = 0L) 0041 : VrmlData_ArrayVec3d (theScene, theName, nPoints, arrPoints) 0042 {} 0043 0044 /** 0045 * Query one point 0046 * @param i 0047 * index in the array of points [0 .. N-1] 0048 * @return 0049 * the coordinate for the index. If index irrelevant, returns (0., 0., 0.) 0050 */ 0051 inline const gp_XYZ& Coordinate (const Standard_Integer i) const 0052 { 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 virtual Handle(VrmlData_Node) 0060 Clone (const Handle(VrmlData_Node)& theOther)const Standard_OVERRIDE; 0061 0062 /** 0063 * Read the Node from input stream. 0064 */ 0065 Standard_EXPORT virtual VrmlData_ErrorStatus 0066 Read (VrmlData_InBuffer& theBuffer) Standard_OVERRIDE; 0067 0068 /** 0069 * Write the Node to the Scene output. 0070 */ 0071 Standard_EXPORT virtual VrmlData_ErrorStatus 0072 Write (const char * thePrefix) const Standard_OVERRIDE; 0073 0074 private: 0075 // ---------- PRIVATE FIELDS ---------- 0076 0077 public: 0078 // Declaration of CASCADE RTTI 0079 DEFINE_STANDARD_RTTI_INLINE(VrmlData_Coordinate,VrmlData_ArrayVec3d) 0080 }; 0081 0082 // Definition of HANDLE object using Standard_DefineHandle.hxx 0083 DEFINE_STANDARD_HANDLE (VrmlData_Coordinate, VrmlData_ArrayVec3d) 0084 0085 0086 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |