00001 //deprecated 00003 // 00004 // PROJECT.....: vpat - Creating Virtual Patients 00005 // RESPONSIBLE.: Carla Freitas e Luciana Nedel 00006 // 00007 // FILE........: vpplane.cpp 00008 // DESCRIPTION.: Contain the VPPlane class implementation. 00009 // 00010 // AUTHOR......: Isabel Harb Manssour 00011 // DATE........: July/11/2000 00012 // DESCRIPTION.: Implementation of class methods. 00013 // 00015 00016 #include <vpplane.h> 00017 00018 00020 // Description: Class "VPPlane" constructor without parameter. 00021 // Parameters.: - 00022 // Return.....: - 00023 00024 VPPlane::VPPlane () { 00025 00026 } 00027 00028 00030 // Description: Class "VPPlane" constructor with parameter. 00031 // Parameters.: VPPlane *plane 00032 // Return.....: - 00033 00034 VPPlane::VPPlane (VPPlane *plane) { 00035 normal = plane->normal; 00036 point = plane->point; 00037 size = plane->size; 00038 color = plane->color; 00039 } 00040 00041 00043 // Description: Method "vpSetNormal" sends a new value to the "normal" 00044 // attribute. 00045 // Parameters.: VPVector3D n 00046 // Return.....: - 00047 00048 void VPPlane::vpSetNormal(VPVector3D n) { 00049 normal = n; 00050 } 00051 00052 00054 // Description: Method "vpGetNormal" returns the value of "normal" 00055 // attribute. 00056 // Parameters.: - 00057 // Return.....: VPVector3D normal 00058 00059 VPVector3D VPPlane::vpGetNormal(void) { 00060 return normal; 00061 } 00062 00063 00065 // Description: Method "vpSetPoint" sends a new value to the "point" 00066 // attribute. 00067 // Parameters.: VPVector3D p 00068 // Return.....: - 00069 00070 void VPPlane::vpSetPoint(VPVector3D p) { 00071 point = p; 00072 } 00073 00074 00076 // Description: Method "vpGetPoint" returns the value of "point" 00077 // attribute. 00078 // Parameters.: - 00079 // Return.....: VPVector3D point 00080 00081 VPVector3D VPPlane::vpGetPoint(void) { 00082 return point; 00083 } 00084 00085 00087 // Description: Method "vpSetSize" sends a new value to the "size" 00088 // attribute. 00089 // Parameters.: VPPoint2D s 00090 // Return.....: - 00091 00092 void VPPlane::vpSetSize(VPPoint2D s) { 00093 size = s; 00094 } 00095 00096 00098 // Description: Method "vpGetSize" returns the value of "size" 00099 // attribute. 00100 // Parameters.: - 00101 // Return.....: VPPoint2D size 00102 00103 VPPoint2D VPPlane::vpGetSize(void) { 00104 return size; 00105 } 00106 00107 00109 // Description: Method "vpSetColor" sends a new value to the "color" 00110 // attribute. 00111 // Parameters.: VPColor c 00112 // Return.....: - 00113 00114 void VPPlane::vpSetColor(VPColor c) { 00115 color = c; 00116 } 00117 00118 00120 // Description: Method "vpGetColor" returns the value of "color" 00121 // attribute. 00122 // Parameters.: - 00123 // Return.....: VPColor color 00124 00125 VPColor VPPlane::vpGetColor(void) { 00126 return color; 00127 } 00128 00129 00131 // Description: ????? 00132 // Parameters.: VPVector3D p 00133 // Return.....: float 00134 00135 float VPPlane::TestPoint(VPVector3D p) { 00136 00137 return (normal.vpGetVector3DX() * ( p.vpGetX() - point.vpGetX() ) + 00138 normal.vpGetVector3DY() * ( p.vpGetY() - point.vpGetY() ) + 00139 normal.vpGetVector3DZ() * ( p.vpGetZ() - point.vpGetZ() ) ); 00140 } 00141 00142 00144 // Description: ????? 00145 // Parameters.: VPVector3D p 00146 // VPVector3D dir 00147 // Return.....: VPVector3D 00148 00149 VPVector3D VPPlane::TestLine(VPVector3D p, VPVector3D dir) { 00150 VPVector3D v; 00151 // FAZER 00152 return (v); 00153 } 00154 00155