source: trunk/VUT/GtpVisibilityPreprocessor/src/X3dExporter.cpp @ 327

Revision 327, 18.0 KB checked in by mattausch, 19 years ago (diff)

worked on the ray based subdivision. finished extracting polygons from rays

Line 
1#include <stack>
2#include "common.h"
3#include "SceneGraph.h"
4#include "X3dExporter.h"
5#include "Mesh.h"
6#include "KdTree.h"
7#include "ViewCellBsp.h"
8#include "ViewCell.h"
9#include "Polygon3.h"
10ViewCellContainer X3dExporter::foundViewCells; // TODO: delete later
11
12X3dExporter::X3dExporter(const string filename):Exporter(filename)
13{
14  stream.open(mFilename.c_str());
15  stream<<"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"<<endl;
16  stream<<"<X3D>"<<endl;
17  stream<<"<Scene>"<<endl;
18 
19}
20
21X3dExporter::~X3dExporter()
22{
23  stream<<"</Scene>"<<endl;
24  stream<<"</X3D>"<<endl;
25  stream.close();
26}
27
28
29bool
30X3dExporter::ExportRays(const vector<Ray> &rays,
31                        const float length,
32                        const RgbColor &color)
33{
34  vector<Ray>::const_iterator ri = rays.begin();
35  stream<<"<Shape>"<<endl;
36  stream<<"<Appearance>"<<endl;
37  stream<<"<Material ambientColor=\""<<color.r<<" "<<color.g<<" "<<color.b<<
38    "\" />"<<endl;
39  stream<<"</Appearance>"<<endl;
40 
41  stream<<"<IndexedLineSet coordIndex=\""<<endl;
42
43  int index = 0;
44  for (; ri != rays.end(); ri++) {
45    stream<<index<<" "<<index+1<<" -1\n";
46    index+=2;
47  }
48 
49  stream<<"\" >"<<endl;
50 
51  stream<<"<Coordinate  point=\""<<endl;
52 
53  ri = rays.begin();
54  for (; ri != rays.end(); ri++) {
55    Vector3 a = (*ri).GetLoc();
56   
57    Vector3 b;
58    if (length < 0)
59      b = (*ri).GetLoc() - length*(*ri).GetDir();
60    else
61      if ((*ri).intersections.size()==0)
62        b = (*ri).GetLoc() + length*(*ri).GetDir();
63      else
64        b = (*ri).Extrap((*ri).intersections[0].mT);
65   
66    stream<<a.x<<" "<<a.y<<" "<<a.z<<" ,";
67    stream<<b.x<<" "<<b.y<<" "<<b.z<<" ,\n";
68  }
69 
70  stream<<"\" >"<<endl;
71  stream<<"</Coordinate>"<<endl;
72  stream<<"</IndexedLineSet>"<<endl;
73  stream<<"</Shape>"<<endl;
74  return true;
75}
76
77void
78X3dExporter::ExportSceneNode(SceneGraphNode *node)
79{
80  stream<<"<Group>"<<endl;
81
82  SceneGraphNodeContainer::iterator ni = node->mChildren.begin();
83  for (; ni != node->mChildren.end(); ni++)
84    ExportSceneNode(*ni);
85 
86 
87  ObjectContainer::const_iterator mi = node->mGeometry.begin();
88  for (; mi != node->mGeometry.end(); mi++) {
89    // export the transform...
90    ExportIntersectable(*mi);
91  }
92 
93  stream<<"</Group>"<<endl;
94
95}
96void
97X3dExporter::ExportIntersectable(Intersectable *object)
98{
99  switch (object->Type()) {
100  case Intersectable::MESH_INSTANCE:
101  case Intersectable::TRANSFORMED_MESH_INSTANCE:
102    ExportMeshInstance((MeshInstance *)object);
103        break;
104  case Intersectable::VIEW_CELL:
105        ExportViewCell((ViewCell *)object);
106    break;
107  default:
108    cerr<<"Sorry the export for object not yet defined"<<endl;
109    break;
110  }
111}
112
113void
114X3dExporter::ExportMeshInstance(MeshInstance *object)
115{
116  // $$JB$$
117  // in the future check whether the mesh was not already exported
118  // and use a reference to the that mesh instead
119  ExportMesh(object->GetMesh());
120}
121
122void
123X3dExporter::ExportViewCells(const ViewCellContainer &viewCells)
124{
125        ViewCellContainer::const_iterator it, it_end = viewCells.end();
126
127        for (it = viewCells.begin(); it != it_end; ++ it)
128                ExportViewCell(*it);
129}
130
131void
132X3dExporter::ExportViewCell(ViewCell *viewCell)
133{
134        if (viewCell->GetMesh())
135                ExportMesh(viewCell->GetMesh());
136}
137
138void
139X3dExporter::ExportMesh(Mesh *mesh)
140{
141
142  stream<<"<Shape>"<<endl;
143  stream<<"<Appearance>"<<endl;
144 
145  // $$ tmp -> random material
146 
147  float r, g, b;
148
149  if (mUseForcedMaterial) {
150    r = mForcedMaterial.mDiffuseColor.r;
151    g = mForcedMaterial.mDiffuseColor.g;
152    b = mForcedMaterial.mDiffuseColor.b;
153   
154  } else
155    if (mesh->mMaterial) {
156      r = mesh->mMaterial->mDiffuseColor.r;
157      g = mesh->mMaterial->mDiffuseColor.g;
158      b = mesh->mMaterial->mDiffuseColor.b;
159    } else {
160      r = RandomValue(0.5, 1.0);
161      g = RandomValue(0.5, 1.0);
162      b = RandomValue(0.5, 1.0);
163    }
164  stream<<"<Material diffuseColor=\""<<r<<" "<<g<<" "<<b<<
165    "\" specularColor=\"0.0 0.0 0.0\"/>"<<endl;
166  stream<<"</Appearance>"<<endl;
167
168
169  if (mWireframe)
170    stream<<"<IndexedLineSet ccw=\"TRUE\" coordIndex=\""<<endl;
171  else
172    stream<<"<IndexedFaceSet ccw=\"TRUE\" coordIndex=\""<<endl;
173
174  FaceContainer::const_iterator fi = mesh->mFaces.begin();
175
176  int index = 0;
177 
178  for (; fi != mesh->mFaces.end(); fi++) {
179    Face *face = *fi;
180    VertexIndexContainer::const_iterator vi = face->mVertexIndices.begin();
181    for (; vi != face->mVertexIndices.end(); vi++)
182      stream<<*vi<<" ";
183    stream<<"-1"<<endl;
184  }
185  stream<<"\" >"<<endl;
186
187  stream<<"<Coordinate  point=\""<<endl;
188 
189  VertexContainer::const_iterator vi = mesh->mVertices.begin();
190  for (; vi != mesh->mVertices.end(); vi++) {
191    stream<<(*vi).x<<" "<<(*vi).y<<" "<<(*vi).z;
192    stream<<","<<endl;
193  }
194 
195  stream<<"\" >"<<endl;
196  stream<<"</Coordinate>"<<endl;
197
198  if (mWireframe)
199    stream<<"</IndexedLineSet>"<<endl;
200  else
201    stream<<"</IndexedFaceSet>"<<endl;
202 
203  stream<<"</Shape>"<<endl;
204
205}
206
207
208void X3dExporter::ExportPolygon(Polygon3 *poly)
209{
210        stream << "<Shape>" << endl;
211        stream << "<Appearance>" << endl;
212 
213        // $$ tmp -> random material
214 
215        float r, g, b;
216
217        if (mUseForcedMaterial)
218        {
219                r = mForcedMaterial.mDiffuseColor.r;
220                g = mForcedMaterial.mDiffuseColor.g;
221                b = mForcedMaterial.mDiffuseColor.b;
222        }
223        else if (poly->mMaterial)
224        {
225                r = poly->mMaterial->mDiffuseColor.r;
226                g = poly->mMaterial->mDiffuseColor.g;
227                b = poly->mMaterial->mDiffuseColor.b;
228        } else
229        {
230                r = RandomValue(0.5, 1.0);
231                g = RandomValue(0.5, 1.0);
232                b = RandomValue(0.5, 1.0);
233        }
234
235        stream << "<Material diffuseColor=\"" << r << " " << g << " " << b
236                   << "\" specularColor=\"0.0 0.0 0.0\"/>" << endl;
237
238    stream << "</Appearance>" << endl;
239
240
241        //-- create and write indices
242        if (mWireframe)
243                stream << "<IndexedLineSet ccw=\"TRUE\" coordIndex=\"" << endl;
244        else
245                stream << "<IndexedFaceSet ccw=\"TRUE\" coordIndex=\"" << endl;
246
247        int index = 0;
248       
249        VertexContainer::const_iterator vi; 
250       
251        for (int index = 0; index < (int)poly->mVertices.size(); ++ index)
252                stream << index << " ";
253       
254        if (mWireframe) // final line to finish polygon
255                stream << "0 ";
256
257        stream << "-1" << endl;
258        stream << "\" >" << endl;
259       
260        stream << "<Coordinate  point=\"" << endl;
261 
262        for (vi = poly->mVertices.begin(); vi != poly->mVertices.end(); ++vi)
263        {
264                stream << (*vi).x << " " << (*vi).y << " " << (*vi).z;
265                stream << "," << endl;
266        }
267 
268        stream << "\" >" << endl;
269        stream << "</Coordinate>" << endl;
270
271        if (mWireframe)
272                stream << "</IndexedLineSet>" << endl;
273        else
274                stream << "</IndexedFaceSet>" << endl;
275 
276        stream << "</Shape>" << endl;
277}
278
279void X3dExporter::ExportPolygons(const PolygonContainer &polys)
280{
281        stream << "<Shape>" << endl;
282        stream << "<Appearance>" << endl;
283 
284        // $$ tmp -> random material
285 
286        float r, g, b;
287
288        if (mUseForcedMaterial)
289        {
290                r = mForcedMaterial.mDiffuseColor.r;
291                g = mForcedMaterial.mDiffuseColor.g;
292                b = mForcedMaterial.mDiffuseColor.b;
293        }
294        else
295        {
296                r = RandomValue(0.5, 1.0);
297                g = RandomValue(0.5, 1.0);
298                b = RandomValue(0.5, 1.0);
299        }
300
301        stream << "<Material diffuseColor=\"" << r << " " << g << " " << b
302                   << "\" specularColor=\"0.0 0.0 0.0\"/>" << endl;
303
304    stream << "</Appearance>" << endl;
305
306
307        //-- create and write indices
308        if (mWireframe)
309                stream << "<IndexedLineSet ccw=\"TRUE\" coordIndex=\"" << endl;
310        else
311                stream << "<IndexedFaceSet ccw=\"TRUE\" coordIndex=\"" << endl;
312
313        int index = 0;
314       
315        PolygonContainer::const_iterator pit;
316
317    VertexContainer::const_iterator vi; 
318       
319        for (pit = polys.begin(); pit != polys.end(); ++pit)
320        {
321                Polygon3 *poly = *pit;
322                int startIdx = index;
323                for (vi = poly->mVertices.begin(); vi != poly->mVertices.end(); ++vi)
324                {
325                        stream << index ++ << " ";
326                }
327
328                stream << startIdx << " ";// finish line
329                stream << "-1" << endl;
330        }
331
332        stream << "\" >" << endl;
333       
334        stream << "<Coordinate  point=\"" << endl;
335        for (pit = polys.begin(); pit != polys.end(); ++ pit)
336        {
337                Polygon3 *poly = *pit;
338        for (vi = poly->mVertices.begin(); vi != poly->mVertices.end(); ++vi)
339                {
340                        stream << (*vi).x << " " << (*vi).y << " " << (*vi).z;
341                        stream << "," << endl;
342                }
343        }
344        stream << "\" >" << endl;
345        stream << "</Coordinate>" << endl;
346
347        if (mWireframe)
348                stream << "</IndexedLineSet>" << endl;
349        else
350                stream << "</IndexedFaceSet>" << endl;
351 
352        stream << "</Shape>" << endl;
353}
354
355bool
356X3dExporter::ExportBox(const AxisAlignedBox3 &box)
357{
358  Mesh *mesh = new Mesh;
359  // add 6 vertices of the box
360  int index = (int)mesh->mVertices.size();
361  for (int i=0; i < 8; i++) {
362    Vector3 v;
363    box.GetVertex(i, v);
364    mesh->mVertices.push_back(v);
365  }
366 
367  mesh->AddFace(new Face(index + 0, index + 1, index + 3, index + 2) );
368  mesh->AddFace(new Face(index + 0, index + 2, index + 6, index + 4) );
369  mesh->AddFace(new Face(index + 4, index + 6, index + 7, index + 5) );
370 
371  mesh->AddFace(new Face(index + 3, index + 1, index + 5, index + 7) );
372  mesh->AddFace(new Face(index + 0, index + 4, index + 5, index + 1) );
373  mesh->AddFace(new Face(index + 2, index + 3, index + 7, index + 6) );
374 
375  ExportMesh(mesh);
376  delete mesh;
377  return true;
378}
379
380bool
381X3dExporter::ExportBspTree(const BspTree &tree)
382{
383        if (mExportRayDensity)
384        {
385                return ExportBspTreeRayDensity(tree);
386        }
387 
388        stack<BspNode *> tStack;
389
390        tStack.push(tree.GetRoot());
391
392        Mesh *mesh = new Mesh;
393
394        AxisAlignedBox3 box = tree.GetBoundingBox();
395        bool savedWireframe = mWireframe;
396
397        SetWireframe();
398        ExportBox(box);
399       
400        if (!savedWireframe)
401                SetFilled();
402
403        //ViewCellContainer foundViewCells;
404
405        if (BspTree::sStoreSplitPolys)
406        {
407                while (!tStack.empty())
408                {
409            BspNode *node = tStack.top();
410   
411                        tStack.pop();
412       
413                        PolygonContainer::const_iterator it;
414                        PolygonContainer::const_iterator it_end = node->GetPolygons()->end();
415
416                        for (it = node->GetPolygons()->begin(); it != it_end; ++ it)
417                                ExportPolygon(*it);
418                       
419                        if (!node->IsLeaf())
420                        {
421                                BspInterior *interior = dynamic_cast<BspInterior *>(node);
422     
423                                tStack.push(interior->GetFront());
424                                tStack.push(interior->GetBack());
425
426                        }
427                }
428        }
429        else // export view cells
430        {
431                while (!tStack.empty())
432                {
433            BspNode *node = tStack.top();
434   
435                        tStack.pop();
436       
437                        if (node->IsLeaf())
438                        {
439                                ViewCell *viewCell = dynamic_cast<BspLeaf *>(node)->GetViewCell();
440                                if (viewCell)
441                                        foundViewCells.push_back(viewCell);
442                        }
443                        else
444                        {
445                                BspInterior *interior = dynamic_cast<BspInterior *>(node);
446     
447                                tStack.push(interior->GetFront());
448                                tStack.push(interior->GetBack());
449                        }
450                }
451
452                Debug << "Number of view cells with dublicates: " << (int)foundViewCells.size() << endl;
453
454        //-- erase dublicates
455                sort(foundViewCells.begin(), foundViewCells.end());
456                ViewCellContainer::iterator new_end = unique(foundViewCells.begin(), foundViewCells.end());
457                foundViewCells.erase(new_end, foundViewCells.end());
458                ExportViewCells(foundViewCells);
459
460                Debug << "Number of view cells after erasing dublicates: " << (int)foundViewCells.size() << endl;
461        }
462
463        return true;
464}
465
466bool X3dExporter::ExportKdTree(const KdTree &tree)
467{
468         if (mExportRayDensity) {
469    return ExportKdTreeRayDensity(tree);
470  }
471 
472  stack<KdNode *> tStack;
473
474  tStack.push(tree.GetRoot());
475
476  Mesh *mesh = new Mesh;
477 
478  while (!tStack.empty()) {
479    KdNode *node = tStack.top();
480    tStack.pop();
481    AxisAlignedBox3 box = tree.GetBox(node);
482    // add 6 vertices of the box
483    int index = (int)mesh->mVertices.size();
484    for (int i=0; i < 8; i++) {
485      Vector3 v;
486      box.GetVertex(i, v);
487      mesh->mVertices.push_back(v);
488    }
489    mesh->AddFace(new Face(index + 0, index + 1, index + 3, index + 2) );
490    mesh->AddFace(new Face(index + 0, index + 2, index + 6, index + 4) );
491    mesh->AddFace(new Face(index + 4, index + 6, index + 7, index + 5) );
492
493    mesh->AddFace(new Face(index + 3, index + 1, index + 5, index + 7) );
494    mesh->AddFace(new Face(index + 0, index + 4, index + 5, index + 1) );
495    mesh->AddFace(new Face(index + 2, index + 3, index + 7, index + 6) );
496
497    if (!node->IsLeaf()) {
498      KdInterior *interior = (KdInterior *)node;
499      tStack.push(interior->mFront);
500      tStack.push(interior->mBack);
501    }
502  }
503 
504  ExportMesh(mesh);
505  delete mesh;
506  return true;
507        // TODO
508        return true;
509}
510
511
512bool
513X3dExporter::ExportBspTreeRayDensity(const BspTree &tree)
514{
515        stack<BspNode *> tStack;
516
517        tStack.push(tree.GetRoot());
518
519        bool fm = mUseForcedMaterial;
520       
521        mUseForcedMaterial = true;
522       
523        mForcedMaterial.mDiffuseColor.g = 1.0f;
524        mForcedMaterial.mDiffuseColor.b = 1.0f;
525 
526        while (!tStack.empty())
527        {
528                BspNode *node = tStack.top();
529                tStack.pop();
530
531                if (node->IsLeaf())
532                {
533                        ViewCell *vc = dynamic_cast<BspLeaf *>(node)->GetViewCell();
534     
535                        // set the mesh material according to the ray density
536                        if (vc->mPassingRays.mRays)
537                        {
538                                float importance =
539                                        vc->mPassingRays.mContributions / (float)vc->mPassingRays.mRays;
540
541                                mForcedMaterial.mDiffuseColor.r = importance;
542                                mForcedMaterial.mDiffuseColor.g = 1.0f - mForcedMaterial.mDiffuseColor.r;
543                                ExportViewCell(vc);
544                        } 
545                } else
546                {
547                        BspInterior *interior = (BspInterior *)node;
548                        tStack.push(interior->GetFront());
549                        tStack.push(interior->GetBack());
550                }
551        }
552 
553        // restore the state of forced material
554        mUseForcedMaterial = fm;
555
556        return true;
557}
558
559bool
560X3dExporter::ExportKdTreeRayDensity(const KdTree &tree)
561{
562  stack<KdNode *> tStack;
563
564  tStack.push(tree.GetRoot());
565
566  bool fm = mUseForcedMaterial;
567  mUseForcedMaterial = true;
568  mForcedMaterial.mDiffuseColor.g = 1.0f;
569  mForcedMaterial.mDiffuseColor.b = 1.0f;
570  while (!tStack.empty()) {
571    KdNode *node = tStack.top();
572    tStack.pop();
573    if (node->IsLeaf()) {
574      AxisAlignedBox3 box = tree.GetBox(node);
575      Mesh *mesh = new Mesh;
576     
577      // add 6 vertices of the box
578      int index = (int)mesh->mVertices.size();
579      for (int i=0; i < 8; i++) {
580        Vector3 v;
581        box.GetVertex(i, v);
582        mesh->mVertices.push_back(v);
583      }
584      mesh->AddFace(new Face(index + 0, index + 1, index + 3, index + 2) );
585      mesh->AddFace(new Face(index + 0, index + 2, index + 6, index + 4) );
586      mesh->AddFace(new Face(index + 4, index + 6, index + 7, index + 5) );
587     
588      mesh->AddFace(new Face(index + 3, index + 1, index + 5, index + 7) );
589      mesh->AddFace(new Face(index + 0, index + 4, index + 5, index + 1) );
590      mesh->AddFace(new Face(index + 2, index + 3, index + 7, index + 6) );
591
592
593      // set the mesh material according to the ray density
594      KdLeaf *leaf = (KdLeaf *) node;
595      if (leaf->mPassingRays.mRays) {
596        float importance = leaf->mPassingRays.mContributions/(float)leaf->mPassingRays.mRays;
597        //      float importance = leaf->mPassingRays.mContributions/1000.0f;
598        //      float importance = leaf->mPassingRays.mRays/1000.0f;
599        ///(float)leaf->mPassingRays.mRays;
600        // mForcedMaterial.mDiffuseColor.r = log10(leaf->mPassingRays.mRays)/3.0f;
601        mForcedMaterial.mDiffuseColor.r = importance;
602        mForcedMaterial.mDiffuseColor.g = 1.0f - mForcedMaterial.mDiffuseColor.r;
603        ExportMesh(mesh);
604      }
605      delete mesh;
606    } else {
607      KdInterior *interior = (KdInterior *)node;
608      tStack.push(interior->mFront);
609      tStack.push(interior->mBack);
610    }
611  }
612  // restore the state of forced material
613  mUseForcedMaterial = fm;
614  return true;
615}
616
617struct BspSplitData
618{
619        /// the current node
620        BspNode *mNode;
621
622        vector<Plane3 *> mPlanes;
623        vector<bool> mSides;
624        bool mIsFront;
625
626        BspSplitData(BspNode *node):
627        mNode(node), mIsFront(false)
628        {};     
629        BspSplitData(BspNode *node,
630                                 vector<Plane3 *> planes,
631                                 vector<bool> sides,
632                                 bool isFront):
633        mNode(node), mPlanes(planes),
634        mSides(sides), mIsFront(isFront)
635        {};
636};
637
638void X3dExporter::ExportBspSplits(const BspTree &tree)
639{
640        std::stack<BspSplitData> tStack;
641
642        BspSplitData tData(tree.GetRoot());
643        tStack.push(tData);
644 
645        PolygonContainer polys;
646
647        while (!tStack.empty())
648        {
649                // filter polygons donw the tree
650                BspSplitData tData = tStack.top();
651            tStack.pop();       
652               
653                if (!tData.mNode->IsLeaf())
654                {
655                        BspInterior *interior = dynamic_cast<BspInterior *>(tData.mNode);
656                        if (tData.mNode != tree.GetRoot())
657                                tData.mSides.push_back(tData.mIsFront); // add current side
658
659                        // bounded plane is added to the polygons
660                        Polygon3 *planePoly = tree.GetBoundingBox().CrossSection(*interior->GetPlane());
661               
662                        // do all the splits with the previous planes
663                        for (int i = 0; i < (int)tData.mPlanes.size(); ++i)
664                        {
665                                VertexContainer splitPts;
666                                Polygon3 *frontPoly = new Polygon3();
667                                Polygon3 *backPoly = new Polygon3();
668
669                                if (planePoly->ClassifyPlane(*tData.mPlanes[i]) == Plane3::SPLIT)
670                                {
671                                        planePoly->Split(*tData.mPlanes[i], *frontPoly, *backPoly, splitPts);
672                                        DEL_PTR(planePoly);
673
674                                        if(tData.mSides[i] == true)
675                                        {
676                                                planePoly = frontPoly;
677                                                DEL_PTR(backPoly);
678                                        }
679                                        else
680                                        {
681                                                planePoly = backPoly;
682                                                DEL_PTR(frontPoly);
683                                        }
684                                }
685                        }
686
687                        tData.mPlanes.push_back(interior->GetPlane()); // add plane to split planes
688                        if (planePoly->Valid())
689                                polys.push_back(planePoly);
690                        else
691                        {
692                                //Debug << "polygon not valid: " << *planePoly << " size: " << (int)planePoly->mVertices.size() << endl;
693                                DEL_PTR(planePoly);
694                        }
695                        // push the children on the stack
696                        tStack.push(BspSplitData(interior->GetFront(), tData.mPlanes, tData.mSides, true));
697                        tStack.push(BspSplitData(interior->GetBack(), tData.mPlanes, tData.mSides, false));
698                }
699        }       
700        ExportPolygons(polys);
701        CLEAR_CONTAINER(polys);
702}
703
704void X3dExporter::ExportBspSplitPlanes(const BspTree &tree)
705{
706        std::stack<BspNode *> tStack;
707
708        tStack.push(tree.GetRoot());
709 
710        PolygonContainer polys;
711
712        while (!tStack.empty())
713        {
714                // filter polygons donw the tree
715                BspNode *node = tStack.top();
716            tStack.pop();       
717               
718                if (!node->IsLeaf())
719                {
720                        BspInterior *interior = dynamic_cast<BspInterior *>(node);
721
722                        // bounded plane is added to the polygons
723                        polys.push_back(tree.GetBoundingBox().CrossSection(*interior->GetPlane()));
724               
725                        // push the children on the stack
726                        tStack.push(interior->GetBack());
727                        tStack.push(interior->GetFront());
728                }
729        }
730
731        ExportPolygons(polys);
732        CLEAR_CONTAINER(polys);
733}
Note: See TracBrowser for help on using the repository browser.