[vtkusers] vtkGlobeSource SetCurtainHeight Has No Affect

Aashish Chaudhary aashish.chaudhary at kitware.com
Mon Nov 22 13:23:50 EST 2010


Hi Donny,

Based on your suggestion I committed a fix to VTK master.

Thanks for reporting this.

On Sat, Nov 13, 2010 at 4:58 PM, Aashish Chaudhary <
aashish.chaudhary at kitware.com> wrote:

>
>
> On Sat, Nov 13, 2010 at 3:00 PM, Donny <donnyz at charter.net> wrote:
>
>>  Sorry Aashish I forgot to reply to all.
>>
>>
>>
>> Thanks Aashish. I have attached a screenshot to visualize the problem.
>> Maybe you have a better solution. I have two globe source objects. The first
>> is to render a low resolution texture on a terrain patch of the whole United
>> States. The second is a high resolution texture of a smaller terrain
>> patch representing a small area of the United States. The curtain of the
>> second source is sticking above the first source. Can I use two separate
>> textures on the first globe source?
>>
>
> Not as of now (based on my memory). Said that this the feature I wanted to
> have and in my todo list.
>
>
>>
>>
>> I have made the changes to vtkGlobeSource on my local copy. I am not
>> authorized as a contributor and until I am more familiar with the cvs
>> submission procedure I would rather you changed it. The following are the
>> changes I made:
>>
>
> FYI: VTK switched to git. (more information here
> http://www.vtk.org/Wiki/VTK/Git#Topic_Stage)
>
>>
>>
>
>>
>
>
>>  In the vtkGlobeSource.h file I added:
>>
>> vtkSetMacro(AutoCalculateCurtainHeight, int);
>>
>> vtkGetMacro(AutoCalculateCurtainHeight, int);
>>
>>
>>
>> int AutoCalculateCurtainHeight;
>>
>>
>>
>> And in the vtkGlobeSource.cxx file I added:
>>
>>             In the constructor:
>>
>>                         this->AutoCalculateCurtainHeight = 1;
>>
>>
>>
>>       In RequestData():
>>
>>                         if(this->AutoCalculateCurtainHeight)
>>
>>                   this->CurtainHeight = (this->EndLongitude-this
>> ->StartLongitude)
>>
>> ·         this->Radius / 3600.0;
>>
>>
>>
>> Thanks.
>>
>>
>>
>>
>>
> These changes looks reasonable to me.  I will make the changes in the
> repository by tomorrow.
>
> Thanks,
>
>>
>>
>> -----Original Message-----
>> *From:* Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com]
>> *Sent:* Saturday, November 13, 2010 1:10 PM
>> *To:* Donny
>> *Cc:* vtkusers at vtk.org
>> *Subject:* Re: [vtkusers] vtkGlobeSource SetCurtainHeight Has No Affect
>>
>>
>>
>> Hi Donny,
>>
>> On Sat, Nov 13, 2010 at 1:27 PM, Donny <donnyz at charter.net> wrote:
>>
>> I noticed that when I call SetCurtainHeight on a vtkGlobeSource object it
>> has no affect. I browsed the vtkGlobeSource and discovered that in the
>> RequestData function the CurtainHeight is recalculated based on the terrain
>> patch. This makes the SetCurtainHeight function useless.
>>
>>
>>
>>  Can we create another function called SetAutoCalculateCurtainHeight to
>> assign a new variable AutoCalculateCurtainHeight and use that variable to
>> determine if the terrain patch calculation should be performed?
>>
>>
>>
>> I think this sounds reasonable. Do you want to submit a patch (or I can
>> make this change).  I am assuming that for some reason default curtain
>> height didn't work for you? (or something)
>>
>>
>>
>> Thanks.
>>
>>
>>
>> Donny Zimmerman
>>
>> donnyz at charter.net
>>
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>>
>>
>> --
>> | Aashish Chaudhary
>> | R&D Engineer
>> | Kitware Inc.
>> | www.kitware.com
>>
>
>
>
> --
> | Aashish Chaudhary
> | R&D Engineer
> | Kitware Inc.
> | www.kitware.com
>



-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101122/9ca77637/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 47040 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101122/9ca77637/attachment.jpeg>


More information about the vtkusers mailing list