<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="cid:filelist.xml@01C08147.A26B0E40">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-fareast-font-family:"Courier New";}
span.EmailStyle15
        {mso-style-type:personal-compose;
        mso-ansi-font-size:10.0pt;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:black;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-AU style='tab-interval:36.0pt'>
<div class=Section1>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black
face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:
Arial'>How do I get the text to follow the active camera? I am using the
Doc/View paradigm in the vtk/MFC example where you </span></font></span><font
color=black><span style='color:black'>fill a vtkPropCollection with actors, then
add them to your "picture view" during OnUpdate(). </span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><![if !supportEmptyParas]> <![endif]></span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'>In the document class I do this:</span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>//--------
The pipeline for text</span></font><font color=black><span style='color:black;
mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>//
Source</span></font><font color=black><span style='color:black;mso-color-alt:
windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>vText->SetText(txt);</span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>//
Filters</span></font><font color=black><span style='color:black;mso-color-alt:
windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span></span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>//
Mapper</span></font><font color=black><span style='color:black;mso-color-alt:
windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>textMapper->SetInput(vText->GetOutput());</span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><![if !supportEmptyParas]> <![endif]></span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>//
Actor</span></font><font color=black><span style='color:black;mso-color-alt:
windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>textActor->SetMapper(textMapper);</span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>textActor->SetScale(1,1,1);</span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>textActor->AddPosition(0,-0.1,-0.1);</span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>textActor->GetProperty()->SetDiffuseColor(0.2784,
1.0000, 0.3882);</span></font><font color=black><span style='color:black;
mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>textActor->GetProperty()->SetSpecularColor(0.2784,
1.0000, 0.3882);</span></font><font color=black><span style='color:black;
mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>textActor->GetProperty()->SetSpecular(0.4);</span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>textActor->GetProperty()->SetSpecularPower(50);</span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>textActor->GetProperty()->SetInterpolationToGouraud();</span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><span style='mso-tab-count:1'> </span>textActor->GetProperty()->SetOpacity(0.75);</span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'>//<span style='mso-tab-count:1'> </span>textActor->SetCamera(Renderer->GetActiveCamera());</span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'><![if !supportEmptyParas]> <![endif]></span></font><font
color=black><span style='color:black;mso-color-alt:windowtext'><o:p></o:p></span></font></p>
<pre><span class=EmailStyle15><font size=2 color=black face=Arial><span
style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;mso-fareast-font-family:
"Times New Roman"'>Clearly the last line will not work because the Renderer is in the view class. So how do I get the active camera for the text actor?<o:p></o:p></span></font></span></pre><pre><span
class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:
10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;mso-fareast-font-family:
"Times New Roman"'>Is there some way of doing this in the view class in particular OnUpdate(), where you are adding the actors to the renderer as done in the following code snippet.<o:p></o:p></span></font></span></pre><pre><span
class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:
10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;mso-fareast-font-family:
"Times New Roman"'><span style='mso-tab-count:1'> </span>while (prop = propc->GetNextProp()) <o:p></o:p></span></font></span></pre><pre><span
class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:
10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;mso-fareast-font-family:
"Times New Roman"'><span style='mso-tab-count:1'> </span>{<o:p></o:p></span></font></span></pre><pre><span
class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:
10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;mso-fareast-font-family:
"Times New Roman"'><span style='mso-tab-count:2'> </span>this->Renderer->AddProp(prop);<o:p></o:p></span></font></span></pre><pre><span
class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:
10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;mso-fareast-font-family:
"Times New Roman"'><span style='mso-tab-count:1'> </span>}<o:p></o:p></span></font></span></pre><pre><span
class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:
10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;mso-fareast-font-family:
"Times New Roman"'><span style='mso-tab-count:1'> </span>this->Renderer->ResetCamera();<o:p></o:p></span></font></span></pre><pre><span
class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:
10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;mso-fareast-font-family:
"Times New Roman"'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></pre><pre><span
class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:
10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;mso-fareast-font-family:
"Times New Roman"'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></pre><pre><span
class=EmailStyle15><font size=2 color=black face=Arial><span style='font-size:
10.0pt;mso-bidi-font-size:12.0pt;font-family:Arial;mso-fareast-font-family:
"Times New Roman"'>If you have an answer, many thanks in advance!!<o:p></o:p></span></font></span></pre>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black
face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:
Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black
face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:
Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black
face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:
Arial'>Andrew<o:p></o:p></span></font></span></p>
<p class=MsoNormal><span class=EmailStyle15><font size=2 color=black
face=Arial><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:
Arial'><![if !supportEmptyParas]> <![endif]><o:p></o:p></span></font></span></p>
</div>
</body>
</html>