31 #include <Utils/TriangleMesh.hh>
32 #include <Utils/ThreeDOut.hh>
33 #include <Base/Image/ImageIO.hh>
34 #include <Image/Camera.hh>
41 void usage(
char* name)
44 cout<<name<<
" <texture> <projection> [outputFile]\n";
47 int main(
int argc,
char* argv[])
55 if(ImageIO::Load(argv[1], texture)!=0) {
56 cout<<
"texture could not be loaded!\n";
64 }
else if(P.
Load(argv[2])!=0) {
65 cout<<
"Projection could not be loaded!\n";
70 cout<<
"meshing..."; cout.flush();
77 mesh.GenerateImagePlane(P, texture);
82 double downsamplingfactor = 8.0;
84 texture, 1.0, 1.0, downsamplingfactor);
92 vrmlOut.AddTriangleMesh(mesh,
"mesh_from_"+
string(argv[1]),
95 cout<<
"Writing VRML to ";
97 cout<<argv[3]<<
"... ";cout.flush();
98 vrmlOut.VRMLOut(argv[3]);
100 cout<<
"DenseTriangleMesh.wrl... ";cout.flush();
101 vrmlOut.VRMLOut(
"DenseTriangleMesh.wrl");
virtual int Load(const std::string &filename)
convenience wrapper which tries to read different formats
Unified output of 3D entities via OpenGL or VRML.
configuration struct for drawing styles of various 3d objects
double WCSAxesLength
<=0 means no visual coordinate axes
const ProjectionParametersBase * GetParameters(unsigned int cam=0) const
const parameter access function
This class hides the underlying projection model, like projection matrix, spherical camera...
Create and represent a 3D triangle mesh.
const BIAS::Projection & GetProj() const
int ParseMetaData(bool bUse2x64bitTS=true)
After ImageIO::Load() operated on AppData_, this method fills P_, Timestamp, DC_*, ...