KiCad PCB EDA Suite
Loading...
Searching...
No Matches
vertex_item.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2013 CERN
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * @author Maciej Suminski <[email protected]>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 */
22
27
28#ifndef VERTEX_ITEM_H_
29#define VERTEX_ITEM_H_
30
32#include <gal/color4d.h>
33#include <cstddef>
34
35namespace KIGFX
36{
37class VERTEX_MANAGER;
38
40{
41public:
42 friend class CACHED_CONTAINER;
44 friend class VERTEX_MANAGER;
45
46 explicit VERTEX_ITEM( const VERTEX_MANAGER& aManager );
48
54 inline unsigned int GetSize() const
55 {
56 return m_size;
57 }
58
64 inline unsigned int GetOffset() const
65 {
66 return m_offset;
67 }
68
72 VERTEX* GetVertices() const;
73
74private:
80 inline void setOffset( unsigned int aOffset )
81 {
82 m_offset = aOffset;
83 }
84
90 inline void setSize( unsigned int aSize )
91 {
92 m_size = aSize;
93 }
94
96 unsigned int m_offset;
97 unsigned int m_size;
98};
99} // namespace KIGFX
100
101#endif /* VERTEX_ITEM_H_ */
const VERTEX_MANAGER & m_manager
Definition vertex_item.h:95
unsigned int m_size
Definition vertex_item.h:97
unsigned int m_offset
Definition vertex_item.h:96
void setSize(unsigned int aSize)
Set data size in the container.
Definition vertex_item.h:90
VERTEX * GetVertices() const
Return pointer to the data used by the VERTEX_ITEM.
friend class VERTEX_MANAGER
Definition vertex_item.h:44
friend class CACHED_CONTAINER_GPU
Definition vertex_item.h:43
friend class CACHED_CONTAINER
Definition vertex_item.h:42
void setOffset(unsigned int aOffset)
Set data offset in the container.
Definition vertex_item.h:80
VERTEX_ITEM(const VERTEX_MANAGER &aManager)
unsigned int GetOffset() const
Return data offset in the container.
Definition vertex_item.h:64
unsigned int GetSize() const
Return information about number of vertices stored.
Definition vertex_item.h:54
Class to control vertex container and GPU with possibility of emulating old-style OpenGL 1....
The Cairo implementation of the graphics abstraction layer.
Definition eda_group.h:29
Common defines and consts used in vertex related classes.