GeometryBlock.h
1 //##################################################################################################
2 //
3 // Ceetron Export
4 // Component: VTFx
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2015, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeVTFx/Base.h"
16 #include "CeeVTFx/Block.h"
17 
18 #include <vector>
19 
20 class VTFxGeometryBlock;
21 
22 namespace cee {
23 namespace vtfx {
24 
25 //=================================================================================================================================
26 //
27 //
28 //
29 //=================================================================================================================================
30 class CEE_VTFX_EXPORT GeometryBlock : public Block
31 {
32 public:
33  GeometryBlock(size_t geometryCountPerState);
34  virtual ~GeometryBlock();
35 
36  size_t geometryCountPerState() const;
37  size_t stateCount() const;
38  size_t partCount(size_t geometryIndex, size_t stateIndex) const;
39  std::vector<int> elementBlockIds(size_t geometryIndex, size_t stateIndex) const;
40 
41  bool setElementBlocks(size_t geometryIndex, const std::vector<int>& elementBlockIds, const std::vector<int>& partIds);
42  bool addElementBlock(size_t geometryIndex, int elementBlockId, int partId);
43 
44  bool setElementBlocksForState(size_t geometryIndex, const std::vector<int>& elementBlockIds, int stateId, const std::vector<int>& partIds);
45  bool addElementBlockForState(size_t geometryIndex, int elementBlockId, int stateId, int partId);
46 
47  bool checkValidity() const;
48 
49 private:
50  GeometryBlock(VTFxGeometryBlock* block, int blockId);
51 
52  VTFxBlock* internal_vtfxBlock() const;
53 
54 private:
55  friend class DatabasePrivate;
56 
57  CEE_PRIVATE_IMPL(GeometryBlock);
58  CEE_DISALLOW_COPY_AND_ASSIGN(GeometryBlock);
59 };
60 
61 }
62 }
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppAssert.cpp:18
A block defining all the geometries in a VTFx database. There must be only one GeometryBlock in each ...
Definition: GeometryBlock.h:30
Abstract base class for all VTFx blocks.
Definition: Block.h:29