本文整理汇总了C++中vector3f::ExactlyEqual方法的典型用法代码示例。如果您正苦于以下问题:C++ vector3f::ExactlyEqual方法的具体用法?C++ vector3f::ExactlyEqual怎么用?C++ vector3f::ExactlyEqual使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vector3f
的用法示例。
在下文中一共展示了vector3f::ExactlyEqual方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawFarSectors
void SectorView::DrawFarSectors(matrix4x4f modelview)
{
int buildRadius = ceilf((m_zoomClamped/FAR_THRESHOLD) * 3);
if (buildRadius <= DRAW_RAD) buildRadius = DRAW_RAD;
const vector3f secOrigin = vector3f(int(floorf(m_pos.x)), int(floorf(m_pos.y)), int(floorf(m_pos.z)));
// build vertex and colour arrays for all the stars we want to see, if we don't already have them
if (m_toggledFaction || buildRadius != m_radiusFar || !secOrigin.ExactlyEqual(m_secPosFar)) {
m_farstars .clear();
m_farstarsColor .clear();
m_visibleFactions.clear();
for (int sx = secOrigin.x-buildRadius; sx <= secOrigin.x+buildRadius; sx++) {
for (int sy = secOrigin.y-buildRadius; sy <= secOrigin.y+buildRadius; sy++) {
for (int sz = secOrigin.z-buildRadius; sz <= secOrigin.z+buildRadius; sz++) {
if ((vector3f(sx,sy,sz) - secOrigin).Length() <= buildRadius){
BuildFarSector(GetCached(sx, sy, sz), Sector::SIZE * secOrigin, m_farstars, m_farstarsColor);
}
}
}
}
m_secPosFar = secOrigin;
m_radiusFar = buildRadius;
m_toggledFaction = false;
}
// always draw the stars, slightly altering their size for different different resolutions, so they still look okay
if (m_farstars.size() > 0)
m_renderer->DrawPoints(m_farstars.size(), &m_farstars[0], &m_farstarsColor[0], 1.f + (Graphics::GetScreenHeight() / 720.f));
// also add labels for any faction homeworlds among the systems we've drawn
PutFactionLabels(Sector::SIZE * secOrigin);
}