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 #include "LampBasic.h"
00026 #include "Geometry/Primitive/Cone.h"
00027 #include "Geometry/Distance/AxisAlignedBoxDistance.h"
00028 #include "Geometry/Distance/CapsuleDistance.h"
00029 #include "Geometry/Distance/ConeDistance.h"
00030 #include "Geometry/Intersection/AxisAlignedBoxIntersection.h"
00031 #include "Geometry/Intersection/CapsuleIntersection.h"
00032 #include "Geometry/Intersection/ConeIntersection.h"
00033
00034 namespace Lamp{
00035
00036
00037
00038
00039
00040 const Cone Cone::zero(0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f);
00041
00042
00043
00044
00045
00046 float Cone::getSquaredDistance(const Vector3& point) const{
00047 return ConeDistance::squaredDistance(*this, point);
00048 }
00049
00050
00051 float Cone::getSquaredDistance(const AxisAlignedBox& axisAlignedBox) const{
00052 return AxisAlignedBoxDistance::squaredDistance(axisAlignedBox, *this);
00053 }
00054
00055
00056 float Cone::getSquaredDistance(const Capsule& capsule) const{
00057 return CapsuleDistance::squaredDistance(capsule, *this);
00058 }
00059
00060
00061 float Cone::getSquaredDistance(const Cone& cone) const{
00062 return ConeDistance::squaredDistance(*this, cone);
00063 }
00064
00065
00066 float Cone::getSquaredDistance(const Line& line) const{
00067 return ConeDistance::squaredDistance(*this, line);
00068 }
00069
00070
00071 float Cone::getSquaredDistance(const OrientedBox& orientedBox) const{
00072 return ConeDistance::squaredDistance(*this, orientedBox);
00073 }
00074
00075
00076 float Cone::getDistance(const Plane& plane) const{
00077 return ConeDistance::distance(*this, plane);
00078 }
00079
00080
00081 float Cone::getSquaredDistance(const Ray& ray) const{
00082 return ConeDistance::squaredDistance(*this, ray);
00083 }
00084
00085
00086 float Cone::getSquaredDistance(const Segment& segment) const{
00087 return ConeDistance::squaredDistance(*this, segment);
00088 }
00089
00090
00091 float Cone::getSquaredDistance(const Sphere& sphere) const{
00092 return ConeDistance::squaredDistance(*this, sphere);
00093 }
00094
00095
00096 float Cone::getSquaredDistance(const Triangle& triangle) const{
00097 return ConeDistance::squaredDistance(*this, triangle);
00098 }
00099
00100
00101
00102
00103 bool Cone::intersect(const Vector3& point) const{
00104 return ConeIntersection::intersect(*this, point);
00105 }
00106
00107
00108 bool Cone::intersect(const AxisAlignedBox& axisAlignedBox) const{
00109 return AxisAlignedBoxIntersection::intersect(axisAlignedBox, *this);
00110 }
00111
00112
00113 bool Cone::intersect(const Capsule& capsule) const{
00114 return CapsuleIntersection::intersect(capsule, *this);
00115 }
00116
00117
00118 bool Cone::intersect(const Cone& cone) const{
00119 return ConeIntersection::intersect(*this, cone);
00120 }
00121
00122
00123 bool Cone::intersect(const Line& line) const{
00124 return ConeIntersection::intersect(*this, line);
00125 }
00126
00127
00128 bool Cone::intersect(const OrientedBox& orientedBox) const{
00129 return ConeIntersection::intersect(*this, orientedBox);
00130 }
00131
00132
00133 bool Cone::intersect(const Plane& plane) const{
00134 return ConeIntersection::intersect(*this, plane);
00135 }
00136
00137
00138 bool Cone::intersect(const Ray& ray) const{
00139 return ConeIntersection::intersect(*this, ray);
00140 }
00141
00142
00143 bool Cone::intersect(const Segment& segment) const{
00144 return ConeIntersection::intersect(*this, segment);
00145 }
00146
00147
00148 bool Cone::intersect(const Sphere& sphere) const{
00149 return ConeIntersection::intersect(*this, sphere);
00150 }
00151
00152
00153 bool Cone::intersect(const Triangle& triangle) const{
00154 return ConeIntersection::intersect(*this, triangle);
00155 }
00156
00157 }
00158
00159