Go to the documentation of this file.
20 #include "Base/Math/MathTools.h"
21 #include "Base/Tools/DebugMemory.h"
29 for (
int n = 0 ; n < int(pNodes->size()) ; n++)
44 for (
int n = 0 ; n < int(pNodes->size()) ; n++)
59 for (
int n = 0 ; n < int(pNodes->size()) ; n++)
63 position.
fPhi = 360.0f - position.
fPhi;
74 for (
int n = 0 ; n < int(pNodes->size()) ; n++)
90 for (
int n = 0 ; n < int(pNodes->size()) ; n++)
98 for (
int e = 0 ; e < int(pEdges->size()) ; e++)
100 CSGEdge* pEdge = pEdges->at(e);
109 float fMinDistance = FLT_MAX;
110 float fDistance = 0.0f;
113 for (
int n = 0 ; n < int(pNodes->size()) ; n++)
115 CSGNode* pNode = pNodes->at(n);
118 if (fDistance < fMinDistance)
120 fMinDistance = fDistance;
132 float fMinDistance = FLT_MAX;
137 for (
int i = 0 ; i < int(pNodes->size()); i++)
139 for (
int j = 0 ; j < int(pNodes->size()); j++)
145 if (fDistance < fMinDistance)
147 fMinDistance = fDistance;
163 for (
int e = 0 ; e < int(pEdges->size()) ; e++)
165 if ((pEdges->at(e)->nIndex1 == nIndex1) && (pEdges->at(e)->nIndex2 == nIndex2))
170 if ((pEdges->at(e)->nIndex1 == nIndex2) && (pEdges->at(e)->nIndex2 == nIndex1))
187 if (!
getCircumcircle(pGraph, nIndex1, nIndex2, nIndex3, center, fRadius))
192 TSphereCoord point = pNodes->at(nPointIndex)->getPosition();
197 bInside = (fDistance < (fRadius + 0.0001));
208 s1 = pNodes->at(nIndex1)->getPosition();
209 s2 = pNodes->at(nIndex2)->getPosition();
210 s3 = pNodes->at(nIndex3)->getPosition();
216 float p1Sq, p2Sq, p3Sq;
225 cx = num / (2.0f * cp);
227 cy = num / (2.0f * cp);
245 float fMinRadius = FLT_MAX;
250 for (
int v = 0 ;
v < int(pNodes->size()) ;
v++)
278 if (fRadius < fMinRadius)
280 fMinRadius = fRadius;
291 bool bPresent =
false;
297 if ((*iter) == nIndex2)
VectorXD< D, T > sqrt(const VectorXD< D, T > &a)
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)
double v(double t, double v0, double a0, double j)
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...
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)