TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
G3D::units Namespace Reference

Functions

float nanometers ()
 
float micrometers ()
 
float millimeters ()
 
float centimeters ()
 
float meters ()
 
float kilometers ()
 
float inches ()
 
float feet ()
 
float yards ()
 
float miles ()
 
float radians ()
 
float degrees ()
 
float nanoseconds ()
 
float milliseconds ()
 
float seconds ()
 
float minutes ()
 
float hours ()
 
float days ()
 
float years ()
 
float kilograms ()
 
float newtons ()
 
float watts ()
 
float joules ()
 
float steradians ()
 

Detailed Description

Use using namespace G3D::units; to include all units into your program. The units system is specifically designed not to be general but to support commonly used units efficiently and clearly. See http://en.wikipedia.org/wiki/SI_prefix for interesting facts about SI/metric units and full definitions.

Function Documentation

float G3D::units::centimeters ( )
inline

0.01 m

38  {
39  return 0.01f;
40 }
float G3D::units::days ( )
inline

86400 s

112  {
113  return 86400.0f;
114 }

+ Here is the caller graph for this function:

float G3D::units::degrees ( )
inline

pi/180

80  {
81  return 0.0174532925f;
82 }
float G3D::units::feet ( )
inline

0.3048 m

58  {
59  return 0.3048f;
60 }
float G3D::units::hours ( )
inline

3600 s

107  {
108  return 3600.0f;
109 }

+ Here is the caller graph for this function:

float G3D::units::inches ( )
inline

0.0254 m

53  {
54  return 0.0254f;
55 }
float G3D::units::joules ( )
inline

SI unit of energy: J = N*m

143  {
144  return 1.0;
145 }
float G3D::units::kilograms ( )
inline

SI unit of mass

124  {
125  return 1.0f;
126 }
float G3D::units::kilometers ( )
inline

1000 m

48  {
49  return 1000.0f;
50 }
float G3D::units::meters ( )
inline

SI base unit of distance measure.

43  {
44  return 1.0f;
45 }
float G3D::units::micrometers ( )
inline

1e-6 m

28  {
29  return 1e-6f;
30 }
float G3D::units::miles ( )
inline

1609.344 m

68  {
69  return 1609.344f;
70 }
float G3D::units::millimeters ( )
inline

0.001 m

33  {
34  return 0.001f;
35 }
float G3D::units::milliseconds ( )
inline

1e-3 s

92  {
93  return 1e-3f;
94 }

+ Here is the caller graph for this function:

float G3D::units::minutes ( )
inline

60 s

102  {
103  return 60.0f;
104 }

+ Here is the caller graph for this function:

float G3D::units::nanometers ( )
inline

1e-9 m

23  {
24  return 1e-9f;
25 }
float G3D::units::nanoseconds ( )
inline

1e-9 s

87  {
88  return 1e-9f;
89 }
float G3D::units::newtons ( )
inline

1 kg m / s^2

131  {
132  return 1.0f;
133 }
float G3D::units::radians ( )
inline

SI base unit of angular measure.

75  {
76  return 1.0f;
77 }
float G3D::units::seconds ( )
inline

Base unit of time

97  {
98  return 1.0;
99 }

+ Here is the caller graph for this function:

float G3D::units::steradians ( )
inline

Unit of solid angle measure. A sphere subtends 4 * pi sr.

148  {
149  return 1.0;
150 }
float G3D::units::watts ( )
inline

SI unit of power: W = J/s

138  {
139  return 1.0;
140 }
float G3D::units::yards ( )
inline

0.9144 m

63  {
64  return 0.9144f;
65 }
float G3D::units::years ( )
inline

31556926 s

117  {
118  return 31556926.0f;
119 }