Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VTKViewer_Utilities.cxx File Reference
#include "VTKViewer_Utilities.h"
#include "VTKViewer_Actor.h"
#include "VTKViewer_Algorithm.h"
#include <algorithm>
#include <vtkMath.h>
#include <vtkCamera.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>

Functions

void ResetCamera (vtkRenderer *theRenderer, int theUsingZeroFocalPoint)
 
int ComputeVisiblePropBounds (vtkRenderer *theRenderer, double theBounds[6])
 
int ComputeBounds (vtkActorCollection *theCollection, double theBounds[6])
 
void ResetCameraClippingRange (vtkRenderer *theRenderer)
 
bool ComputeTrihedronSize (vtkRenderer *theRenderer, double &theNewSize, const double theSize, const double theSizeInPercents)
 
bool IsBBEmpty (vtkRenderer *theRenderer)
 
bool isBoundValid (double *theBounds)
 
bool ComputeBBCenter (vtkRenderer *theRenderer, double theCenter[3])
 

Function Documentation

bool ComputeBBCenter ( vtkRenderer *  theRenderer,
double  theCenter[3] 
)
int ComputeBounds ( vtkActorCollection *  theCollection,
double  theBounds[6] 
)

Compute the bounds of actors

bool ComputeTrihedronSize ( vtkRenderer *  theRenderer,
double &  theNewSize,
const double  theSize,
const double  theSizeInPercents 
)

Compute trihedron size.

References ComputeVisiblePropBounds().

int ComputeVisiblePropBounds ( vtkRenderer *  theRenderer,
double  theBounds[6] 
)

Compute the bounds of the visible props

References ComputeBounds(), and VTK::ActorCollectionCopy::GetActors().

bool IsBBEmpty ( vtkRenderer *  theRenderer)
bool isBoundValid ( double *  theBounds)

Check that the given bounding box is valid, i.e each min bound < each max bound

void ResetCamera ( vtkRenderer *  theRenderer,
int  theUsingZeroFocalPoint 
)
See Also
vtkRenderer::ResetCamera(double bounds[6]) method

References ComputeVisiblePropBounds(), Plot2d::Dot, and ResetCameraClippingRange().

void ResetCameraClippingRange ( vtkRenderer *  theRenderer)
See Also
vtkRenderer::ResetCameraClippingRange(double bounds[6]) method

References ComputeVisiblePropBounds().