41 #ifndef vpWireFrameSimulator_HH
42 #define vpWireFrameSimulator_HH
51 #include <visp3/core/vpConfig.h>
52 #include <visp3/core/vpDisplay.h>
53 #include <visp3/core/vpHomogeneousMatrix.h>
54 #include <visp3/core/vpImage.h>
55 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
56 #include <visp3/core/vpList.h>
58 #include <visp3/core/vpImagePoint.h>
59 #include <visp3/robot/vpImageSimulator.h>
60 #include <visp3/robot/vpWireFrameSimulatorTypes.h>
220 } vpSceneDesiredObject;
222 typedef enum { CT_LINE, CT_POINT } vpCameraTrajectoryDisplayType;
285 std::string scene_dir;
299 cameraTrajectory.clear();
306 void displayTrajectory(
const vpImage<vpRGBa> &I,
const std::list<vpHomogeneousMatrix> &list_cMo,
320 if ((std::fabs(px_ext - 1.) >
vpMath::maximum(px_ext, 1.) * std::numeric_limits<double>::epsilon()) &&
321 (std::fabs(py_ext - 1) >
vpMath::maximum(py_ext, 1.) * std::numeric_limits<double>::epsilon()))
339 if ((std::fabs(px_ext - 1.) >
vpMath::maximum(px_ext, 1.) * std::numeric_limits<double>::epsilon()) &&
340 (std::fabs(py_ext - 1) >
vpMath::maximum(py_ext, 1.) * std::numeric_limits<double>::epsilon()))
372 if ((std::fabs(px_int - 1.) >
vpMath::maximum(px_int, 1.) * std::numeric_limits<double>::epsilon()) &&
373 (std::fabs(py_int - 1) >
vpMath::maximum(py_int, 1.) * std::numeric_limits<double>::epsilon()))
391 if ((std::fabs(px_int - 1.) >
vpMath::maximum(px_int, 1.) * std::numeric_limits<double>::epsilon()) &&
392 (std::fabs(py_int - 1) >
vpMath::maximum(py_int, 1.) * std::numeric_limits<double>::epsilon()))
419 for (std::list<vpHomogeneousMatrix>::const_iterator it = poseList.begin(); it != poseList.end(); ++it) {
420 cMo_history.push_back(rotz * (*it));
437 void get_fMo_History(std::list<vpHomogeneousMatrix> &fMo_history) { fMo_history = fMoList; }
439 void initScene(
const vpSceneObject &obj,
const vpSceneDesiredObject &desiredObject);
440 void initScene(
const char *obj,
const char *desiredObject);
441 void initScene(
const vpSceneObject &obj);
442 void initScene(
const char *obj);
444 void initScene(
const vpSceneObject &obj,
const vpSceneDesiredObject &desiredObject,
445 const std::list<vpImageSimulator> &imObj);
446 void initScene(
const char *obj,
const char *desiredObject,
const std::list<vpImageSimulator> &imObj);
447 void initScene(
const vpSceneObject &obj,
const std::list<vpImageSimulator> &imObj);
448 void initScene(
const char *obj,
const std::list<vpImageSimulator> &imObj);
463 this->cMo = rotz * cMo_;
464 fMc = fMo * this->cMo.
inverse();
475 this->fMc = fMc_ * rotz;
476 cMo = this->fMc.
inverse() * fMo;
504 this->camTrajType = camTraj_type;
553 this->camMf = rotz * cam_Mf;
556 this->camMf2.
buildFrom(0, 0, T[2], 0, 0, 0);
557 f2Mf = camMf2.
inverse() * this->camMf;
558 extCamChanged =
true;
Generic class defining intrinsic camera parameters.
Class to define RGB colors available for display functionalities.
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpHomogeneousMatrix & buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
vpHomogeneousMatrix inverse() const
void extract(vpRotationMatrix &R) const
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
unsigned int getWidth() const
unsigned int getHeight() const
static Type maximum(const Type &a, const Type &b)
static Type minimum(const Type &a, const Type &b)
Class that consider the case of a translation vector.
Implementation of a wire frame simulator. Compared to the vpSimulator class, it does not require thir...
void deleteCameraPositionHistory()
vpHomogeneousMatrix getExternalCameraPosition() const
vpSceneDesiredObject desiredObject
vpHomogeneousMatrix camMf2
@ D_CIRCLE
The object displayed at the desired position is a circle.
vpHomogeneousMatrix refMo
vpCameraParameters getInternalCameraParameters(const vpImage< unsigned char > &I) const
void setCameraPositionRelObj(const vpHomogeneousMatrix &cMo_)
void get_cMo_History(std::list< vpHomogeneousMatrix > &cMo_history)
bool displayCameraTrajectory
vpCameraParameters getExternalCameraParameters(const vpImage< vpRGBa > &I) const
void get_fMo_History(std::list< vpHomogeneousMatrix > &fMo_history)
bool displayImageSimulator
vpCameraTrajectoryDisplayType camTrajType
void setCurrentViewColor(const vpColor &col)
void setNbPtTrajectory(unsigned int nbPt)
void setCameraTrajectoryDisplayType(const vpCameraTrajectoryDisplayType &camTraj_type)
vpHomogeneousMatrix get_cMo() const
vpCameraParameters getExternalCameraParameters(const vpImage< unsigned char > &I) const
void setCameraColor(const vpColor &col)
vpCameraTrajectoryDisplayType
void setDesiredViewColor(const vpColor &col)
vpHomogeneousMatrix camMf
vpCameraParameters getInternalCameraParameters(const vpImage< vpRGBa > &I) const
void setExternalCameraPosition(const vpHomogeneousMatrix &cam_Mf)
void setCameraTrajectoryColor(const vpColor &col)
std::list< vpImagePoint > cameraTrajectory
bool displayDesiredObject
std::list< vpHomogeneousMatrix > fMoList
void setCameraSizeFactor(float factor)
void setCameraPositionRelWorld(const vpHomogeneousMatrix &fMc_)
std::list< vpImageSimulator > objectImage
void set_fMo(const vpHomogeneousMatrix &fMo_)
vpHomogeneousMatrix get_fMo() const
void setDesiredCameraPosition(const vpHomogeneousMatrix &cdMo_)
void setInternalCameraParameters(const vpCameraParameters &cam)
void setExternalCameraParameters(const vpCameraParameters &cam)
@ CIRCLE
A 10cm radius circle.
@ THREE_LINES
Three parallel lines with equation y=-5, y=0, y=5.
@ ROAD
Three parallel lines representing a road.
@ SPHERE
A 15cm radius sphere.
@ CUBE
A 12.5cm size cube.
@ TIRE
A tire represented by 2 circles with radius 10cm and 15cm.
@ CYLINDER
A cylinder of 80cm length and 10cm radius.
void setGraphicsThickness(unsigned int thickness)
void setDisplayCameraTrajectory(const bool &do_display)
std::list< vpHomogeneousMatrix > poseList