Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::ThreeDOut Class Reference

Unified output of 3D entities via OpenGL or VRML. More...

#include <Utils/ThreeDOut.hh>

+ Inheritance diagram for BIAS::ThreeDOut:
+ Collaboration diagram for BIAS::ThreeDOut:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
void Dump ()
 list all internal 3d objects on cout More...
 
void GetBoundingBox (Vector3< double > &min, Vector3< double > &max)
 Get the min and max vector of the smallest bounding box, which is drawn around the added points. More...
 
Vector3< double > GetCenterOfPoints ()
 get center of gravity (mean of structure) More...
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
std::map< unsigned int,
PMatrix3DData > & 
GetMapPMatrices ()
 call by reference accessor for data member mapPMatrices_ JW More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void OpenGLOut (const BIAS::RGBAuc &Color)
 draw all entities (with the same color) using OpenGL Includes lines, points, pmatrices etc. More...
 
void OpenGLOut ()
 render all entities (with the same color) using OpenGL Includes lines, points, pmatrices etc. More...
 
void OpenGLOutEllipsoids (const BIAS::RGBAuc &Color)
 draw all ellipsoids with the same color: More...
 
void OpenGLOutEllipsoids ()
 draw all ellipsoids with their own color: More...
 
void OpenGLOutImages (const bool &disableBlending=true)
 draw all image patches using OpenGL More...
 
void OpenGLOutIndexedFaceSets ()
 draw mesh into opengl More...
 
void OpenGLOutLines (const BIAS::RGBAuc &Color)
 draw all lines with the same color: More...
 
void OpenGLOutLines ()
 draw all pmatrices with their own color More...
 
void OpenGLOutPMatrices (const BIAS::RGBAuc &Color)
 draw all pmatrices with the same color: More...
 
void OpenGLOutPMatrices ()
 draw all pmatrices with their own color: More...
 
void OpenGLOutPoints (const BIAS::RGBAuc &Color)
 draw all points with the same color: More...
 
void OpenGLOutPoints ()
 draw all points with their own color: More...
 
void OpenGLOutWCS ()
 display the world coordinate system origin and axes More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveAll ()
 removes all entites Essentially a clear on each entityt container. More...
 
void RemoveAllCamEllipsoids ()
 
void RemoveAllEllipsoids ()
 completely removes all ellipsoids from the internal structures, there is no way to get it back More...
 
void RemoveAllImages ()
 completely removes all images from the internal structures, there is no way to get it back More...
 
void RemoveAllIndexedFaceSets ()
 
void RemoveAllLines ()
 completely removes all lines from the internal structures JW More...
 
void RemoveAllPMatrices ()
 completely removes all images from the internal structures, there is no way to get it back More...
 
void RemoveAllPoints ()
 completely removes all points from the internal structures, there is no way to get them back More...
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void RemoveEllipsoid (const unsigned int &EIndex)
 completely removes the ellipsoid from the internal structures, there is no way to get it back More...
 
void RemoveImage (const unsigned int &EIndex)
 completely removes the image from the internal structures, there is no way to get it back More...
 
void RemoveLine (const unsigned int &LineIndex)
 completely removes the line from the internal structures, there is no way to get it back More...
 
void RemovePMatrix (int index)
 removes the P-matrix index, there is no way to get it back More...
 
void RemovePoint (const unsigned int &PointIndex)
 completely removes the point from the internal structures, there is no way to get it back More...
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void SetParams (const ThreeDOutParameters &params)
 
void SetParamsCameraScale (double cameraScale)
 
void SetParamsCameraStyle (CameraDrawingStyle cameraStyle)
 
void SetParamsDrawCameraEllipse (bool drawEllipse)
 
void SetParamsDrawEllipse (bool drawEllipse)
 
void SetParamsEllipsoidScale (double ellipsoidScale)
 
void SetParamsLineDrawingStyle (const LineDrawingStyle lineStyle)
 
void SetParamsLineWidth (const int lineWidth)
 
void SetParamsPointDrawingStyle (const PointDrawingStyle pointStyle)
 
void SetParamsPointSize (const double pointSize)
 
void SetParamsWCSAxesLength (double WCSAxesLength)
 
void SetWriteViewpoints (const bool &val)
 write VRML viewpoint nodes for some P matrices ? More...
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
 ThreeDOut (const BIAS::ThreeDOutParameters &params=BIAS::ThreeDOutParameters())
 Constructor for empty 3D scene with given parameters. More...
 
void Translation (const Vector3< double > &movement)
 transfers the whole scene by this offset More...
 
void UpdateEllipsoid (const unsigned int &EIndex, BIAS::CovMatrix3x3 &cov, BIAS::Vector3< double > &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE)
 
void UpdateEllipsoid (const unsigned int &EIndex, BIAS::CovMatrix3x3 &cov, BIAS::HomgPoint3D &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE)
 
void UpdateLine (const unsigned int &LineIndex, const BIAS::Vector3< double > &Start, const BIAS::Vector3< double > &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
void UpdateLine (const unsigned int &LineIndex, const BIAS::HomgPoint3D &Start, const BIAS::HomgPoint3D &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
void UpdatePMatrix (const unsigned int &PIndex, BIAS::PMatrix &P, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE)
 
void UpdatePMatrixColor (const unsigned int &PIndex, const BIAS::RGBAuc &Color)
 
void UpdatePoint (const unsigned int &PointIndex, const BIAS::Vector3< double > &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
void UpdatePoint (const unsigned int &PointIndex, const BIAS::HomgPoint3D &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
void UpdatePointColor (const unsigned int &PointIndex, const BIAS::RGBAuc &Color)
 
int VRMLOut (const std::string &sFilename)
 flush all 3d objects to a vrml file with name sFilename, this is the function most users would call More...
 
int VRMLOut (const std::string &sFilename, const BIAS::RGBAuc &Color)
 flush all 3d objects to a vrml file with name sFilename, use Color as the color for all elements More...
 
int VRMLOutEllipsoids (std::ostream &vrml, const BIAS::RGBAuc &Color)
 only write (previously stored) ellipsoids to an open vrml file, override their individual colors with Color More...
 
int VRMLOutEllipsoids (std::ostream &vrml)
 only write (previously stored) ellipsoids into an open vrml file More...
 
int VRMLOutImages (std::ostream &VRMLFile)
 only write (previously stored) images into an open vrml file More...
 
int VRMLOutIndexedFaceSets (std::ostream &VRMLFile)
 only write (previously stored) face sets into an open vrml file Will include texture into VRML as PixelTexture node. More...
 
int VRMLOutLines (std::ostream &vrml, const BIAS::RGBAuc &Color)
 only write (previously stored) lines into an open vrml file, override their individual colors with Color More...
 
int VRMLOutLines (std::ostream &vrml)
 only write (previously stored) points into an open vrml file More...
 
int VRMLOutPMatrices (std::ostream &vrml, const BIAS::RGBAuc &Color)
 only write (previously stored) cameras into an open vrml file, override their individual colors with Color More...
 
int VRMLOutPMatrices (std::ostream &vrml)
 only write (previously stored) cameras into an open vrml file More...
 
int VRMLOutPMatricesRoutine (std::ostream &VRMLFile, const PMatrix3DData *it, double r=255.0, double g=255.0, double b=255.0, double transparency=0.0, bool CenterAsSphere=false)
 only write camera into an open vrml file More...
 
int VRMLOutPoints (std::ostream &vrml, const BIAS::RGBAuc &Color)
 only write (previously stored) points into an open vrml file, override their individual colors with Color More...
 
int VRMLOutPoints (std::ostream &vrml)
 only write (previously stored) points into an open vrml file More...
 
int VRMLOutProjection (std::ostream &VRMLFile)
 only write previously stored projection objects into opened vrml file. More...
 
int VRMLOutProjectionView (std::ostream &VRMLFile)
 only write previously stored projectionview objects into opened vrml file. More...
 
void VRMLOutWCS (std::ostream &vrml)
 write world coordinate system origin and axes More...
 
int VRMLOutWriteHeader (std::ostream &vrml)
 write the VRML 2.0 header into an open file More...
 
void VRMLOutWriteNavigationInfo (std::ostream &vrml)
 write VRML 2.0 navigation info node More...
 
void VRMLOutWriteViewpoint (std::ostream &vrml)
 write VRMl 2.0 viewpoint that can selecetd in vrml viewer More...
 
virtual int WriteToFile (const std::string &filename)
 Generic write method (wrapper for VRMLOut). More...
 
virtual ~ThreeDOut ()
 Destructor releases all memory used. More...
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 
static double VRMLtransparency (const unsigned char alpha)
 get alpha opacity value as VRML transparency helper mapping, usually transparency = (1-alpha) More...
 
static double VRMLtransparency (const BIAS::Vector4< unsigned char > &vRgba)
 get alpha opacity component as VRML transparency g More...
 

Public Attributes

bool visualize_viewports
 

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
void CoordinateSystem (std::ostream &VRMLFile, double selectionRadius, double r, double g, double b, double axeslength, double scale=1.0, const std::string &name="")
 Write a projection of a camera in COORDINATE-style into VRML. More...
 
std::string CorrectDefString_ (const std::string &defstring)
 replace invalid characters in def string and return corrected More...
 
void DrawSphere_ (double radius, int lats, int longs)
 
void OpenGLOutPMatrices_ (const BIAS::RGBAuc &Color, bool UseOneColor)
 
void PaintCone (std::ostream &VRMLFile, double selectionRadius, double r, double g, double b, double transparency, double angle, double scale=1.0, const std::string &name="")
 Write a parameterized cone into VRMLFile. More...
 
void PaintPyramid (std::ostream &VRMLFile, double selectionRadius, double r, double g, double b, double transparency, double angle, double ratio=4.0/3.0, double scale=1.0, const std::string &name="", bool paint_lines=false)
 Write a parameterized pyramid into VRMLFile. More...
 
void VRMLOutEllipsoid_ (std::ostream &vrml, Ellipsoid3DData &E, const BIAS::RGBAuc &Color)
 
int VRMLOutPMatricesAsArrows_ (std::ostream &vrml, const BIAS::RGBAuc &Color)
 this is an optimized strategy to avoid hundred of shape nodes More...
 
int VRMLOutPMatricesAsMesh_ (std::ostream &vrml, const BIAS::RGBAuc &Color)
 
int VRMLOutPointsAsBoxes_ (std::ostream &VRMLFile)
 
int VRMLOutPointsAsPointSet_ (std::ostream &VRMLFile)
 
int VRMLOutPointsAsSpheres_ (std::ostream &VRMLFile)
 
void VRMLOutViewPortConical (std::ostream &VRMLFile, double selectionRadius, double r, double g, double b, double angle, double scale, const std::string &name, bool solid=false)
 Write a projection of a NON-PERSPECTIVE camera into VRML. More...
 
void VRMLOutViewPortPyramidal (std::ostream &VRMLFile, double selectionRadius, double r, double g, double b, double angle, double ratio, double scale, const std::string &name, bool solid=false)
 Write a projection of a PERSPECTIVE camera into VRML. More...
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
bool glewInitialized_
 
std::map< unsigned int,
Ellipsoid3DData
mapCamEllipsoids_
 map of all ellipsoid structures More...
 
std::map< unsigned int,
Ellipsoid3DData
mapEllipsoids_
 map of all ellipsoid structures More...
 
std::map< unsigned int,
Image3DData
mapImages_
 map of all image structures More...
 
std::map< unsigned int,
IndexedFaceSet
mapIndexedFaceSet_
 
std::map< unsigned int,
Line3DData
mapLines_
 map of all line structures More...
 
std::map< unsigned int,
PMatrix3DData
mapPMatrices_
 the cameras are saved in a vector for efficiency reasons More...
 
std::map< unsigned int,
Point3DData
mapPoints_
 map of all point structures More...
 
std::map< unsigned int,
Projection3DData
mapProjection3D_
 
std::map< unsigned int,
Text3DData
mapTexts_
 map of all point structures More...
 
std::vector< double > meanDraw
 
unsigned int NextCamEllipsoidIndex_
 counter for the next ellipsoid index, gaps are not reused by now More...
 
unsigned int NextEllipsoidIndex_
 counter for the next ellipsoid index, gaps are not reused by now More...
 
unsigned int NextImageIndex_
 counter for the next index, gaps (due to delete) are not reused by now More...
 
unsigned int NextIndexedFaceSetIndex_
 
unsigned int NextLineIndex_
 counter for the next line index, gaps (due to delete) arent reused More...
 
unsigned int NextPIndex_
 counter for the next index, gaps (due to delete) are not reused by now More...
 
unsigned int NextPointIndex_
 counter for the next index, gaps (due to delete) are not reused by now More...
 
unsigned int NextProjection3DIndex_
 
unsigned int NextTextIndex_
 counter for the next index, gaps (due to delete) are not reused by now More...
 
ThreeDOutParameters Params_
 holds the params set by constructor or SetParams More...
 
bool WriteViewpoints_
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Functions to add geometric objects for output

save the return value to update or delete the objects later

unsigned int AddPoint (const BIAS::Vector3< double > &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
unsigned int AddText (const std::string &thetext, const BIAS::Vector3< double > &position, const BIAS::Quaternion< double > &direction=BIAS::Quaternion< double >(0.0, 0.0, 0.0, 0.0), const double &thesize=-12.0, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
unsigned int AddPoint (const BIAS::HomgPoint3D &v, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
unsigned int AddLine (const BIAS::Vector3< double > &Start, const BIAS::Vector3< double > &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
unsigned int AddLine (const BIAS::HomgPoint3D &Start, const BIAS::HomgPoint3D &End, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE)
 
unsigned int AddEllipsoid (BIAS::CovMatrix3x3 &cov, const BIAS::Vector3< double > &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE, const bool cameraCov=false)
 
unsigned int AddEllipsoid (BIAS::CovMatrix3x3 &cov, const BIAS::HomgPoint3D &C, const BIAS::RGBAuc &Color=RGBAuc_WHITE_SEMI, const double &dConfidenceRegionScale=DEF_P_SCALE, const bool cameraCov=false)
 
void AddPlane (const HomgPlane3D &plane, const RGBAuc &colour=RGBAuc_WHITE_SEMI, const double size=1.0, const Vector3< double > &translation=Vector3< double >(0.0, 0.0, 0.0), const bool wireframe=true)
 Adds the given plane to the scene, visualising it with lines or with a colored quad. More...
 
unsigned int AddPMatrix (BIAS::PMatrix &P, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE, const std::string &name="")
 decompose P and add to internal data structures. More...
 
unsigned int AddPMatrix (BIAS::Matrix3x4< double > &M, const unsigned int &width, const unsigned int &height, const BIAS::RGBAuc &Color=RGBAuc_WHITE_OPAQUE, const double &dScale=DEF_P_SCALE, const std::string &name="")
 interface for the above More...
 
unsigned int AddImage (const Vector3< double > &UL, const Vector3< double > &UR, const Vector3< double > &LL, unsigned int Width, unsigned int Height, unsigned char *pData, unsigned int channels=1, const std::string &name="", bool billboard=false)
 add a small rectangular image patch spanned by three 3d points small means really small (only a few pixels), the patch is approximated in a very complicated way in vrml to allow for inline data More...
 
unsigned int AddImage (const Vector3< double > &UL, const Vector3< double > &UR, const Vector3< double > &LL, const Vector3< double > &LR, unsigned int Width, unsigned int Height, unsigned char *pData, unsigned int channels=1, const std::string &name="", bool billboard=false)
 add a small image patch spanned by four 3d points small means really small (only a few pixels), the patch is approximated in a very complicated way in vrml to allow for inline data More...
 
unsigned int AddTriangleMesh (const TriangleMesh &mesh, const std::string &name="", const std::string &textureOutputName="", bool writeOutTexture=true, bool calcNormals=false)
 Adds triangle mesh as IndexedFaceSet to ThreeDOut mem. More...
 
unsigned int AddProjection (const Projection &p, const RGBAuc &colorSelection=RGBAuc_WHITE_OPAQUE, const double radius=0.1, const double scale=1.0, const std::string &identifier="", const int camera_type=-1)
 Add a projection object to ThreeDOut mem. More...
 
unsigned int AddProjection (const Projection &p, const std::string &identifier)
 interface for above More...
 
unsigned int AddPose (const PoseParametrization &p, const RGBAuc &colorSelection=RGBAuc_WHITE_OPAQUE, const double radius=0.1, const double scale=1.0, const int camera_type=-1)
 
static void ComputePlaneCorners (const HomgPlane3D &plane, const double size, std::vector< Vector3< double > > &corners)
 Helper function computing the corners of a 3D plane. More...
 

Detailed Description

Unified output of 3D entities via OpenGL or VRML.

Alpha blending policy (like OpenGL defaults):

However, VRML has inverse interpretation (!), thus a conversion is required, see http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/nodesRef.html

Examples:
EvaluateAlignment.cpp, Example3DImagePlane.cpp, ExampleAutoCalib.cpp, ExampleCameraPath2Vrml.cpp, ExampleFMatrix.cpp, ExampleMeshFromImage.cpp, ExampleProjectionParametersPerspective2.cpp, ExampleRectification.cpp, ExampleShowFreeD.cpp, ExampleThreeDOutVRML.cpp, ExampleTriangleMesh.cpp, ExampleTriangleMeshQuad.cpp, ExampleVRMLOutProjection.cpp, and InvestigatePRelations.cpp.

Definition at line 349 of file ThreeDOut.hh.

Constructor & Destructor Documentation

ThreeDOut::~ThreeDOut ( )
virtual

Destructor releases all memory used.

Definition at line 206 of file ThreeDOut.cpp.

ThreeDOut::ThreeDOut ( const BIAS::ThreeDOutParameters params = BIAS::ThreeDOutParameters())

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

unsigned int ThreeDOut::AddEllipsoid ( BIAS::CovMatrix3x3 cov,
const BIAS::Vector3< double > &  C,
const BIAS::RGBAuc Color = RGBAuc_WHITE_SEMI,
const double &  dConfidenceRegionScale = DEF_P_SCALE,
const bool  cameraCov = false 
)
unsigned int ThreeDOut::AddEllipsoid ( BIAS::CovMatrix3x3 cov,
const BIAS::HomgPoint3D C,
const BIAS::RGBAuc Color = RGBAuc_WHITE_SEMI,
const double &  dConfidenceRegionScale = DEF_P_SCALE,
const bool  cameraCov = false 
)
Parameters
dConfidenceRegionScalesee Quadric3D.hh for the relationship between enlarging the standard confidence region and the probability that a measurement will be inside that region, 1.0 means sigma

Definition at line 823 of file ThreeDOut.cpp.

References AddEllipsoid(), and BIAS::HomgPoint3D::IsHomogenized().

unsigned int BIAS::ThreeDOut::AddImage ( const Vector3< double > &  UL,
const Vector3< double > &  UR,
const Vector3< double > &  LL,
unsigned int  Width,
unsigned int  Height,
unsigned char *  pData,
unsigned int  channels = 1,
const std::string &  name = "",
bool  billboard = false 
)
inline

add a small rectangular image patch spanned by three 3d points small means really small (only a few pixels), the patch is approximated in a very complicated way in vrml to allow for inline data

Parameters
channelsnumber of channels: 1=grey, 3=rgb
Author
koeser 09/2004
Examples:
ExampleThreeDOutVRML.cpp.

Definition at line 512 of file ThreeDOut.hh.

unsigned int ThreeDOut::AddImage ( const Vector3< double > &  UL,
const Vector3< double > &  UR,
const Vector3< double > &  LL,
const Vector3< double > &  LR,
unsigned int  Width,
unsigned int  Height,
unsigned char *  pData,
unsigned int  channels = 1,
const std::string &  name = "",
bool  billboard = false 
)

add a small image patch spanned by four 3d points small means really small (only a few pixels), the patch is approximated in a very complicated way in vrml to allow for inline data

Parameters
channelsnumber of channels: 1=grey, 3=rgb
Author
koeser 09/2005

Definition at line 963 of file ThreeDOut.cpp.

References BIAS::Image3DData::BillBoard, CorrectDefString_(), BIAS::Image< StorageType >::GetImageDataArray(), BIAS::Image3DData::ImageData, BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image3DData::LL, BIAS::Image3DData::LR, mapImages_, BIAS::Image3DData::name, NextImageIndex_, BIAS::Image< StorageType >::Release(), BIAS::ImageBase::SetROI(), BIAS::Image3DData::UL, and BIAS::Image3DData::UR.

unsigned int ThreeDOut::AddLine ( const BIAS::Vector3< double > &  Start,
const BIAS::Vector3< double > &  End,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
Returns
index value to change the line later
Parameters
StartStart point of line
EndEnd point of line
Examples:
ExampleAutoCalib.cpp, ExampleFMatrix.cpp, ExampleProjectionParametersPerspective2.cpp, ExampleRectification.cpp, and InvestigatePRelations.cpp.

Definition at line 756 of file ThreeDOut.cpp.

References BIAS::Line3DData::Color, BIAS::Line3DData::End, mapLines_, NextLineIndex_, and BIAS::Line3DData::Start.

Referenced by AddLine(), AddPlane(), and AddProjection().

unsigned int ThreeDOut::AddLine ( const BIAS::HomgPoint3D Start,
const BIAS::HomgPoint3D End,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
Returns
index value to change the line later
Parameters
StartStart point of line
EndEnd point of line

Definition at line 769 of file ThreeDOut.cpp.

References AddLine(), and BIAS::HomgPoint3D::IsHomogenized().

void ThreeDOut::AddPlane ( const HomgPlane3D plane,
const RGBAuc colour = RGBAuc_WHITE_SEMI,
const double  size = 1.0,
const Vector3< double > &  translation = Vector3<double>(0.0, 0.0, 0.0),
const bool  wireframe = true 
)

Adds the given plane to the scene, visualising it with lines or with a colored quad.

Note
The translation vector may render the plane's distance to the center of origin inconsistent. You must compute a proper translation vector that is located on the plane by yourself, e.g. by using HomgPlane3D::ProjectPoint().
Parameters
planethe plane to add
colourthe colour used for drawing
sizeedge length of the plane
translationthe lines are moved by this vector
wireframespecifies if plane should be displayed with lines or solid
Author
rwulff
Date
09/2011

Definition at line 837 of file ThreeDOut.cpp.

References AddLine(), AddTriangleMesh(), ComputePlaneCorners(), BIAS::HomgPlane3D::GetNormalVector(), and BIAS::TriangleMesh::SetMesh().

unsigned int ThreeDOut::AddPMatrix ( BIAS::PMatrix P,
const unsigned int &  width,
const unsigned int &  height,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE,
const double &  dScale = DEF_P_SCALE,
const std::string &  name = "" 
)
unsigned int ThreeDOut::AddPMatrix ( BIAS::Matrix3x4< double > &  M,
const unsigned int &  width,
const unsigned int &  height,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE,
const double &  dScale = DEF_P_SCALE,
const std::string &  name = "" 
)

interface for the above

Author
Jan Woetzel

Definition at line 1012 of file ThreeDOut.cpp.

References AddPMatrix().

unsigned int ThreeDOut::AddPoint ( const BIAS::Vector3< double > &  v,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
Returns
index value to change the point later
Parameters
vpoint coordinates
Examples:
EvaluateAlignment.cpp, ExampleAutoCalib.cpp, ExampleFMatrix.cpp, ExampleProjectionParametersPerspective2.cpp, and ExampleRectification.cpp.

Definition at line 719 of file ThreeDOut.cpp.

References BIAS::Point3DData::Color, mapPoints_, NextPointIndex_, and BIAS::Point3DData::Point.

Referenced by AddPoint(), and BIAS::GenSynthMatches::CreateVRML_().

unsigned int ThreeDOut::AddPoint ( const BIAS::HomgPoint3D v,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
Returns
index value to change the point later
Parameters
vpoint coordinates

Definition at line 729 of file ThreeDOut.cpp.

References AddPoint(), and BIAS::HomgPoint3D::IsHomogenized().

unsigned int ThreeDOut::AddPose ( const PoseParametrization p,
const RGBAuc colorSelection = RGBAuc_WHITE_OPAQUE,
const double  radius = 0.1,
const double  scale = 1.0,
const int  camera_type = -1 
)
unsigned int ThreeDOut::AddProjection ( const Projection p,
const RGBAuc colorSelection = RGBAuc_WHITE_OPAQUE,
const double  radius = 0.1,
const double  scale = 1.0,
const std::string &  identifier = "",
const int  camera_type = -1 
)

Add a projection object to ThreeDOut mem.

Parameters
colorSelectioncolor of the small sphere around the center Draws the four cam coordinate axes (A in red, H in Green, V in blue) and a small sphere around the center which is usefull for selection.
    VIEWPORT PART, DUE TO BE IMPLEMENTED

unsigned int wid = 0;
unsigned int hei = 0;

calculate the angle if(camera_type != -1){ calculate the size of an image p.GetParameters()->GetImageSize(wid, hei); HomgPoint2D p1_2D, p2_2D;

cout << "wid: " << wid << ", hei: " << hei << endl;

if(hei==0 && wid==0){ cout << "Unable to calculate size of an img from projection..." << endl; } else{ if(camera_type == 0){ p1_2D[0] = 0; p1_2D[1] = rint(hei/2); p2_2D[0] = rint(wid/2); p2_2D[1] = rint(hei/2); } if(camera_type == 1){ we take a point (wid/4, hei/2) and (wid/2, hei/2), 'cause the angle could be more than 180 degrees p1_2D[0] = rint(wid/4); p1_2D[1] = rint(hei/2); p2_2D[0] = rint(wid/2); p2_2D[1] = rint(hei/2); } HomgPoint3D p1_3D = p.GetParameters()->UnProjectToPoint(p1_2D, 1.0); HomgPoint3D p2_3D = p.GetParameters()->UnProjectToPoint(p2_2D, 1.0);

double dx = p1_3D[0]-p2_3D[0]; double dy = p1_3D[1]-p2_3D[1]; double dz = p1_3D[2]-p2_3D[2];

half of the distance between two 1.0-lentgh-rays from the principal point it's equal to a sin of an alpha/2 for perspective and aplpha/4 for non-perspective cameras, whereas alpha is an cutoffangle of the camera. double dist_div_2 = sqrt(dx*dx+dy*dy+dz*dz)/2;

if(camera_type == 0) data.angle = 2*asin(dist_div_2); if(camera_type == 1) data.angle = 4*asin(dist_div_2); } }

Examples:
ExampleCameraPath2Vrml.cpp, ExampleRectification.cpp, and ExampleVRMLOutProjection.cpp.

Definition at line 1308 of file ThreeDOut.cpp.

References AddLine(), BIAS::Projection3DData::C, BIAS::Projection3DData::ColorOfSelection, BIAS::CoordinateTransform3D::ConcatenateLocalTransform(), BIAS::CoordinateTransform3D::GetC(), BIAS::Projection::GetC(), BIAS::Projection::GetParameters(), BIAS::ProjectionParametersBase::GetPose(), BIAS::CoordinateTransform3D::GetQ(), BIAS::Projection::GetQ(), BIAS::Projection3DData::identifier, mapProjection3D_, NextProjection3DIndex_, BIAS::Projection3DData::radiusSelection, BIAS::Projection3DData::scale, BIAS::Projection3DData::Set(), BIAS::RMatrixBase::SetFromQuaternion(), BIAS::Projection::Size(), and BIAS::Projection3DData::type.

unsigned int BIAS::ThreeDOut::AddProjection ( const Projection p,
const std::string &  identifier 
)
inline

interface for above

Definition at line 573 of file ThreeDOut.hh.

unsigned int ThreeDOut::AddText ( const std::string &  thetext,
const BIAS::Vector3< double > &  position,
const BIAS::Quaternion< double > &  direction = BIAS::Quaternion<double>(0.0,0.0,0.0,0.0),
const double &  thesize = -12.0,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
Returns
index value to change the text later
Parameters
positiontext coordinates
orientation3d orientation (screen-aligned if zero)
thetextstring to be visualized in 3d
thesize,:if>0: 3d height of text if<0: 2d height (in pixels) of text

Definition at line 739 of file ThreeDOut.cpp.

References BIAS::Text3DData::Color, BIAS::Text3DData::Direction, mapTexts_, NextTextIndex_, BIAS::Text3DData::Position, BIAS::Text3DData::Size, and BIAS::Text3DData::Text.

unsigned int ThreeDOut::AddTriangleMesh ( const TriangleMesh mesh,
const std::string &  name = "",
const std::string &  textureOutputName = "",
bool  writeOutTexture = true,
bool  calcNormals = false 
)

Adds triangle mesh as IndexedFaceSet to ThreeDOut mem.

Parameters
namedefines node name in vrml - must not contain dots ('.')!
textureOutputNameis telling which name the texture shall have when writing the vrml. If this param is empty (default), the texture is integrated into the vrml as PixelMap.
writeOutTextureif true and the textureOutputName is not "" then the texture is written into textureOutputName, otherwise only the texture name or a PixelMap is integrated into vrml. (default = true)
calcNormals[in],:set whether to calculate normals (e.g. for lighting) or not. Normally normals are only calculated if no texture is present in mesh (default behaviour)
Examples:
ExampleMeshFromImage.cpp, ExampleRectification.cpp, ExampleTriangleMesh.cpp, and ExampleTriangleMeshQuad.cpp.

Definition at line 1104 of file ThreeDOut.cpp.

References BIAS::IndexedFaceSet::bbmax, BIAS::IndexedFaceSet::bbmin, BIAS::IndexedFaceSet::CASize, BIAS::IndexedFaceSet::ColorArray, CorrectDefString_(), BIAS::Vector3< T >::CrossProduct(), BIAS::Equal(), BIAS::IndexedFaceSet::faceIndices, BIAS::IndexedFaceSet::facetArray, BIAS::IndexedFaceSet::facetIndicesCountArray, BIAS::ImageBase::GetHeight(), BIAS::TriangleMesh::GetNormals(), BIAS::TriangleMesh::GetTexCoords(), BIAS::TriangleMesh::GetTexture(), BIAS::TriangleMesh::GetTriangleIndices(), BIAS::TriangleMesh::GetVertexColors(), BIAS::TriangleMesh::GetVertices(), BIAS::ImageBase::GetWidth(), mapIndexedFaceSet_, BIAS::IndexedFaceSet::name, NextIndexedFaceSetIndex_, BIAS::IndexedFaceSet::NormalArray, BIAS::Vector3< T >::NormL2(), BIAS::IndexedFaceSet::NumFacets, BIAS::ImageBase::PowerOfTwoSize(), BIAS::IndexedFaceSet::TASize, BIAS::IndexedFaceSet::texCoordSet, BIAS::IndexedFaceSet::texture, BIAS::IndexedFaceSet::TextureCoordArray, BIAS::IndexedFaceSet::textureName, BIAS::IndexedFaceSet::useColoredVertices, BIAS::IndexedFaceSet::useNormals, BIAS::IndexedFaceSet::useTexture, BIAS::IndexedFaceSet::VASize, BIAS::IndexedFaceSet::VertArray, BIAS::IndexedFaceSet::vertexColorSet, BIAS::IndexedFaceSet::vertexSet, and BIAS::IndexedFaceSet::writeOutTexture.

Referenced by AddPlane(), BIAS::ImageBlender::BlendImages(), and BIAS::ImageBlenderIncremental::BlendImages().

void ThreeDOut::ComputePlaneCorners ( const HomgPlane3D plane,
const double  size,
std::vector< Vector3< double > > &  corners 
)
static

Helper function computing the corners of a 3D plane.

Parameters
planethe plane to compute corners for
sizeedge length of the plane
cornersreturns 3D coordinates of plane corners
Author
esquivel
Date
06/2012

Definition at line 877 of file ThreeDOut.cpp.

References BIAS::Vector3< T >::CrossProduct(), BIAS::Matrix3x3< T >::GetInverse(), BIAS::HomgPlane3D::GetNormalVector(), and BIAS::Vector3< T >::ScalarProduct().

Referenced by AddPlane().

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

void ThreeDOut::CoordinateSystem ( std::ostream &  VRMLFile,
double  selectionRadius,
double  r,
double  g,
double  b,
double  axeslength,
double  scale = 1.0,
const std::string &  name = "" 
)
protected

Write a projection of a camera in COORDINATE-style into VRML.

Parameters
VRMLFiledestination, writes to an end of the file
scalescale of the projection

VRMLFile<<" geometry Box{ size "<<selectionRadius<<" " <<selectionRadius<<" "<<selectionRadius<<" } "<<std::endl;

Definition at line 599 of file ThreeDOut.cpp.

References CorrectDefString_().

Referenced by VRMLOutProjection(), and VRMLOutWCS().

string ThreeDOut::CorrectDefString_ ( const std::string &  defstring)
protected

replace invalid characters in def string and return corrected

Author
koeser

Definition at line 273 of file ThreeDOut.cpp.

Referenced by AddImage(), AddPMatrix(), AddTriangleMesh(), CoordinateSystem(), PaintCone(), PaintPyramid(), VRMLOutImages(), VRMLOutIndexedFaceSets(), and VRMLOutPMatricesRoutine().

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

void ThreeDOut::DrawSphere_ ( double  radius,
int  lats,
int  longs 
)
protected

Definition at line 2502 of file ThreeDOut.cpp.

Referenced by OpenGLOutPoints().

void ThreeDOut::Dump ( )
void ThreeDOut::GetBoundingBox ( Vector3< double > &  min,
Vector3< double > &  max 
)

Get the min and max vector of the smallest bounding box, which is drawn around the added points.

uncompleted, doesn't deliver correct results (mostly 0) alpha

Definition at line 3756 of file ThreeDOut.cpp.

References mapCamEllipsoids_, mapEllipsoids_, mapImages_, mapIndexedFaceSet_, mapLines_, mapPMatrices_, and mapPoints_.

Vector3< double > ThreeDOut::GetCenterOfPoints ( )

get center of gravity (mean of structure)

Definition at line 3740 of file ThreeDOut.cpp.

References mapPoints_.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

std::map< unsigned int, PMatrix3DData >& BIAS::ThreeDOut::GetMapPMatrices ( )
inline

call by reference accessor for data member mapPMatrices_ JW

Definition at line 853 of file ThreeDOut.hh.

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
void ThreeDOut::OpenGLOut ( const BIAS::RGBAuc Color)

draw all entities (with the same color) using OpenGL Includes lines, points, pmatrices etc.

(everything)

Definition at line 2470 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::DrawUncertaintyEllipsoids, OpenGLOutEllipsoids(), OpenGLOutImages(), OpenGLOutIndexedFaceSets(), OpenGLOutLines(), OpenGLOutPMatrices(), OpenGLOutPoints(), OpenGLOutWCS(), Params_, and BIAS::ThreeDOutParameters::WCSAxesLength.

void ThreeDOut::OpenGLOut ( )

render all entities (with the same color) using OpenGL Includes lines, points, pmatrices etc.

(everything)

Definition at line 2485 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::DrawUncertaintyEllipsoids, OpenGLOutEllipsoids(), OpenGLOutImages(), OpenGLOutIndexedFaceSets(), OpenGLOutLines(), OpenGLOutPMatrices(), OpenGLOutPoints(), OpenGLOutWCS(), Params_, and BIAS::ThreeDOutParameters::WCSAxesLength.

void ThreeDOut::OpenGLOutEllipsoids ( const BIAS::RGBAuc Color)

draw all ellipsoids with the same color:

Definition at line 2330 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::EllipsoidScale, BIAS::Vector4< T >::GetData(), mapEllipsoids_, and Params_.

void ThreeDOut::OpenGLOutEllipsoids ( )

draw all ellipsoids with their own color:

Definition at line 2361 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::EllipsoidScale, mapEllipsoids_, and Params_.

Referenced by OpenGLOut().

void ThreeDOut::OpenGLOutImages ( const bool &  disableBlending = true)

draw all image patches using OpenGL

Parameters
disableBlendingtrue to glDisbale(GL_BLEND) temporarily
Todo:
: This implementation is very inefficient because it recreates the textures for each rendering pass! JW
Todo:
image interface (rgb<=>grey)

Definition at line 2038 of file ThreeDOut.cpp.

References mapImages_.

Referenced by OpenGLOut().

void ThreeDOut::OpenGLOutIndexedFaceSets ( )
void ThreeDOut::OpenGLOutLines ( const BIAS::RGBAuc Color)

draw all lines with the same color:

Definition at line 2292 of file ThreeDOut.cpp.

References BIAS::Vector4< T >::GetData(), BIAS::ThreeDOutParameters::LineWidth, mapLines_, and Params_.

void ThreeDOut::OpenGLOutLines ( )

draw all pmatrices with their own color

Todo:
linedrawingstyle=dashed not implmented

Definition at line 2310 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::LineWidth, mapLines_, and Params_.

Referenced by OpenGLOut().

void ThreeDOut::OpenGLOutPMatrices ( const BIAS::RGBAuc Color)

draw all pmatrices with the same color:

Definition at line 2028 of file ThreeDOut.cpp.

References OpenGLOutPMatrices_().

void ThreeDOut::OpenGLOutPMatrices ( )

draw all pmatrices with their own color:

Definition at line 2032 of file ThreeDOut.cpp.

References OpenGLOutPMatrices_().

Referenced by OpenGLOut().

void ThreeDOut::OpenGLOutPMatrices_ ( const BIAS::RGBAuc Color,
bool  UseOneColor 
)
protected
void ThreeDOut::OpenGLOutPoints ( const BIAS::RGBAuc Color)
void ThreeDOut::OpenGLOutPoints ( )
void ThreeDOut::OpenGLOutWCS ( )

display the world coordinate system origin and axes

Definition at line 1631 of file ThreeDOut.cpp.

References BIAS::DrawTextGL::InitFont(), Params_, BIAS::DrawTextGL::Print3D(), and BIAS::ThreeDOutParameters::WCSAxesLength.

Referenced by OpenGLOut().

void ThreeDOut::PaintCone ( std::ostream &  VRMLFile,
double  selectionRadius,
double  r,
double  g,
double  b,
double  transparency,
double  angle,
double  scale = 1.0,
const std::string &  name = "" 
)
protected

Write a parameterized cone into VRMLFile.

Parameters
VRMLFiledestination, writes to an end of the file
selectionRadiuslength of the side of the cone
transparencytransparency of given (r,g,b)-color
angleangle of the cone
Author
amattal

Definition at line 461 of file ThreeDOut.cpp.

References CorrectDefString_().

Referenced by VRMLOutViewPortConical().

void ThreeDOut::PaintPyramid ( std::ostream &  VRMLFile,
double  selectionRadius,
double  r,
double  g,
double  b,
double  transparency,
double  angle,
double  ratio = 4.0/3.0,
double  scale = 1.0,
const std::string &  name = "",
bool  paint_lines = false 
)
protected

Write a parameterized pyramid into VRMLFile.

Parameters
VRMLFiledestination, writes to an end of the file
selectionRadiuslength of an edge of the pyramid
transparencytransparency of given (r,g,b)-color
angleangle between two opposite faces of pyramid which 3rd edges are width-of-the-projection far from eachother
ratiowidth-of-the-projection/height-of-the-projection
paint_linesredraw 4 edges of the pyramid (looks better)
Author
amattal

Definition at line 306 of file ThreeDOut.cpp.

References CorrectDefString_().

Referenced by VRMLOutViewPortPyramidal().

void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void ThreeDOut::RemoveAll ( )

removes all entites Essentially a clear on each entityt container.

Author
Jan Woetzel
Examples:
ExampleTriangleMesh.cpp.

Definition at line 3855 of file ThreeDOut.cpp.

References RemoveAllCamEllipsoids(), RemoveAllEllipsoids(), RemoveAllImages(), RemoveAllIndexedFaceSets(), RemoveAllLines(), RemoveAllPMatrices(), and RemoveAllPoints().

void ThreeDOut::RemoveAllCamEllipsoids ( )

Definition at line 1585 of file ThreeDOut.cpp.

References mapCamEllipsoids_.

Referenced by RemoveAll().

void ThreeDOut::RemoveAllEllipsoids ( )

completely removes all ellipsoids from the internal structures, there is no way to get it back

Definition at line 1581 of file ThreeDOut.cpp.

References mapEllipsoids_.

Referenced by RemoveAll().

void ThreeDOut::RemoveAllImages ( )

completely removes all images from the internal structures, there is no way to get it back

Definition at line 1602 of file ThreeDOut.cpp.

References mapImages_.

Referenced by RemoveAll().

void ThreeDOut::RemoveAllIndexedFaceSets ( )

Definition at line 1596 of file ThreeDOut.cpp.

References mapIndexedFaceSet_, and NextIndexedFaceSetIndex_.

Referenced by RemoveAll().

void ThreeDOut::RemoveAllLines ( )

completely removes all lines from the internal structures JW

Definition at line 1569 of file ThreeDOut.cpp.

References mapLines_.

Referenced by RemoveAll().

void ThreeDOut::RemoveAllPMatrices ( )

completely removes all images from the internal structures, there is no way to get it back

Definition at line 1607 of file ThreeDOut.cpp.

References mapPMatrices_.

Referenced by RemoveAll().

void ThreeDOut::RemoveAllPoints ( )

completely removes all points from the internal structures, there is no way to get them back

Definition at line 1557 of file ThreeDOut.cpp.

References mapPoints_.

Referenced by RemoveAll().

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void ThreeDOut::RemoveEllipsoid ( const unsigned int &  EIndex)

completely removes the ellipsoid from the internal structures, there is no way to get it back

Definition at line 1574 of file ThreeDOut.cpp.

References mapEllipsoids_.

void ThreeDOut::RemoveImage ( const unsigned int &  EIndex)

completely removes the image from the internal structures, there is no way to get it back

Definition at line 1589 of file ThreeDOut.cpp.

References mapImages_.

void ThreeDOut::RemoveLine ( const unsigned int &  LineIndex)

completely removes the line from the internal structures, there is no way to get it back

Definition at line 1562 of file ThreeDOut.cpp.

References mapLines_.

void ThreeDOut::RemovePMatrix ( int  index)

removes the P-matrix index, there is no way to get it back

Definition at line 1612 of file ThreeDOut.cpp.

References mapPMatrices_.

void ThreeDOut::RemovePoint ( const unsigned int &  PointIndex)

completely removes the point from the internal structures, there is no way to get it back

Definition at line 1550 of file ThreeDOut.cpp.

References mapPoints_.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void ThreeDOut::SetParams ( const ThreeDOutParameters params)
Examples:
ExampleCameraPath2Vrml.cpp.

Definition at line 209 of file ThreeDOut.cpp.

References Params_.

Referenced by ThreeDOut().

void ThreeDOut::SetParamsCameraScale ( double  cameraScale)

Definition at line 225 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::CameraScale, and Params_.

void ThreeDOut::SetParamsCameraStyle ( CameraDrawingStyle  cameraStyle)

Definition at line 231 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::CameraStyle, and Params_.

Referenced by BIAS::GenSynthMatches::CreateVRML_().

void ThreeDOut::SetParamsDrawCameraEllipse ( bool  drawEllipse)
void ThreeDOut::SetParamsDrawEllipse ( bool  drawEllipse)

Definition at line 237 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::DrawUncertaintyEllipsoids, and Params_.

void ThreeDOut::SetParamsEllipsoidScale ( double  ellipsoidScale)

Definition at line 249 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::EllipsoidScale, and Params_.

void ThreeDOut::SetParamsLineDrawingStyle ( const LineDrawingStyle  lineStyle)

Definition at line 267 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::LineStyle, and Params_.

void ThreeDOut::SetParamsLineWidth ( const int  lineWidth)

Definition at line 219 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::LineWidth, and Params_.

void ThreeDOut::SetParamsPointDrawingStyle ( const PointDrawingStyle  pointStyle)

Definition at line 261 of file ThreeDOut.cpp.

References Params_, and BIAS::ThreeDOutParameters::PointStyle.

Referenced by BIAS::GenSynthMatches::CreateVRML_().

void ThreeDOut::SetParamsPointSize ( const double  pointSize)

Definition at line 214 of file ThreeDOut.cpp.

References Params_, and BIAS::ThreeDOutParameters::PointSize.

Referenced by BIAS::GenSynthMatches::CreateVRML_().

void ThreeDOut::SetParamsWCSAxesLength ( double  WCSAxesLength)

Definition at line 255 of file ThreeDOut.cpp.

References Params_, and BIAS::ThreeDOutParameters::WCSAxesLength.

void ThreeDOut::SetWriteViewpoints ( const bool &  val)

write VRML viewpoint nodes for some P matrices ?

Author
Jan Woetzel

Definition at line 3878 of file ThreeDOut.cpp.

References WriteViewpoints_.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

void ThreeDOut::Translation ( const Vector3< double > &  movement)

transfers the whole scene by this offset

Definition at line 3934 of file ThreeDOut.cpp.

References mapCamEllipsoids_, mapEllipsoids_, mapImages_, mapIndexedFaceSet_, mapLines_, mapPMatrices_, mapPoints_, and mapProjection3D_.

void ThreeDOut::UpdateEllipsoid ( const unsigned int &  EIndex,
BIAS::CovMatrix3x3 cov,
BIAS::Vector3< double > &  C,
const BIAS::RGBAuc Color = RGBAuc_WHITE_SEMI,
const double &  dConfidenceRegionScale = DEF_P_SCALE 
)
void ThreeDOut::UpdateEllipsoid ( const unsigned int &  EIndex,
BIAS::CovMatrix3x3 cov,
BIAS::HomgPoint3D C,
const BIAS::RGBAuc Color = RGBAuc_WHITE_SEMI,
const double &  dConfidenceRegionScale = DEF_P_SCALE 
)
Parameters
dConfidenceRegionScalesee Quadric3D.hh for the relationship between enlarging the standard confidence region and the probability that a measurement will be inside that region, 1.0 means sigma

Definition at line 1537 of file ThreeDOut.cpp.

References BIAS::HomgPoint3D::IsHomogenized(), and UpdateEllipsoid().

void ThreeDOut::UpdateLine ( const unsigned int &  LineIndex,
const BIAS::Vector3< double > &  Start,
const BIAS::Vector3< double > &  End,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
Parameters
LineIndexvalue previously returned by AddLine
StartStart point of line
EndEnd point of line

Definition at line 1475 of file ThreeDOut.cpp.

References BIAS::Line3DData::Color, BIAS::Line3DData::End, mapLines_, and BIAS::Line3DData::Start.

Referenced by UpdateLine().

void ThreeDOut::UpdateLine ( const unsigned int &  LineIndex,
const BIAS::HomgPoint3D Start,
const BIAS::HomgPoint3D End,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
Parameters
LineIndexvalue previously returned by AddLine
StartStart point of line
EndEnd point of line

Definition at line 1489 of file ThreeDOut.cpp.

References BIAS::HomgPoint3D::IsHomogenized(), and UpdateLine().

void ThreeDOut::UpdatePMatrix ( const unsigned int &  PIndex,
BIAS::PMatrix P,
const unsigned int &  width,
const unsigned int &  height,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE,
const double &  dScale = DEF_P_SCALE 
)
Parameters
PIndexvalue previously returned by AddPMatrix

Definition at line 1456 of file ThreeDOut.cpp.

References AddPMatrix(), and NextPIndex_.

void ThreeDOut::UpdatePMatrixColor ( const unsigned int &  PIndex,
const BIAS::RGBAuc Color 
)
Parameters
PIndexvalue previously returned by AddPMatrix

Definition at line 1469 of file ThreeDOut.cpp.

References mapPMatrices_.

void ThreeDOut::UpdatePoint ( const unsigned int &  PointIndex,
const BIAS::Vector3< double > &  v,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
Parameters
PointIndexvalue previously returned by AddPoint

Definition at line 1427 of file ThreeDOut.cpp.

References BIAS::Point3DData::Color, mapPoints_, and BIAS::Point3DData::Point.

Referenced by UpdatePoint().

void ThreeDOut::UpdatePoint ( const unsigned int &  PointIndex,
const BIAS::HomgPoint3D v,
const BIAS::RGBAuc Color = RGBAuc_WHITE_OPAQUE 
)
Parameters
PointIndexvalue previously returned by AddPoint

Definition at line 1445 of file ThreeDOut.cpp.

References BIAS::HomgPoint3D::IsHomogenized(), and UpdatePoint().

void ThreeDOut::UpdatePointColor ( const unsigned int &  PointIndex,
const BIAS::RGBAuc Color 
)
Parameters
PointIndexvalue previously returned by AddPoint

Definition at line 1439 of file ThreeDOut.cpp.

References mapPoints_.

int ThreeDOut::VRMLOut ( const std::string &  sFilename)
int ThreeDOut::VRMLOut ( const std::string &  sFilename,
const BIAS::RGBAuc Color 
)

flush all 3d objects to a vrml file with name sFilename, use Color as the color for all elements

Definition at line 3650 of file ThreeDOut.cpp.

References Params_, VRMLOutEllipsoids(), VRMLOutImages(), VRMLOutIndexedFaceSets(), VRMLOutLines(), VRMLOutPMatrices(), VRMLOutPoints(), VRMLOutWCS(), VRMLOutWriteHeader(), and BIAS::ThreeDOutParameters::WCSAxesLength.

void ThreeDOut::VRMLOutEllipsoid_ ( std::ostream &  vrml,
Ellipsoid3DData E,
const BIAS::RGBAuc Color 
)
protected
int ThreeDOut::VRMLOutEllipsoids ( std::ostream &  vrml,
const BIAS::RGBAuc Color 
)

only write (previously stored) ellipsoids to an open vrml file, override their individual colors with Color

Definition at line 3575 of file ThreeDOut.cpp.

References mapEllipsoids_, and VRMLOutEllipsoid_().

Referenced by VRMLOut().

int ThreeDOut::VRMLOutEllipsoids ( std::ostream &  vrml)
int ThreeDOut::VRMLOutImages ( std::ostream &  VRMLFile)

only write (previously stored) images into an open vrml file

Definition at line 3335 of file ThreeDOut.cpp.

References CorrectDefString_(), mapImages_, BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::NormL2().

Referenced by VRMLOut().

int ThreeDOut::VRMLOutIndexedFaceSets ( std::ostream &  VRMLFile)

only write (previously stored) face sets into an open vrml file Will include texture into VRML as PixelTexture node.

Examples:
ExampleTriangleMesh.cpp.

Definition at line 3203 of file ThreeDOut.cpp.

References CorrectDefString_(), mapIndexedFaceSet_, and BIAS::ImageIO::Save().

Referenced by VRMLOut().

int ThreeDOut::VRMLOutLines ( std::ostream &  vrml,
const BIAS::RGBAuc Color 
)

only write (previously stored) lines into an open vrml file, override their individual colors with Color

Definition at line 3072 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::LineStyle, BIAS::ThreeDOutParameters::LineWidth, mapLines_, Params_, and BIAS::Solid.

Referenced by VRMLOut().

int ThreeDOut::VRMLOutLines ( std::ostream &  vrml)

only write (previously stored) points into an open vrml file

Definition at line 3502 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::LineStyle, BIAS::ThreeDOutParameters::LineWidth, mapLines_, Params_, BIAS::Solid, and VRMLtransparency().

int ThreeDOut::VRMLOutPMatrices ( std::ostream &  vrml,
const BIAS::RGBAuc Color 
)

only write (previously stored) cameras into an open vrml file, override their individual colors with Color

Definition at line 2751 of file ThreeDOut.cpp.

References BIAS::Arrow, BIAS::ThreeDOutParameters::CameraStyle, BIAS::ThreeDOutParameters::DrawCameraUncertaintyEllipsoids, mapCamEllipsoids_, Params_, BIAS::PyramidMesh, VRMLOutEllipsoid_(), VRMLOutPMatricesAsArrows_(), and VRMLOutPMatricesAsMesh_().

Referenced by VRMLOut().

int ThreeDOut::VRMLOutPMatrices ( std::ostream &  vrml)

only write (previously stored) cameras into an open vrml file

Definition at line 3044 of file ThreeDOut.cpp.

References BIAS::PMatrix3DData::Color, BIAS::ThreeDOutParameters::DrawCameraUncertaintyEllipsoids, mapCamEllipsoids_, mapPMatrices_, Params_, VRMLOutEllipsoid_(), and VRMLOutPMatricesRoutine().

int ThreeDOut::VRMLOutPMatricesAsArrows_ ( std::ostream &  vrml,
const BIAS::RGBAuc Color 
)
protected

this is an optimized strategy to avoid hundred of shape nodes

Definition at line 2825 of file ThreeDOut.cpp.

References BIAS::PMatrix3DData::C, BIAS::ThreeDOutParameters::LineWidth, mapPMatrices_, Params_, BIAS::PMatrix3DData::PP, and BIAS::PMatrix3DData::Up.

Referenced by VRMLOutPMatrices().

int ThreeDOut::VRMLOutPMatricesAsMesh_ ( std::ostream &  vrml,
const BIAS::RGBAuc Color 
)
protected
int ThreeDOut::VRMLOutPMatricesRoutine ( std::ostream &  VRMLFile,
const PMatrix3DData it,
double  r = 255.0,
double  g = 255.0,
double  b = 255.0,
double  transparency = 0.0,
bool  CenterAsSphere = false 
)
int ThreeDOut::VRMLOutPoints ( std::ostream &  vrml,
const BIAS::RGBAuc Color 
)

only write (previously stored) points into an open vrml file, override their individual colors with Color

Definition at line 2533 of file ThreeDOut.cpp.

References mapPoints_.

Referenced by VRMLOut().

int ThreeDOut::VRMLOutPoints ( std::ostream &  vrml)
int ThreeDOut::VRMLOutPointsAsBoxes_ ( std::ostream &  VRMLFile)
protected
int ThreeDOut::VRMLOutPointsAsPointSet_ ( std::ostream &  VRMLFile)
protected

Definition at line 2545 of file ThreeDOut.cpp.

References BIAS::Point3DData::Color, mapPoints_, and BIAS::Point3DData::Point.

Referenced by VRMLOutPoints().

int ThreeDOut::VRMLOutPointsAsSpheres_ ( std::ostream &  VRMLFile)
protected
int ThreeDOut::VRMLOutProjection ( std::ostream &  VRMLFile)

only write previously stored projection objects into opened vrml file.

VIEWPORT PART, DUE TO BE IMPLEMENTED

VIEWPORT PART, DUE TO BE IMPLEMENTED

Definition at line 3108 of file ThreeDOut.cpp.

References BIAS::ThreeDOutParameters::CameraStyle, CoordinateSystem(), mapProjection3D_, Params_, BIAS::PyramidMesh, BIAS::PyramidMeshWithArrow, BIAS::PyramidSolid, VRMLOutViewPortConical(), and VRMLOutViewPortPyramidal().

Referenced by VRMLOut().

int BIAS::ThreeDOut::VRMLOutProjectionView ( std::ostream &  VRMLFile)

only write previously stored projectionview objects into opened vrml file.

void ThreeDOut::VRMLOutViewPortConical ( std::ostream &  VRMLFile,
double  selectionRadius,
double  r,
double  g,
double  b,
double  angle,
double  scale,
const std::string &  name,
bool  solid = false 
)
protected

Write a projection of a NON-PERSPECTIVE camera into VRML.

Parameters
VRMLFiledestination, writes to an end of the file
selectionRadiuslength of a side of the cone(s)
anglemaximum angle of the camera-view
scalescale of the projection
solidtrue if Style = PyramidSolid
Author
amattal

Definition at line 564 of file ThreeDOut.cpp.

References PaintCone().

Referenced by VRMLOutProjection().

void ThreeDOut::VRMLOutViewPortPyramidal ( std::ostream &  VRMLFile,
double  selectionRadius,
double  r,
double  g,
double  b,
double  angle,
double  ratio,
double  scale,
const std::string &  name,
bool  solid = false 
)
protected

Write a projection of a PERSPECTIVE camera into VRML.

Parameters
VRMLFiledestination, writes to an end of the file
selectionRadiuslength of an edge of the pyramid(s)
anglemaximum angle of the camera-view
ratiowidth-of-the-projection/height-of-the-projection
scalescale of the projection
solidtrue if Style = PyramidSolid
Author
amattal

Definition at line 530 of file ThreeDOut.cpp.

References PaintPyramid().

Referenced by VRMLOutProjection().

void ThreeDOut::VRMLOutWCS ( std::ostream &  vrml)

write world coordinate system origin and axes

Definition at line 1622 of file ThreeDOut.cpp.

References CoordinateSystem(), Params_, and BIAS::ThreeDOutParameters::WCSAxesLength.

Referenced by VRMLOut().

int ThreeDOut::VRMLOutWriteHeader ( std::ostream &  vrml)

write the VRML 2.0 header into an open file

Examples:
ExampleTriangleMesh.cpp.

Definition at line 3696 of file ThreeDOut.cpp.

Referenced by VRMLOut().

void ThreeDOut::VRMLOutWriteNavigationInfo ( std::ostream &  vrml)

write VRML 2.0 navigation info node

Author
Jan Woetzel

Definition at line 3883 of file ThreeDOut.cpp.

Referenced by VRMLOutWriteViewpoint().

void ThreeDOut::VRMLOutWriteViewpoint ( std::ostream &  vrml)

write VRMl 2.0 viewpoint that can selecetd in vrml viewer

Author
Jan Woetzel

Definition at line 3894 of file ThreeDOut.cpp.

References BIAS::PMatrix3DData::C, BIAS::Vector3< T >::Length(), mapPMatrices_, BIAS::PMatrix3DData::PP, BIAS::Vector3< T >::ScalarProduct(), BIAS::PMatrix3DData::UL, BIAS::PMatrix3DData::UR, and VRMLOutWriteNavigationInfo().

Referenced by VRMLOut().

double ThreeDOut::VRMLtransparency ( const unsigned char  alpha)
static

get alpha opacity value as VRML transparency helper mapping, usually transparency = (1-alpha)

Definition at line 3867 of file ThreeDOut.cpp.

Referenced by VRMLOutEllipsoid_(), VRMLOutEllipsoids(), VRMLOutLines(), VRMLOutPMatricesRoutine(), VRMLOutPointsAsSpheres_(), and VRMLtransparency().

double ThreeDOut::VRMLtransparency ( const BIAS::Vector4< unsigned char > &  vRgba)
static

get alpha opacity component as VRML transparency g

Definition at line 3873 of file ThreeDOut.cpp.

References VRMLtransparency().

virtual int BIAS::ThreeDOut::WriteToFile ( const std::string &  filename)
inlinevirtual

Generic write method (wrapper for VRMLOut).

Reimplemented in BIAS::ThreeDOutOpenSceneGraph.

Definition at line 766 of file ThreeDOut.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

bool BIAS::ThreeDOut::glewInitialized_
protected

Definition at line 914 of file ThreeDOut.hh.

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

std::map<unsigned int, Ellipsoid3DData> BIAS::ThreeDOut::mapCamEllipsoids_
protected
std::map<unsigned int, Ellipsoid3DData> BIAS::ThreeDOut::mapEllipsoids_
protected
std::map<unsigned int, Image3DData> BIAS::ThreeDOut::mapImages_
protected
std::map<unsigned int, IndexedFaceSet> BIAS::ThreeDOut::mapIndexedFaceSet_
protected
std::map<unsigned int, Line3DData> BIAS::ThreeDOut::mapLines_
protected
std::map<unsigned int, PMatrix3DData > BIAS::ThreeDOut::mapPMatrices_
protected
std::map<unsigned int, Point3DData> BIAS::ThreeDOut::mapPoints_
protected
std::map<unsigned int, Projection3DData> BIAS::ThreeDOut::mapProjection3D_
protected

Definition at line 1021 of file ThreeDOut.hh.

Referenced by AddPose(), AddProjection(), Translation(), and VRMLOutProjection().

std::map<unsigned int, Text3DData> BIAS::ThreeDOut::mapTexts_
protected

map of all point structures

Definition at line 999 of file ThreeDOut.hh.

Referenced by BIAS::ThreeDOutOpenSceneGraph::AddOSGTexts_(), and AddText().

std::vector<double> BIAS::ThreeDOut::meanDraw
protected

Definition at line 1026 of file ThreeDOut.hh.

unsigned int BIAS::ThreeDOut::NextCamEllipsoidIndex_
protected

counter for the next ellipsoid index, gaps are not reused by now

Definition at line 1016 of file ThreeDOut.hh.

Referenced by AddEllipsoid(), and ThreeDOut().

unsigned int BIAS::ThreeDOut::NextEllipsoidIndex_
protected

counter for the next ellipsoid index, gaps are not reused by now

Definition at line 1011 of file ThreeDOut.hh.

Referenced by AddEllipsoid(), and ThreeDOut().

unsigned int BIAS::ThreeDOut::NextImageIndex_
protected

counter for the next index, gaps (due to delete) are not reused by now

Definition at line 991 of file ThreeDOut.hh.

Referenced by AddImage(), and ThreeDOut().

unsigned int BIAS::ThreeDOut::NextIndexedFaceSetIndex_
protected

Definition at line 1019 of file ThreeDOut.hh.

Referenced by AddTriangleMesh(), RemoveAllIndexedFaceSets(), and ThreeDOut().

unsigned int BIAS::ThreeDOut::NextLineIndex_
protected

counter for the next line index, gaps (due to delete) arent reused

Definition at line 1006 of file ThreeDOut.hh.

Referenced by AddLine(), and ThreeDOut().

unsigned int BIAS::ThreeDOut::NextPIndex_
protected

counter for the next index, gaps (due to delete) are not reused by now

Definition at line 986 of file ThreeDOut.hh.

Referenced by AddPMatrix(), ThreeDOut(), and UpdatePMatrix().

unsigned int BIAS::ThreeDOut::NextPointIndex_
protected

counter for the next index, gaps (due to delete) are not reused by now

Definition at line 996 of file ThreeDOut.hh.

Referenced by AddPoint(), and ThreeDOut().

unsigned int BIAS::ThreeDOut::NextProjection3DIndex_
protected

Definition at line 1022 of file ThreeDOut.hh.

Referenced by AddPose(), and AddProjection().

unsigned int BIAS::ThreeDOut::NextTextIndex_
protected

counter for the next index, gaps (due to delete) are not reused by now

Definition at line 1001 of file ThreeDOut.hh.

Referenced by AddText(), and ThreeDOut().

ThreeDOutParameters BIAS::ThreeDOut::Params_
protected
bool BIAS::ThreeDOut::visualize_viewports

Definition at line 355 of file ThreeDOut.hh.

Referenced by ThreeDOut().

bool BIAS::ThreeDOut::WriteViewpoints_
protected

Definition at line 1024 of file ThreeDOut.hh.

Referenced by SetWriteViewpoints(), ThreeDOut(), and VRMLOut().


The documentation for this class was generated from the following files: