removed coin<3 references

This commit is contained in:
andrea
2023-07-24 19:37:11 +02:00
committed by Chris Hennes
parent 64f9251cae
commit 6c2a5c1539
3 changed files with 3 additions and 23 deletions

View File

@@ -228,17 +228,8 @@ QStringList SoFCOffscreenRenderer::getWriteImageFiletypeInfo()
// get all supported formats by Coin3D
int num = getNumWriteFiletypes();
for (int i=0; i < num; i++) {
#if (COIN_MAJOR_VERSION < 2) // Coin3D <= 1.x
SbList<SbName> extlist;
#elif (COIN_MAJOR_VERSION < 3) // Coin3D <= 2.x
# if (COIN_MINOR_VERSION < 3) // Coin3D <= 2.2.x
SbList<SbName> extlist;
# else // Coin3D >= 2.3.x
SbPList extlist;
# endif
#else // Coin3D >= 3.x
SbPList extlist;
#endif
SbString fullname, description;
getWriteFiletypeInfo(i, extlist, fullname, description);

View File

@@ -2746,9 +2746,7 @@ void View3DInventorViewer::animatedViewAll(int steps, int ms)
SbViewportRegion vp = this->getSoRenderManager()->getViewportRegion();
SbBox3f box = getBoundingBox();
#if (COIN_MAJOR_VERSION >= 3)
float aspectRatio = vp.getViewportAspectRatio();
#endif
if (box.isEmpty())
return;
@@ -2768,12 +2766,10 @@ void View3DInventorViewer::animatedViewAll(int steps, int ms)
if (cam->isOfType(SoOrthographicCamera::getClassTypeId())) {
isOrthographic = true;
height = static_cast<SoOrthographicCamera*>(cam)->height.getValue();
#if (COIN_MAJOR_VERSION >= 3)
if (aspectRatio < 1.0f)
diff = sphere.getRadius() * 2 - height * aspectRatio;
else
#endif
diff = sphere.getRadius() * 2 - height;
diff = sphere.getRadius() * 2 - height;
pos = (box.getCenter() - direction * sphere.getRadius());
}
else if (cam->isOfType(SoPerspectiveCamera::getClassTypeId())) {

View File

@@ -2114,15 +2114,8 @@ std::set<int> EditModeConstraintCoinManager::detectPreselectionConstr(const SoPi
SbVec3s EditModeConstraintCoinManager::getDisplayedSize(const SoImage* iconPtr) const
{
#if (COIN_MAJOR_VERSION >= 3)
SbVec3s iconSize = iconPtr->image.getValue().getSize();
#else
SbVec2s size;
int nc;
const unsigned char* bytes = iconPtr->image.getValue(size, nc);
SbImage img(bytes, size, nc);
SbVec3s iconSize = img.getSize();
#endif
if (iconPtr->width.getValue() != -1)
iconSize[0] = iconPtr->width.getValue();
if (iconPtr->height.getValue() != -1)