[vtkusers] A Light Emiting Object
Naim
naim at electromagneticworks.com
Mon Sep 25 17:38:10 EDT 2006
Hi, I used this function to eliminate shading
void CGLModelViewCtrl::RemoveShading()
{
// eliminate shading
m_prenderer->LightFollowCameraOn();
m_prenderer->TwoSidedLightingOn();
m_prenderer->GetTwoSidedLighting();
vtkLight *light1 = vtkLight::New();
light1->SetLightTypeToCameraLight();
light1->PositionalOn();
light1->SetConeAngle(180);
light1->SetIntensity(0.5);
light1->SetPosition(1,0,1);
vtkLight *light2 = vtkLight::New();
light2->SetLightTypeToCameraLight();
light2->PositionalOn();
light2->SetConeAngle(180);
light2->SetIntensity(0.5);
light2->SetPosition(0,1,1);
vtkLight *light3 = vtkLight::New();
light3->SetLightTypeToCameraLight();
light3->PositionalOn();
light3->SetConeAngle(180);
light3->SetIntensity(0.5);
light3->SetPosition(-1,0,1);
vtkLight *light4 = vtkLight::New();
light4->SetLightTypeToCameraLight();
light4->PositionalOn();
light4->SetConeAngle(180);
light4->SetIntensity(0.5);
light4->SetPosition(0,-1,1);
m_prenderer->AddLight(light1);
m_prenderer->AddLight(light2);
m_prenderer->AddLight(light3);
m_prenderer->AddLight(light4);
// release memory
int objectCount = 4; // number of objects to delete
CleanUpObjects(objectCount, light1, light2, light3, light4);
}
Naim Himrane.
Electromagneticworks Inc.
-----Original Message-----
From: vtkusers-bounces+naim=electromagneticworks.com at vtk.org
[mailto:vtkusers-bounces+naim=electromagneticworks.com at vtk.org] On Behalf Of
Lucas Nunes
Sent: September 22, 2006 6:22 PM
To: vtkusers at vtk.org
Subject: [vtkusers] A Light Emiting Object
Hello! I'm new to VTK and I have a question: is it
possible to make an object to emit light in all
diretions, like the sun? I'm trying to create a solar
system model (I'm a colledge student), and the
examples I've looked didn't have something that I
could use to implement this.
If it is not possible, then there is someway to
"simulate" the sunlight? It has to be light spreading
in all directions.
Thanks for any ideas!
Lucas Dutra Nunes
"All your base are belong to us!"
_______________________________________________________
Você quer respostas para suas perguntas? Ou você sabe muito e quer
compartilhar seu conhecimento? Experimente o Yahoo! Respostas !
http://br.answers.yahoo.com/
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list