本文整理汇总了C++中StelPainter::drawGreatCircleArc方法的典型用法代码示例。如果您正苦于以下问题:C++ StelPainter::drawGreatCircleArc方法的具体用法?C++ StelPainter::drawGreatCircleArc怎么用?C++ StelPainter::drawGreatCircleArc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StelPainter
的用法示例。
在下文中一共展示了StelPainter::drawGreatCircleArc方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawOptim
void Constellation::drawOptim(StelPainter& sPainter, const StelCore* core, const SphericalCap& viewportHalfspace) const
{
if (lineFader.getInterstate()<=0.0001f)
return;
if (checkVisibility())
{
sPainter.setColor(lineColor[0], lineColor[1], lineColor[2], lineFader.getInterstate());
Vec3d star1;
Vec3d star2;
for (unsigned int i=0;i<numberOfSegments;++i)
{
star1=asterism[2*i]->getJ2000EquatorialPos(core);
star2=asterism[2*i+1]->getJ2000EquatorialPos(core);
star1.normalize();
star2.normalize();
sPainter.drawGreatCircleArc(star1, star2, &viewportHalfspace);
}
}
}
示例2: drawBoundaryOptim
void Constellation::drawBoundaryOptim(StelPainter& sPainter) const
{
if (!boundaryFader.getInterstate())
return;
sPainter.enableTexture2d(false);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode
sPainter.setColor(boundaryColor[0], boundaryColor[1], boundaryColor[2], boundaryFader.getInterstate());
unsigned int i, j;
size_t size;
Vec3f pt1, pt2;
Vec3d ptd1, ptd2;
std::vector<Vec3f> *points;
if (singleSelected) size = isolatedBoundarySegments.size();
else size = sharedBoundarySegments.size();
const SphericalCap& viewportHalfspace = sPainter.getProjector()->getBoundingCap();
for (i=0;i<size;i++)
{
if (singleSelected) points = isolatedBoundarySegments[i];
else points = sharedBoundarySegments[i];
for (j=0;j<points->size()-1;j++)
{
pt1 = points->at(j);
pt2 = points->at(j+1);
if (pt1*pt2>0.9999999f)
continue;
ptd1.set(pt1[0], pt1[1], pt1[2]);
ptd2.set(pt2[0], pt2[1], pt2[2]);
sPainter.drawGreatCircleArc(ptd1, ptd2, &viewportHalfspace);
}
}
}