Go to the documentation of this file.
19 #include "Base/Math/MathTools.h"
20 #include "Base/Tools/DebugMemory.h"
30 for (
int n = 0; n < int(pNodes->size()); n++)
46 for (
int n = 0; n < int(pNodes->size()); n++)
62 for (
int n = 0; n < int(pNodes->size()); n++)
66 position.
fPhi = 360.0f - position.
fPhi;
78 for (
int n = 0; n < int(pNodes->size()); n++)
95 for (
int n = 0; n < int(pNodes->size()); n++)
103 for (
int e = 0; e < int(pEdges->size()); e++)
105 CSGEdge* pEdge = pEdges->at(e);
115 float fMinDistance = FLT_MAX;
116 float fDistance = 0.0f;
119 for (
int n = 0; n < int(pNodes->size()); n++)
121 CSGNode* pNode = pNodes->at(n);
124 if (fDistance < fMinDistance)
126 fMinDistance = fDistance;
139 float fMinDistance = FLT_MAX;
144 for (
int i = 0; i < int(pNodes->size()); i++)
146 for (
int j = 0; j < int(pNodes->size()); j++)
151 pNodes->at(j)->getPosition());
153 if (fDistance < fMinDistance)
155 fMinDistance = fDistance;
172 for (
int e = 0; e < int(pEdges->size()); e++)
174 if ((pEdges->at(e)->nIndex1 == nIndex1) && (pEdges->at(e)->nIndex2 == nIndex2))
179 if ((pEdges->at(e)->nIndex1 == nIndex2) && (pEdges->at(e)->nIndex2 == nIndex1))
202 if (!
getCircumcircle(pGraph, nIndex1, nIndex2, nIndex3, center, fRadius))
207 TSphereCoord point = pNodes->at(nPointIndex)->getPosition();
213 bInside = (fDistance < (fRadius + 0.0001));
230 s1 = pNodes->at(nIndex1)->getPosition();
231 s2 = pNodes->at(nIndex2)->getPosition();
232 s3 = pNodes->at(nIndex3)->getPosition();
238 float p1Sq, p2Sq, p3Sq;
248 cx = num / (2.0f * cp);
250 cy = num / (2.0f * cp);
270 float fMinRadius = FLT_MAX;
275 for (
int v = 0;
v < int(pNodes->size());
v++)
303 if (fRadius < fMinRadius)
305 fMinRadius = fRadius;
317 bool bPresent =
false;
323 if ((*iter) == nIndex2)
int findEdge(CSphericalGraph *pGraph, int nIndex1, int nIndex2)
std::vector< CSGNode * > TNodeList
bool insideCircumcircle(CSphericalGraph *pGraph, int nIndex1, int nIndex2, int nIndex3, int nPointIndex, bool &bInside)
int addNode(CSGNode *pNode)
void inverseTransform(CSphericalGraph *pGraph, TTransform transform)
void copyGraphNodesAndEdges(CSphericalGraph *pSrcGraph, CSphericalGraph *pDstGraph)
void invertTheta(CSphericalGraph *pGraph)
bool isEdgePresent(CSphericalGraph *pGraph, int nIndex1, int nIndex2)
int findClosestNode(CSphericalGraph *pGraph, TSphereCoord coord)
TSphereCoord getPosition()
virtual CSGNode * getNewNode()
int addEdge(int nIndex1, int nIndex2)
void setPosition(TSphereCoord position)
void findClosestNeighbours(CSphericalGraph *pGraph, int &s, int &t)
bool getCircumcircle(CSphericalGraph *pGraph, int nIndex1, int nIndex2, int nIndex3, TSphereCoord ¢er, float &fRadius)
int getDelaunayNeighbour(CSphericalGraph *pGraph, CSGEdge *pEdge)
std::vector< int > * getNodeAdjacency(int nIndex)
auto transform(const Container< InputT, Alloc > &in, OutputT(*func)(InputT const &)) -> Container< OutputT, typename std::allocator_traits< Alloc >::template rebind_alloc< OutputT >>
Convenience function (with less typing) to transform a container of type InputT into the same contain...
VectorXD< D, T > sqrt(const VectorXD< D, T > &a)
double v(double t, double v0, double a0, double j)
std::vector< CSGEdge * > TEdgeList
void transform(CSphericalGraph *pGraph, TTransform transform)
void invertPhi(CSphericalGraph *pGraph)
double s(double t, double s0, double v0, double a0, double j)