39 lines
998 B
C++
39 lines
998 B
C++
#pragma once
|
|
#include <App/V8/Tree/Instance.hpp>
|
|
#include <App/V8/DataModel/PartInstance.hpp>
|
|
#include <App/V8/World/ComPlicitNgine.hpp>
|
|
#include <App/V8/World/JointInstance.hpp>
|
|
|
|
namespace RNR
|
|
{
|
|
class Weld : public JointInstance
|
|
{
|
|
btRigidBody* m_aBody;
|
|
PartInstance* m_aInstance;
|
|
|
|
btRigidBody* m_bBody;
|
|
PartInstance* m_bInstance;
|
|
|
|
btFixedConstraint* m_constraint;
|
|
public:
|
|
Weld();
|
|
~Weld();
|
|
virtual std::string getClassName() { return "Weld"; }
|
|
|
|
void weld(PartInstance* a, PartInstance* b);
|
|
bool create();
|
|
void destroy();
|
|
|
|
bool getBroken();
|
|
PartInstance* getPartA() { return m_aInstance; }
|
|
PartInstance* getPartB() { return m_bInstance; }
|
|
};
|
|
|
|
class Snap : public Weld
|
|
{
|
|
// they're basically the same
|
|
public:
|
|
virtual std::string getClassName() { return "Snap"; }
|
|
virtual std::string getExplorerIcon() { return "Weld"; }
|
|
};
|
|
} |