Class VisualObjectParams_TexturedTriangles
Defined in File CVisualObject.h
Inheritance Relationships
Base Type
public mrpt::viz::CVisualObject(Class CVisualObject)
Derived Types
public mrpt::viz::CMesh(Class CMesh)public mrpt::viz::CSetOfTexturedTriangles(Class CSetOfTexturedTriangles)public mrpt::viz::CTexturedPlane(Class CTexturedPlane)
Class Documentation
-
class VisualObjectParams_TexturedTriangles : public virtual mrpt::viz::CVisualObject
Subclassed by mrpt::viz::CMesh, mrpt::viz::CSetOfTexturedTriangles, mrpt::viz::CTexturedPlane
Raw access to textured-triangle shader buffer data
-
inline const auto &shaderTexturedTrianglesBuffer() const
-
inline auto &shaderTexturedTrianglesBufferMutex() const
Public Functions
-
VisualObjectParams_TexturedTriangles() = default
-
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, they will be internally filled to its dimensions to be powers of two)
Note
Images are copied, the original ones can be deleted.
-
void assignImage(const mrpt::img::CImage &img)
Assigns a texture image, and disable transparency.
Note
Images are copied, the original ones can be deleted.
-
void assignImage(mrpt::img::CImage &&img, mrpt::img::CImage &&imgAlpha)
Similar to assignImage, but the passed images are moved in (move semantic).
-
void assignImage(mrpt::img::CImage &&img)
Similar to assignImage, but with move semantics.
-
inline bool isLightEnabled() const
-
inline void enableLight(bool enable = true)
-
inline void cullFaces(const TCullFace &cf)
Control whether to render the FRONT, BACK, or BOTH (default) set of faces. Refer to docs for glCullFace(). Example: If set to
cullFaces(TCullFace::BACK);, back faces will not be drawn (“culled”)
-
inline const mrpt::img::CImage &getTextureImage() const
-
inline const mrpt::img::CImage &getTextureAlphaImage() const
-
inline bool textureImageHasBeenAssigned() const
-
void assignNormalMap(const mrpt::img::CImage &img)
Assigns a normal map image for tangent-space normal mapping. The image should encode normals in tangent space as RGB where (128,128,255) represents the unperturbed surface normal.
Note
Images are copied, the original ones can be deleted.
-
void assignNormalMap(mrpt::img::CImage &&img)
Similar to assignNormalMap, but with move semantics.
-
inline const mrpt::img::CImage &getNormalMapImage() const
-
inline bool normalMapHasBeenAssigned() const
-
inline void enableTextureLinearInterpolation(bool enable)
Enable linear interpolation of textures (default=false, use nearest pixel)
-
inline bool textureLinearInterpolation() const
-
inline void enableTextureMipMap(bool enable)
-
inline bool textureMipMap() const
Protected Functions
-
void params_serialize(mrpt::serialization::CArchive &out) const
-
void params_deserialize(mrpt::serialization::CArchive &in)
-
mrpt::math::TBoundingBoxf trianglesBoundingBox() const
Returns the bounding box of m_triangles, or (0,0,0)-(0,0,0) if empty.
-
void writeToStreamTexturedObject(mrpt::serialization::CArchive &out) const
-
void readFromStreamTexturedObject(mrpt::serialization::CArchive &in)
-
inline const auto &shaderTexturedTrianglesBuffer() const