Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add properties to Geometry components #1008

Closed
NickDraper opened this issue Jun 2, 2008 · 2 comments
Closed

Add properties to Geometry components #1008

NickDraper opened this issue Jun 2, 2008 · 2 comments
Assignees
Milestone

Comments

@NickDraper
Copy link
Contributor

As discussed between Nick and Laurent on Monday 02/06/2008.

The properties need to be able to handle general data values such as chopper speed and angle, but also modifiers to the geometry such as position and rotation modifiers (to account for motors).

The values need to be accessible through the Geometry object, but must not themselves be stored within the instrument tree as we need to share the geometry structure between workspaces that may have different properties.

One possibility would be to have any geometry objects found by through a workspace to be a returned as a throw away object facade that holds a pointer to the object from the geometry tree and a pointer to the relevant properties. This class would only be instantiated from the various data on demand and by using a shared pointer disposed of when no longer needed.

I’ve thought this through a bit more and attached a couple of class diagrams. Broadly The workspace holds a Parameterized instrument, not an Instrument (although they share an IInstrument interface). The Parameterized Instrument is just a composition of the Instrument and a ParameterMap. When you ask a Parmaeterized Instrument for a component you will actually be given a ParameterisedComponent, the main difference is that the Parameterized component has a shared pointer to the ParameterMap.
Within ParameterizedComponent the GetPos, getRelativePos and getRotation methods would be overloaded to check the ParameterMap for any modifications. Also the getParent function would be altered to return another Parameterized Component, allowing a full traversal up the tree.

@NickDraper
Copy link
Contributor Author

This issue was originally trac ticket 160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants