Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

ArticulatedAgentBase.h

Go to the documentation of this file.
00001 // ArticulatedAgentBase.h: interface for the ArticulatedAgentBase class.
00002 //
00004 
00005 #ifndef ARTICULATEDAGENTBASE_H
00006 #define ARTICULATEDAGENTBASE_H
00007 
00008 #include "ArticulatedComponent.h"
00009 #include "ArticulatedLimb.h"
00010 #include "Circle.h"
00011 #include "CappedRectangle.h"
00012 #include "Vector3.h"
00013 
00014 class Simulator;
00015 
00019 class ArticulatedAgentBase : public ArticulatedComponent {
00020 public:
00022    ArticulatedAgentBase(std::string label="");
00023 
00025    virtual ~ArticulatedAgentBase();
00026 
00028    ArticulatedLimb* addLimb();
00032    ArticulatedLimb* addLimb(real l, real theta);
00033 
00034 
00035    virtual void registerPrimitives(Simulator* simulator);
00036 
00037    virtual bool detectContacts(PhysicalObject* object, GlobalContactInfoVector* contacts);
00038    virtual void detectInternalContacts(GlobalContactInfoVector* contacts);
00039    virtual bool detectMouseContact(const Vector2& rMouse, Vector2& p, PhysicalObject*& object);
00040 
00041    virtual void deleteContacts();
00042 
00043    void fillContactMatrix(ContactSolver* contactSolver, ContactInfo* contactInfo);
00044 
00046    virtual void draw(GUI *gui);
00047 
00048    virtual void setOutlineColor(Color color);
00049    virtual void setFillColor(Color color);
00050 
00051 protected:
00053    static void solveSystem(SymmetricMatrix3& m, const Vector3& c, Vector3& x);
00054 
00057    static void solveSystem(const SymmetricMatrix3& m, const real determinant, const Vector3& c, Vector3& x);
00058    
00059 protected:
00061   ArticulatedLimbPVector limbs;
00062 
00063    void deleteLimbs();
00064 };
00065 
00066 #endif //ARTICULATEDAGENTBASE_H

Thyrix homepageUsers' guide

(C) Arxia 2004-2005