Home Hierarchy Members Alphabetical Related Pages

mfrotation.h

Go to the documentation of this file.
00001 #ifndef XDKWRL_MFROTATION_H
00002 #define XDKWRL_MFROTATION_H
00003 
00004 #include <xdkwrl/fieldtypes/sfrotation.h>
00005 #include <deque>
00006 #include <algorithm>
00007 #include <iterator>
00008 
00009 namespace wrl
00010 {
00011   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00012   // Interface of  MFRotation
00013   //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00014   /*! \ingroup fieldtypes
00015    * 
00016    * A MFRotation is a container of SFRotation. It is implemented using a STL's
00017    * deque so you can benefit from its interface. Most common
00018    * functionnalities you would use are:
00019    \code
00020    MFRotation mf;
00021    mf.push_back(SFRotation(45.0f,0.0f,1.0f,0.0f));  
00022    mf.push_front(SFRotation(-45.0f,0.0f,1.0f,0.0f)); 
00023    mf[0].setAngle(60.0f);           
00024    \endcode
00025    * but since it uses STL principles, you have all useful concepts such as
00026    * iterator, algorithms, etc...
00027    *
00028    * Below is included the documentation for this field type from the ISO
00029    * standard.
00030    * \htmlinclude sfrotation.html
00031    */
00032   class MFRotation : public std::deque<SFRotation>
00033   {
00034   public:
00035     static inline const char* typeName();
00036     static inline FieldTypeId typeId();
00037     friend std::ostream& operator<<(std::ostream& s,const MFRotation& f);
00038   };
00039   //************************************************************
00040   // Implementation of MFRotation
00041   //************************************************************
00042   inline const char*
00043   MFRotation::typeName()
00044   {
00045     return "MFRotation";
00046   }
00047   inline FieldTypeId
00048   MFRotation::typeId()
00049   {
00050     return mfRotation;
00051   }  
00052   inline std::ostream& operator<<(std::ostream& s,const MFRotation& f)
00053   {
00054     s<<'[';
00055     std::copy(f.begin(),f.end(),std::ostream_iterator<SFRotation>(s," "));
00056     return s<<']';
00057   }  
00058 }
00059 
00060 #endif // XDKWRL_MFROTATION_H

Generated on 24 Feb 2005 with doxygen version 1.3.9.1. Valid HTML 4.0! Valid CSS!