[vtkusers] Set light Intensity

Bill Lorensen bill.lorensen at gmail.com
Fri Dec 11 11:47:03 EST 2015


Sorry, I meant
col->InitTraversal()

On Fri, Dec 11, 2015 at 10:36 AM, Lays Rodrigues
<laysrodriguessilva at gmail.com> wrote:
> Bill, the LightCollection dont have this method. The equivalence is
> NewInstance?
> I'm trying this:
>
>  GetRenderWindow()->AddRenderer(renderer);
>
>     renderer->SetBackground(0.576,0.749,0.874);
>
>     renderer->CreateLight();
>
>     lightCol->NewInstance();
>
>     lightCol = renderer->GetLights();
>
>     int i = lightCol->GetNumberOfItems();
>
>     if(i>0){
>
>         light = (vtkLight*)lightCol->GetItemAsObject(0);
>
>         light->SetIntensity(10);
>
>     }
>
>
> But the view dont change.
> What do I want, is to improve the vizualiation of the 3d models that I load.
> From this:
> http://pt-br.tinypic.com/r/2aj6zh2/9
>
> To something like this:
> http://centrumdruku3d.pl/wp-content/uploads/2014/12/RepetierServer2.png
>
> And i think that correcting the lights, will be the first step...
>
> See ya
>
> 2015-12-11 13:04 GMT-02:00 Bill Lorensen <bill.lorensen at gmail.com>:
>>
>> Do,
>>
>> col->Initialize ();
>>
>> On Dec 11, 2015 9:50 AM, "Lays Rodrigues" <laysrodriguessilva at gmail.com>
>> wrote:
>>>
>>> The tip of Amelie dont work. Someone have more tips? >.<
>>> Att
>>>
>>> 2015-12-11 8:59 GMT-02:00 ameloush <theryame at gmail.com>:
>>>>
>>>> You could try this :
>>>>
>>>>   vtkSmartPointer<vtkLightCollection>  col =
>>>> vtkSmartPointer<vtkLightCollection>::New();
>>>>
>>>>     col = ren->GetLights();
>>>>         int i=col->GetNumberOfItems();  // to be sure there is at list
>>>> one
>>>> light
>>>>     light = (vtkLight*)col->GetItemAsObject(0);
>>>>     light->SetIntensity(10);
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://vtk.1045678.n5.nabble.com/Set-light-Intensity-tp5735471p5735482.html
>>>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>>> _______________________________________________
>>>> 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
>>>>
>>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>>
>>>
>>>
>>> --
>>> __
>>> Lays Rodrigues
>>> Front-End Developer at Br-Print3D Project(KDE)
>>> Computer Science Student at UFF/PURO
>>> Organizadora da Semana da Computação UFF-PURO
>>> www.facebook.com/semanacomputacaopuro
>>> www.facebook.com/brprint3d
>>> www.brprint3d.wordpress.com
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>
>
>
> --
> __
> Lays Rodrigues
> Front-End Developer at Br-Print3D Project(KDE)
> Computer Science Student at UFF/PURO
> Organizadora da Semana da Computação UFF-PURO
> www.facebook.com/semanacomputacaopuro
> www.facebook.com/brprint3d
> www.brprint3d.wordpress.com
>
>
>
>



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the vtkusers mailing list