本文整理汇总了C++中Style::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ Style::getName方法的具体用法?C++ Style::getName怎么用?C++ Style::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Style
的用法示例。
在下文中一共展示了Style::getName方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getStyle
Style* PatternLoader::getStyle(QString name) {
Style* pS;
for(pS=styleList.first(); pS != 0; pS=styleList.next()) {
if(name.compare(pS->getName())==0) { return pS; }
}
return NULL;
}
示例2: newStyle
Style
Style::combineWith( const Style& rhs ) const
{
// start by deep-cloning this style.
Style newStyle(*this);
newStyle.copySymbols(rhs);
if ( !this->empty() && !rhs.empty() )
newStyle.setName( _name + std::string(":") + rhs.getName() );
else if ( !this->empty() && rhs.empty() )
newStyle.setName( _name );
else if ( this->empty() && !rhs.empty() )
newStyle.setName( rhs.getName() );
else
newStyle.setName( _name );
return newStyle;
}
示例3: updateLabels
void MapTile::updateLabels(float _dt, const Style& _style, const View& _view) {
glm::mat4 mvp = _view.getViewProjectionMatrix() * m_modelMatrix;
glm::vec2 screenSize = glm::vec2(_view.getWidth(), _view.getHeight());
for(auto& label : m_labels[_style.getName()]) {
label->update(mvp, screenSize, _dt);
}
}
示例4: pushLabelTransforms
void MapTile::pushLabelTransforms(const Style& _style, std::shared_ptr<LabelContainer> _labelContainer) {
auto& textBuffer = m_buffers[_style.getName()];
if(textBuffer) {
auto ftContext = _labelContainer->getFontContext();
ftContext->lock();
for(auto& label : m_labels[_style.getName()]) {
label->pushTransform(textBuffer);
}
textBuffer->triggerTransformUpdate();
ftContext->unlock();
}
}
示例5:
std::shared_ptr<TextBuffer> MapTile::getTextBuffer(const Style& _style) const {
auto it = m_buffers.find(_style.getName());
if (it != m_buffers.end()) {
return it->second;
}
return nullptr;
}
示例6: newStyle
Style
Style::combineWith( const Style& rhs ) const
{
// start by deep-cloning this style.
Config conf = getConfig( false );
Style newStyle( conf );
// next, merge in the symbology from the other style.
newStyle.mergeConfig( rhs.getConfig(false) );
if ( !this->empty() && !rhs.empty() )
newStyle.setName( _name + std::string(":") + rhs.getName() );
else if ( !this->empty() && rhs.empty() )
newStyle.setName( _name );
else if ( this->empty() && !rhs.empty() )
newStyle.setName( rhs.getName() );
else
newStyle.setName( _name );
return newStyle;
}
示例7: draw
void Tile::draw(const Style& _style, const View& _view) {
const auto& styleMesh = m_geometry[_style.getName()];
if (styleMesh) {
auto& shader = _style.getShaderProgram();
glm::mat4 modelViewMatrix = _view.getViewMatrix() * m_modelMatrix;
glm::mat4 modelViewProjMatrix = _view.getViewProjectionMatrix() * m_modelMatrix;
shader->setUniformMatrix4f("u_modelView", glm::value_ptr(modelViewMatrix));
shader->setUniformMatrix4f("u_modelViewProj", glm::value_ptr(modelViewProjMatrix));
shader->setUniformMatrix3f("u_normalMatrix", glm::value_ptr(_view.getNormalMatrix()));
// Set the tile zoom level, using the sign to indicate whether the tile is a proxy
shader->setUniformf("u_tile_zoom", m_proxyCounter > 0 ? -m_id.z : m_id.z);
styleMesh->draw(*shader);
}
}
示例8:
void
StyleSheet::addStyle( const Style& style )
{
_styles[ style.getName() ] = style;
}
示例9:
bool Style::operator>(const Style& style) const {
return name.compare(style.getName()) > 0;
}
示例10: setTextBuffer
void MapTile::setTextBuffer(const Style& _style, std::shared_ptr<TextBuffer> _buffer) {
m_buffers[_style.getName()] = _buffer;
}
示例11: addGeometry
void MapTile::addGeometry(const Style& _style, std::unique_ptr<VboMesh> _mesh) {
m_geometry[_style.getName()] = std::move(_mesh); // Move-construct a unique_ptr at the value associated with the given style
}