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
31#include <gal/gal.h>
33#include <gal/color4d.h>
34#include <cstddef>
35
36namespace KIGFX
37{
38class VERTEX_MANAGER;
39
41{
42public:
43 friend class CACHED_CONTAINER;
45 friend class VERTEX_MANAGER;
46
47 explicit VERTEX_ITEM( const VERTEX_MANAGER& aManager );
49
55 inline unsigned int GetSize() const
56 {
57 return m_size;
58 }
59
65 inline unsigned int GetOffset() const
66 {
67 return m_offset;
68 }
69
73 VERTEX* GetVertices() const;
74
75private:
81 inline void setOffset( unsigned int aOffset )
82 {
83 m_offset = aOffset;
84 }
85
91 inline void setSize( unsigned int aSize )
92 {
93 m_size = aSize;
94 }
95
97 unsigned int m_offset;
98 unsigned int m_size;
99};
100} // namespace KIGFX
101
102#endif /* VERTEX_ITEM_H_ */
const VERTEX_MANAGER & m_manager
Definition vertex_item.h:96
unsigned int m_size
Definition vertex_item.h:98
unsigned int m_offset
Definition vertex_item.h:97
void setSize(unsigned int aSize)
Set data size in the container.
Definition vertex_item.h:91
friend class VERTEX_MANAGER
Definition vertex_item.h:45
friend class CACHED_CONTAINER_GPU
Definition vertex_item.h:44
friend class CACHED_CONTAINER
Definition vertex_item.h:43
void setOffset(unsigned int aOffset)
Set data offset in the container.
Definition vertex_item.h:81
VERTEX_ITEM(const VERTEX_MANAGER &aManager)
unsigned int GetOffset() const
Return data offset in the container.
Definition vertex_item.h:65
unsigned int GetSize() const
Return information about number of vertices stored.
Definition vertex_item.h:55
Class to control vertex container and GPU with possibility of emulating old-style OpenGL 1....
#define GAL_API
Definition gal.h:27
The Cairo implementation of the graphics abstraction layer.
Definition eda_group.h:30
Common defines and consts used in vertex related classes.