1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #pragma once19 20 #include "../MathGeoLibFwd.h"21 #include "../Math/float3.h"22 23 #ifdef MATH_ENABLE_STL_SUPPORT24 #include <vector>25 #endif26 27 [MATH_BEGIN_NAMESPACE]28 29 30 31 class [Circle]32 {33 public:34 35 vec [pos];36 37 38 39 40 41 vec [normal];42 43 44 45 46 47 float [r];48 49 50 51 52 53 [Circle]() {}54 55 56 57 58 59 60 61 [Circle](const vec ¢er, const vec &[normal], float radius);62 63 64 65 66 vec [BasisU]() const;67 68 69 70 71 vec [BasisV]() const;72 73 74 75 76 77 78 vec [GetPoint](float angleRadians) const;79 80 81 82 83 84 85 86 87 vec [GetPoint](float angleRadians, float [d]) const;88 89 90 91 92 vec [CenterPoint]() const { return [pos]; }93 vec [Centroid]() const { return [pos]; } 94 95 96 97 98 99 100 101 102 vec [ExtremePoint](const vec &direction) const;103 104 105 106 107 [Plane] [ContainingPlane]() const;108 109 110 111 112 void [Translate](const vec &offset);113 114 115 116 117 118 119 void [Transform](const [float3x3] &transform);120 void [Transform](const [float3x4] &transform);121 void [Transform](const [float4x4] &transform);122 void [Transform](const [Quat] &transform);123 124 125 126 127 128 129 130 bool [EdgeContains](const vec &point, float maxDistance = 1[e]-6f) const;131 132 133 134 135 136 137 138 139 140 141 142 float [DistanceToEdge](const vec &point) const;143 144 145 146 147 148 149 150 151 float [DistanceToDisc](const vec &point) const;152 153 154 155 156 157 158 159 160 vec [ClosestPointToEdge](const vec &point) const;161 162 163 164 165 166 167 168 vec [ClosestPointToDisc](const vec &point) const;169 170 171 172 173 174 int [Intersects](const [Plane] &plane, vec *pt1, vec *pt2) const;175 int [Intersects](const [Plane] &plane) const;176 177 178 179 bool [IntersectsDisc](const [Line] &line) const;180 bool [IntersectsDisc](const [LineSegment] &lineSegment) const;181 bool [IntersectsDisc](const [Ray] &ray) const;182 183 #ifdef MATH_ENABLE_STL_SUPPORT184 185 186 187 188 189 190 [VecArray] [IntersectsFaces](const [OBB] &obb) const;191 192 [VecArray] [IntersectsFaces](const [AABB] &aabb) const;193 194 195 196 std::string [ToString]() const;197 #endif198 199 #ifdef MATH_QT_INTEROP200 operator QString() const { return toString(); }201 QString toString() const { return QString::fromStdString([ToString]()); }202 #endif203 };204 205 [Circle] [operator *](const [float3x3] &transform, const [Circle] &circle);206 [Circle] [operator *](const [float3x4] &transform, const [Circle] &circle);207 [Circle] [operator *](const [float4x4] &transform, const [Circle] &circle);208 [Circle] [operator *](const [Quat] &transform, const [Circle] &circle);209 210 #ifdef MATH_QT_INTEROP211 Q_DECLARE_METATYPE([Circle])212 Q_DECLARE_METATYPE([Circle]*)213 #endif214 215 #ifdef MATH_ENABLE_STL_SUPPORT216 std::ostream &[operator <<](std::ostream &o, const [Circle] &circle);217 #endif218 219 [MATH_END_NAMESPACE] Go back to previous page