ENH: runTimePostProcessing FO camera update
- Removed the camera 'mode'
- The (old) static camera was only appropriate when parallel
projection was inactive, and the view was centred at (0 0 0)
- Camera input now always requires 'position' and 'focalPoint'
- Clip box is now optional. Note that this is applied after the
camera
set-up and so will override the camera position
- View angle is only appropriate when not using parallel projection
- Zoom now required, applied after all other operations
- 1 = do nothing, >1 = zoom in, <1 = zoom out
Example input:
camera
{
// Total number of frames to generate
nFrameTotal 1;
// Parallel projection flag
parallelProjection no;
// Optional clippling box
clipBox (-0.0206 -0.0254 -0.0005) (0.29 0.0254 0.0005);
focalPoint (0 0 0);
up (0 1 0);
position (0 0 1);
viewAngle 20;
zoom 1.1;
}
This commit is contained in:
@ -49,6 +49,7 @@ SourceFiles
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
class vtkActor;
|
||||
class vtkRenderer;
|
||||
class vtkRenderWindow;
|
||||
|
||||
@ -58,22 +59,12 @@ namespace functionObjects
|
||||
{
|
||||
namespace runTimePostPro
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class scene Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class scene
|
||||
{
|
||||
public:
|
||||
|
||||
enum modeType{mtStatic, mtFlightPath};
|
||||
|
||||
NamedEnum<modeType, 2> modeTypeNames_;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Reference to the object registry
|
||||
@ -88,7 +79,7 @@ private:
|
||||
//- Read camera properties
|
||||
void readCamera(const dictionary& dict);
|
||||
|
||||
//- Read solour properties
|
||||
//- Read colour properties
|
||||
void readColours(const dictionary& dict);
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
@ -108,9 +99,6 @@ protected:
|
||||
|
||||
// Camera settings
|
||||
|
||||
//- Mode
|
||||
modeType mode_;
|
||||
|
||||
//- Position
|
||||
autoPtr<Function1<point>> cameraPosition_;
|
||||
|
||||
@ -123,12 +111,20 @@ protected:
|
||||
//- View angle
|
||||
autoPtr<Function1<scalar>> cameraViewAngle_;
|
||||
|
||||
//- Zoom: 1 = do nothing, >1 = zoom in, <1 = zoom out
|
||||
// - perspective mode: reduces view angle
|
||||
// - parallel mode: manipulate parallel scale
|
||||
autoPtr<Function1<scalar>> cameraZoom_;
|
||||
|
||||
|
||||
// Scene management
|
||||
|
||||
//- Clipping box
|
||||
boundBox clipBox_;
|
||||
|
||||
//- Clipping box actor
|
||||
vtkSmartPointer<vtkActor> clipBoxActor_;
|
||||
|
||||
//- Parallel projection flag
|
||||
bool parallelProjection_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user