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
5struct 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
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};
Definition Line.h:6
glm::vec3 mEnd
Definition Line.h:34
bool operator==(const Line &other) const
Definition Line.h:20
bool operator!=(const Line &other) const
Definition Line.h:28
float mLifetime
Definition Line.h:36
glm::vec3 mStart
Definition Line.h:33
Line(glm::vec3 start, glm::vec3 end, glm::vec4 color, float lifetime)
Definition Line.h:7
Line()
Definition Line.h:15
glm::vec4 mColor
Definition Line.h:35