VTK
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkLODActor Class Reference

an actor that supports multiple levels of detail More...

#include <vtkLODActor.h>

Inherits vtkActor.

Public Types

typedef vtkActor Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkLODActorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void Render (vtkRenderer *, vtkMapper *)
 
int RenderOpaqueGeometry (vtkViewport *viewport)
 
void ReleaseGraphicsResources (vtkWindow *)
 
void AddLODMapper (vtkMapper *mapper)
 
void Modified ()
 
void ShallowCopy (vtkProp *prop)
 
virtual void SetLowResFilter (vtkPolyDataAlgorithm *)
 
virtual void SetMediumResFilter (vtkPolyDataAlgorithm *)
 
virtual vtkPolyDataAlgorithm * GetLowResFilter ()
 
virtual vtkPolyDataAlgorithm * GetMediumResFilter ()
 
virtual int GetNumberOfCloudPoints ()
 
virtual void SetNumberOfCloudPoints (int)
 
virtual vtkMapperCollection * GetLODMappers ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkLODActorSafeDownCast (vtkObjectBase *o)
 
static vtkLODActorNew ()
 

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 
 vtkLODActor ()
 
 ~vtkLODActor ()
 
virtual void CreateOwnLODs ()
 
virtual void UpdateOwnLODs ()
 
virtual void DeleteOwnLODs ()
 

Protected Attributes

vtkActor * Device
 
vtkMapperCollection * LODMappers
 
vtkPolyDataAlgorithm * LowResFilter
 
vtkPolyDataAlgorithm * MediumResFilter
 
vtkPolyDataMapper * LowMapper
 
vtkPolyDataMapper * MediumMapper
 
vtkTimeStamp BuildTime
 
int NumberOfCloudPoints
 

Detailed Description

an actor that supports multiple levels of detail

vtkLODActor is an actor that stores multiple levels of detail (LOD) and can automatically switch between them. It selects which level of detail to use based on how much time it has been allocated to render. Currently a very simple method of TotalTime/NumberOfActors is used. (In the future this should be modified to dynamically allocate the rendering time between different actors based on their needs.)

There are three levels of detail by default. The top level is just the normal data. The lowest level of detail is a simple bounding box outline of the actor. The middle level of detail is a point cloud of a fixed number of points that have been randomly sampled from the mapper's input data. Point attributes are copied over to the point cloud. These two lower levels of detail are accomplished by creating instances of a vtkOutlineFilter (low-res) and vtkMaskPoints (medium-res). Additional levels of detail can be add using the AddLODMapper() method.

To control the frame rate, you typically set the vtkRenderWindowInteractor DesiredUpdateRate and StillUpdateRate. This then will cause vtkLODActor to adjust its LOD to fulfill the requested update rate.

For greater control on levels of detail, see also vtkLODProp3D. That class allows arbitrary definition of each LOD.

Warning
If you provide your own mappers, you are responsible for setting its ivars correctly, such as ScalarRange, LookupTable, and so on.
On some systems the point cloud rendering (the default, medium level of detail) can result in points so small that they can hardly be seen. In this case, use the GetProperty()->SetPointSize() method to increase the rendered size of the points.
See Also
vtkActor vtkRenderer vtkLODProp3D
Examples:
vtkLODActor (Examples)
Tests:
vtkLODActor (Tests)

Definition at line 75 of file vtkLODActor.h.

Member Typedef Documentation

typedef vtkActor vtkLODActor::Superclass

Definition at line 78 of file vtkLODActor.h.

Constructor & Destructor Documentation

vtkLODActor::vtkLODActor ( )
protected
vtkLODActor::~vtkLODActor ( )
protected

Member Function Documentation

static int vtkLODActor::IsTypeOf ( const char *  type)
static
virtual int vtkLODActor::IsA ( const char *  type)
virtual
static vtkLODActor* vtkLODActor::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkLODActor::NewInstanceInternal ( ) const
protectedvirtual
vtkLODActor* vtkLODActor::NewInstance ( ) const
void vtkLODActor::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
static vtkLODActor* vtkLODActor::New ( )
static

Creates a vtkLODActor with the following defaults: origin(0,0,0) position=(0,0,0) scale=(1,1,1) visibility=1 pickable=1 dragable=1 orientation=(0,0,0). NumberOfCloudPoints is set to 150.

virtual void vtkLODActor::Render ( vtkRenderer *  ,
vtkMapper *   
)
virtual

This causes the actor to be rendered. It, in turn, will render the actor's property and then mapper.

int vtkLODActor::RenderOpaqueGeometry ( vtkViewport *  viewport)

This method is used internally by the rendering process. We overide the superclass method to properly set the estimated render time.

void vtkLODActor::ReleaseGraphicsResources ( vtkWindow *  )

Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release.

void vtkLODActor::AddLODMapper ( vtkMapper *  mapper)

Add another level of detail. They do not have to be in any order of complexity.

virtual void vtkLODActor::SetLowResFilter ( vtkPolyDataAlgorithm *  )
virtual

You may plug in your own filters to decimate/subsample the input. The default is to use a vtkOutlineFilter (low-res) and vtkMaskPoints (medium-res).

virtual void vtkLODActor::SetMediumResFilter ( vtkPolyDataAlgorithm *  )
virtual

You may plug in your own filters to decimate/subsample the input. The default is to use a vtkOutlineFilter (low-res) and vtkMaskPoints (medium-res).

virtual vtkPolyDataAlgorithm* vtkLODActor::GetLowResFilter ( )
virtual

You may plug in your own filters to decimate/subsample the input. The default is to use a vtkOutlineFilter (low-res) and vtkMaskPoints (medium-res).

virtual vtkPolyDataAlgorithm* vtkLODActor::GetMediumResFilter ( )
virtual

You may plug in your own filters to decimate/subsample the input. The default is to use a vtkOutlineFilter (low-res) and vtkMaskPoints (medium-res).

virtual int vtkLODActor::GetNumberOfCloudPoints ( )
virtual

Set/Get the number of random points for the point cloud.

virtual void vtkLODActor::SetNumberOfCloudPoints ( int  )
virtual

Set/Get the number of random points for the point cloud.

virtual vtkMapperCollection* vtkLODActor::GetLODMappers ( )
virtual

All the mappers for different LODs are stored here. The order is not important.

void vtkLODActor::Modified ( )

When this objects gets modified, this method also modifies the object.

void vtkLODActor::ShallowCopy ( vtkProp *  prop)

Shallow copy of an LOD actor. Overloads the virtual vtkProp method.

virtual void vtkLODActor::CreateOwnLODs ( )
protectedvirtual
virtual void vtkLODActor::UpdateOwnLODs ( )
protectedvirtual
virtual void vtkLODActor::DeleteOwnLODs ( )
protectedvirtual

Member Data Documentation

vtkActor* vtkLODActor::Device
protected

Definition at line 136 of file vtkLODActor.h.

vtkMapperCollection* vtkLODActor::LODMappers
protected

Definition at line 137 of file vtkLODActor.h.

vtkPolyDataAlgorithm* vtkLODActor::LowResFilter
protected

Definition at line 141 of file vtkLODActor.h.

vtkPolyDataAlgorithm* vtkLODActor::MediumResFilter
protected

Definition at line 142 of file vtkLODActor.h.

vtkPolyDataMapper* vtkLODActor::LowMapper
protected

Definition at line 143 of file vtkLODActor.h.

vtkPolyDataMapper* vtkLODActor::MediumMapper
protected

Definition at line 144 of file vtkLODActor.h.

vtkTimeStamp vtkLODActor::BuildTime
protected

Definition at line 146 of file vtkLODActor.h.

int vtkLODActor::NumberOfCloudPoints
protected

Definition at line 147 of file vtkLODActor.h.


The documentation for this class was generated from the following file: