summaryrefslogtreecommitdiff
path: root/src/glm/gtx/inertia.hpp
blob: 602de823850121e817bb3cfefd3ec9310308a5d2 (plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2006-04-21
// Updated : 2006-11-13
// Licence : This source is under MIT License
// File    : glm/gtx/inertia.hpp
///////////////////////////////////////////////////////////////////////////////////////////////////
// Dependency:
// - GLM core
///////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef glm_gtx_inertia
#define glm_gtx_inertia

// Dependency:
#include "../glm.hpp"

#if(defined(GLM_MESSAGES) && !defined(glm_ext))
#	pragma message("GLM: GLM_GTX_inertia extension included")
#endif

namespace glm{
namespace gtx{
namespace inertia ///< GLM_GTX_inertia extension: Create inertia matrices
{
	/// \addtogroup gtx_inertia
	/// @{

	//! Build an inertia matrix for a box.
	//! From GLM_GTX_inertia extension.
	template <typename T> 
	detail::tmat3x3<T> boxInertia3(
		const T Mass, 
		const detail::tvec3<T>& Scale);
		
	//! Build an inertia matrix for a box.
	//! From GLM_GTX_inertia extension.
	template <typename T> 
	detail::tmat4x4<T> boxInertia4(
		const T Mass, 
		const detail::tvec3<T>& Scale);
		
	//! Build an inertia matrix for a disk.
	//! From GLM_GTX_inertia extension.
	template <typename T> 
	detail::tmat3x3<T> diskInertia3(
		const T Mass, 
		const T Radius);

	//! Build an inertia matrix for a disk.
	//! From GLM_GTX_inertia extension.
	template <typename T> 
	detail::tmat4x4<T> diskInertia4(
		const T Mass, 
		const T Radius);

	//! Build an inertia matrix for a ball.
	//! From GLM_GTX_inertia extension.
	template <typename T> 
	detail::tmat3x3<T> ballInertia3(
		const T Mass, 
		const T Radius);
		
	//! Build an inertia matrix for a ball.
	//! From GLM_GTX_inertia extension.
	template <typename T> 
	detail::tmat4x4<T> ballInertia4(
		const T Mass, 
		const T Radius);

	//! Build an inertia matrix for a sphere.
	//! From GLM_GTX_inertia extension.
	template <typename T> 
	detail::tmat3x3<T> sphereInertia3(
		const T Mass, 
		const T Radius);

	//! Build an inertia matrix for a sphere.
	//! From GLM_GTX_inertia extension.
	template <typename T> 
	detail::tmat4x4<T> sphereInertia4(
		const T Mass, 
		const T Radius);

	/// @}
}// namespace inertia
}// namespace gtx
}// namespace glm

#include "inertia.inl"

namespace glm{using namespace gtx::inertia;}

#endif//glm_gtx_inertia