File indexing completed on 2025-01-18 10:03:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _Graphic3d_AttribBuffer_HeaderFile
0015 #define _Graphic3d_AttribBuffer_HeaderFile
0016
0017 #include <Graphic3d_Buffer.hxx>
0018
0019
0020
0021 class Graphic3d_AttribBuffer : public Graphic3d_Buffer
0022 {
0023 DEFINE_STANDARD_RTTIEXT(Graphic3d_AttribBuffer, Graphic3d_Buffer)
0024 public:
0025
0026 Standard_EXPORT Graphic3d_AttribBuffer (const Handle(NCollection_BaseAllocator)& theAlloc);
0027
0028
0029 Standard_EXPORT bool Init (const Standard_Integer theNbElems,
0030 const Graphic3d_Attribute* theAttribs,
0031 const Standard_Integer theNbAttribs);
0032
0033
0034 bool Init (const Standard_Integer theNbElems,
0035 const Graphic3d_Array1OfAttribute& theAttribs)
0036 {
0037 return Init (theNbElems, &theAttribs.First(), theAttribs.Size());
0038 }
0039
0040
0041 virtual Standard_Boolean IsMutable() const Standard_OVERRIDE { return myIsMutable; }
0042
0043
0044 Standard_EXPORT void SetMutable (Standard_Boolean theMutable);
0045
0046
0047 virtual Standard_Boolean IsInterleaved() const Standard_OVERRIDE { return myIsInterleaved; }
0048
0049
0050
0051
0052 Standard_EXPORT void SetInterleaved (Standard_Boolean theIsInterleaved);
0053
0054
0055 virtual Graphic3d_BufferRange InvalidatedRange() const Standard_OVERRIDE { return myInvalidatedRange; }
0056
0057
0058 virtual void Validate() Standard_OVERRIDE { myInvalidatedRange.Clear(); }
0059
0060
0061 Standard_EXPORT virtual void Invalidate() Standard_OVERRIDE;
0062
0063
0064 Standard_EXPORT void Invalidate (Standard_Integer theAttributeIndex);
0065
0066
0067 Standard_EXPORT void Invalidate (Standard_Integer theAttributeIndex,
0068 Standard_Integer theVertexLower,
0069 Standard_Integer theVertexUpper);
0070
0071
0072 Standard_EXPORT void Invalidate (Standard_Integer theVertexLower,
0073 Standard_Integer theVertexUpper);
0074
0075
0076 Standard_EXPORT void invalidate (const Graphic3d_BufferRange& theRange);
0077
0078 protected:
0079 Graphic3d_BufferRange myInvalidatedRange;
0080 Standard_Boolean myIsInterleaved;
0081 Standard_Boolean myIsMutable;
0082 };
0083
0084 #endif