Bound line type
This commit is contained in:
@@ -50,6 +50,8 @@ namespace JabyEngine {
|
||||
Code code = IdentityCode;
|
||||
};
|
||||
|
||||
typedef Vertex Body;
|
||||
|
||||
union {
|
||||
Head head;
|
||||
Vertex vertex;
|
||||
@@ -67,6 +69,19 @@ namespace JabyEngine {
|
||||
return {.vertex = {static_cast<short>(0xF000), static_cast<short>(0xF000u)}};
|
||||
}
|
||||
};
|
||||
|
||||
struct LineMaker {
|
||||
// Make this it's own outside type??
|
||||
template<typename T, size_t N>
|
||||
struct Type {
|
||||
T head;
|
||||
T body[N];
|
||||
};
|
||||
|
||||
static constexpr Type<LINE_F, 2> new_line_f(const Color24& color, const Vertex (&vertices)[2]) {
|
||||
return Type<LINE_F, 2>{.head = LINE_F::new_line(color, false), .body = {LINE_F::new_point(vertices[0]), LINE_F::new_point(vertices[1])}};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user