1 #include "ThreeDOutOpenSceneGraph.hh"
7 #include <osgDB/WriteFile>
10 #include <osg/Geometry>
11 #include <osg/Texture2D>
13 #include <osg/MatrixTransform>
14 #include <osg/Billboard>
15 #include <osg/ShapeDrawable>
17 #include <osg/LineWidth>
18 #include <osg/LineStipple>
28 #include <osgText/Font>
29 #include <osgText/Text>
34 #include <Base/Common/FileHandling.hh>
35 #include <Base/Image/ImageIO.hh>
36 #include "OpenSceneGraphHelper.hh"
62 std::string suffix, fname;
65 bool savetextures=
true;
75 BIASERR(
"GetSceneGraph failed!");
81 fname = dir+base+suffix;
86 osg::Node *myNode = sg.get();
87 std::transform( suffix.begin(), suffix.end(),
88 suffix.begin(), (int (*)(int))std::tolower );
89 BCDOUT(D_TDOOSG_MatrixTransform,
"saving suffix: "<<suffix<< endl);
92 BCDOUT(D_TDOOSG_MatrixTransform,
"found vrml file, adding matrix "
93 <<
"transform for compensation\n");
96 mt =
new osg::MatrixTransform(
osg::Matrix(1, 0, 0, 0,
100 mt->addChild(sg.get());
101 mt->setName(sg->getName());
105 osgDB::writeNodeFile(*myNode, fname);
120 const std::string &filename )
const
125 sg =
new osg::MatrixTransform;
126 sg->setName(
"RootTransform");
138 if (newNode != NULL) sg->addChild(newNode);
146 std::string graphfilename)
const
151 osg::MatrixTransform* mTrans =
152 new osg::MatrixTransform;
153 mTrans->setName(
"IndexedFaceSetsTransform");
155 unsigned int texcount=0;
157 map<unsigned int, IndexedFaceSet>::const_iterator it;
162 osg::Geode* mGeode =
new osg::Geode();
163 #if OPENSCENEGRAPH_MAJOR_VERSION < 3 || (OPENSCENEGRAPH_MAJOR_VERSION == 3 && OPENSCENEGRAPH_MINOR_VERSION <= 1)
164 osg::Geometry* mGeometry =
new osg::Geometry();
166 deprecated_osg::Geometry* mGeometry =
new deprecated_osg::Geometry();
168 mGeode->addDrawable(mGeometry);
171 osg::MatrixTransform* mObjTrans =
172 new osg::MatrixTransform;
173 mObjTrans->setName(it->second.name+
"Transform");
174 mTrans->addChild(mObjTrans);
175 mObjTrans->addChild(mGeode);
176 mGeode->setName(it->second.name);
180 const unsigned int vertNumb = it->second.vertexSet.size();
181 osg::Vec3Array* vertices =
new osg::Vec3Array(vertNumb);
183 for(
unsigned int vt = 0; vt < vertNumb; vt++)
187 (*vertices)[vt].set(vertexBIAS[0],vertexBIAS[1],vertexBIAS[2]);
190 mGeometry->setVertexArray(vertices);
193 if (it->second.useTexture) {
194 unsigned int texCoordNumb = it->second.texCoordSet.size();
195 if(texCoordNumb!= vertNumb)
197 BIASWARN(
"Number of texture coordinates does not match vertex number.");
200 osg::Vec2Array* texCoords =
new osg::Vec2Array(texCoordNumb);
201 for(
unsigned int tc=0; tc<texCoordNumb; tc++)
204 (*texCoords)[tc].set(texCoordBIAS[0],texCoordBIAS[1]);
206 mGeometry->setTexCoordArray(0,texCoords);
211 const unsigned int faceNumb = it->second.faceIndices.size();
213 osg::DrawElementsUInt* drawTriangleElmtsU=NULL;
214 osg::DrawElementsUInt* drawQuadsElmtsU=NULL;
216 for(
unsigned int fc = 0; fc<faceNumb ; fc++)
221 unsigned int indexNum = it->second.faceIndices[fc].Size();
222 osg::DrawElementsUInt* actualFace;
227 if(drawTriangleElmtsU==NULL)
230 new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES);
231 mGeometry->addPrimitiveSet(drawTriangleElmtsU);
233 actualFace = drawTriangleElmtsU;
236 if(drawQuadsElmtsU==NULL)
239 new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS);
240 mGeometry->addPrimitiveSet(drawQuadsElmtsU);
242 actualFace = drawQuadsElmtsU;
246 new osg::DrawElementsUInt(osg::PrimitiveSet::POLYGON);
247 mGeometry->addPrimitiveSet(actualFace);
250 for(
unsigned int ix = 0; ix<indexNum; ix++)
253 int idx = (it->second.faceIndices[fc])[ix];
255 actualFace->push_back((
unsigned int) idx);
260 if (it->second.useColoredVertices) {
261 if (it->second.vertexColorSet.size() > 0) {
262 osg::Vec4Array* colours =
new osg::Vec4Array();
263 colours->reserve(it->second.vertexColorSet.size());
265 for (
size_t colourCount = 0;
266 colourCount < it->second.vertexColorSet.size();
269 = it->second.vertexColorSet[colourCount];
270 colours->push_back(osg::Vec4(
float(colour[0]) / 255.0f,
271 float(colour[1]) / 255.0f,
272 float(colour[2]) / 255.0f,
273 float(colour[3]) / 255.0f));
276 mGeometry->setColorArray(colours);
277 #if OPENSCENEGRAPH_MAJOR_VERSION < 3 || (OPENSCENEGRAPH_MAJOR_VERSION == 3 && OPENSCENEGRAPH_MINOR_VERSION <= 1)
278 mGeometry->setColorBinding(osg::Geometry::BIND_PER_VERTEX);
280 mGeometry->setColorBinding(deprecated_osg::Geometry::BIND_PER_VERTEX);
286 if (it->second.useNormals && it->second.NormalArray) {
287 osg::Vec3Array* normals =
new osg::Vec3Array();
288 normals->reserve(it->second.vertexSet.size());
290 for (
size_t normalCount = 0;
291 normalCount < it->second.vertexSet.size();
293 const size_t offset = normalCount * 3;
295 normals->push_back(
osg::Vec3(it->second.NormalArray[offset],
296 it->second.NormalArray[offset + 1],
297 it->second.NormalArray[offset + 2]));
300 mGeometry->setNormalArray(normals);
301 #if OPENSCENEGRAPH_MAJOR_VERSION < 3 || (OPENSCENEGRAPH_MAJOR_VERSION == 3 && OPENSCENEGRAPH_MINOR_VERSION <= 1)
302 mGeometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
304 mGeometry->setNormalBinding(deprecated_osg::Geometry::BIND_PER_VERTEX);
309 if (it->second.useTexture) {
310 osg::Image* mImage =
new osg::Image;
326 if(!osgDB::writeImageFile(*mImage,tmptexfilename))
328 BIASWARN(
"could not save texture.");
330 mImage->setFileName(tmptexfilename);
333 mTex2D->setImage( mImage );
335 osg::StateSet *ss =
new osg::StateSet;
336 ss->setTextureAttributeAndModes(0, mTex2D.get());
340 osg::TexEnv *txenv =
new osg::TexEnv(osg::TexEnv::REPLACE);
341 ss->setTextureAttribute(0, txenv);
345 mGeode->setStateSet(ss);
355 unsigned int texnumber)
const
365 std::stringstream sstr;
366 sstr << setfill (
'0')<< setw(3) << texnumber;
377 osg::MatrixTransform* mTrans =
new osg::MatrixTransform;
378 mTrans->setName(
"LineSetTransform");
379 rootNode->addChild(mTrans);
382 osg::Geode* mGeode =
new osg::Geode;
383 mGeode->setName(
"Lines");
386 #if OPENSCENEGRAPH_MAJOR_VERSION < 3 || (OPENSCENEGRAPH_MAJOR_VERSION == 3 && OPENSCENEGRAPH_MINOR_VERSION <= 1)
387 osg::Geometry* mGeometry =
new osg::Geometry;
389 deprecated_osg::Geometry* mGeometry =
new deprecated_osg::Geometry;
391 mGeode->addDrawable(mGeometry);
392 mTrans->addChild(mGeode);
394 osg::Vec3Array* vertices =
new osg::Vec3Array;
395 osg::Vec4ubArray* colors =
new osg::Vec4ubArray;
399 osg::StateSet* ss =
new osg::StateSet;
400 osg::LineWidth* lw =
new osg::LineWidth;
401 ss->setAttribute(lw);
403 ss->setMode( GL_LIGHTING, osg::StateAttribute::PROTECTED
404 | osg::StateAttribute::OFF );
409 osg::LineStipple* ls =
new osg::LineStipple;
410 ls->setPattern(0x0f0f);
412 ss->setAttributeAndModes(ls);
414 mGeode->setStateSet(ss);
416 map<unsigned int, Line3DData>::const_iterator it;
421 RGBAuc col = it->second.Color;
422 vertices->push_back(
osg::Vec3(pt1[0], pt1[1], pt1[2]));
423 vertices->push_back(
osg::Vec3(pt2[0], pt2[1], pt2[2]));
425 colors->push_back(osg::Vec4ub(col[0],col[1],col[2],col[3]));
428 mGeometry->setVertexArray(vertices);
429 mGeometry->setColorArray(colors);
430 #if OPENSCENEGRAPH_MAJOR_VERSION < 3 || (OPENSCENEGRAPH_MAJOR_VERSION == 3 && OPENSCENEGRAPH_MINOR_VERSION <= 1)
431 mGeometry->setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE);
433 mGeometry->setColorBinding(deprecated_osg::Geometry::BIND_PER_PRIMITIVE);
435 mGeometry->addPrimitiveSet(
436 new osg::DrawArrays(osg::DrawArrays::LINES,0,
mapLines_.size()*2));
442 bool camEllipsoids)
const
446 const std::map<unsigned int, Ellipsoid3DData>* actualElipsoidMap;
449 mTrans->setName(
"CamEllipsoidSetTransform");
454 mTrans->setName(
"EllipsoidSetTransform");
458 if(actualElipsoidMap->empty())
463 rootNode->addChild(mTrans);
465 map<unsigned int, Ellipsoid3DData>::const_iterator it;
466 for(it=actualElipsoidMap->begin(); it!=actualElipsoidMap->end(); it++)
469 osg::MatrixTransform* mTransEllip =
470 new osg::MatrixTransform;
471 mTrans->addChild(mTransEllip);
480 rota.makeRotate(it->second.dAngle,
481 it->second.RotAxis[0],
482 it->second.RotAxis[1],
483 it->second.RotAxis[2]
485 transl.makeTranslate(it->second.C[0],it->second.C[1],it->second.C[2]);
487 transf = scale*rota*transl;
488 mTransEllip->setMatrix(transf);
491 osg::Sphere* mSphere =
new osg::Sphere(
osg::Vec3(0,0,0),1.0);
492 osg::ShapeDrawable* sphereDrawable =
new osg::ShapeDrawable(mSphere);
493 sphereDrawable->setColor(osg::Vec4(it->second.Color[0],
496 it->second.Color[3]));
497 mGeode =
new osg::Geode();
498 mGeode->addDrawable(sphereDrawable);
499 mTransEllip->addChild(mGeode);
509 osg::MatrixTransform* mTrans =
510 new osg::MatrixTransform;
511 mTrans->setName(
"PointSetTransform");
512 rootNode->addChild(mTrans);
516 mGeode->setName(
"Points");
517 mGeode->setCullingActive(
false);
521 mGeode->addDrawable(mGeometry);
522 mTrans->addChild(mGeode);
530 mGeode->setStateSet(ss);
533 ss->setMode( GL_LIGHTING, osg::StateAttribute::PROTECTED
534 | osg::StateAttribute::OFF );
538 BIASWARN(
"unsupported PointDrawingStyle.");
545 map<unsigned int, BIAS::Point3DData>::const_iterator it;
549 RGBAuc col = it->second.Color;
550 vertices->push_back(
osg::Vec3(pt[0], pt[1], pt[2]));
551 colors->push_back(osg::Vec4ub(col[0],col[1],col[2],col[3]));
554 mGeometry->setVertexArray(vertices);
555 mGeometry->setColorArray(colors);
556 mGeometry->setColorBinding(osg::Geometry::BIND_PER_VERTEX);
557 mGeometry->addPrimitiveSet(
558 new osg::DrawArrays(osg::DrawArrays::POINTS,0,
mapPoints_.size()));
571 new osg::MatrixTransform;
572 mTrans->setName(
"CameraSetTransform");
573 rootNode->addChild(mTrans.get());
574 osg::Geode* mGeode =
new osg::Geode;
575 mGeode->setName(
"Cameras");
576 mTrans->addChild(mGeode);
581 unsigned int idxOffset=0;
585 osg::StateSet* ss =
new osg::StateSet;
586 osg::Point* p =
new osg::Point;
592 osg::LineWidth* lw =
new osg::LineWidth;
596 ss->setMode( GL_LIGHTING, osg::StateAttribute::PROTECTED
597 | osg::StateAttribute::OFF );
599 mGeode->setStateSet(ss);
602 osg::LineStipple* ls =
new osg::LineStipple;
603 ls->setPattern(0x0f0f);
605 ss->setAttributeAndModes(ls);
609 map<unsigned int, PMatrix3DData>::const_iterator it;
613 osg::Geometry* mGeometry =
new osg::Geometry;
614 mGeode->addDrawable(mGeometry);
615 osg::DrawElementsUInt* drawElmtsU=NULL;
619 drawElmtsU =
new osg::DrawElementsUInt(osg::PrimitiveSet::LINES);
623 drawElmtsU =
new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES);
627 osg::DrawElementsUInt* drawElmtsPointsU=
628 new osg::DrawElementsUInt(osg::PrimitiveSet::POINTS);
631 mGeometry->setName(i->
name);
634 osg::Vec3Array* vertices =
new osg::Vec3Array;
635 osg::Vec4ubArray* colors =
new osg::Vec4ubArray;
638 vertices->push_back(vC) ;
641 colors->push_back(osg::Vec4ub(col[0],col[1],col[2],col[3]));
643 colors->push_back(osg::Vec4ub(col[0],col[1],col[2],col[3]));
646 drawElmtsPointsU->push_back(0);
663 vertices->push_back(vUR);
664 vertices->push_back(vUL);
665 vertices->push_back(vLL);
666 vertices->push_back(vLR);
671 osg::Matrixd identitymat;
672 identitymat.makeIdentity();
673 mTrans->setMatrix(identitymat);
674 rootNode->addChild(mTrans);
676 osg::Sphere* mSphere =
new osg::Sphere(
osg::Vec3(vUL[0],vUL[1],vUL[2]),
678 osg::TessellationHints *fewfaces =
new osg::TessellationHints;
679 fewfaces->setTargetNumFaces(4);
680 fewfaces->setTessellationMode(osg::TessellationHints::USE_TARGET_NUM_FACES);
683 osg::ShapeDrawable* sphereDrawable =
new osg::ShapeDrawable(mSphere,fewfaces);
684 sphereDrawable->setColor(osg::Vec4f(
float(col[0]),
689 mGeode =
new osg::Geode();
690 mGeode->addDrawable(sphereDrawable);
691 mTrans->addChild(mGeode);
703 drawElmtsU->push_back(0);drawElmtsU->push_back(1);
704 drawElmtsU->push_back(0);drawElmtsU->push_back(2);
705 drawElmtsU->push_back(0);drawElmtsU->push_back(3);
706 drawElmtsU->push_back(0);drawElmtsU->push_back(4);
707 drawElmtsU->push_back(1);drawElmtsU->push_back(2);
708 drawElmtsU->push_back(2);drawElmtsU->push_back(3);
709 drawElmtsU->push_back(3);drawElmtsU->push_back(4);
710 drawElmtsU->push_back(4);drawElmtsU->push_back(1);
722 vertices->push_back(vPP);
725 vertices->push_back(vUPC);
726 drawElmtsU->push_back(0);drawElmtsU->push_back(idxOffset);
727 drawElmtsU->push_back(0);drawElmtsU->push_back(idxOffset+1);
733 drawElmtsU->push_back(0);drawElmtsU->push_back(1);
734 drawElmtsU->push_back(2);
735 drawElmtsU->push_back(0);drawElmtsU->push_back(3);
736 drawElmtsU->push_back(4);
737 drawElmtsU->push_back(0);drawElmtsU->push_back(4);
738 drawElmtsU->push_back(1);
739 drawElmtsU->push_back(0);drawElmtsU->push_back(2);
740 drawElmtsU->push_back(3);
741 drawElmtsU->push_back(1);drawElmtsU->push_back(3);
742 drawElmtsU->push_back(2);
743 drawElmtsU->push_back(1);drawElmtsU->push_back(4);
744 drawElmtsU->push_back(3);
749 BIASERR(
"unexpected pmatrix draw style");
753 mGeometry->setVertexArray(vertices);
754 mGeometry->setColorArray(colors);
755 mGeometry->setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE_SET);
756 mGeometry->addPrimitiveSet(drawElmtsPointsU);
757 mGeometry->addPrimitiveSet(drawElmtsU);
765 std::string graphfilename)
const
771 unsigned int texcount=0;
772 map<unsigned int, Image3DData>::const_iterator it;
776 osg::Geometry* mGeometry =
new osg::Geometry();
777 osg::Geode* mGeode = 0;
778 osg::Billboard* mBB = 0;
779 if(it->second.BillBoard)
782 mBB =
new osg::Billboard();
783 rootNode->addChild(mBB);
784 mBB->setMode(osg::Billboard::AXIAL_ROT);
786 mBB->setNormal(
osg::Vec3(0.0f,0.0f,1.0f));
788 rootNode->addChild(mBB);
789 mBB->setName(it->second.name);
793 mGeode =
new osg::Geode();
794 mGeode->addDrawable(mGeometry);
795 rootNode->addChild(mGeode);
796 mGeode->setName(it->second.name);
800 osg::Vec3Array* vertices =
new osg::Vec3Array(4);
801 if(!it->second.BillBoard)
803 (*vertices)[0].set(it->second.UL[0],it->second.UL[1],it->second.UL[2]);
804 (*vertices)[1].set(it->second.LL[0],it->second.LL[1],it->second.LL[2]);
805 (*vertices)[2].set(it->second.LR[0],it->second.LR[1],it->second.LR[2]);
806 (*vertices)[3].set(it->second.UR[0],it->second.UR[1],it->second.UR[2]);
814 (*vertices)[0].set(it->second.UL[0]-bbcenter[0],
815 it->second.UL[1]-bbcenter[1],
816 it->second.UL[2]-bbcenter[2]);
817 (*vertices)[1].set(it->second.LL[0]-bbcenter[0],
818 it->second.LL[1]-bbcenter[1]
819 ,it->second.LL[2]-bbcenter[2]);
820 (*vertices)[2].set(it->second.LR[0]-bbcenter[0],
821 it->second.LR[1]-bbcenter[1],
822 it->second.LR[2]-bbcenter[2]);
823 (*vertices)[3].set(it->second.UR[0]-bbcenter[0],
824 it->second.UR[1]-bbcenter[1],
825 it->second.UR[2]-bbcenter[2]);
829 mBB->addDrawable( mGeometry,
osg::Vec3(bbcenter[0],
834 mGeometry->setVertexArray(vertices);
836 osg::DrawElementsUInt* actualFace;
837 actualFace =
new osg::DrawElementsUInt(osg::PrimitiveSet::QUADS);
838 mGeometry->addPrimitiveSet(actualFace);
839 actualFace->push_back((
unsigned int) 0);
840 actualFace->push_back((
unsigned int) 1);
841 actualFace->push_back((
unsigned int) 2);
842 actualFace->push_back((
unsigned int) 3);
845 osg::Vec2Array* texCoords =
new osg::Vec2Array(4);
846 (*texCoords)[0].set(0,1);
847 (*texCoords)[1].set(0,0);
848 (*texCoords)[2].set(1,0);
849 (*texCoords)[3].set(1,1);
850 mGeometry->setTexCoordArray(0,texCoords);
854 osg::Image* mImage =
new osg::Image;
856 string(
"img")+it->second.name,texcount);
858 osg::StateSet *ss =
new osg::StateSet;
866 BIASWARN(
"could not save texture.");
869 mImage->setFileName(tmptexfilename);
871 mTex2D->setImage( mImage );
874 ss->setTextureAttributeAndModes(0, mTex2D.get());
877 osg::TexEnv *txenv =
new osg::TexEnv(osg::TexEnv::REPLACE);
878 ss->setTextureAttribute(0, txenv);
880 if(it->second.BillBoard)
882 mBB->setStateSet(ss);
886 mGeode->setStateSet(ss);
898 osg::MatrixTransform* mTrans =
new osg::MatrixTransform;
899 mTrans->setName(
"TextTransform");
900 rootNode->addChild(mTrans);
903 map<unsigned int, BIAS::Text3DData>::const_iterator it;
907 mGeode->setName(
"Text");
908 mGeode->setCullingActive(
false);
909 mTrans->addChild(mGeode);
911 osgText::Text* text4 =
new osgText::Text;
912 text4->setFont(
"fonts/times.ttf");
914 if (it->second.Size>0.0)
915 text4->setCharacterSize(it->second.Size);
917 double thesize = -1.0 * it->second.Size;
918 if (thesize<5) thesize = 5;
919 text4->setCharacterSizeMode(osgText::Text::OBJECT_COORDS_WITH_MAXIMUM_SCREEN_SIZE_CAPPED_BY_FONT_HEIGHT);
920 text4->setCharacterSize(thesize);
922 text4->setPosition(
osg::Vec3(it->second.Position[0],
923 it->second.Position[1],
924 it->second.Position[2]));
928 if (it->second.Direction.NormL2()>0.0) {
957 text4->setRotation(osg::Quat(q[0], q[1], q[2], q[3]));
959 text4->setAxisAlignment(osgText::Text::SCREEN);
960 text4->setAlignment(osgText::Text::CENTER_CENTER);
964 text4->setBackdropType(osgText::Text::OUTLINE);
967 text4->setColor(osg::Vec4(
float(it->second.Color[0])/255.0,
float(it->second.Color[1])/255.0,
968 float(it->second.Color[2])/255.0,
float(it->second.Color[3])/255.0));
969 text4->setText(it->second.Text);
970 mGeode->addDrawable(text4);
int GetSceneGraph_(osg::ref_ptr< osg::Group > &sg, bool exporttextures, const std::string &filename) const
osg::Node * AddOSGIndexedFaceSets_(bool exporttextures, std::string graphfilename) const
create one transform (IndexedFaceSets), add another transform for each indexed face set...
std::map< unsigned int, Text3DData > mapTexts_
map of all point structures
std::map< unsigned int, Image3DData > mapImages_
map of all image structures
int OpenSceneGraphOut(const std::string &filename) const
save ThreeDOut object as OpenSceneGraph saves an Open Scene Graph and the needed textures ...
Unified output of 3D entities via OpenGL or VRML.
BIAS::Vector3< double > LL
lower left corner of image plane in wcs
std::string GenerateFilename_(std::string graphfilename, std::string subname, unsigned int texnumber) const
ThreeDOutParameters Params_
holds the params set by constructor or SetParams
configuration struct for drawing styles of various 3d objects
ThreeDOutOpenSceneGraph(const BIAS::ThreeDOutParameters ¶ms=BIAS::ThreeDOutParameters())
BIAS::RGBAuc Color
RGBA color+opacity, 255=opaque, 0=transp.
std::map< unsigned int, Line3DData > mapLines_
map of all line structures
std::string TexImgExtension_
stores important data for drawing a camera
std::map< unsigned int, Point3DData > mapPoints_
map of all point structures
CameraDrawingStyle CameraStyle
void AddOSGLines_(osg::ref_ptr< osg::Group > &Rootnode) const
virtual ~ThreeDOutOpenSceneGraph()
BIAS::Vector3< double > UL
upper left corner of image plane in wcs
void AddOSGImage_(osg::ref_ptr< osg::Group > &Rootnode, bool exportTextures, std::string graphfilename) const
static void SplitName(const std::string &fullname, std::string &dir, std::string &base, std::string &suffix)
Split full path into:
LineDrawingStyle LineStyle
long int NewDebugLevel(const std::string &name)
creates a new debuglevel
static bool BIASimageToOSGimage(const BIAS::Image< unsigned char > &in, osg::Image *out, bool copydata)
conversion function
static int Save(const std::string &filename, const ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Export image as file using extrnal libs.
BIAS::Vector3< double > UR
upper right corner of image plane in wcs
void AddOSGPMatrix_(osg::ref_ptr< osg::Group > &rootNode) const
void AddOSGPoints_(osg::ref_ptr< osg::Group > &Rootnode) const
void MultIP(const T &scalar)
std::map< unsigned int, IndexedFaceSet > mapIndexedFaceSet_
BIAS::Vector3< double > PP
principle point in wcs
BIAS::Vector3< double > Up
Up-Vector (V)
PointDrawingStyle PointStyle
std::map< unsigned int, PMatrix3DData > mapPMatrices_
the cameras are saved in a vector for efficiency reasons
std::map< unsigned int, Ellipsoid3DData > mapCamEllipsoids_
map of all ellipsoid structures
void AddOSGTexts_(osg::ref_ptr< osg::Group > &Rootnode) const
BIAS::Vector3< double > C
camera center in wcs
BIAS::Vector3< double > LR
lower right corner of image plane in wcs
void AddOSGEllipsoids_(osg::ref_ptr< osg::Group > &rootNode, bool camEllipsoids=false) const
int GetOpenSceneGraph(osg::ref_ptr< osg::Group > &sg, bool exporttextures=false) const
Get ThreeDOut object as OpenSceneGraph structure.
std::map< unsigned int, Ellipsoid3DData > mapEllipsoids_
map of all ellipsoid structures