This repository was archived by the owner on Jul 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExampleModelHuman.any
More file actions
65 lines (41 loc) · 1.86 KB
/
ExampleModelHuman.any
File metadata and controls
65 lines (41 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Example Model using the Camera template class and the HumanModel
// The camera is configured to look at the pelvis and rotate around
// the model.
//
// See the CameraClassTemplate for detailed usage of the camera class
#include "<ANYBODY_PATH_INSTALLDIR>/AMMR/Application/libdef.any"
#include "CameraClassTemplate.any"
Main = {
VideoLookAtCamera VideoMaker(UP_DIRECTION=y) =
{
// Filename of the video that is created.
VideoName = "Human";
// Save images at double resolution and downscale when creating
// the video. This will improve the video quality.
VideoInputScale = 2;
VideoResolution = {1080,768};
// The camera direction is time dependent to make a rotating camera.
CameraDirection = {cos(2*pi*Main.Study.t),0,sin(2*pi*Main.Study.t) };
// The point in global reference which the camera looks at.
CameraLookAtPoint = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.r+{0,-0.15,0};
// Override the default camera counter with the time step from the study.
// This ensures that we only save the images from the analysis.
// Note: The study must include (have a reference to) this camera template.
// Otherwise the counter will not update.
Counter = Main.Study.iStep;
// The sequence of analysis to make the recording from.
Analysis = {
AnyOperation &ref = Main.Study.Kinematics;
};
};
// Include the HumanModel from the repository
#include "<ANYBODY_PATH_BODY>/HumanModel.any"
AnyBodyStudy Study = {
AnyFolder &model = .HumanModel.BodyModelWithDefaultDrivers;
Gravity = {0.0, -9.81, 0.0};
// We need to include a referece to the camera to ensure the
// time dependent variables update when the study runs
AnyFolder& Camera_referece = Main.VideoMaker;
nStep = 60;
};
};// Main