Exemplo n.º 1
0
Text3D* Text3D::create(const String& font, float size, const String& text)
{
	Text3D* txt = new Text3D(SceneManager::instance());
	txt->setFont(font);
	txt->setFontSize(size);
	txt->setText(text);
	return txt;
}
Exemplo n.º 2
0
Text3D* ChessUtils::createText3D(const string& content, Font3D* font3D, const Vec3& position, float size, float depth, osgText::TextBase::AlignmentType textAligment) {
	Text3D* text = new Text3D();
	text->setFont(font3D);
	text->setCharacterSize(size);
	text->setCharacterDepth(depth);
	text->setAlignment(textAligment);
	text->setAxisAlignment(osgText::TextBase::XY_PLANE);
	text->setPosition(position);
	text->setText(content);	

	return text;
}