<html xmlns:v="urn:schemas-microsoft-com:vml" 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=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="cid:filelist.xml@01C8E66E.00F70980">
<link rel=Edit-Time-Data href="cid:editdata.mso">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        text-align:justify;
        mso-pagination:widow-orphan;
        font-size:10.5pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.EmailStyle17
        {mso-style-type:personal;
        mso-style-noshow:yes;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:navy;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
</style>
<![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in;text-justify-trim:
punctuation'>

<div class=Section1 style='layout-grid:15.6pt'>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi and welcome to OSG.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You need to make sure your viewport and
projection matrix have equivalent aspect ratios.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The best way to do this in MFC is to use
the viewport dimensions that your using (traits->width, traits->height)
and then change your projection matrix to match that aspect ratio.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>-Steve<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=2 color=navy face="Times New Roman"><span
style='font-size:10.5pt;color:navy;mso-no-proof:yes'> <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Times New Roman"><span
style='font-size:10.5pt;color:navy;mso-no-proof:yes'> <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face="Times New Roman"><span
style='font-size:10.5pt;color:navy;mso-no-proof:yes'> </span></font><o:p></o:p></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal align=left style='text-align:left'><b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
osg-users-bounces@lists.openscenegraph.org
[mailto:osg-users-bounces@lists.openscenegraph.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>TANG Fangqin<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, July 15, 2008 10:34
AM<br>
<b><span style='font-weight:bold'>To:</span></b>
osg-users@lists.openscenegraph.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [osg-users] Using
OsgViewerMFC to load a sphere</span></font><font size=3><span style='font-size:
12.0pt'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal align=left style='text-align:left'><font size=2
face="Times New Roman"><span style='font-size:10.5pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>Hi All,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>I am a beginner of OSG. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>I used OsgViewerMFC to load a
sphere into the scene, but it displays as an ellipsoid.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>The radius doesn’t seem to
be equal in two orthotropic axes.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>I find that it may be related to
the width and height of the view window when initializing.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>The following codes are from
OsgViewerMFC:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>::GetWindowRect(m_hWnd,
&rect);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>…<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>traits->x = 0;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>traits->y = 0;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>traits->width = rect.right -
rect.left;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>traits->height = rect.bottom -
rect.top;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>…<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>osg::GraphicsContext* gc =
osg::GraphicsContext::createGraphicsContext(traits.get());<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>How to solve this?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>Thanks for your advices in
advance.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:9.0pt;
font-family:Arial;mso-fareast-language:ZH-CN'>Tang<o:p></o:p></span></font></p>

</div>

</body>

</html>