111 for (
int i = 0; i < 3; ++i) {
112 boost::hash_combine(seed, cp.
coord[i]);
113 boost::hash_combine(seed, cp.
normal[i]);
114 boost::hash_combine(seed, cp.
color[i]);
186 SbVec3f
const getNormal (
const SbVec3f *pVec,
const int nIdx);
190 static void getTriIn(
void *pData, SoCallbackAction *pAct,
const SoPrimitiveVertex *pV1,
const SoPrimitiveVertex *pV2,
const SoPrimitiveVertex *pV3);
196 SoFieldSensor* _saveSensor;
203 SbMatrix _wInverseTransposedMat;
205 unsigned int _currentDrawStyle;
207 unsigned int _currentVertexOrdering;
211 void _writeVRML2Header(std::ofstream& outFile);
213 void _writeVRML2PointSet(std::ofstream& outFile);
215 void _writeVRML2LineSet(std::ofstream& outFile);
217 void _writeVRML2FaceSet(std::ofstream& outFile);
220 int _vecToStr(
const SbVec3f& vec,
char* buf,
size_t numEntries=0,
size_t currNum=0);
222 int _vecToStr(
const SbColor& col,
char* buf,
size_t numEntries=0,
size_t currNum=0);
225 void _writeIndices(std::ofstream& outFile,
size_t numIndices,
size_t posDelim);
226 void _writeIndices(std::ofstream& outFile, std::vector<size_t> & indexList,
size_t posDelim);
229 SoCallbackAction* _callbackAction;
232 static SoCallbackAction::Response preCB(
void *userData,
233 SoCallbackAction *action,
237 static void pointCB (
void* userData, SoCallbackAction* action,
238 const SoPrimitiveVertex* v);
240 static void lineCB (
void* userData, SoCallbackAction* action,
241 const SoPrimitiveVertex* v1,
242 const SoPrimitiveVertex* v2);
244 static void triangleCB(
void* userData, SoCallbackAction* action,
245 const SoPrimitiveVertex* v1,
246 const SoPrimitiveVertex* v2,
247 const SoPrimitiveVertex* v3);
250 typedef std::vector<COLORED_POINT> pointsVec;
252 typedef std::vector<COLORED_POINT> linesVec;
254 typedef std::vector<COLORED_POINT> trianglesVec;
258 std::vector<pointsVec> _points;
260 std::vector<linesVec> _lines;
262 std::vector<trianglesVec> _triangles;
266 boost::unordered_map < COLORED_POINT, int, hashColoredPoint > _distinctColoredVertices;
static void getTriIn(void *pData, SoCallbackAction *pAct, const SoPrimitiveVertex *pV1, const SoPrimitiveVertex *pV2, const SoPrimitiveVertex *pV3)
callback function for extracting triangulation from the scene