00001
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
00033
00034 #ifndef GROOVX_VISX_CLONEFACE_CC_UTC20050626084017_DEFINED
00035 #define GROOVX_VISX_CLONEFACE_CC_UTC20050626084017_DEFINED
00036
00037 #include "visx/cloneface.h"
00038
00039 #include "io/ioproxy.h"
00040 #include "io/readutils.h"
00041 #include "io/writeutils.h"
00042
00043 #include "rutz/trace.h"
00044 #include "rutz/debug.h"
00045 GVX_DBG_REGISTER
00046
00047 namespace
00048 {
00049 const int CLONEFACE_SVID = 0;
00050 }
00051
00053
00054
00055
00057
00058 const FieldMap& CloneFace::classFields()
00059 {
00060 static const Field FIELD_ARRAY[] =
00061 {
00062 Field("eyeAspect", &CloneFace::itsEyeAspect, 0.0, 0.0, 1.0, 0.05,
00063 Field::NEW_GROUP),
00064 Field("vertOffset", &CloneFace::itsVertOffset, 0.0, -0.1, 0.1, 0.01)
00065 };
00066
00067 static FieldMap CLONEFACE_FIELDS(FIELD_ARRAY, &Face::classFields());
00068
00069 return CLONEFACE_FIELDS;
00070 }
00071
00072 CloneFace* CloneFace::make()
00073 {
00074 GVX_TRACE("CloneFace::make");
00075 return new CloneFace;
00076 }
00077
00078 CloneFace::CloneFace () :
00079 Face(), itsEyeAspect(0.0), itsVertOffset(0.0)
00080 {
00081 GVX_TRACE("CloneFace::CloneFace()");
00082
00083 setFieldMap(CloneFace::classFields());
00084
00085
00086
00087 const double* const face_pnts = Face::getCtrlPnts();
00088 for (int i = 0; i < 24; ++i)
00089 {
00090 itsCtrlPnts[i] = face_pnts[i];
00091 }
00092 }
00093
00094 CloneFace::~CloneFace () throw()
00095 {
00096 GVX_TRACE("CloneFace::~CloneFace");
00097 }
00098
00099 io::version_id CloneFace::class_version_id() const
00100 {
00101 GVX_TRACE("CloneFace::class_version_id");
00102 return CLONEFACE_SVID;
00103 }
00104
00105 void CloneFace::read_from(io::reader& reader)
00106 {
00107 GVX_TRACE("CloneFace::read_from");
00108
00109 io::read_utils::read_value_seq<double>(reader, "ctrlPnts",
00110 itsCtrlPnts, 24);
00111
00112 readFieldsFrom(reader, classFields());
00113
00114 reader.read_base_class("Face", io::make_proxy<Face>(this));
00115 }
00116
00117 void CloneFace::write_to(io::writer& writer) const
00118 {
00119 GVX_TRACE("CloneFace::write_to");
00120
00121 io::write_utils::write_value_seq(writer, "ctrlPnts",
00122 itsCtrlPnts, itsCtrlPnts+24, true);
00123
00124 writeFieldsTo(writer, classFields(), CLONEFACE_SVID);
00125
00126 writer.write_base_class("Face", io::make_const_proxy<Face>(this));
00127 }
00128
00129 const double* CloneFace::getCtrlPnts() const
00130 {
00131 GVX_TRACE("CloneFace::getCtrlPnts");
00132 return itsCtrlPnts;
00133 }
00134
00135 double CloneFace::getEyeAspect() const
00136 {
00137 GVX_TRACE("CloneFace::getEyeAspect");
00138 return itsEyeAspect;
00139 }
00140
00141 double CloneFace::getVertOffset() const
00142 {
00143 GVX_TRACE("CloneFace::getVertOffset");
00144 return itsVertOffset;
00145 }
00146
00147 static const char __attribute__((used)) vcid_groovx_visx_cloneface_cc_utc20050626084017[] = "$Id: cloneface.cc 10065 2007-04-12 05:54:56Z rjpeters $ $HeadURL: file:
00148 #endif // !GROOVX_VISX_CLONEFACE_CC_UTC20050626084017_DEFINED