|Automatic animation flight path sample
This command will initialize a camera animation through the scene in ArcScene using a designated flight path style. The animation is built by creating camera keyframes along a path, deriving the target, azimuth, and viewing distance of the target from the settings specified. When previewing using the 'Apply' command, or before the dialog is dismissed, the keyframes are added to a track and IAnimationTrack::InterpolateObjectProperties is used to position the camera. Therefore the intent of this sample is, in part, to demonstrate how the InterpolateObjectProperties method is used to set the current state of the scene.
Individual properties of a keyframe can be set directly depending on the property type (Long, Integer, Point, Extent, Double, RGBColor, or Boolean), and the index of the property.
pK.PropertyValueDouble(2) = 90
sets the azimuth (property 2) of the 'pK' keyframe variable to 90.
How to use:
Steps for adding a command/tool from a DLL:
Register the DLL: sxFlightPaths.dll. You can register a DLL on Windows by typing in the Start Menu\Run dialog box 'regsvr32 ' and the path to the dll file.
In the Customize dialog, click on 'Add from file', and browse to select 'sxFlightPaths.dll'.
Under the Commands tab, find the '3D Analyst Developer Samples (Animation)' and drag the 'Animation Flight Paths' command onto a toolbar or menu. Dismiss the Customize dialog.
Using the Tool:
Start ArcScene and load the layers of interest. Run the 'Animation Flight Paths' command.
Choose the flight path style- Circle Overhead, Spiral Down, Spiral Up, Boundary, Cross Bounds, or Transects.
Choose the viewing target and set any other relevant height or transect values. Next, set the speed for the preview playback. This setting will not affect any tracks which are added to the scene animation collection, as scene animation track speed is controlled by the play controls. This setting, however, is proportional to the number of steps used in playing back the animation via the 'Apply' command or on command exit, and therefore, the speed. A speed setting of 0 will produce no immediate playback.
An ArcScene session with layers of interest loaded.
||A module used to gather the parameters for, and run the appropriate animation creation commands.
||ICommand implementation for the tool.
||Main dialog for the tool.
|basAnimation.bas and other 3D Analyst Developer Sample utilties
||This project also references shared code located in Visual Basic code modules. To compile this project, these files are necessary in the location: '<ARCGIS INSTALL PATH > \ArcObjects Developer Kit\Samples\3D Analyst\Utilities\ '.
This example uses many routines from the basAnimation module in this set of files, for example.