PLearn 0.1
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Member Functions | Private Types | Private Member Functions
PLearn::MeshMatch Class Reference

#include <MeshMatch.h>

Inheritance diagram for PLearn::MeshMatch:
Inheritance graph
[legend]
Collaboration diagram for PLearn::MeshMatch:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MeshMatch ()
 Default constructor.
virtual ~MeshMatch ()
 Virtual destructor.
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual MeshMatchdeepCopy (CopiesMap &copies) const
virtual void build ()
 Post-constructor.
virtual void makeDeepCopyFromShallowCopy (CopiesMap &copies)
 Transforms a shallow copy into a deep copy.

Static Public Member Functions

static string _classname_ ()
static OptionList_getOptionList_ ()
static RemoteMethodMap_getRemoteMethodMap_ ()
static Object_new_instance_for_typemap_ ()
static bool _isa_ (const Object *o)
static void _static_initialize_ ()
static const PPathdeclaringFile ()
static int compare (const MeshMatch &p, const MeshMatch &q)

Public Attributes

int id
int model_id
Mat rot
Vec trans
Vec angles
real error

Static Public Attributes

static StaticInitializer _static_initializer_

Static Protected Member Functions

static void declareOptions (OptionList &ol)
 Declares this class' options.

Private Types

typedef Object inherited

Private Member Functions

void build_ ()
 This does the actual building.

Detailed Description

Definition at line 58 of file MeshMatch.h.


Member Typedef Documentation

Reimplemented from PLearn::Object.

Definition at line 63 of file MeshMatch.h.


Constructor & Destructor Documentation

PLearn::MeshMatch::MeshMatch ( )

Default constructor.

Definition at line 48 of file MeshMatch.cc.

                     :
  id( 0 ),
  model_id( 0 ),
//  correspondences(),
  rot( 3, 3 ),
  trans( 3 ),
  angles( 3 ),
  error( 0 )
{}
virtual PLearn::MeshMatch::~MeshMatch ( ) [inline, virtual]

Virtual destructor.

Definition at line 92 of file MeshMatch.h.

{}

Member Function Documentation

string PLearn::MeshMatch::_classname_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 80 of file MeshMatch.cc.

OptionList & PLearn::MeshMatch::_getOptionList_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 80 of file MeshMatch.cc.

RemoteMethodMap & PLearn::MeshMatch::_getRemoteMethodMap_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 80 of file MeshMatch.cc.

bool PLearn::MeshMatch::_isa_ ( const Object o) [static]

Reimplemented from PLearn::Object.

Definition at line 80 of file MeshMatch.cc.

Object * PLearn::MeshMatch::_new_instance_for_typemap_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 80 of file MeshMatch.cc.

StaticInitializer MeshMatch::_static_initializer_ & PLearn::MeshMatch::_static_initialize_ ( ) [static]

Reimplemented from PLearn::Object.

Definition at line 80 of file MeshMatch.cc.

void PLearn::MeshMatch::build ( ) [virtual]

Post-constructor.

The normal implementation should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.

Reimplemented from PLearn::Object.

Definition at line 116 of file MeshMatch.cc.

References PLearn::Object::build(), and build_().

Here is the call graph for this function:

void PLearn::MeshMatch::build_ ( ) [private]

This does the actual building.

Reimplemented from PLearn::Object.

Definition at line 111 of file MeshMatch.cc.

Referenced by build().

{
}

Here is the caller graph for this function:

string PLearn::MeshMatch::classname ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 80 of file MeshMatch.cc.

int PLearn::MeshMatch::compare ( const MeshMatch p,
const MeshMatch q 
) [static]

Definition at line 152 of file MeshMatch.cc.

References error.

{
//  if( p.correspondences.size() < q.correspondences.size() ) return  1;
//  if( p.correspondences.size() > q.correspondences.size() ) return -1;
  if( p.error > q.error ) return  1;
  if( p.error < q.error ) return -1;
  return 0;
}
void PLearn::MeshMatch::declareOptions ( OptionList ol) [static, protected]

Declares this class' options.

Reimplemented from PLearn::Object.

Definition at line 82 of file MeshMatch.cc.

References angles, PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::Object::declareOptions(), error, id, model_id, rot, and trans.

{
  declareOption(ol, "id", &MeshMatch::id, OptionBase::buildoption,
                "match identifier");

  declareOption(ol, "model_id", &MeshMatch::model_id, OptionBase::buildoption,
                "identifier of the model we try to match the mesh to");
/*
  declareOption(ol, "correspondences", &MeshMatch::correspondences, 
                OptionBase::buildoption,
                "list of point-to-point correspondences of the match");
*/
  declareOption(ol, "rot", &MeshMatch::rot, OptionBase::buildoption,
                "rotation matrix of the match"); // maybe learntoption ?

  declareOption(ol, "trans", &MeshMatch::trans, OptionBase::buildoption,
                "translation vector of the match");

  declareOption(ol, "angles", &MeshMatch::angles, OptionBase::buildoption,
                "angles of the rotations of the match");

  declareOption(ol, "error", &MeshMatch::error, OptionBase::buildoption,
                "alignment error between the match and the model");


  // Now call the parent class' declareOptions
  inherited::declareOptions(ol);
}

Here is the call graph for this function:

static const PPath& PLearn::MeshMatch::declaringFile ( ) [inline, static]

Reimplemented from PLearn::Object.

Definition at line 110 of file MeshMatch.h.

MeshMatch * PLearn::MeshMatch::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 80 of file MeshMatch.cc.

OptionList & PLearn::MeshMatch::getOptionList ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 80 of file MeshMatch.cc.

OptionMap & PLearn::MeshMatch::getOptionMap ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 80 of file MeshMatch.cc.

RemoteMethodMap & PLearn::MeshMatch::getRemoteMethodMap ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 80 of file MeshMatch.cc.

void PLearn::MeshMatch::makeDeepCopyFromShallowCopy ( CopiesMap copies) [virtual]

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::Object.

Definition at line 122 of file MeshMatch.cc.

References PLearn::Object::makeDeepCopyFromShallowCopy(), and PLERROR.

{
  inherited::makeDeepCopyFromShallowCopy(copies);

  // ### Call deepCopyField on all "pointer-like" fields 
  // ### that you wish to be deepCopied rather than 
  // ### shallow-copied.
  // ### ex:
  // deepCopyField(trainvec, copies);

  // ### Remove this line when you have fully implemented this method.
  PLERROR("MeshMatch::makeDeepCopyFromShallowCopy not fully (correctly) implemented yet!");
}

Here is the call graph for this function:


Member Data Documentation

Reimplemented from PLearn::Object.

Definition at line 110 of file MeshMatch.h.

Definition at line 76 of file MeshMatch.h.

Referenced by declareOptions().

Definition at line 77 of file MeshMatch.h.

Referenced by compare(), and declareOptions().

Definition at line 71 of file MeshMatch.h.

Referenced by declareOptions().

Definition at line 72 of file MeshMatch.h.

Referenced by declareOptions().

Definition at line 74 of file MeshMatch.h.

Referenced by declareOptions().

Definition at line 75 of file MeshMatch.h.

Referenced by declareOptions().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines