GlistEngine
Loading...
Searching...
No Matches
gLine.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Nitra Games Ltd.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * gLine.h
19 *
20 * Created on: May 7, 2021
21 * Author: noyan
22 */
23
24#ifndef GRAPHICS_PRIMITIVES_GLINE_H_
25#define GRAPHICS_PRIMITIVES_GLINE_H_
26
27#include "gMesh.h"
28
29
30class gLine: public gMesh {
31public:
33 gLine(float x1, float y1, float x2, float y2);
34 gLine(float x1, float y1, float z1, float x2, float y2, float z2);
35
36 void setPoints(float x1, float y1, float x2, float y2);
37 void setPoints(float x1, float y1, float z1, float x2, float y2, float z2);
38
39 void draw();
40 void draw(float x1, float y1, float x2, float y2);
41 void draw(float x1, float y1, float z1, float x2, float y2, float z2);
42
43 void setThickness(float thickness);
44
45private:
46 std::vector<gVertex> verticessb;
47 std::vector<gIndex> indicessb;
48 void setLinePoints(float x1, float y1, float z1, float x2, float y2, float z2);
49 gVertex vertex1, vertex2;
50 float thickness;
51
52};
53
54#endif /* GRAPHICS_PRIMITIVES_GLINE_H_ */
Definition gLine.h:30
void draw(float x1, float y1, float z1, float x2, float y2, float z2)
gLine(float x1, float y1, float z1, float x2, float y2, float z2)
void draw()
void setPoints(float x1, float y1, float x2, float y2)
void draw(float x1, float y1, float x2, float y2)
void setThickness(float thickness)
void setPoints(float x1, float y1, float z1, float x2, float y2, float z2)
gLine(float x1, float y1, float x2, float y2)
Definition gMesh.h:27
Definition gVbo.h:14