LDLTriangleLine *LDLQuadLine::newTriangleLine(int p1, int p2, int p3) { UCSTRING point1Str, point2Str, point3Str; char *newLine; LDLTriangleLine *retValue; std::basic_stringstream<UCSTRING::value_type> ss; point1Str = printPoint(p1); point2Str = printPoint(p2); point3Str = printPoint(p3); ss << "3 " << m_colorNumber << " " << point1Str << " " << point2Str << " " << point3Str; newLine = ucstringtombs(ss.str().c_str()); retValue = new LDLTriangleLine(m_parentModel, newLine, m_lineNumber, m_line); delete[] newLine; return retValue; }
LDLTriangleLine *LDLQuadLine::newTriangleLine(int p1, int p2, int p3) { UCCHAR pointBuf1[64] = _UC(""); UCCHAR pointBuf2[64] = _UC(""); UCCHAR pointBuf3[64] = _UC(""); UCCHAR ucNewLine[1024]; char *newLine; LDLTriangleLine *retValue; printPoint(p1, pointBuf1); printPoint(p2, pointBuf2); printPoint(p3, pointBuf3); sucprintf(ucNewLine, COUNT_OF(ucNewLine), _UC("3 %ld %s %s %s"), m_colorNumber, pointBuf1, pointBuf2, pointBuf3); newLine = ucstringtombs(ucNewLine); retValue = new LDLTriangleLine(m_parentModel, newLine, m_lineNumber, m_line); delete newLine; return retValue; }