Go to the documentation of this file.
28 float x_min,
float x_max,
float y_min,
float y_max)
36 float x_min,
float x_max,
float y_min,
float y_max)
37 : polygonUpToDate(false)
55 #if MRPT_HAS_OPENGL_GLUT
155 poly[0].x = poly[1].x =
m_xMin;
156 poly[2].x = poly[3].x =
m_xMax;
157 poly[0].y = poly[3].y =
m_yMin;
158 poly[1].y = poly[2].y =
m_yMax;
159 for (
size_t i = 0; i < 4; i++) poly[i].
z = 0;
GLAPI void GLAPIENTRY glBegin(GLenum mode)
bool m_enableTransparency
Of the texture using "m_textureImageAlpha".
void render_texturedobj() const override
Must be implemented by derived classes.
mrpt::img::CImage m_textureImage
int m_pad_x_right
The size of the fill in pixels in the textured image, w.r.t the image passed by the user.
std::shared_ptr< CTexturedPlane > Ptr
virtual bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Simulation of ray-trace, given a pose.
void readFromStreamTexturedObject(mrpt::serialization::CArchive &in)
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
GLAPI void GLAPIENTRY glDisable(GLenum cap)
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated)
void assignImage(const mrpt::img::CImage &img, const mrpt::img::CImage &imgAlpha)
Assigns a texture and a transparency image, and enables transparency (If the images are not 2^N x 2^M...
std::shared_ptr< CRenderizable > Ptr
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A 2D plane in the XY plane with a texture image.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
GLAPI void GLAPIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z)
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
bool traceRay(const std::vector< TPolygonWithPlane > &vec, const mrpt::math::TPose3D &pose, double &dist)
Fast ray tracing method using polygons' properties.
Virtual base class for "archives": classes abstracting I/O streams.
GLAPI void GLAPIENTRY glEnd(void)
mrpt::img::CImage m_textureImageAlpha
virtual ~CTexturedPlane()
Private, virtual destructor: only can be deleted from smart pointers.
std::vector< mrpt::math::TPolygonWithPlane > tmpPoly
Used for ray-tracing.
mrpt::poses::CPose3D m_pose
6D pose wrt the parent coordinate reference.
static void checkOpenGLError()
Checks glGetError and throws an exception if an error situation is found.
int r_width
Size of the texture image, rounded up to next power of 2.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
double x
X,Y,Z coordinates.
A base class for all OpenGL objects with loadable textures.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
3D polygon, inheriting from std::vector<TPoint3D>
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
void composePoint(double lx, double ly, double lz, double &gx, double &gy, double &gz, mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *out_jacobian_df_dpoint=nullptr, mrpt::math::CMatrixFixedNumeric< double, 3, 6 > *out_jacobian_df_dpose=nullptr, mrpt::math::CMatrixFixedNumeric< double, 3, 6 > *out_jacobian_df_dse3=nullptr, bool use_small_rot_approx=false) const
An alternative, slightly more efficient way of doing with G and L being 3D points and P this 6D pose...
CTexturedPlane(float x_min=-1, float x_max=1, float y_min=-1, float y_max=1)
Constructor.
GLAPI void GLAPIENTRY glTexCoord2d(GLdouble s, GLdouble t)
This base provides a set of functions for maths stuff.
void writeToStreamTexturedObject(mrpt::serialization::CArchive &out) const
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void writeToStreamRender(mrpt::serialization::CArchive &out) const
The namespace for 3D scene representation and rendering.
void readFromStreamRender(mrpt::serialization::CArchive &in)
virtual void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const override
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |