Blender  V3.3
rall2d.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3  * \file
4  * class for automatic differentiation on scalar values and 1st
5  * derivatives and 2nd derivative.
6  *
7  * Erwin Aertbelien, Div. PMA, Dep. of Mech. Eng., K.U.Leuven
8  *
9  * \version
10  * ORO_Geometry V0.2
11  *
12  * \par Note
13  * VC6++ contains a bug, concerning the use of inlined friend functions
14  * in combination with namespaces. So, try to avoid inlined friend
15  * functions !
16  *
17  * \par History
18  * - $log$
19  *
20  * \par Release
21  * $Name: $
22  ****************************************************************************/
23 
24 #ifndef Rall2D_H
25 #define Rall2D_H
26 
27 #include <math.h>
28 #include <assert.h>
29 #include "utility.h"
30 
31 
32 namespace KDL {
33 
51 template <class T,class V=T,class S=T>
52 class Rall2d
53  {
54  public :
55  T t;
56  V d;
57  V dd;
58  public :
59  // = Constructors
61 
62  explicit INLINE Rall2d(typename TI<T>::Arg c)
63  {t=c;SetToZero(d);SetToZero(dd);}
64 
65  INLINE Rall2d(typename TI<T>::Arg tn,const V& afg):t(tn),d(afg) {SetToZero(dd);}
66 
67  INLINE Rall2d(typename TI<T>::Arg tn,const V& afg,const V& afg2):t(tn),d(afg),dd(afg2) {}
68 
69  // = Copy Constructor
70  INLINE Rall2d(const Rall2d<T,V,S>& r):t(r.t),d(r.d),dd(r.dd) {}
71  //if one defines this constructor, it's better optimized then the
72  //automatically generated one ( that one set's up a loop to copy
73  // word by word.
74 
75  // = Member functions to access internal structures :
76  INLINE T& Value() {
77  return t;
78  }
79 
80  INLINE V& D() {
81  return d;
82  }
83 
84  INLINE V& DD() {
85  return dd;
86  }
88  Rall2d<T,V,S> tmp;
89  SetToZero(tmp);
90  return tmp;
91  }
93  Rall2d<T,V,S> tmp;
94  SetToIdentity(tmp);
95  return tmp;
96  }
97 
98  // = assignment operators
100  {t=c;SetToZero(d);SetToZero(dd);return *this;}
101 
103  {t=r.t;d=r.d;dd=r.dd;return *this;}
104 
106  {
107  t /= rhs.t;
108  d = (d-t*rhs.d)/rhs.t;
109  dd= (dd - S(2)*d*rhs.d-t*rhs.dd)/rhs.t;
110  return *this;
111  }
112 
114  {
115  t *= rhs.t;
116  d = (d*rhs.t+t*rhs.d);
117  dd = (dd*rhs.t+S(2)*d*rhs.d+t*rhs.dd);
118  return *this;
119  }
120 
122  {
123  t +=rhs.t;
124  d +=rhs.d;
125  dd+=rhs.dd;
126  return *this;
127  }
128 
130  {
131  t -= rhs.t;
132  d -= rhs.d;
133  dd -= rhs.dd;
134  return *this;
135  }
136 
138  {
139  t /= rhs;
140  d /= rhs;
141  dd /= rhs;
142  return *this;
143  }
144 
146  {
147  t *= rhs;
148  d *= rhs;
149  dd *= rhs;
150  return *this;
151  }
152 
154  {
155  t -= rhs;
156  return *this;
157  }
158 
160  {
161  t += rhs;
162  return *this;
163  }
164 
165  // = Operators between Rall2d objects
166 /*
167  friend INLINE Rall2d<T,V,S> operator /(const Rall2d<T,V,S>& lhs,const Rall2d<T,V,S>& rhs);
168  friend INLINE Rall2d<T,V,S> operator *(const Rall2d<T,V,S>& lhs,const Rall2d<T,V,S>& rhs);
169  friend INLINE Rall2d<T,V,S> operator +(const Rall2d<T,V,S>& lhs,const Rall2d<T,V,S>& rhs);
170  friend INLINE Rall2d<T,V,S> operator -(const Rall2d<T,V,S>& lhs,const Rall2d<T,V,S>& rhs);
171  friend INLINE Rall2d<T,V,S> operator -(const Rall2d<T,V,S>& arg);
172  friend INLINE Rall2d<T,V,S> operator *(S s,const Rall2d<T,V,S>& v);
173  friend INLINE Rall2d<T,V,S> operator *(const Rall2d<T,V,S>& v,S s);
174  friend INLINE Rall2d<T,V,S> operator +(S s,const Rall2d<T,V,S>& v);
175  friend INLINE Rall2d<T,V,S> operator +(const Rall2d<T,V,S>& v,S s);
176  friend INLINE Rall2d<T,V,S> operator -(S s,const Rall2d<T,V,S>& v);
177  friend INLINE INLINE Rall2d<T,V,S> operator -(const Rall2d<T,V,S>& v,S s);
178  friend INLINE Rall2d<T,V,S> operator /(S s,const Rall2d<T,V,S>& v);
179  friend INLINE Rall2d<T,V,S> operator /(const Rall2d<T,V,S>& v,S s);
180 
181  // = Mathematical functions that operate on Rall2d objects
182 
183  friend INLINE Rall2d<T,V,S> exp(const Rall2d<T,V,S>& arg);
184  friend INLINE Rall2d<T,V,S> log(const Rall2d<T,V,S>& arg);
185  friend INLINE Rall2d<T,V,S> sin(const Rall2d<T,V,S>& arg);
186  friend INLINE Rall2d<T,V,S> cos(const Rall2d<T,V,S>& arg);
187  friend INLINE Rall2d<T,V,S> tan(const Rall2d<T,V,S>& arg);
188  friend INLINE Rall2d<T,V,S> sinh(const Rall2d<T,V,S>& arg);
189  friend INLINE Rall2d<T,V,S> cosh(const Rall2d<T,V,S>& arg);
190  friend INLINE Rall2d<T,V,S> tanh(const Rall2d<T,V,S>& arg);
191  friend INLINE Rall2d<T,V,S> sqr(const Rall2d<T,V,S>& arg);
192  friend INLINE Rall2d<T,V,S> pow(const Rall2d<T,V,S>& arg,double m) ;
193  friend INLINE Rall2d<T,V,S> sqrt(const Rall2d<T,V,S>& arg);
194  friend INLINE Rall2d<T,V,S> asin(const Rall2d<T,V,S>& arg);
195  friend INLINE Rall2d<T,V,S> acos(const Rall2d<T,V,S>& arg);
196  friend INLINE Rall2d<T,V,S> atan(const Rall2d<T,V,S>& x);
197  friend INLINE Rall2d<T,V,S> atan2(const Rall2d<T,V,S>& y,const Rall2d<T,V,S>& x);
198  friend INLINE Rall2d<T,V,S> abs(const Rall2d<T,V,S>& x);
199  friend INLINE Rall2d<T,V,S> hypot(const Rall2d<T,V,S>& y,const Rall2d<T,V,S>& x);
200  // returns sqrt(y*y+x*x), but is optimized for accuracy and speed.
201  friend INLINE S Norm(const Rall2d<T,V,S>& value) ;
202  // returns Norm( value.Value() ).
203 
204  // = Some utility functions to improve performance
205  // (should also be declared on primitive types to improve uniformity
206  friend INLINE Rall2d<T,V,S> LinComb(S alfa,const Rall2d<T,V,S>& a,
207  TI<T>::Arg beta,const Rall2d<T,V,S>& b );
208  friend INLINE void LinCombR(S alfa,const Rall2d<T,V,S>& a,
209  TI<T>::Arg beta,const Rall2d<T,V,S>& b,Rall2d<T,V,S>& result );
210  // = Setting value of a Rall2d object to 0 or 1
211  friend INLINE void SetToZero(Rall2d<T,V,S>& value);
212  friend INLINE void SetToOne(Rall2d<T,V,S>& value);
213  // = Equality in an eps-interval
214  friend INLINE bool Equal(const Rall2d<T,V,S>& y,const Rall2d<T,V,S>& x,double eps);
215  */
216  };
217 
218 
219 
220 
221 
222 // = Operators between Rall2d objects
223 template <class T,class V,class S>
225  {
226  Rall2d<T,V,S> tmp;
227  tmp.t = lhs.t/rhs.t;
228  tmp.d = (lhs.d-tmp.t*rhs.d)/rhs.t;
229  tmp.dd= (lhs.dd-S(2)*tmp.d*rhs.d-tmp.t*rhs.dd)/rhs.t;
230  return tmp;
231  }
232 
233 template <class T,class V,class S>
235  {
236  Rall2d<T,V,S> tmp;
237  tmp.t = lhs.t*rhs.t;
238  tmp.d = (lhs.d*rhs.t+lhs.t*rhs.d);
239  tmp.dd = (lhs.dd*rhs.t+S(2)*lhs.d*rhs.d+lhs.t*rhs.dd);
240  return tmp;
241  }
242 
243 template <class T,class V,class S>
245  {
246  return Rall2d<T,V,S>(lhs.t+rhs.t,lhs.d+rhs.d,lhs.dd+rhs.dd);
247  }
248 
249 template <class T,class V,class S>
251  {
252  return Rall2d<T,V,S>(lhs.t-rhs.t,lhs.d-rhs.d,lhs.dd-rhs.dd);
253  }
254 
255 template <class T,class V,class S>
257  {
258  return Rall2d<T,V,S>(-arg.t,-arg.d,-arg.dd);
259  }
260 
261 template <class T,class V,class S>
263  {
264  return Rall2d<T,V,S>(s*v.t,s*v.d,s*v.dd);
265  }
266 
267 template <class T,class V,class S>
269  {
270  return Rall2d<T,V,S>(v.t*s,v.d*s,v.dd*s);
271  }
272 
273 template <class T,class V,class S>
275  {
276  return Rall2d<T,V,S>(s+v.t,v.d,v.dd);
277  }
278 
279 template <class T,class V,class S>
281  {
282  return Rall2d<T,V,S>(v.t+s,v.d,v.dd);
283  }
284 
285 template <class T,class V,class S>
287  {
288  return Rall2d<T,V,S>(s-v.t,-v.d,-v.dd);
289  }
290 
291 template <class T,class V,class S>
293  {
294  return Rall2d<T,V,S>(v.t-s,v.d,v.dd);
295  }
296 
297 template <class T,class V,class S>
299  {
300  Rall2d<T,V,S> tmp;
301  tmp.t = s/rhs.t;
302  tmp.d = (-tmp.t*rhs.d)/rhs.t;
303  tmp.dd= (-S(2)*tmp.d*rhs.d-tmp.t*rhs.dd)/rhs.t;
304  return tmp;
305 }
306 
307 
308 template <class T,class V,class S>
310  {
311  return Rall2d<T,V,S>(v.t/s,v.d/s,v.dd/s);
312  }
313 
314 
315 template <class T,class V,class S>
317  {
318  Rall2d<T,V,S> tmp;
319  tmp.t = exp(arg.t);
320  tmp.d = tmp.t*arg.d;
321  tmp.dd = tmp.d*arg.d+tmp.t*arg.dd;
322  return tmp;
323  }
324 
325 template <class T,class V,class S>
327  {
328  Rall2d<T,V,S> tmp;
329  tmp.t = log(arg.t);
330  tmp.d = arg.d/arg.t;
331  tmp.dd = (arg.dd-tmp.d*arg.d)/arg.t;
332  return tmp;
333  }
334 
335 template <class T,class V,class S>
337  {
338  T v1 = sin(arg.t);
339  T v2 = cos(arg.t);
340  return Rall2d<T,V,S>(v1,v2*arg.d,v2*arg.dd - (v1*arg.d)*arg.d );
341  }
342 
343 template <class T,class V,class S>
345  {
346  T v1 = cos(arg.t);
347  T v2 = -sin(arg.t);
348  return Rall2d<T,V,S>(v1,v2*arg.d, v2*arg.dd - (v1*arg.d)*arg.d);
349  }
350 
351 template <class T,class V,class S>
353  {
354  T v1 = tan(arg.t);
355  T v2 = S(1)+sqr(v1);
356  return Rall2d<T,V,S>(v1,v2*arg.d, v2*(arg.dd+(S(2)*v1*sqr(arg.d))));
357  }
358 
359 template <class T,class V,class S>
361  {
362  T v1 = sinh(arg.t);
363  T v2 = cosh(arg.t);
364  return Rall2d<T,V,S>(v1,v2*arg.d,v2*arg.dd + (v1*arg.d)*arg.d );
365  }
366 
367 template <class T,class V,class S>
369  {
370  T v1 = cosh(arg.t);
371  T v2 = sinh(arg.t);
372  return Rall2d<T,V,S>(v1,v2*arg.d,v2*arg.dd + (v1*arg.d)*arg.d );
373  }
374 
375 template <class T,class V,class S>
377  {
378  T v1 = tanh(arg.t);
379  T v2 = S(1)-sqr(v1);
380  return Rall2d<T,V,S>(v1,v2*arg.d, v2*(arg.dd-(S(2)*v1*sqr(arg.d))));
381  }
382 
383 template <class T,class V,class S>
385  {
386  return Rall2d<T,V,S>(arg.t*arg.t,
387  (S(2)*arg.t)*arg.d,
388  S(2)*(sqr(arg.d)+arg.t*arg.dd)
389  );
390  }
391 
392 template <class T,class V,class S>
393 INLINE Rall2d<T,V,S> pow(const Rall2d<T,V,S>& arg,double m)
394  {
395  Rall2d<T,V,S> tmp;
396  tmp.t = pow(arg.t,m);
397  T v2 = (m/arg.t)*tmp.t;
398  tmp.d = v2*arg.d;
399  tmp.dd = (S((m-1))/arg.t)*tmp.d*arg.d + v2*arg.dd;
400  return tmp;
401  }
402 
403 template <class T,class V,class S>
405  {
406  /* By inversion of sqr(x) :*/
407  Rall2d<T,V,S> tmp;
408  tmp.t = sqrt(arg.t);
409  tmp.d = (S(0.5)/tmp.t)*arg.d;
410  tmp.dd = (S(0.5)*arg.dd-sqr(tmp.d))/tmp.t;
411  return tmp;
412  }
413 
414 template <class T,class V,class S>
416 {
417  /* By inversion of sin(x) */
418  Rall2d<T,V,S> tmp;
419  tmp.t = asin(arg.t);
420  T v = cos(tmp.t);
421  tmp.d = arg.d/v;
422  tmp.dd = (arg.dd+arg.t*sqr(tmp.d))/v;
423  return tmp;
424 }
425 
426 template <class T,class V,class S>
428 {
429  /* By inversion of cos(x) */
430  Rall2d<T,V,S> tmp;
431  tmp.t = acos(arg.t);
432  T v = -sin(tmp.t);
433  tmp.d = arg.d/v;
434  tmp.dd = (arg.dd+arg.t*sqr(tmp.d))/v;
435  return tmp;
436 
437 }
438 
439 template <class T,class V,class S>
441 {
442  /* By inversion of tan(x) */
443  Rall2d<T,V,S> tmp;
444  tmp.t = atan(x.t);
445  T v = S(1)+sqr(x.t);
446  tmp.d = x.d/v;
447  tmp.dd = x.dd/v-(S(2)*x.t)*sqr(tmp.d);
448  return tmp;
449 }
450 
451 template <class T,class V,class S>
453 {
454  Rall2d<T,V,S> tmp;
455  tmp.t = atan2(y.t,x.t);
456  T v = sqr(y.t)+sqr(x.t);
457  tmp.d = (x.t*y.d-x.d*y.t)/v;
458  tmp.dd = ( x.t*y.dd-x.dd*y.t-S(2)*(x.t*x.d+y.t*y.d)*tmp.d ) / v;
459  return tmp;
460 }
461 
462 template <class T,class V,class S>
464 {
465  T v(Sign(x));
466  return Rall2d<T,V,S>(v*x,v*x.d,v*x.dd);
467 }
468 
469 template <class T,class V,class S>
471 {
472  Rall2d<T,V,S> tmp;
473  tmp.t = hypot(y.t,x.t);
474  tmp.d = (x.t*x.d+y.t*y.d)/tmp.t;
475  tmp.dd = (sqr(x.d)+x.t*x.dd+sqr(y.d)+y.t*y.dd-sqr(tmp.d))/tmp.t;
476  return tmp;
477 }
478 // returns sqrt(y*y+x*x), but is optimized for accuracy and speed.
479 
480 template <class T,class V,class S>
481 INLINE S Norm(const Rall2d<T,V,S>& value)
482 {
483  return Norm(value.t);
484 }
485 // returns Norm( value.Value() ).
486 
487 
488 // (should also be declared on primitive types to improve uniformity
489 template <class T,class V,class S>
491  const T& beta,const Rall2d<T,V,S>& b ) {
492  return Rall2d<T,V,S>(
493  LinComb(alfa,a.t,beta,b.t),
494  LinComb(alfa,a.d,beta,b.d),
495  LinComb(alfa,a.dd,beta,b.dd)
496  );
497 }
498 
499 template <class T,class V,class S>
500 INLINE void LinCombR(S alfa,const Rall2d<T,V,S>& a,
501  const T& beta,const Rall2d<T,V,S>& b,Rall2d<T,V,S>& result ) {
502  LinCombR(alfa, a.t, beta, b.t, result.t);
503  LinCombR(alfa, a.d, beta, b.d, result.d);
504  LinCombR(alfa, a.dd, beta, b.dd, result.dd);
505 }
506 
507 template <class T,class V,class S>
509  {
510  SetToZero(value.t);
511  SetToZero(value.d);
512  SetToZero(value.dd);
513  }
514 
515 template <class T,class V,class S>
517  {
518  SetToZero(value.d);
519  SetToIdentity(value.t);
520  SetToZero(value.dd);
521  }
522 
523 template <class T,class V,class S>
524 INLINE bool Equal(const Rall2d<T,V,S>& y,const Rall2d<T,V,S>& x,double eps=epsilon)
525 {
526  return (Equal(x.t,y.t,eps)&&
527  Equal(x.d,y.d,eps)&&
528  Equal(x.dd,y.dd,eps)
529  );
530 }
531 
532 
533 }
534 
535 
536 #endif
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
static T Sign(const T &x)
INLINE V & DD()
Definition: rall2d.h:84
INLINE Rall2d< T, V, S > & operator=(S c)
Definition: rall2d.h:99
INLINE Rall2d()
Definition: rall2d.h:60
V d
1st derivative
Definition: rall2d.h:56
INLINE Rall2d(const Rall2d< T, V, S > &r)
Definition: rall2d.h:70
INLINE Rall2d(typename TI< T >::Arg tn, const V &afg)
Definition: rall2d.h:65
INLINE Rall2d(typename TI< T >::Arg c)
Definition: rall2d.h:62
INLINE Rall2d< T, V, S > & operator+=(const Rall2d< T, V, S > &rhs)
Definition: rall2d.h:121
INLINE Rall2d(typename TI< T >::Arg tn, const V &afg, const V &afg2)
Definition: rall2d.h:67
INLINE Rall2d< T, V, S > & operator*=(const Rall2d< T, V, S > &rhs)
Definition: rall2d.h:113
INLINE V & D()
Definition: rall2d.h:80
static INLINE Rall2d< T, V, S > Identity()
Definition: rall2d.h:92
INLINE T & Value()
Definition: rall2d.h:76
static INLINE Rall2d< T, V, S > Zero()
Definition: rall2d.h:87
V dd
2nd derivative
Definition: rall2d.h:57
INLINE Rall2d< T, V, S > & operator-=(const Rall2d< T, V, S > &rhs)
Definition: rall2d.h:129
T t
value
Definition: rall2d.h:55
INLINE Rall2d< T, V, S > & operator/=(const Rall2d< T, V, S > &rhs)
Definition: rall2d.h:105
const T & Arg
Arg is used for passing the element to a function.
Definition: utility.h:148
#define T
static unsigned c
Definition: RandGen.cpp:83
static unsigned a[3]
Definition: RandGen.cpp:78
Definition: chain.cpp:27
INLINE S Norm(const Rall1d< T, V, S > &value)
Definition: rall1d.h:416
INLINE Rall1d< T, V, S > sinh(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:335
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:319
INLINE Rall1d< T, V, S > cosh(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:343
INLINE void SetToIdentity(Rall1d< T, V, S > &value)
Definition: rall1d.h:460
INLINE Rall1d< T, V, S > pow(const Rall1d< T, V, S > &arg, double m)
Definition: rall1d.h:359
INLINE Rall1d< T, V, S > log(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:303
INLINE Rall1d< T, V, S > tanh(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:422
INLINE Rall1d< T, V, S > operator-(const Rall1d< T, V, S > &lhs, const Rall1d< T, V, S > &rhs)
Definition: rall1d.h:234
INLINE Rall1d< T, V, S > asin(const Rall1d< T, V, S > &x)
Definition: rall1d.h:391
void SetToZero(Jacobian &jac)
Definition: jacobian.cpp:81
INLINE Rall1d< T, V, S > sqrt(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:367
Rotation operator*(const Rotation &lhs, const Rotation &rhs)
Definition: frames.cpp:177
INLINE void LinCombR(S alfa, const Rall1d< T, V, S > &a, const T &beta, const Rall1d< T, V, S > &b, Rall1d< T, V, S > &result)
Definition: rall1d.h:446
INLINE Rall1d< T, V, S > atan(const Rall1d< T, V, S > &x)
Definition: rall1d.h:375
INLINE Rall1d< T, V, S > acos(const Rall1d< T, V, S > &x)
Definition: rall1d.h:399
INLINE Rall1d< T, V, S > operator+(const Rall1d< T, V, S > &lhs, const Rall1d< T, V, S > &rhs)
Definition: rall1d.h:227
INLINE Rall1d< T, V, S > operator/(const Rall1d< T, V, S > &lhs, const Rall1d< T, V, S > &rhs)
Definition: rall1d.h:215
double epsilon
default precision while comparing with Equal(..,..) functions. Initialized at 0.0000001.
Definition: utility.cpp:22
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:311
INLINE Rall1d< T, V, S > tan(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:327
IMETHOD bool Equal(const VectorAcc &, const VectorAcc &, double=epsilon)
INLINE Rall1d< T, V, S > LinComb(S alfa, const Rall1d< T, V, S > &a, const T &beta, const Rall1d< T, V, S > &b)
Definition: rall1d.h:437
INLINE Rall1d< T, V, S > atan2(const Rall1d< T, V, S > &y, const Rall1d< T, V, S > &x)
Definition: rall1d.h:429
INLINE Rall1d< T, V, S > exp(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:295
INLINE Rall1d< T, V, S > hypot(const Rall1d< T, V, S > &y, const Rall1d< T, V, S > &x)
Definition: rall1d.h:383
INLINE Rall1d< T, V, S > sqr(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:351
INLINE Rall1d< T, V, S > abs(const Rall1d< T, V, S > &x)
Definition: rall1d.h:407
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
const btScalar eps
Definition: poly34.cpp:11
ccl_device_inline float beta(float x, float y)
Definition: util/math.h:775
#define INLINE
Definition: utility.h:226
CCL_NAMESPACE_BEGIN struct Window V