Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SbMathVecHelper.h
1#ifndef SB_MATH_VEC_HELPER_H
2#define SB_MATH_VEC_HELPER_H
3
4/*=======================================================================
5 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
6 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
7 *** ***
8 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
9 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
10 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
11 *** ***
12 *** RESTRICTED RIGHTS LEGEND ***
13 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
14 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
15 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
16 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
17 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
18 *** ***
19 *** COPYRIGHT (C) 1996-2017 BY FEI S.A.S, ***
20 *** BORDEAUX, FRANCE ***
21 *** ALL RIGHTS RESERVED ***
22**=======================================================================*/
23/*=======================================================================
24** Author : VSG (MMM YYYY)
25**=======================================================================*/
26
27
28#include <Inventor/SbBase.h>
29#include <Inventor/SbVec.h>
30#include <Inventor/SbMathHelper.h>
31
32
34{
35
36 template< class T>
38 {
39 public:
40 typedef float scalarType;
41 };
42
43 template< >
45 {
46 public:
47 typedef float scalarType;
48 };
49
50 template< >
52 {
53 public:
54 typedef double scalarType;
55 };
56
60 template< class T >
62 {
63 return ( SbMathHelper::isCoinc< typename VecTraits<T>::scalarType>( x[0], y[0], tol ) &&
64 SbMathHelper::isCoinc< typename VecTraits<T>::scalarType>( x[1], y[1], tol ) &&
65 SbMathHelper::isCoinc< typename VecTraits<T>::scalarType>( x[2], y[2], tol ) );
66 }
67
68}
69// SB_MATH_VEC_HELPER_H
70#endif
71
72
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D vector class ...
Definition SbVec.h:1214
3D vector class.
Definition SbVec.h:932
static const float OIV_DEF_MATH_HELPER_EPS
Default epsilon value for coincidence and interval checking.
bool isCoinc(const T &x, const T &y, T tol=(T) OIV_DEF_MATH_HELPER_EPS)
Coincidence test using given tolerance.
bool isCoinc(const T &x, const T &y, typename VecTraits< SbVec3f >::scalarType tol=(typename VecTraits< SbVec3f >::scalarType) SbMathHelper::OIV_DEF_MATH_HELPER_EPS)
Coincidence test using given tolerance.