DataIndexedTriangles.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Geometry
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2013, 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 "CeeGeometry/Base.h"
16 #include "CeeGeometry/Data.h"
17 #include "CeeCore/Vec3d.h"
18 #include "CeeCore/BoundingBox.h"
19 
20 #include <vector>
21 
22 namespace cee {
23 namespace geo {
24 
25 
26 //==================================================================================================
27 //
28 //
29 //
30 //==================================================================================================
31 class CEE_GEO_EXPORT DataIndexedTriangles : public Data
32 {
33 public:
35  DataIndexedTriangles(const std::vector<Vec3d>& vertices, const std::vector<unsigned int>& indices);
36  virtual ~DataIndexedTriangles();
37 
38  virtual Type type() const;
39  virtual BoundingBox boundingBox() const;
40 
41  std::vector<Vec3d> vertices() const;
42  void setVertices(const std::vector<Vec3d>& vertices);
43 
44  std::vector<unsigned int> indices() const;
45  void setIndices(const std::vector<unsigned int>& indices);
46 
47  size_t triangleCount() const;
48  void removeAll();
49 
50 private:
51  CEE_PRIVATE_IMPL(DataIndexedTriangles);
52  CEE_PRIVATE_F(Part);
53  CEE_PRIVATE_F(GeometryModel);
54  CEE_DISALLOW_COPY_AND_ASSIGN(DataIndexedTriangles);
55 };
56 
57 } // namespace geo
58 } // namespace cee
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Base class for all geometry part data classes.
Definition: Data.h:28
Type
Enumerator for each of the available primitives.
Definition: Data.h:33
Axis-aligned bounding box.
Definition: BoundingBox.h:27
GeometryModel is a subclass of Model that can handle a large number of parts efficiently.
Definition: GeometryModel.h:36
Geometry part and how it is to be drawn.
Definition: Part.h:32
Data structure representing indexed triangles data for a geometry part
Definition: DataIndexedTriangles.h:31