Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdContactForceSet.h

00001 // rdContactForceSet.h
00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00003 // Copyright 2002, 2003 Realistic Dynamics, Inc.
00004 // All rights reserved.
00005 //
00006 // Please do not read, copy, distribute, or use without permission.
00007 // Contact: Frank C. Anderson, fca@RealisticDynamics.com
00008 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00009 #ifndef __rdContactForceSet_h__
00010 #define __rdContactForceSet_h__
00011 
00012 #include <rdPtrArray.h>
00013 #include "rdModel.h"
00014 #include "rdContactForce.h"
00015 
00016 
00017 //============================================================================
00018 // CONSTANTS
00019 //============================================================================
00020 
00021 
00022 //=============================================================================
00023 //=============================================================================
00034 class RDSIMULATION_API rdContactForceSet : public rdPtrArray 
00035 {
00036 
00037 //=============================================================================
00038 // DATA
00039 //=============================================================================
00040 private:
00042    static rdPtrArray _ContactForceTypes;
00043 protected:
00045    rdPtrArray _defaultContactForces;
00047    rdModel *_model;
00049    int _nyp;
00051    int *_pseudoIndex;
00052 
00053 //=============================================================================
00054 // METHODS
00055 //=============================================================================
00056    //--------------------------------------------------------------------------
00057    // CONSTRUCTION
00058    //--------------------------------------------------------------------------
00059 public:
00060    rdContactForceSet();
00061    rdContactForceSet(const char *aFileName);
00062    virtual ~rdContactForceSet();
00063 private:
00064    void setNull();
00065    void constructPseudoStatesIndex();
00066    void constructDefaultContacts();
00067 
00068    //--------------------------------------------------------------------------
00069    // GET AND SET
00070    //--------------------------------------------------------------------------
00071 public:
00072    // MODEL
00073    void setModel(rdModel *aModel);
00074    rdModel* getModel();
00075    // CONTACT
00076    rdContactForce* setContactForce(rdContactForce *aContact);
00077    rdContactForce* setContactForce(int aIndex,rdContactForce *aContact);
00078    rdContactForce* getContactForce(int aIndex) const;
00079    // PSEUDOSTATES
00080    int getNYP();
00081    int getPseudoStatesIndex(int aWhichActuator);
00082    void setPseudoStates(const double aY[]);
00083    void getPseudoStates(double rY[]);
00084 
00085    //--------------------------------------------------------------------------
00086    // COMPUTATIONS
00087    //--------------------------------------------------------------------------
00088    void computeContact();
00089    void updatePseudoStates();
00090 
00091    //--------------------------------------------------------------------------
00092    // APPLICATION
00093    //--------------------------------------------------------------------------
00094    void apply();
00095 
00096    //--------------------------------------------------------------------------
00097    // CHECK
00098    //--------------------------------------------------------------------------
00099    bool check() const;
00100    
00101    //--------------------------------------------------------------------------
00102    // REGISTER SUPPORTED ACTUATOR TYPES
00103    //--------------------------------------------------------------------------
00104    static void RegisterType(const rdContactForce &aContact);
00105 
00106    //--------------------------------------------------------------------------
00107    // XML
00108    //--------------------------------------------------------------------------
00109    void updateObject(bool aDeep=true);
00110    void updateNode(bool aDeep=true);
00111    void generateNode(IDOM_Element *aParent);
00112 
00113 //=============================================================================
00114 }; // END of class rdContactForceSet
00115 //=============================================================================
00116 //=============================================================================
00117 
00118 
00119 #endif // __rdContactForceSet_h__
00120 
00121 

Generated on Wed Aug 20 02:17:05 2003 for Simulation Software by doxygen1.3