Top  Previous  Next

The Viewpoint object specifies the view mode and camera position and orientation for views and maps within FreeFlyer. Viewpoints can be configured through ViewWindow object editors and through FreeFlyer script, as shown in the examples below. The available Viewpoint types in FreeFlyer are:


3D View

2D Map

Celestial Sphere

Sensor View

Blockage View

Star Map

Rotating-Pulsating View



Viewpoints in the Object Editor

You can add Viewpoints directly to a ViewWindow in the ViewWindow object editor. Simply navigate to the Viewpoints tab of the dialog and create a Viewpoint to begin configuring it to meet your needs.


Viewpoint Tab in the ViewWindow Object Dialog

Viewpoint Tab in the ViewWindow Object Dialog



Viewpoints in FreeFlyer Script

You can add a Viewpoint to a ViewWindow using the AddViewpoint method, or you can copy entire Viewpoint objects so you can create one master Viewpoint and quickly use it for multiple Viewpoints and ViewWindows.


// Create and Configure Viewpoint

Viewpoint MarsMaster;

MarsMaster.ViewpointType = "view";

MarsMaster.ViewpointName = "Mars View";

MarsMaster.ThreeDView.ReferenceFrame = "inertial";

MarsMaster.ThreeDView.Source = Mars.ObjectId;

MarsMaster.ThreeDView.Target = Mars.ObjectId;

MarsMaster.ThreeDView.Declination = 15;

MarsMaster.ThreeDView.RightAscension = 45;

MarsMaster.ThreeDView.Radius = 15000;


// Add Viewpoint to a single ViewWindow object




// -- OR --

// Copy Viewpoint to multiple ViewWindow objects

ViewWindow1.CurrentViewpoint = MarsMaster;

ViewWindow2.CurrentViewpoint = MarsMaster;


You can also access Viewpoints associated with a ViewWindow using the ViewWindow.Viewpoints array. This array gives the user read and write access to the Viewpoint objects, as shown below.


Spacecraft Spacecraft1;



// Create ViewWindow

ViewWindow ViewWindow1({Spacecraft1});


// Remove the default Viewpoint



// Create Viewpoints

Viewpoint Viewpoint1;

Viewpoint Viewpoint2;

Viewpoint Viewpoint3;

Viewpoint1.ViewpointType = "map";

Viewpoint2.ViewpointType = "view";

Viewpoint3.ViewpointType = "sensorview";


// Add 3 Viewpoints to a ViewWindow





// Edit properties of the Viewpoints through the ViewWindow.Viewpoints[] array

ViewWindow1.Viewpoints[0].MapView.Body = Moon.ObjectId;

ViewWindow1.Viewpoints[1].ThreeDView.ReferenceFrame = "inertial";

ViewWindow1.Viewpoints[2].SensorView.Source = Spacecraft1.Sensors[0].ObjectId;





See Also


View Output Properties

Viewpoint Properties and Methods