Skip to content

Instantly share code, notes, and snippets.

@mxgrey
Last active March 23, 2016 18:50
Show Gist options
  • Save mxgrey/df0056ce66925105adeb to your computer and use it in GitHub Desktop.
Save mxgrey/df0056ce66925105adeb to your computer and use it in GitHub Desktop.
class Joint : public virtual AddonManager
{
public:
struct Properties // First category of Properties
{
std::string mName;
Eigen::Isometry3d mTransformFromParent;
Eigen::Isometry3d mTransformFromChild;
ActuatorType mActuatorType;
};
struct ExtendedProperties // Third category of Properties
: Properties
{
AddonProperties mAddonProperties; // Second category of Properties
ExtendedProperties(const Properties& properties, const AddonProperties& addonProperties);
};
void setProperties(const Properties& properties)
{
// TODO: Set mProperties and trigger any flags that need to be dirtied
}
void setExtendedProperties(const ExtendedProperties& properties)
{
setProperties(static_cast<const Properties&>(properties));
AddonManager::setAddonProperties(properties.mAddonProperties);
}
const Properties& getProperties() const
{
return mProperties;
}
ExtendedProperties getExtendedProperties() const
{
return ExtendedProperties(mProperties, getAddonProperties());
}
protected:
Properties mProperties;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment