MCPcopy Create free account
hub / github.com/cinder/Cinder / TestMatrix44

Function TestMatrix44

test/mathTest/src/TestMatrix44.h:3–2199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#pragma once
2
3template <typename T> void TestMatrix44( std::ostream& os )
4{
5 typedef Matrix44<T> MatT;
6
7 // Matrix44();
8 {
9 bool result = false;
10
11 MatT c0( 1, 0, 0, 0,
12 0, 1, 0, 0,
13 0, 0, 1, 0,
14 0, 0, 0, 1 );
15 MatT m0;
16
17 result = ( c0 == m0 );
18
19 os << (result ? "passed" : "FAILED") << " : " << "Matrix44();" << "\n";
20 }
21
22
23 // Matrix44( T s );
24 {
25 bool result = false;
26
27 MatT c0( 3, 3, 3, 3,
28 3, 3, 3, 3,
29 3, 3, 3, 3,
30 3, 3, 3, 3 );
31
32 MatT m0( 3 );
33
34 result = ( c0 == m0 );
35
36 os << (result ? "passed" : "FAILED") << " : " << "Matrix44( T s );" << "\n";
37 }
38
39
40 // Matrix44( const T *dt );
41 {
42 bool result = false;
43
44 MatT c0( 1, 2, 3, 4,
45 5, 6, 7, 8,
46 9, 10, 11, 12,
47 13, 14, 15, 16 );
48
49 T data[16] =
50 {
51 (T) 1, (T) 2, (T) 3, (T) 4,
52 (T) 5, (T) 6, (T) 7, (T) 8,
53 (T) 9, (T)10, (T)11, (T)12,
54 (T)13, (T)14, (T)15, (T)16
55 };
56
57 MatT m0( data );
58
59 result = ( c0 == m0 );
60

Callers

nothing calls this directly

Calls 12

toRadiansFunction · 0.85
alignZAxisWithTargetFunction · 0.85
getSecondsMethod · 0.80
atMethod · 0.80
invertMethod · 0.80
transformPointMethod · 0.80
rotateMethod · 0.80
zeroFunction · 0.50
startMethod · 0.45
stopMethod · 0.45
translateMethod · 0.45
scaleMethod · 0.45

Tested by

no test coverage detected