-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTexCoord2.h
More file actions
73 lines (62 loc) · 2.08 KB
/
TexCoord2.h
File metadata and controls
73 lines (62 loc) · 2.08 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
/*
Copyright (C) 1997,1998,1999
Kenji Hiranabe, Eiwa System Management, Inc.
This program is free software.
Implemented by Kenji Hiranabe(hiranabe@esm.co.jp),
conforming to the Java(TM) 3D API specification by Sun Microsystems.
Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear
in supporting documentation. Kenji Hiranabe and Eiwa System Management,Inc.
makes no representations about the suitability of this software for any
purpose. It is provided "AS IS" with NO WARRANTY.
*/
#ifndef TEXCOORD2_H
#define TEXCOORD2_H
#include "VmUtil.h"
#include "Tuple2.h"
VM_BEGIN_NS
/**
* A 2 element texture coordinate that is represented by x,y coordinates.
* @version specification 1.1, implementation $Revision: 1.3 $, $Date: 1999/10/06 02:52:46 $
* @author Kenji hiranabe
*/
template<class T>
class TexCoord2 : public Tuple2<T> {
/*
* $Log: TexCoord2.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 TexCoord2 from the specified xy coordinates.
* @param x the x coordinate
* @param y the y coordinate
*/
TexCoord2(T x, T y): Tuple2<T>(x, y) { }
/**
* Constructs and initializes a TexCoord2 from the specified array.
* @param p the array of length 2 containing xy in order
*/
TexCoord2(const T v[]): Tuple2<T>(v) { }
/**
* Constructs and initializes a TexCoord2 to (0,0).
*/
TexCoord2(): Tuple2<T>() { }
};
typedef TexCoord2<float> TexCoord2f;
typedef TexCoord2<double> TexCoord2d;
VM_END_NS
#endif /* TEXCOORD2_H */