Simple Vector Library 1.5 http://www.cs.cmu.edu/~ajw/doc/svl.html
Transform.h@1:e25ff4b06ed2, 2016-01-05 (annotated)
- Committer:
- BartJanssens
- Date:
- Tue Jan 05 13:37:50 2016 +0000
- Revision:
- 1:e25ff4b06ed2
- Parent:
- 0:785cff1e5a7c
fixed va_list bug
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
BartJanssens | 0:785cff1e5a7c | 1 | /* |
BartJanssens | 0:785cff1e5a7c | 2 | File: Transform.h |
BartJanssens | 0:785cff1e5a7c | 3 | |
BartJanssens | 0:785cff1e5a7c | 4 | Function: Provides transformation constructors. |
BartJanssens | 0:785cff1e5a7c | 5 | |
BartJanssens | 0:785cff1e5a7c | 6 | Author(s): Andrew Willmott |
BartJanssens | 0:785cff1e5a7c | 7 | |
BartJanssens | 0:785cff1e5a7c | 8 | Copyright: (c) 1995-2001, Andrew Willmott |
BartJanssens | 0:785cff1e5a7c | 9 | */ |
BartJanssens | 0:785cff1e5a7c | 10 | |
BartJanssens | 0:785cff1e5a7c | 11 | #ifndef __SVL_TRANSFORM__ |
BartJanssens | 0:785cff1e5a7c | 12 | #define __SVL_TRANSFORM__ |
BartJanssens | 0:785cff1e5a7c | 13 | |
BartJanssens | 0:785cff1e5a7c | 14 | inline Mat2 Rot2(Real theta) |
BartJanssens | 0:785cff1e5a7c | 15 | { Mat2 result; result.MakeRot(theta); return(result); } |
BartJanssens | 0:785cff1e5a7c | 16 | inline Mat2 Scale2(const Vec2 &s) |
BartJanssens | 0:785cff1e5a7c | 17 | { Mat2 result; result.MakeScale(s); return(result); } |
BartJanssens | 0:785cff1e5a7c | 18 | |
BartJanssens | 0:785cff1e5a7c | 19 | inline Mat3 Rot3(const Vec3 &axis, Real theta) |
BartJanssens | 0:785cff1e5a7c | 20 | { Mat3 result; result.MakeRot(axis, theta); return(result); } |
BartJanssens | 0:785cff1e5a7c | 21 | inline Mat3 Rot3(const Vec4 &q) |
BartJanssens | 0:785cff1e5a7c | 22 | { Mat3 result; result.MakeRot(q); return(result); } |
BartJanssens | 0:785cff1e5a7c | 23 | inline Mat3 Scale3(const Vec3 &s) |
BartJanssens | 0:785cff1e5a7c | 24 | { Mat3 result; result.MakeScale(s); return(result); } |
BartJanssens | 0:785cff1e5a7c | 25 | inline Mat3 HRot3(Real theta) |
BartJanssens | 0:785cff1e5a7c | 26 | { Mat3 result; result.MakeHRot(theta); return(result); } |
BartJanssens | 0:785cff1e5a7c | 27 | inline Mat3 HScale3(const Vec2 &s) |
BartJanssens | 0:785cff1e5a7c | 28 | { Mat3 result; result.MakeHScale(s); return(result); } |
BartJanssens | 0:785cff1e5a7c | 29 | inline Mat3 HTrans3(const Vec2 &t) |
BartJanssens | 0:785cff1e5a7c | 30 | { Mat3 result; result.MakeHTrans(t); return(result); } |
BartJanssens | 0:785cff1e5a7c | 31 | |
BartJanssens | 0:785cff1e5a7c | 32 | inline Mat4 HRot4(const Vec3 &axis, Real theta) |
BartJanssens | 0:785cff1e5a7c | 33 | { Mat4 result; result.MakeHRot(axis, theta); return(result); } |
BartJanssens | 0:785cff1e5a7c | 34 | inline Mat4 HRot4(const Vec4 &q) |
BartJanssens | 0:785cff1e5a7c | 35 | { Mat4 result; result.MakeHRot(q); return(result); } |
BartJanssens | 0:785cff1e5a7c | 36 | inline Mat4 HScale4(const Vec3 &s) |
BartJanssens | 0:785cff1e5a7c | 37 | { Mat4 result; result.MakeHScale(s); return(result); } |
BartJanssens | 0:785cff1e5a7c | 38 | inline Mat4 HTrans4(const Vec3 &t) |
BartJanssens | 0:785cff1e5a7c | 39 | { Mat4 result; result.MakeHTrans(t); return(result); } |
BartJanssens | 0:785cff1e5a7c | 40 | |
BartJanssens | 0:785cff1e5a7c | 41 | #endif |