-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColor3.h
More file actions
75 lines (65 loc) · 1.8 KB
/
Color3.h
File metadata and controls
75 lines (65 loc) · 1.8 KB
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
#ifndef COLOR3_H
#define COLOR3_H
#include "VmUtil.h"
#include "Tuple3.h"
VM_BEGIN_NS
/**
* A 3 element color represented by x,y,z
* coordinates.
* @version specification 1.1, implementation $Revision: 1.3 $, $Date: 1999/10/06 02:52:46 $
* @author Kenji hiranabe
*/
template<class T>
class Color3 : public Tuple3<T> {
/*
* $Log: Color3.h,v $
* Revision 1.3 1999/10/06 02:52:46 hiranabe
* Java3D 1.2 and namespace
*
* Revision 1.2 1999/05/26 00:59:37 hiranabe
* support Visual C++
*
* Revision 1.1 1999/03/04 11:07:09 hiranabe
* Initial revision
*
* Revision 1.1 1999/03/04 11:07:09 hiranabe
* Initial revision
*
*/
public:
/**
* Constructs and initializes a Color3 from the specified xyz
* @param x the x coordinate
* @param y the y coordinate
* @param z the z coordinate
*/
Color3(T x, T y, T z): Tuple3<T>(x, y, z) { }
/**
* Constructs and initializes a Color3 from input array of length 3.
* @param c the array of length 3 containing xyz in order
*/
Color3(const T c[]): Tuple3<T>(c) { }
/**
* Constructs and initializes a Color3 from the specified Tuple3d.
* @param t1 the Tuple3d containing the initialization x y z data
*/
Color3(const Tuple3<T>& t1): Tuple3<T>(t1) { }
#if 0
/**
* Constructs and initializes a Color3 from the specified Tuple3f.
* @param t1 the Tuple3f containing the initialization x y z data
*/
Color3(Tuple3f t1) {
super(t1);
}
#endif
/**
* Constructs and initializes a Color3 to (0,0,0).
*/
Color3(): Tuple3<T>() { }
};
typedef Color3<float> Color3f;
typedef Color3<double> Color3d;
typedef Color3<unsigned char> Color3b;
VM_END_NS
#endif /* COLOR3_H */