Back to home page

EIC code displayed by LXR

 
 

    


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_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 () {}
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 = 0L)
0041     : VrmlData_ArrayVec3d (theScene, theName, nVec, arrVec)
0042   {}
0043 
0044   /**
0045    * Query one normal
0046    * @param i
0047    *   index in the array of normals [0 .. N-1]
0048    * @return
0049    *   the normal value for the index. If index irrelevant, returns (0., 0., 0.)
0050    */
0051   inline const gp_XYZ& Normal   (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 
0075  private:
0076   // ---------- PRIVATE FIELDS ----------
0077 
0078 
0079  public:
0080 // Declaration of CASCADE RTTI
0081 DEFINE_STANDARD_RTTI_INLINE(VrmlData_Normal,VrmlData_ArrayVec3d)
0082 };
0083 
0084 // Definition of HANDLE object using Standard_DefineHandle.hxx
0085 DEFINE_STANDARD_HANDLE (VrmlData_Normal, VrmlData_ArrayVec3d)
0086 
0087 
0088 #endif