README.md 2.65 KB
Newer Older
Yue Wu's avatar
Yue Wu committed
1
# Computer Animation 2022 - Exercise
Yuwei Xiao's avatar
init  
Yuwei Xiao committed
2
3
4
5
6
7
8

## Overview

Code framework for course exercise.

## Installation

Yuwei Xiao's avatar
Yuwei Xiao committed
9
Install **Git** and build system **Cmake**. For windows user, MSVC need to be installed.
Yuwei Xiao's avatar
init  
Yuwei Xiao committed
10
11
12
13
14
15
16
17
18
19
20

### Note for linux users

Many linux distributions do not include `gcc` and the basic development tools in their default installation. On Ubuntu, you need to install the following packages:

```
sudo apt-get install build-essential libx11-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libxrandr-dev libxi-dev libxmu-dev libblas-dev libxinerama-dev libxcursor-dev
```

### Build

Yuwei Xiao's avatar
update    
Yuwei Xiao committed
21
22
Clone this repo (together with the submodule `libigl`):
```
Yue Wu's avatar
Yue Wu committed
23
git clone --recursive http://dalab.se.sjtu.edu.cn/gitlab/courses/ca-framework-2022.git
Yuwei Xiao's avatar
update    
Yuwei Xiao committed
24
25
26
27
# if you forget clone submodule at first place
git submodule update --init --recursive
``` 

Yuwei Xiao's avatar
init  
Yuwei Xiao committed
28
29
30
31
32
33
34
35
36
37
38
39
Run the following commands inside the relevant subfolder to setup the build folder:
```
mkdir build
cd build
cmake ..
```

Compile and run the executable, e.g. Ubuntu:
```
make && ./0_dummy/0_dummy
```

Yuwei Xiao's avatar
Yuwei Xiao committed
40
41
42
43
### For Windows

Cmake will generate Microsft visual studio project. Click the `*.sln` file to open the project and build.

Yuwei Xiao's avatar
init  
Yuwei Xiao committed
44
45
46
47
48
49
50
51
52
## Exercise Handin

**You only need to handin the directory containing the modified executable**. For example (homework 0), you only need to compress folder *0_dummy* and submit the compressed file. *Please don't include any build file, only the source code and related resource file*.

```
zip NAME_ID_0_dummy.zip 0_dummy/*
```

Rename your compressed file following the rule *`NAME_ID_XXX`*.
Yuwei Xiao's avatar
Yuwei Xiao committed
53
54
55
56
57
58
59
60


## FAQ

* Command `cmake ../` stuck at `Cloning into 'eigen'...` or other cloning.

    This may caused by problem of accessing github. Please first try use [SJTU VPN](!https://net.sjtu.edu.cn/wlfw/VPN.htm) and compile. 

61
    ~~Also, some repos are available on our own server, such as *Eigen*. The download info of libigl dependencies is located at file `libigl/cmake/LibiglDownloadExternal.cmake`. For example, you can change the link at line 70 to `http://dalab.se.sjtu.edu.cn/gitlab/xiaoyuwei/eigen.git` use eigen mirror repo at DALAB server.~~
Yuwei Xiao's avatar
Yuwei Xiao committed
62

63
    ~~glfw (http://dalab.se.sjtu.edu.cn/gitlab/xiaoyuwei/glfw.git) and imgui (http://dalab.se.sjtu.edu.cn/gitlab/xiaoyuwei/imgui.git) are also available on our server.~~
Yuwei Xiao's avatar
Yuwei Xiao committed
64

Hui Wang's avatar
Hui Wang committed
65
66
67
68
69
70
71
* The menu bar isn't rendered correctly in Release mode using VS2019.

    Solution 1: Use Debug mode.

    Solution 2: Remove `ImGuiWindowFlags_AlwaysAutoResize` flag used in `ImGui::Begin()` and comment out `ImGui::SetNextWindowSizeConstraints()` in `include/Gui.cpp`. See [#1669](https://github.com/libigl/libigl/issues/1669) for more details.

    
Yuwei Xiao's avatar
Yuwei Xiao committed
72
73
74

----

Yue Wu's avatar
Yue Wu committed
75
The main part of this framework refers to physical-based simulation course at ETH Zurich.