SpinSim.cpp 461 Bytes
Newer Older
Yuwei Xiao's avatar
ex4    
Yuwei Xiao committed
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
#include "SpinSim.h"

bool SpinSim::advance() {
	Eigen::Vector3d w = p_body->getAngularVelocity();
	
	// TODO
	// update orientation
	switch (m_method) {
	case 0: {
		// matrix-based angular velocity
		break;
	}

	case 1: {
		// quaternion-based angular velocity
		break;
	}
	default:
            std::cerr << m_method << " is not a valid rotation method."
                        << std::endl;
	}

	// advance time
	m_time += m_dt;
	m_step++;

	return false;
}