[770c98]: / Application / MocapExamples / BVH_BoxLift / Model / CreateVideo.any

Download this file

59 lines (40 with data), 1.9 kB

// See following file for more information on the camera class template
// and options. 
// #include "<ANYBODY_PATH_MODELUTILS>/Video/VideoLookAtCamera.any"

// This is a simple example of using the camera class to create videos.
#include "<ANYBODY_PATH_MODELUTILS>/Video/VideoLookAtCamera.any"

#define VIDEO_STUDY Main.Studies.InverseDynamicStudy
#define VIDEO_ANALYSIS InverseDynamics


VIDEO_STUDY  = {
VideoLookAtCamera VideoTool (UP_DIRECTION = y) = 
{
     VideoName = Main.ModelSetup.TrialSpecificData.TrialFileName;
  
     
     // The point the camera focus on  
     CameraLookAtPoint = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.r +{0.2,-0.25,0};
     
     // The vertical field of view in meters at the LookAtPoint
     CameraFieldOfView = 2;
     
     // The direction which the camera is placed
     // (In global coordinates with respect to the LookAtPoint)
     CameraDirection = {-0.5,0.2,0.5};
     
     Counter = VIDEO_STUDY.iStep;
     
     /// Determines the speed of the video. 
     /// Currently set to realtime
     VideoInputFrameRate = round(VIDEO_STUDY.nStep/iffun(VIDEO_STUDY.tEnd-VIDEO_STUDY.tStart, VIDEO_STUDY.tEnd-VIDEO_STUDY.tStart, 1.0*VIDEO_STUDY.nStep)); 
   
     
     // Operation which run before recoding is started.
     PreAnalysis = {
         AnyOperation &step1 = Main.RunAnalysis.LoadParameters;
         AnyOperation &step2 = Main.RunAnalysis.MarkerTracking;
     };
     
     // The operations which should be included in the video.
     Analysis = {
         AnyOperation &ref = VIDEO_STUDY.VIDEO_ANALYSIS;
     };
     Create_Video.Settings.DisplayPriority = PriorityLow;
 };
 
 };
 
 Main.ModelSetup = {
   AnyOperationSequence CreateVideo = {
     Settings.DisplayPriority = PriorityHigh;
     AnyOperation& CreateVideo = VIDEO_STUDY.VideoTool.Create_Video;
   };
 };