SoDetail* ViewProviderPlane::getDetail(const char* subelement) const { SoLineDetail* detail = 0; std::string subelem(subelement); int edge = -1; if(subelem == "Main") edge = 0; if(edge >= 0) { detail = new SoLineDetail(); detail->setPartIndex(edge); } return detail; }
SoDetail* ViewProviderDatum::getDetail(const char* subelement) const { QString subelem = QString::fromLatin1(subelement); if (subelem == QObject::tr("Line")) { SoLineDetail* detail = new SoLineDetail(); detail->setPartIndex(0); return detail; } else if (subelem == QObject::tr("Plane")) { SoFaceDetail* detail = new SoFaceDetail(); detail->setPartIndex(0); return detail; } else if (subelem == QObject::tr("Point")) { SoPointDetail* detail = new SoPointDetail(); detail->setCoordinateIndex(0); return detail; } return NULL; }
SoDetail* ViewProviderPlacement::getDetail(const char* subelement) const { SoLineDetail* detail = 0; std::string subelem(subelement); int edge = -1; if(subelem == "X-Axis") edge = 0; else if(subelem == "Y-Axis") edge = 1; else if(subelem == "Z-Axis") edge = 2; else if(subelem == "XY-Plane") edge = 3; else if(subelem == "XZ-Plane") edge = 4; else if(subelem == "YZ-Plane") edge = 5; if(edge >= 0) { detail = new SoLineDetail(); detail->setPartIndex(edge); } return detail; }