// Collect the current vertex data and add a new whole vertex // Note: Deal with color void trpgwGeomHelper::AddVertex(trpg3dPoint &pt) { polyTex.insert(polyTex.end(),tmpTex.begin(),tmpTex.end()); polyNorm.push_back(tmpNorm); // Note: Turn this back on. It's not right currently, though #if 0 if (buf->GetEndian() != trpg_cpu_byte_order()) { trpg3dPoint tmpVert; tmpVert.x = trpg_byteswap_8bytes_to_double ((char *)&pt.x); tmpVert.y = trpg_byteswap_8bytes_to_double ((char *)&pt.y); tmpVert.z = trpg_byteswap_8bytes_to_double ((char *)&pt.z); polyVert.push_back(tmpVert); } else #endif polyVert.push_back(pt); // Update min/max zmin = MIN(pt.z,zmin); zmax = MAX(pt.z,zmax); }
bool trpgReadBuffer::Get(float64 &ret) { char cval[8]; if (!GetData(cval,sizeof(float64))) return false; try { if (ness == cpuNess) memcpy(&ret,cval,8); else ret = trpg_byteswap_8bytes_to_double(cval); } catch (...) { } return true; }