43 #ifndef vpWireFrameSimulator_HH
44 #define vpWireFrameSimulator_HH
50 #include <visp/vpConfig.h>
58 #include <visp/vpMy.h>
59 #include <visp/vpArit.h>
60 #include <visp/vpBound.h>
61 #include <visp/vpView.h>
62 #include <visp/vpToken.h>
63 #include <visp/vpTmstack.h>
64 #include <visp/vpVwstack.h>
65 #include <visp/vpRfstack.h>
66 #include <visp/vpArit.h>
71 void close_clipping();
72 void open_keyword (Keyword *kwp);
74 void open_source (FILE *fd,
const char *str);
75 void malloc_Bound_scene (Bound_scene *bsp,
const char *name,Index bn);
76 void free_Bound_scene (Bound_scene *bsp);
77 void parser (Bound_scene *bsp);
78 void close_source (
void);
79 void close_lex (
void);
80 void close_keyword (
void);
81 void display_scene(Matrix mat, Bound_scene sc);
82 void View_to_Matrix (View_parameters *vp, Matrix m);
83 Bound *clipping_Bound (Bound *bp, Matrix m);
84 void set_Bound_face_display (Bound *bp, Byte b);
85 void point_3D_2D (Point3f *p3, Index size,
int xsize,
int ysize, Point2i *p2);
86 void wireframe_Face (Face *fp, Point2i *pp);
88 #include <visp/vpConfig.h>
89 #include <visp/vpImage.h>
90 #include <visp/vpHomogeneousMatrix.h>
91 #include <visp/vpDisplay.h>
92 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
93 # include <visp/vpList.h>
95 #include <visp/vpImagePoint.h>
96 #include <visp/vpImageSimulator.h>
98 void set_scene (
const char*, Bound_scene *,
float);
218 } vpSceneDesiredObject;
224 } vpCameraTrajectoryDisplayType;
287 std::string scene_dir;
297 cameraTrajectory.clear();
302 void displayTrajectory(
const vpImage<vpRGBa> &I,
const std::list<vpHomogeneousMatrix> &list_cMo,
const std::list<vpHomogeneousMatrix> &list_fMo,
const vpHomogeneousMatrix &camMf);
314 if( (std::fabs(px_ext-1.) >
vpMath::maximum(px_ext,1.)*std::numeric_limits<double>::epsilon())
315 && (std::fabs(py_ext-1) >
vpMath::maximum(py_ext,1.)*std::numeric_limits<double>::epsilon()))
333 if( (std::fabs(px_ext-1.) >
vpMath::maximum(px_ext,1.)*std::numeric_limits<double>::epsilon())
334 && (std::fabs(py_ext-1) >
vpMath::maximum(py_ext,1.)*std::numeric_limits<double>::epsilon()))
364 if( (std::fabs(px_int-1.) >
vpMath::maximum(px_int,1.)*std::numeric_limits<double>::epsilon())
365 && (std::fabs(py_int-1) >
vpMath::maximum(py_int,1.)*std::numeric_limits<double>::epsilon()))
383 if( (std::fabs(px_int-1.) >
vpMath::maximum(px_int,1.)*std::numeric_limits<double>::epsilon())
384 && (std::fabs(py_int-1) >
vpMath::maximum(py_int,1.)*std::numeric_limits<double>::epsilon()))
410 for(std::list<vpHomogeneousMatrix>::const_iterator it=poseList.begin(); it!=poseList.end(); ++it){
411 cMo_history.push_back(rotz*(*it));
427 void get_fMo_History(std::list<vpHomogeneousMatrix>& fMo_history) {fMo_history = fMoList;}
429 void initScene(
const vpSceneObject &obj,
const vpSceneDesiredObject &desiredObject);
430 void initScene(
const char* obj,
const char* desiredObject);
431 void initScene(
const vpSceneObject &obj);
432 void initScene(
const char* obj);
434 void initScene(
const vpSceneObject &obj,
const vpSceneDesiredObject &desiredObject,
const std::list<vpImageSimulator> &imObj);
435 void initScene(
const char* obj,
const char* desiredObject,
const std::list<vpImageSimulator> &imObj);
436 void initScene(
const vpSceneObject &obj,
const std::list<vpImageSimulator> &imObj);
437 void initScene(
const char* obj,
const std::list<vpImageSimulator> &imObj);
523 this->camMf = rotz * cam_Mf;
527 f2Mf = camMf2.
inverse()*this->camMf;
528 extCamChanged =
true;
536 this->thickness_ = thickness;
575 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
593 for(std::list<vpHomogeneousMatrix>::const_iterator it=poseList.begin(); it!=poseList.end(); ++it){
607 for(std::list<vpHomogeneousMatrix>::const_iterator iter = fMoList.begin(); iter != fMoList.end(); ++iter){
613 vp_deprecated
void initScene(vpSceneObject obj, vpSceneDesiredObject desiredObject,
vpList<vpImageSimulator> &imObj);
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.
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
Provide simple list management.
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
vp_deprecated vpList< vpHomogeneousMatrix > get_fMo_History()
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.
void addRight(const type &el)
add a new element in the list, at the right of the current one
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)
Construction from translation vector and rotation matrix.
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.
vp_deprecated vpList< vpHomogeneousMatrix > get_cMo_History()
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