#include <SbProjector.h>
Public Member Functions | |
SbProjector (const SbString &) | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
SbProjector (const SbProjector &) | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual | ~SbProjector () |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
bool | project (int, SbVec3f *) const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
bool | isRZ () const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
bool | isZR () const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
Protected Member Functions | |
bool | projectRZ (int, SbVec3f *) const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
bool | projectPHIZ (int, SbVec3f *) const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
bool | projectZR (int, SbVec3f *) const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
bool | projectNZR (int, SbVec3f *) const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
bool | projectNormZ (int, SbVec3f *) const |
bool | projectZPHI (int, SbVec3f *) const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
bool | projectPHIETA (int, SbVec3f *) const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
Private Attributes | |
int | fProjection |
Definition at line 14 of file SbProjector.h.
SoUtils::SbProjector::SbProjector | ( | const SbString & | ) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 17 of file SbProjector.cpp.
00020 :fProjection(0) 00023 { 00024 if(aProjection=="RZ") fProjection = 1; 00025 else if(aProjection=="PHIZ") fProjection = 2; 00026 else if(aProjection=="ZR") fProjection = 3; 00027 else if(aProjection=="ZPHI") fProjection = 4; 00028 else if(aProjection=="-ZR") fProjection = 5; 00029 else if(aProjection=="PHIETA") fProjection = 6; 00030 00031 }
SoUtils::SbProjector::SbProjector | ( | const SbProjector & | ) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 33 of file SbProjector.cpp.
00036 :fProjection(aProjector.fProjection) 00039 { 00040 }
SoUtils::SbProjector::~SbProjector | ( | ) | [virtual] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 42 of file SbProjector.cpp.
bool SoUtils::SbProjector::project | ( | int | , | |
SbVec3f * | ||||
) | const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 65 of file SbProjector.cpp.
00071 { 00072 if(fProjection==1) 00073 return projectRZ(aNumber,aPoints); 00074 else if(fProjection==2) 00075 return projectPHIZ(aNumber,aPoints); 00076 else if(fProjection==3) 00077 return projectZR(aNumber,aPoints); 00078 else if(fProjection==4) 00079 return projectZPHI(aNumber,aPoints); 00080 else if(fProjection==5) 00081 return projectNZR(aNumber,aPoints); 00082 else 00083 return true; // Do nothing. It is ok. 00084 }
bool SoUtils::SbProjector::isRZ | ( | ) | const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 49 of file SbProjector.cpp.
00053 { 00054 return (fProjection==1 ? true : false); 00055 }
bool SoUtils::SbProjector::isZR | ( | ) | const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 57 of file SbProjector.cpp.
00061 { 00062 return (fProjection==3 || fProjection==5 ? true : false); 00063 }
bool SoUtils::SbProjector::projectRZ | ( | int | , | |
SbVec3f * | ||||
) | const [protected] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 86 of file SbProjector.cpp.
00092 { 00093 for(int index=0;index<aNumber;index++) { 00094 SbVec3f& point = aPoints[index]; 00095 float x = point[0]; 00096 float y = point[1]; 00097 float z = point[2]; 00098 float r = (float)::sqrt(x*x+y*y); 00099 //printf("debug : SbProjector::projectRZ : %d (%d) : %g %g\n", 00100 // index,aNumber,r,z); 00101 point[0] = r; 00102 point[1] = z; 00103 point[2] = 0; 00104 } 00105 return true; 00106 }
bool SoUtils::SbProjector::projectPHIZ | ( | int | , | |
SbVec3f * | ||||
) | const [protected] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 108 of file SbProjector.cpp.
00114 { 00115 for(int index=0;index<aNumber;index++) { 00116 SbVec3f& point = aPoints[index]; 00117 float x = point[0]; 00118 float y = point[1]; 00119 float z = point[2]; 00120 double v; 00121 if(!arctan(y,x,v)) return false; 00122 point[0] = (float)v; 00123 point[1] = z; 00124 point[2] = 0; 00125 } 00126 return true; 00127 }
bool SoUtils::SbProjector::projectZR | ( | int | , | |
SbVec3f * | ||||
) | const [protected] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 129 of file SbProjector.cpp.
00135 { 00136 for(int index=0;index<aNumber;index++) { 00137 SbVec3f& point = aPoints[index]; 00138 float x = point[0]; 00139 float y = point[1]; 00140 float z = point[2]; 00141 float r = (float)::sqrt(x*x+y*y); 00142 //printf("debug : SbProjector::projectRZ : %d (%d) : %g %g\n", 00143 // index,aNumber,r,z); 00144 point[0] = z; 00145 point[1] = r; 00146 point[2] = 0; 00147 } 00148 return true; 00149 }
bool SoUtils::SbProjector::projectNZR | ( | int | , | |
SbVec3f * | ||||
) | const [protected] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 151 of file SbProjector.cpp.
00157 { 00158 for(int index=0;index<aNumber;index++) { 00159 SbVec3f& point = aPoints[index]; 00160 float x = point[0]; 00161 float y = point[1]; 00162 float z = point[2]; 00163 float r = (float)::sqrt(x*x+y*y); 00164 if (x<0) {r=-r;} 00165 point[0] = z; 00166 point[1] = r; 00167 point[2] = 0; 00168 } 00169 return true; 00170 }
bool SoUtils::SbProjector::projectNormZ | ( | int | , | |
SbVec3f * | ||||
) | const [protected] |
bool SoUtils::SbProjector::projectZPHI | ( | int | , | |
SbVec3f * | ||||
) | const [protected] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 195 of file SbProjector.cpp.
00201 { 00202 for(int index=0;index<aNumber;index++) { 00203 SbVec3f& point = aPoints[index]; 00204 float x = point[0]; 00205 float y = point[1]; 00206 float z = point[2]; 00207 double v; 00208 if(!arctan(y,x,v)) return false; 00209 point[0] = z; 00210 point[1] = (float)v; 00211 point[2] = 0; 00212 } 00213 return true; 00214 }
bool SoUtils::SbProjector::projectPHIETA | ( | int | , | |
SbVec3f * | ||||
) | const [protected] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 172 of file SbProjector.cpp.
00178 { 00179 for(int index=0;index<aNumber;index++) { 00180 SbVec3f& point = aPoints[index]; 00181 float x = point[0]; 00182 float y = point[1]; 00183 float eta = (float)::tan(x*x+y*y); 00184 double phi; 00185 if(!arctan(y,x,phi)) return false; 00186 //printf("debug : SbProjector::projectPHIETA : %d (%d) : %g %g\n", 00187 // index,aNumber,eta,phi); 00188 point[0] = eta; 00189 point[1] = (float)phi; 00190 point[2] = 0; 00191 } 00192 return true; 00193 }
int SoUtils::SbProjector::fProjection [private] |
Definition at line 31 of file SbProjector.h.