Last active
March 23, 2016 18:50
-
-
Save mxgrey/df0056ce66925105adeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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