MRPT
2.0.1
|
Classes | |
struct | Font |
struct | FontData |
struct | Point |
Variables | |
Point | mono_vertices [] |
Font::Index | mono_triangles [] |
Font::Index | mono_lines [] |
Font::Char | mono_chars [] |
Font | mono_font |
Point | sans_vertices [] |
Font::Index | sans_triangles [] |
Font::Index | sans_lines [] |
Font::Char | sans_chars [] |
Font | sans_font |
Point | serif_vertices [] |
Font::Index | serif_triangles [] |
Font::Index | serif_lines [] |
Font::Char | serif_chars [] |
Font | serif_font |
static struct FontData | data |
OpenGL vector 3D fonts | |
using | TEXT_STYLE = TOpenGLFontStyle |
different style for font rendering More... | |
void | glSetFont (const std::string &fontname) |
sets the font to use for future font rendering commands. More... | |
const std::string & | glGetFont () |
returns the name of the currently active font More... | |
std::pair< double, double > | glDrawText (const std::string &text, std::vector< mrpt::opengl::TTriangle > &tris, std::vector< mrpt::math::TPoint3Df > &lines, TEXT_STYLE style=NICE, double spacing=1.5, double kerning=0.1) |
renders a string in GL using the current settings. More... | |
std::pair< double, double > | glGetExtends (const std::string &text, double spacing=1.5, double kerning=0.1) |
returns the size of the bounding box of a text to be rendered, similar to glDrawText but without any visual output More... | |
void | glDrawTextTransformed (const std::string &text, std::vector< mrpt::opengl::TTriangle > &tris, std::vector< mrpt::math::TPoint3Df > &lines, std::vector< mrpt::img::TColor > &line_colors, const mrpt::poses::CPose3D &text_pose, float text_scale, const mrpt::img::TColor &text_color, TEXT_STYLE style=NICE, double spacing=1.5, double kerning=0.1) |
Appends to {tris,lines} the entities representing a given text including a pose and scale transformation. More... | |
using mrpt::opengl::internal::TEXT_STYLE = typedef TOpenGLFontStyle |
std::pair< double, double > mrpt::opengl::internal::glDrawText | ( | const std::string & | text, |
std::vector< mrpt::opengl::TTriangle > & | tris, | ||
std::vector< mrpt::math::TPoint3Df > & | lines, | ||
TEXT_STYLE | style = NICE , |
||
double | spacing = 1.5 , |
||
double | kerning = 0.1 |
||
) |
renders a string in GL using the current settings.
Font coordinates are +X along the line and +Y along the up direction of glyphs. The origin is at the top baseline at the left of the first character. Characters have a maximum size of 1. linefeed is interpreted as a new line and the start is offset in -Y direction by spacing . Individual characters are separated by kerning + plus their individual with.
text | string to be rendered, unknown characters are replaced with '?' |
style | rendering style |
spacing | distance between individual text lines |
kerning | distance between characters |
Definition at line 153 of file gltext.cpp.
References mrpt::opengl::internal::Font::Char::advance, mrpt::opengl::internal::FontData::currentFont(), data, mrpt::opengl::FILL, mrpt::opengl::internal::Font::findChar(), mrpt::opengl::NICE, mrpt::opengl::OUTLINE, THROW_EXCEPTION, mrpt::math::TPoint2D_data< T >::x, and mrpt::math::TPoint2D_data< T >::y.
Referenced by glDrawTextTransformed(), mrpt::opengl::CText::onUpdateBuffers_Text(), and mrpt::opengl::CText3D::onUpdateBuffers_Text().
void mrpt::opengl::internal::glDrawTextTransformed | ( | const std::string & | text, |
std::vector< mrpt::opengl::TTriangle > & | tris, | ||
std::vector< mrpt::math::TPoint3Df > & | lines, | ||
std::vector< mrpt::img::TColor > & | line_colors, | ||
const mrpt::poses::CPose3D & | text_pose, | ||
float | text_scale, | ||
const mrpt::img::TColor & | text_color, | ||
TEXT_STYLE | style = NICE , |
||
double | spacing = 1.5 , |
||
double | kerning = 0.1 |
||
) |
Appends to {tris,lines} the entities representing a given text including a pose and scale transformation.
It calls glDrawText() and appends its results to the provided buffers.
Definition at line 268 of file gltext.cpp.
References mrpt::poses::CPose3D::composePoint(), glDrawText(), and mrpt::poses::CPose3D::rotateVector().
Referenced by mrpt::opengl::CColorBar::onUpdateBuffers_all().
std::pair< double, double > mrpt::opengl::internal::glGetExtends | ( | const std::string & | text, |
double | spacing, | ||
double | kerning | ||
) |
returns the size of the bounding box of a text to be rendered, similar to glDrawText but without any visual output
Definition at line 233 of file gltext.cpp.
References mrpt::opengl::internal::Font::Char::advance, mrpt::opengl::internal::FontData::currentFont(), data, and mrpt::opengl::internal::Font::findChar().
const std::string & mrpt::opengl::internal::glGetFont | ( | ) |
returns the name of the currently active font
Definition at line 151 of file gltext.cpp.
References mrpt::opengl::internal::FontData::currentFontName, and data.
void mrpt::opengl::internal::glSetFont | ( | const std::string & | fontname | ) |
sets the font to use for future font rendering commands.
Options are: "sans", "serif", "mono".
fontname | string containing font name |
Definition at line 146 of file gltext.cpp.
References mrpt::opengl::internal::FontData::currentFontName, data, and mrpt::opengl::internal::FontData::fonts.
Referenced by mrpt::opengl::internal::FontData::FontData(), mrpt::opengl::CColorBar::onUpdateBuffers_all(), mrpt::opengl::CText::onUpdateBuffers_Text(), mrpt::opengl::CText3D::onUpdateBuffers_Text(), and mrpt::opengl::CAxis::onUpdateBuffers_Wireframe().
|
static |
Definition at line 144 of file gltext.cpp.
Referenced by mrpt::opengl::COpenGLBuffer::allocate(), mrpt::opengl::COpenGLBuffer::RAII_Impl::allocate(), mrpt::io::CMemoryStream::CMemoryStream(), mrpt::system::compute_CRC16(), mrpt::system::compute_CRC32(), mrpt::math::confidenceIntervals(), mrpt::math::CSparseMatrix::CSparseMatrix(), mrpt::math::CVectorDynamic< KFTYPE >::CVectorDynamic(), mrpt::gui::CWindowDialogPlots::CWindowDialogPlots(), mrpt::hwdrivers::CIMUXSens_MT4::doProcess(), mrpt::hwdrivers::CIMUIntersense::doProcess(), mrpt::math::RANSAC_Template< NUMTYPE >::execute(), mrpt::math::extractColumnFromVectorOfVectors(), mrpt::math::four1(), mrpt::ros1bridge::get_float_from_field(), mrpt::ros1bridge::get_uint16_from_field(), mrpt::typemeta::TEnumType< ENUMTYPE >::getBimap(), mrpt::serialization::CMessage::getContentAsStruct(), mrpt::hwdrivers::CBoardSonars::getObservation(), glDrawText(), glGetExtends(), glGetFont(), glSetFont(), mrpt::comms::net::http_get(), mrpt::opengl::CRenderizableShaderTexturedTriangles::initializeTextures(), mrpt::obs::CObservationPointCloud::load(), mrpt::img::CImage::loadFromXPM(), mrpt::img::CImage::loadTGA(), mrpt::system::md5(), mrpt::gui::MRPTImage2wxImage(), mrpt::hwdrivers::CGPSInterface::parse_NMEA(), ParseColor(), mrpt::gui::WxSubsystem::pushPendingWxRequest(), mrpt::math::realft(), reserveDataBuffer(), mrpt::hwdrivers::CNTRIPClient::sendBackToServer(), mrpt::hwdrivers::CGPSInterface::sendCustomCommand(), mrpt::serialization::CMessage::serializeObject(), mrpt::serialization::CMessage::setContentFromStruct(), mrpt::hmtslam::CMHPropertiesValuesList::setElemental(), and mrpt::slam::CRejectionSamplingRangeOnlyLocalization::setParams().
Font::Char mrpt::opengl::internal::mono_chars[] |
Definition at line 2550 of file gltext.cpp.
Font mrpt::opengl::internal::mono_font |
Definition at line 2649 of file gltext.cpp.
Font::Index mrpt::opengl::internal::mono_lines[] |
Definition at line 2034 of file gltext.cpp.
Font::Index mrpt::opengl::internal::mono_triangles[] |
Definition at line 1294 of file gltext.cpp.
Point mrpt::opengl::internal::mono_vertices[] |
Definition at line 14 of file gltext.cpp.
Font::Char mrpt::opengl::internal::sans_chars[] |
Definition at line 2488 of file gltext.cpp.
Font mrpt::opengl::internal::sans_font |
Definition at line 2587 of file gltext.cpp.
Font::Index mrpt::opengl::internal::sans_lines[] |
Definition at line 1985 of file gltext.cpp.
Font::Index mrpt::opengl::internal::sans_triangles[] |
Definition at line 1263 of file gltext.cpp.
Point mrpt::opengl::internal::sans_vertices[] |
Definition at line 14 of file gltext.cpp.
Font::Char mrpt::opengl::internal::serif_chars[] |
Definition at line 2958 of file gltext.cpp.
Font mrpt::opengl::internal::serif_font |
Definition at line 3057 of file gltext.cpp.
Font::Index mrpt::opengl::internal::serif_lines[] |
Definition at line 2361 of file gltext.cpp.
Font::Index mrpt::opengl::internal::serif_triangles[] |
Definition at line 1498 of file gltext.cpp.
Point mrpt::opengl::internal::serif_vertices[] |
Definition at line 14 of file gltext.cpp.
Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020 |