コード例 #1
0
//==============================
// BitmapFontSurfaceLocal::DrawTextBillboarded3D
void BitmapFontSurfaceLocal::DrawTextBillboarded3D( BitmapFont const & font, fontParms_t const & parms,
		Vector3f const & pos, float const scale, Vector4f const & color, char const * text )
{
	fontParms_t billboardParms = parms;
	billboardParms.Billboard = true;
	DrawText3D( font, billboardParms, pos, Vector3f( 1.0f, 0.0f, 0.0f ), Vector3f( 0.0f, -1.0f, 0.0f ),
			scale, color, text );
}
コード例 #2
0
//==============================
// BitmapFontSurfaceLocal::DrawText3Df
void BitmapFontSurfaceLocal::DrawText3Df( BitmapFont const & font, fontParms_t const & parms,
		Vector3f const & pos, Vector3f const & normal, Vector3f const & up,
		float const scale, Vector4f const & color, char const * fmt, ... )
{
    char buffer[256];
    va_list args;
    va_start( args, fmt );
    vsnprintf( buffer, sizeof( buffer ), fmt, args );
    va_end( args );
    DrawText3D( font, parms, pos, normal, up, scale, color, buffer );
}
コード例 #3
0
void Font::DrawText3D( std::string text, const Pos3D *pos, uint8_t align, double scale )
{
	DrawText3D( text, pos, align, 1.f, 1.f, 1.f, 1.f, scale );
}