quickplot
Loading...
Searching...
No Matches
triangle.h
1// SPDX-License-Identifier: GPL-3.0-or-later
2// Copyright (c) 2024 Team Dissolve and contributors
3
4#pragma once
5
6#include "vector3.h"
7
9class Edge
10{
11 public:
18 Edge combine(const Edge &other) const;
19};
20
23{
24 public:
25 Triangle(Vec3<float> i = 0.0f, Vec3<float> j = 0.0f, Vec3<float> k = 0.0f);
36 float *writeByteArray(float *p);
38 Edge bounds() const;
39 Triangle flip() const;
40 Triangle operator+(const Vec3<float> &offset) const;
41 Triangle operator-(const Vec3<float> &offset) const;
42};
43
45class Quad
46{
47 public:
48 Quad(Vec3<float> i = 0.0f, Vec3<float> j = 0.0f, Vec3<float> k = 0.0f, Vec3<float> l = 0.0f);
59 float *writeByteArray(float *p);
61 Edge bounds() const;
62 Quad flip() const;
63 Quad operator+(const Vec3<float> &offset) const;
64 Quad operator-(const Vec3<float> &offset) const;
65 std::pair<Triangle, Triangle> asTriangles() const;
66};
Definition triangle.h:10
Vec3< float > end
Definition triangle.h:15
Vec3< float > start
Definition triangle.h:13
Edge combine(const Edge &other) const
Definition triangle.cpp:7
Definition triangle.h:46
float * writeByteArray(float *p)
Definition triangle.cpp:79
Vec3< float > d
Definition triangle.h:52
Edge bounds() const
Definition triangle.cpp:65
Vec3< float > a
Definition triangle.h:52
Vec3< float > b
Definition triangle.h:52
Vec3< float > c
Definition triangle.h:52
Definition triangle.h:23
Vec3< float > b
Definition triangle.h:29
float * writeByteArray(float *p)
Definition triangle.cpp:35
Vec3< float > c
Definition triangle.h:29
Edge bounds() const
Definition triangle.cpp:21
Vec3< float > a
Definition triangle.h:29
Definition vector3.h:11