Skip to content

Instantly share code, notes, and snippets.

@mxgrey
Last active March 23, 2016 18:51
Show Gist options
  • Save mxgrey/615416de55100d7eeb67 to your computer and use it in GitHub Desktop.
Save mxgrey/615416de55100d7eeb67 to your computer and use it in GitHub Desktop.
class Joint : public virtual ComponentManager
{
public:
struct Properties // First category of Properties
{
std::string mName;
Eigen::Isometry3d mTransformFromParent;
Eigen::Isometry3d mTransformFromChild;
ActuatorType mActuatorType;
};
void setProperties(const Properties& properties)
{
// TODO: Set mProperties and trigger any flags that need to be dirtied
}
const Properties& getProperties() const
{
return mProperties;
}
// These using-declarations are placed here just to let you know that these functions
// exist in ComponentManager. They would not be needed in the actual implementation.
using ComponentProperties = ComponentManager::Properties; // Second category of Properties
using ComponentManager::setComponentProperties;
using ComponentManager::getComponentProperties;
protected:
Properties mProperties;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment