Dirk Reiners wrote:
>       Hi Enrico,
>
> Enrico Borrione wrote:
>   
>> hi opensg users,
>>
>> working with my cave application,
>> i noticed that the ceiling and the sides are not
>> matching, basically because of different aspect
>> ratios. The first thing that came to my mind
>> was to use a DisplayCalibration xml to 
>> stretch the ceiling's viewport and make it match
>> the sides'.
>>
>> I resumed an old piece of code of mine,
>> but i am not having any luck in so far.
>>
>> right now i am enabling the  calibration via:
>>
>> std::filebuf fb;
>> fb.open ("cluster.xml",std::ios::in);
>> std::istream os(&fb);
>> beginEditCP(win);
>>      win->loadCalibration(os);
>> endEditCP(win);
>> fb.close();
>>
>> and the XML look like:
>>
>> <?xml version="1.0"?>
>>     
> ...
>   
>> </displaycalibration>
>>
>> I already made sure that the calibration has been loaded
>> quering it:
>>
>> DisplayCalibrationPtr calib = m_pWin->getCalibration(0);
>> std::cout << calib->getServer().c_str() << std::endl;
>>
>> and that the servers name actually match.
>>
>> What am i forgetting?
>>     
>
> Hm, not sure, I haven't used that part myself. Yvonne, Johannes, can you 
> say something about this one?
>   
Seems ok, but I've never used the <grid> parts in this context.
Alternatively you might want to try the new DisplayFilters.
Attached you find a little example, just load it like this:
         std::ifstream in("calibFileNew.xml");
         if (in)
             win->loadFilter(in);
But unfortunately this simple loading method doesn't work in combination
with the BalancedMultiWindow and balance set to true.

Bye
Yvonne

>       Dirk
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>   

<displayfilter>

 <server name="test1" >
  <colordisplayfilter>
	  <colormatrix>
		0.290259 0.0148847 0.0109531 0 
		0.151414 0.466373 0.00382121 0 
		0.0125544 0.0275535 0.477622 0 
		-0.201104 -0.782503 -1.13009 1 
	  </colormatrix>
	  <gamma>2.4</gamma>
	  <size>2 2 2</size>
	  <shadingtable>
		<color>0 0 0</color>
		<color>0 0 0</color>
		<color>1 1 1</color>
		<color>1 1 1</color>
		<color>1 1 1</color>
		<color>1 1 1</color>
		<color>0 0 0</color>
		<color>0 0 0</color>
	  </shadingtable>
  </colordisplayfilter>
  
  <resolutiondisplayfilter>
	<downscale>0.9</downscale>
  </resolutiondisplayfilter>
  
  <distortiondisplayfilter>
	  <rows>2</rows>
	  <cols>2</cols>
	  <positions>
		<point>0 0</point>
		<point>1 0</point>
		<point>0 1</point>
		<point>1 1</point>
	  </positions>
  </distortiondisplayfilter>
 </server>
 
 <server name="test2" >
  <colordisplayfilter>
	  <colormatrix>
		0.456046 0.0476225 0.0100033 0 
		0.0279291 0.475362 0.0547091 0 
		0.000321805 0.0434762 0.364378 0 
		-0.0456066 -5.41122 -1.00344 1 
	  </colormatrix>
	  <gamma>2.4</gamma>
	  <size>2 2 2</size>
	  <shadingtable>
		<color>0.2 0.2 0.2</color>
		<color>0.2 0.2 0.2</color>
		<color>0.8 0.8 0.8</color>
		<color>0.8 0.8 0.8</color>
		<color>0.8 0.8 0.8</color>
		<color>0.8 0.8 0.8</color>
		<color>0.2 0.2 0.2</color>
		<color>0.2 0.2 0.2</color>
	  </shadingtable>
  </colordisplayfilter>
  
  <resolutiondisplayfilter>
	<downscale>.5</downscale>
  </resolutiondisplayfilter>
  
  <distortiondisplayfilter>
	  <rows>2</rows>
	  <cols>2</cols>
	  <positions>
		<point>0 0</point>
		<point>1 0</point>
		<point>0 1</point>
		<point>1 1</point>
	  </positions>
  </distortiondisplayfilter>
 </server>
 
</displayfilter>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to