Polyphase Game Engine
Loading...
Searching...
No Matches
Line.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Maths.h
"
4
5
struct
Line
6
{
7
Line
(glm::vec3 start, glm::vec3 end, glm::vec4 color,
float
lifetime)
8
{
9
mStart
= start;
10
mEnd
= end;
11
mColor
= color;
12
mLifetime
= lifetime;
13
}
14
15
Line
()
16
{
17
18
}
19
20
bool
operator==
(
const
Line
& other)
const
21
{
22
// Don't compare lifetime
23
return
mStart
== other.
mStart
&&
24
mEnd
== other.
mEnd
&&
25
mColor
== other.
mColor
;
26
}
27
28
bool
operator!=
(
const
Line
& other)
const
29
{
30
return
!
operator==
(other);
31
}
32
33
glm::vec3
mStart
= glm::vec3(0.0f, 0.0f, 0.0f);
34
glm::vec3
mEnd
= glm::vec3(0.0f, 1.0f, 0.0f);
35
glm::vec4
mColor
= glm::vec4(1.0f, 1.0f, 1.0f, 1.0f);
36
float
mLifetime
= 0.0f;
37
};
Maths.h
Line
Definition
Line.h:6
Line::mEnd
glm::vec3 mEnd
Definition
Line.h:34
Line::operator==
bool operator==(const Line &other) const
Definition
Line.h:20
Line::operator!=
bool operator!=(const Line &other) const
Definition
Line.h:28
Line::mLifetime
float mLifetime
Definition
Line.h:36
Line::mStart
glm::vec3 mStart
Definition
Line.h:33
Line::Line
Line(glm::vec3 start, glm::vec3 end, glm::vec4 color, float lifetime)
Definition
Line.h:7
Line::Line
Line()
Definition
Line.h:15
Line::mColor
glm::vec4 mColor
Definition
Line.h:35
Engine
Source
Engine
Line.h
Generated by
1.9.8