Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
AMFigureC::AMFigureC(StringC)
AMFigureC::AMFigureC(int,StringC)
AMFigureC::AMFigureC(const AMFigureC &)
AMFigureC::AMFigureC(StringC &,StringC &)
AMFigureC::operator=(const AMFigureC &)
AMFigureC::~AMFigureC(void)
AMFigureC::CreateSegments(int)
AMFigureC::SegmentNo(const StringC &,BooleanT)
AMFigureC::Segment(int)
AMFigureC::Connect(int,int)
AMFigureC::statictoglobal(int)
AMFigureC::dynamictoglobal(int,FieldC &)
AMFigureC::MakeJointsBall(MotionSeqC &)
AMFigureC::MakeStaticNull(MotionSeqC &)
AMFigureC::MakeDynamicT0Null(MotionSeqC &)
AMFigureC::MakeStandardForm(MotionSeqC &)
AMFigureC::PrintSubTree(int,int)
AMFigureC::PrintHierarchy(void)
AMFigureC::SaveSegmentsByName(void)
AMFigureC::ExportUntransfPolops(BooleanT)
AMFigureC::ExportStaticRotCenters(void)
AMFigureC::ExportStaticPolops(BooleanT)
AMFigureC::ExportDynamicPolops(FieldC &,BooleanT)
AMFigureC::SaveAsPolopsSequence(StringC &,MotionSeqC &,int,int)
AMFigureC::SplitLine(const StringC &)
AMFigureC::LoadSkeleton(StringC &,StringC &)
AMFigureC::SaveSkeleton(StringC &,StringC &)
AMFigureC::ManualAnglesAndDump(StringC &)
AMFigureC::CheckOnAxis(JointT,char)
AMFigureC::LoadHiroHumanoid(void)
AMFigureC::LoadVectorSets(const StringC &)
AMFigureC::SaveVectorSets(SArray1dC &,const StringC &)
AMFigureC::SaveAMWSkeleton(const StringC &)
AMFigureC::LoadAMWSkeleton(const StringC &)
AMFigureC::LoadAcclaimSkeleton(const StringC &)
AMFigureC::LoadASF(const StringC &,StringC &)
AMFigureC::ReadUnits(ifstream &,RealT &,RealT &,StringC &)
AMFigureC::ReadRoot(ifstream &,DListC &,StringC &)
AMFigureC::ReadBoneData(ifstream &,DListC &,BooleanT &,StringC &)
AMFigureC::ReadHierarchy(ifstream &,BooleanT &,StringC &)
AMFigureC::LoadMesh(const StringC &)
AMFigureC::LoadAcclaimMotion(const StringC &)
AMFigureC::getFamily(const StringC &)
AMFigureC::calcStatic(int)
AMFigureC::moveRcenterLoc(int)
AMFigureC::calcRcenterGlob(int)
AMFigureC::calcRcenterLoc(int)
AMFigureC::calcDynam(int,Vector3dC,int)
AMFigureC::SaveAcclaimSkeleton(const StringC &,StringC &,BooleanT)
AMFigureC::SaveASF(const StringC &,StringC &,BooleanT)
AMFigureC::SaveMesh(const StringC &)
AMFigureC::SaveAcclaimMotion(const StringC &,MotionSeqC &,BooleanT)
AMFigureC::DumpASFHeader(ostream &)
AMFigureC::DumpASFDocumentation(ostream &)
AMFigureC::DumpASFData(ostream &)
AMFigureC::DumpASFUnits(ostream &)
AMFigureC::DumpASFRoot(ostream &)
AMFigureC::DumpASFBones(ostream &)
AMFigureC::DumpASFBone(ostream &,int)
AMFigureC::DumpASFHierarchy(ostream &)
AMFigureC::DumpASFSkin(ostream &,const StringC &)
AMFigureC::DumpJointAngles(ostream &,const Vector3dC &,JointT)
AMFigureC::DumpFooLimits(ostream &,JointT)
AMFigureC::DumpJointType(ostream &,JointT,BooleanT)
AMFigureC
 
include "amma/AMFigure.hh"
User Level:Default
Library:AMWorld
Example: gendispmap.cc genmtri.cc
Section:Applications.Articulated models
In Scope:std

Comments:
-----------------------------------------------------------------------------

Parent Classes: Variables:
int trace;

int nsegs;

StringC name;
The name of this figure

SArray1dC segments;
All the segments

Methods:
AMFigureC(StringC _name = "Unnamed")

AMFigureC(int n,StringC _name = "Unnamed")

AMFigureC(const AMFigureC & f)

AMFigureC(StringC & figfile,StringC & objfile)
Construct from file, see behaviour of LoadSkeleton

AMFigureC & operator=(const AMFigureC & f)

~AMFigureC()
Member functions for handling segments --------------------------------------

void CreateSegments(int n)
Creates n segments in the figure

int SegmentNo(const StringC & s,BooleanT exitonerror = TRUE)
Returns the number of the segment with the name 's'; 0 indexed returns -1 if the name is not found unless exitonerror set

AMSegmentC & Segment(int n)
Returns a reference to the nth segment in the list; 0 indexed

void Connect(int p,int c)
Connect a parent-child Segment pair transforms from local to global, etc -------------------------------------

void statictoglobal(int iseg)

void dynamictoglobal(int iseg,FieldC & f)
computes the static / dynamic transf for this segment to global and stores the result in the segment The computation then proceeds all the way down the tree, usually this will be called for the root segment.

void MakeJointsBall(MotionSeqC & m)
set all joints to null, ball or trans + ball

void MakeStaticNull(MotionSeqC & m)
move all static transforms into dynamic, making static null

void MakeDynamicT0Null(MotionSeqC & m)
transform so that at t=0 the motion is null. does not pass the boneshow test right now - could be RXRY joints?

void MakeStandardForm(MotionSeqC & mseq)
According to AJS the "standard form" consists of all joints converted to ball joints, no static transform and the motion for some given field set to null. status = experimental Export and Print outs ---------------------

void PrintSubTree(int iseg,int level)
print the tree starting at the specified segment

void PrintHierarchy()
Outputs the hierarchy of this figure to screen

void SaveSegmentsByName()
Export the segments individually

PolopsC ExportUntransfPolops(BooleanT purify = TRUE)
Export the loaded figure as a Polops

VectorSetC ExportStaticRotCenters()
Export the rotation centers in globals

PolopsC ExportStaticPolops(BooleanT purify = TRUE)
Export the transformed figure as a Polops

PolopsC ExportDynamicPolops(FieldC & f,BooleanT purify = TRUE)
Export the transformed figure as a Polops

void SaveAsPolopsSequence(StringC & filename,MotionSeqC & mseq,int first = 0,int last = 0)
saves the motionsequence as a number of tri/etc files file abc.wrl will be saved as abc000.wrl 001 002 ... last=0 defaults to all. no action if filename is null or mseq contains no data -------------------------- Input and Output - General --------------------------

DListC<StringC> SplitLine(const StringC & line)
spllit a string into pieces

void LoadSkeleton(StringC & filename,StringC & objfile)
Load a skeleton file from file .amw/.asf/hiro, for acclaim the objfile is ignored for amw the objfile is set to same as filename.obj

void SaveSkeleton(StringC & out_file,StringC & out_objfile)
Save a skeleton file to file .amw/.asf and and a objfile with the same name

void ManualAnglesAndDump(StringC & outfile)
see the joint angles by hand and dump a file

void CheckOnAxis(JointT jnt,char c)
check to see that c and joint are comaptible used only by ManualAnglesAndDump

void LoadHiroHumanoid()
load the 'hiro' model from directory ./hiro with predetermined names deprecated as not very flexible, but handy for now ------------------------------- Point sets attached to segments -------------------------------

SArray1dC<VectorSetC> LoadVectorSets(const StringC & fileroot)

void SaveVectorSets(SArray1dC<VectorSetC> & psets,const StringC & fileroot)
VectorSet stuff ---------------------------------- Input and Output - Local to Surrey ----------------------------------

void SaveAMWSkeleton(const StringC & filename)
saves the AMFigure hierarchy in a (hopefully) man-readable format

void LoadAMWSkeleton(const StringC & filename)
loasds the AMFigure hierarchy in the format that SaveSkeleton writes. -------------------------------------- Input and Output - Specific to Acclaim --------------------------------------

void LoadAcclaimSkeleton(const StringC & asffile)
Loads an asf- & obj-file.

void LoadASF(const StringC & asffile,StringC & objfile)
Inside, Figure is reinitialized! loading segments, initial position and orientation Lines in ASF-file beginning with: axis - sequence from which the root pre-set orientation should be calculated order - order of dofs in AMC-file; sequence in which rotations are calculated about global axes; assigned to 'segstat.jtype' of root position - pre-set position of root orientation - pre-set orientation of root bone - name of the bone segment direction - direction vector length - length of the bone segment axis - initial orientation of the bone segment dof - degrees of freedom of the bone segment limits - limits in the (relative) rotation of the bone segment: (--> there is no data member or member function for these limits in AMSegment ! <--)

void ReadUnits(ifstream & is,RealT & len,RealT & ang,StringC & l)

void ReadRoot(ifstream & is,DListC<AMSegmentC> & tf,StringC & l)

void ReadBoneData(ifstream & is,DListC<AMSegmentC> & tf,BooleanT & bonedatafirst,StringC & l)

void ReadHierarchy(ifstream & is,BooleanT & bonedatafirst,StringC & l)

void LoadMesh(const StringC & objfile)
loads mesh from obj-file

MotionSeqC LoadAcclaimMotion(const StringC & amcfile)
loads the contents of an amc-file into a MotionSeqC object, uses scaling (lunit) suggested in the most recently loaded .asf file.

void getFamily(const StringC & line)
this processes one line of the hierarchy section of the .asf file and directly updates the segments the first segment named in 'line' is made the parent of the following mentioned segments, which are in their turn made children of the first mentioned segment. The 'number of children' of the parent is increased appropriately

void calcStatic(int nr)
on entry all segment.toglabal contains the absolute rotation this recursive routine calculates the static rotation matrices (relative rotation of segment with respect to the parent)

void moveRcenterLoc(int nr)
on entering: - 'segments[0..nsegs-1].rcenter' contain the delta D coordinates with respect to the parent, as given by Acclaim on returning: - 'segments[nr].segstat.rcenter' contain the Delta D of the parent in global coordinates which must then be converted to local (recursive) ajsroot - children of the root segment need special treatment.

void calcRcenterGlob(int iseg)
converts all the Delta D by summing to C, but still in global i.e. adds coordinates of parent center of rotation to coordinates of segment center of rotation (recursive)

void calcRcenterLoc(int iseg)
converts global coordinates of the centers of rotation to local (recursive)

SegDynaTC calcDynam(int segnr,Vector3dC v,int na)
calculates the dynamic rotation matrix (relative rotation of segment to parent) from a given vector of three (euler) angles ------------------------------- Save acclaim ------------------------------

void SaveAcclaimSkeleton(const StringC & asffile,StringC & objfile,BooleanT inRadians = FALSE)

void SaveASF(const StringC & asffile,StringC & objfile,BooleanT inRadians = FALSE)

void SaveMesh(const StringC & objfile)

int SaveAcclaimMotion(const StringC & amcfile,MotionSeqC & motSeq,BooleanT inRadians = FALSE)

void DumpASFHeader(ostream & out)

void DumpASFDocumentation(ostream & out)

void DumpASFData(ostream & out)

void DumpASFUnits(ostream & out)

void DumpASFRoot(ostream & out)

void DumpASFBones(ostream & out)

void DumpASFBone(ostream & out,int nbone)

void DumpASFHierarchy(ostream & out)

void DumpASFSkin(ostream & out,const StringC & objfile)

void DumpJointAngles(ostream & out,const Vector3dC & angles,JointT jnt)

void DumpFooLimits(ostream & out,JointT jnt)

void DumpJointType(ostream & out,JointT jnt,BooleanT withSpaces = FALSE)


Programmer:Andrew Stoddart, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001