39 #ifndef vpWireFrameSimulator_HH
40 #define vpWireFrameSimulator_HH
46 #include <visp3/core/vpConfig.h>
54 #include <visp3/robot/vpMy.h>
55 #include <visp3/robot/vpArit.h>
56 #include <visp3/robot/vpBound.h>
57 #include <visp3/robot/vpView.h>
58 #include <visp3/robot/vpToken.h>
59 #include <visp3/robot/vpTmstack.h>
60 #include <visp3/robot/vpVwstack.h>
61 #include <visp3/robot/vpRfstack.h>
62 #include <visp3/robot/vpArit.h>
67 void close_clipping();
68 void open_keyword (Keyword *kwp);
70 void open_source (FILE *fd,
const char *str);
71 void malloc_Bound_scene (Bound_scene *bsp,
const char *name,Index bn);
72 void free_Bound_scene (Bound_scene *bsp);
73 void parser (Bound_scene *bsp);
74 void close_source (
void);
75 void close_lex (
void);
76 void close_keyword (
void);
77 void display_scene(Matrix mat, Bound_scene sc);
78 void View_to_Matrix (View_parameters *vp, Matrix m);
79 Bound *clipping_Bound (Bound *bp, Matrix m);
80 void set_Bound_face_display (Bound *bp, Byte b);
81 void point_3D_2D (Point3f *p3, Index size,
int xsize,
int ysize, Point2i *p2);
82 void wireframe_Face (Face *fp, Point2i *pp);
84 #include <visp3/core/vpConfig.h>
85 #include <visp3/core/vpImage.h>
86 #include <visp3/core/vpHomogeneousMatrix.h>
87 #include <visp3/core/vpDisplay.h>
88 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
89 # include <visp3/core/vpList.h>
91 #include <visp3/core/vpImagePoint.h>
92 #include <visp3/robot/vpImageSimulator.h>
94 void set_scene (
const char*, Bound_scene *,
float);
214 } vpSceneDesiredObject;
220 } vpCameraTrajectoryDisplayType;
283 std::string scene_dir;
293 cameraTrajectory.clear();
298 void displayTrajectory(
const vpImage<vpRGBa> &I,
const std::list<vpHomogeneousMatrix> &list_cMo,
const std::list<vpHomogeneousMatrix> &list_fMo,
const vpHomogeneousMatrix &camMf);
310 if( (std::fabs(px_ext-1.) >
vpMath::maximum(px_ext,1.)*std::numeric_limits<double>::epsilon())
311 && (std::fabs(py_ext-1) >
vpMath::maximum(py_ext,1.)*std::numeric_limits<double>::epsilon()))
329 if( (std::fabs(px_ext-1.) >
vpMath::maximum(px_ext,1.)*std::numeric_limits<double>::epsilon())
330 && (std::fabs(py_ext-1) >
vpMath::maximum(py_ext,1.)*std::numeric_limits<double>::epsilon()))
360 if( (std::fabs(px_int-1.) >
vpMath::maximum(px_int,1.)*std::numeric_limits<double>::epsilon())
361 && (std::fabs(py_int-1) >
vpMath::maximum(py_int,1.)*std::numeric_limits<double>::epsilon()))
379 if( (std::fabs(px_int-1.) >
vpMath::maximum(px_int,1.)*std::numeric_limits<double>::epsilon())
380 && (std::fabs(py_int-1) >
vpMath::maximum(py_int,1.)*std::numeric_limits<double>::epsilon()))
406 for(std::list<vpHomogeneousMatrix>::const_iterator it=poseList.begin(); it!=poseList.end(); ++it){
407 cMo_history.push_back(rotz*(*it));
423 void get_fMo_History(std::list<vpHomogeneousMatrix>& fMo_history) {fMo_history = fMoList;}
425 void initScene(
const vpSceneObject &obj,
const vpSceneDesiredObject &desiredObject);
426 void initScene(
const char* obj,
const char* desiredObject);
427 void initScene(
const vpSceneObject &obj);
428 void initScene(
const char* obj);
430 void initScene(
const vpSceneObject &obj,
const vpSceneDesiredObject &desiredObject,
const std::list<vpImageSimulator> &imObj);
431 void initScene(
const char* obj,
const char* desiredObject,
const std::list<vpImageSimulator> &imObj);
432 void initScene(
const vpSceneObject &obj,
const std::list<vpImageSimulator> &imObj);
433 void initScene(
const char* obj,
const std::list<vpImageSimulator> &imObj);
519 this->camMf = rotz * cam_Mf;
523 f2Mf = camMf2.
inverse()*this->camMf;
524 extCamChanged =
true;
532 this->thickness_ = thickness;
bool displayImageSimulator
The object displayed at the desired position is the same than the scene object defined in vpSceneObje...
A cylinder of 80cm length and 10cm radius.
void deleteCameraPositionHistory()
A tire represented by 2 circles with radius 10cm and 15cm.
vpCameraParameters getInternalCameraParameters(const vpImage< vpRGBa > &I) const
unsigned int getWidth() const
Three parallel lines with equation y=-5, y=0, y=5.
A plane represented by a 56cm by 56cm plate with a grid of 49 squares inside.
Implementation of an homogeneous matrix and operations on such kind of matrices.
A plate with 8 points at coordinates (0.05,0,0), (0.15,0.05,0), (0.2,0.2,0), (-0.05,0.2,0), (-0.15,-0.1,0), (-0.1,-0.1,0), (-0.05,0.05,0) and (0.5,0,0). ach point is represented by a circle with 2cm radius.
void setCameraColor(const vpColor &col)
void setDesiredViewColor(const vpColor &col)
A 40cm by 40cm plate with 4 points at coordinates (-0.1,-0.1,0), (0.1,-0.1,0), (0.1,0.1,0), (0.1,0.1,0). Each point is represented by a circle with 2cm radius.
void set_fMo(const vpHomogeneousMatrix &fMo_)
Class to define colors available for display functionnalities.
void setNbPtTrajectory(const unsigned int nbPt)
void get_cMo_History(std::list< vpHomogeneousMatrix > &cMo_history)
void setCameraPositionRelWorld(const vpHomogeneousMatrix &fMc_)
std::list< vpImageSimulator > objectImage
void setCurrentViewColor(const vpColor &col)
std::list< vpImagePoint > cameraTrajectory
void setExternalCameraPosition(const vpHomogeneousMatrix &cam_Mf)
A 40cm by 40cm plate with 4 points at coordinates (-0.05,0.05,0), (0.05,0.05,0), (0.05,-0.05,0), (-0.05,-0.05,0). Each point is represented by a circle with 2cm radius.
void setDesiredCameraPosition(const vpHomogeneousMatrix &cdMo_)
void setGraphicsThickness(unsigned int thickness)
std::list< vpHomogeneousMatrix > fMoList
static Type maximum(const Type &a, const Type &b)
void setCameraTrajectoryDisplayType(const vpCameraTrajectoryDisplayType &camTraj_type)
void setCameraTrajectoryColor(const vpColor &col)
4 points at coordinates (-0.03,-0.03,0), (0.03,-0.03,0), (0.03,0.03,0), (0.03,0.03,0). Each point is represented by a circle with 1cm radius.
vpCameraParameters getExternalCameraParameters(const vpImage< unsigned char > &I) const
vpHomogeneousMatrix get_fMo() const
The object displayed at the desired position is a circle.
A 40cm by 40cm plate with 4 points at coordinates (-0.025,-0.05,0), (-0.075,0.05,0), (0.075,0.05,0), (0.025,-0.05,0). Each point is represented by a circle with 2cm radius.
Generic class defining intrinsic camera parameters.
bool displayDesiredObject
void extract(vpRotationMatrix &R) const
static Type minimum(const Type &a, const Type &b)
A 40cm by 40cm plate with 3 points at coordinates (0,0,0), (0.1,0,0), (0,0.1,0). Each point is repres...
Implementation of a wire frame simulator. Compared to the vpSimulator class, it does not require thir...
void buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
vpCameraParameters getInternalCameraParameters(const vpImage< unsigned char > &I) const
void setExternalCameraParameters(const vpCameraParameters &cam)
vpCameraTrajectoryDisplayType camTrajType
A 40cm by 40cm plate with 4 points at coordinates (-0.07,-0.05,0), (0.07,0.05,0), (0...
vpCameraParameters getExternalCameraParameters(const vpImage< vpRGBa > &I) const
void setCameraPositionRelObj(const vpHomogeneousMatrix &cMo_)
vpSceneDesiredObject desiredObject
A 40cm by 40cm plate with 4 points at coordinates (0,-0.1,0), (0.1,0,0), (0,0.1,0), (-0.1,0,0). Each point is represented by a circle with 2cm radius.
bool displayCameraTrajectory
vpHomogeneousMatrix camMf
Three parallel lines representing a road.
vpHomogeneousMatrix inverse() const
vpHomogeneousMatrix get_cMo() const
void setInternalCameraParameters(const vpCameraParameters &cam)
vpCameraTrajectoryDisplayType
void setDisplayCameraTrajectory(const bool &do_display)
void get_fMo_History(std::list< vpHomogeneousMatrix > &fMo_history)
vpHomogeneousMatrix refMo
A pipe represented by a cylinder of 25 cm length and 15cm radius.
unsigned int getHeight() const
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Class that consider the case of a translation vector.
void setCameraSizeFactor(const float factor)
std::list< vpHomogeneousMatrix > poseList
vpHomogeneousMatrix getExternalCameraPosition() const
vpHomogeneousMatrix camMf2