Text in 3D window

Hi,
I am still not able to get this resolved. Please help.

I was having problem with displaying 2D text in a 3D window. I managed to overcome it by creating my own class AIS_3DText.Now, I can display the 2d text in a 3D window but I am not able to set its color,font and angle. How do I do that? I tried,

Prs3d_TextAspect* textAspect = new Prs3d_TextAspect();
textAspect->SetAngle(angle);
textAspect->SetColor(aColor);
textAspect->SetFont(font);

Handle(AIS_3DText) aGraphicText = new AIS_3DText(aText,tmpPnt); // My own class
m_AISContext->SetColor(aGraphicText,aColor,Standard_False);
m_AISContext->Display(aGraphicText);

It does not seem to work.Can anybody help me?

Thanks in advance,
~Amod

Serge's picture

Hi!
I would suggest you to put all aspect stuff into the Compute(...) method of your AIS_3DText class. And try to use Prs3d_Text::Draw( presentation, aspect, text, point).
You should be able to change color and font attributes. It seems angle has no influence...
You can check out OpenGl_text.c file to see if angle attribute is taken into account.

Regards