0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / Graphic3d / Graphic3d_Buffer.cxx
CommitLineData
34253146 1// Copyright (c) 2018 OPEN CASCADE SAS
2//
3// This file is part of Open CASCADE Technology software library.
4//
5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
10//
11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
13
14#include <Graphic3d_Buffer.hxx>
02a2beaa 15
34253146 16#include <Graphic3d_BoundBuffer.hxx>
da87ddc3 17#include <Graphic3d_MutableIndexBuffer.hxx>
02a2beaa 18#include <NCollection_AlignedAllocator.hxx>
34253146 19
20IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Buffer, NCollection_Buffer)
21IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_IndexBuffer, Graphic3d_Buffer)
22IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_BoundBuffer, NCollection_Buffer)
da87ddc3 23IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_MutableIndexBuffer, Graphic3d_IndexBuffer)
bc73b006 24
02a2beaa 25// =======================================================================
26// function : DefaultAllocator
27// purpose :
28// =======================================================================
29const Handle(NCollection_BaseAllocator)& Graphic3d_Buffer::DefaultAllocator()
30{
31 static const Handle(NCollection_BaseAllocator) THE_ALLOC = new NCollection_AlignedAllocator (16);
32 return THE_ALLOC;
33}
34
bc73b006 35// =======================================================================
36// function : DumpJson
37// purpose :
38// =======================================================================
39void Graphic3d_Buffer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
40{
41 OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
42 OCCT_DUMP_BASE_CLASS (theOStream, theDepth, NCollection_Buffer)
43
44 OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Stride)
45 OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbElements)
46 OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbAttributes)
47}