[vtkusers] Level of Detail LOD based on space not rendering time
gbiv
gbivins4 at gmail.com
Thu Jun 19 12:22:16 EDT 2008
I was thinking callbacks based on your mouse.
Basically you could set your callbacks up like this:
/**
*mouse click
**/
onStartInteraction
{
//Always set the interactive lod when mouse clicks so
//navigating around is interactive
setInteractiveLod( interactiveLOD )
}
/**
*mouse release
**/
onEndInteraction
{
//Check distance between activeCamera.getPosition() and lod.GetCenter()
distance = checkDistanceBetweenLODAndCamera()
if (distance <= highLODDist )
{
//Set High LOD if distance is within tolorance
lod.SetSelectedLODID( highLODID )
return;
}
elseif( distance <= medLODDist )
{
//Set medium LOD as the interactive LOD if distance is within
tolerance
interactiveLOD = setMedLODID;
}
elseif( distance <= medLODDist )
{
//Set lower LOD as the interactive LOD if distance is within tolerance
interactiveLOD = setLowLODID;
}
lod.SetSelectedLODID( interactiveLOD );
}
This would always show a low or medium LOD (specified by interactiveLOD)
while navigating and then when navigation stopped, it would calculate the
distance and choose the appropriate lod to display. That way distance is
only calculated when the mouse is released...
Something like that but I haven't tried it...
;)
biv
Sarah Macumber wrote:
>
> No I hadn't, you mean by placing
>
> virtual void SetSelectedLODID (int)
>
> calls in call backs tied to the camera? Wont that be really slow?
>
> Sarah
>
> *************************************************************
>
> -----Original Message-----
> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On
> Behalf Of gbiv
> Sent: Thursday, June 19, 2008 7:38 AM
> To: vtkusers at vtk.org
> Subject: Re: [vtkusers] Level of Detail LOD based on space not rendering
> time
>
>
> Have you tried turning off the AutomaticLODSelection and manually
> setting the
> activeLOD based on camera distance from the LODProp?
> biv
>
> Sarah Macumber wrote:
>>
>> Hi,
>>
>>
>>
>> I am trying to render a sub sampling of polydata when I am zoomed out
>> from an object and then render the full polydata set when I am zoomed
> in
>> so that greater detail is shown on my unstructured grid the closer I
> get
>> to it. I have too many polydata to show all at once, but want to
>> display full mesh detail if the user decides to zoom in on my object.
>>
>>
>>
>> Is there any way to choose your mapper based on focal distance /
> camera
>> clipping range instead of rendering time like vtkLODProp3D /
> vtkLODActor
>> does?
>>
>>
>>
>> Thanks Sarah
>>
>>
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Level-of-Detail-LOD-based-on-space-not-rendering-t
> ime-tp18008661p18009237.html
> Sent from the VTK - Users mailing list archive at Nabble.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
> _______________________________________________
> 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
>
>
--
View this message in context: http://www.nabble.com/Level-of-Detail-LOD-based-on-space-not-rendering-time-tp18008661p18012743.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list