00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef _OSGVOLUMEINTERSECTFUNCTIONS_H_
00040 #define _OSGVOLUMEINTERSECTFUNCTIONS_H_
00041 #ifdef __sgi
00042 #pragma once
00043 #endif
00044
00045 #include <math.h>
00046
00047 #include <OSGConfig.h>
00048 #include <OSGBase.h>
00049 #include <OSGBaseTypes.h>
00050
00051 OSG_BEGIN_NAMESPACE
00052
00053 class Volume;
00054 class BoxVolume;
00055 class CylinderVolume;
00056 class SphereVolume;
00057 class FrustumVolume;
00058
00059
00060
00061
00062
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00086 OSG_BASE_DLLMAPPING
00087 bool intersect(const Volume &vol1, const Volume &vol2);
00088
00089
00090
00091
00096 OSG_BASE_DLLMAPPING
00097 bool intersect(const BoxVolume &vol1, const BoxVolume &vol2);
00098
00103 OSG_BASE_DLLMAPPING
00104 bool intersect(const BoxVolume &vol1, const SphereVolume &vol2);
00105
00110 OSG_BASE_DLLMAPPING
00111 bool intersect(const BoxVolume &vol1, const CylinderVolume &vol2);
00112
00117 OSG_BASE_DLLMAPPING
00118 bool intersect(const BoxVolume &vol1, const FrustumVolume &vol2);
00119
00123 OSG_BASE_DLLMAPPING
00124 bool intersect(const BoxVolume &vol1, const Volume &vol2);
00125
00126
00127
00128
00133 inline
00134 bool intersect(const SphereVolume &vol1, const BoxVolume &vol2);
00135
00140 OSG_BASE_DLLMAPPING
00141 bool intersect(const SphereVolume &vol1, const SphereVolume &vol2);
00142
00147 OSG_BASE_DLLMAPPING
00148 bool intersect(const SphereVolume &vol1, const CylinderVolume &vol2);
00149
00154 OSG_BASE_DLLMAPPING
00155 bool intersect(const SphereVolume &vol1, const FrustumVolume &vol2);
00156
00161 OSG_BASE_DLLMAPPING
00162 bool intersect(const SphereVolume &vol1, const Volume &vol2);
00163
00164
00165
00166
00171 inline
00172 bool intersect(const CylinderVolume &vol1, const BoxVolume &vol2);
00173
00178 inline
00179 bool intersect(const CylinderVolume &vol1, const SphereVolume &vol2);
00180
00185 OSG_BASE_DLLMAPPING
00186 bool intersect(const CylinderVolume &vol1, const CylinderVolume &vol2);
00187
00192 OSG_BASE_DLLMAPPING
00193 bool intersect(const CylinderVolume &vol1, const FrustumVolume &vol2);
00194
00199 OSG_BASE_DLLMAPPING
00200 bool intersect(const CylinderVolume &vol1, const Volume &vol2);
00201
00202
00203
00204
00209 inline
00210 bool intersect(const FrustumVolume &vol1, const BoxVolume &vol2);
00211
00216 inline
00217 bool intersect(const FrustumVolume &vol1, const SphereVolume &vol2);
00218
00223 inline
00224 bool intersect(const FrustumVolume &vol1, const CylinderVolume &vol2);
00225
00230 OSG_BASE_DLLMAPPING
00231 bool intersect(const FrustumVolume &vol1, const FrustumVolume &vol2);
00232
00237 OSG_BASE_DLLMAPPING
00238 bool intersect(const FrustumVolume &vol1, const Volume &vol2);
00239
00240
00241
00242
00247 inline
00248 bool intersect(const Volume &srcVol, const BoxVolume &vol);
00249
00254 inline
00255 bool intersect(const Volume &srcVol, const SphereVolume &vol);
00256
00261 inline
00262 bool intersect(const Volume &srcVol, const CylinderVolume &vol);
00263
00268 inline
00269 bool intersect(const Volume &srcVol, const FrustumVolume &vol);
00270
00271
00272
00273
00274
00278 OSG_BASE_DLLMAPPING
00279 void extend(Volume &srcVol, const Volume &vol);
00280
00281
00282
00283
00288 OSG_BASE_DLLMAPPING
00289 void extend(BoxVolume &srcVol, const BoxVolume &vol);
00290
00295 OSG_BASE_DLLMAPPING
00296 void extend(BoxVolume &srcVol, const SphereVolume &vol);
00297
00302 OSG_BASE_DLLMAPPING
00303 void extend(BoxVolume &srcVol, const CylinderVolume &vol);
00304
00309 OSG_BASE_DLLMAPPING
00310 void extend(BoxVolume &srcVol, const FrustumVolume &vol);
00311
00316 OSG_BASE_DLLMAPPING
00317 void extend(BoxVolume &srcVol, const Volume &vol);
00318
00319
00320
00321
00326 OSG_BASE_DLLMAPPING
00327 void extend(SphereVolume &srcVol, const BoxVolume &vol);
00328
00333 OSG_BASE_DLLMAPPING
00334 void extend(SphereVolume &srcVol, const SphereVolume &vol);
00335
00340 OSG_BASE_DLLMAPPING
00341 void extend(SphereVolume &srcVol, const CylinderVolume &vol);
00342
00347 OSG_BASE_DLLMAPPING
00348 void extend(SphereVolume &srcVol, const FrustumVolume &vol);
00349
00354 OSG_BASE_DLLMAPPING
00355 void extend(SphereVolume &srcVol, const Volume &vol);
00356
00357
00358
00359
00364 OSG_BASE_DLLMAPPING
00365 void extend(CylinderVolume &srcVol, const BoxVolume &vol);
00366
00371 OSG_BASE_DLLMAPPING
00372 void extend(CylinderVolume &srcVol, const SphereVolume &vol);
00373
00378 OSG_BASE_DLLMAPPING
00379 void extend(CylinderVolume &srcVol, const CylinderVolume &vol);
00380
00385 OSG_BASE_DLLMAPPING
00386 void extend(CylinderVolume &srcVol, const FrustumVolume &vol);
00387
00392 OSG_BASE_DLLMAPPING
00393 void extend(CylinderVolume &srcVol, const Volume &vol);
00394
00395
00396
00397
00402 OSG_BASE_DLLMAPPING
00403 void extend(FrustumVolume &srcVol, const BoxVolume &vol);
00404
00409 OSG_BASE_DLLMAPPING
00410 void extend(FrustumVolume &srcVol, const SphereVolume &vol);
00411
00416 OSG_BASE_DLLMAPPING
00417 void extend(FrustumVolume &srcVol, const CylinderVolume &vol);
00418
00423 OSG_BASE_DLLMAPPING
00424 void extend(FrustumVolume &srcVol, const FrustumVolume &vol);
00425
00430 OSG_BASE_DLLMAPPING
00431 void extend(FrustumVolume &srcVol, const Volume &vol);
00432
00433
00434 OSG_END_NAMESPACE
00435
00436 #include "OSGVolumeFunctions.inl"
00437
00438 #endif
00439