API:IDimension
From Wiketomica
| API Home | Participants | API | Discussion | Demos | Downloads | Documentation | Contact Us | Acknowledgements |
Reason For Existence
IDimension is needed so that simulation elements can declare the dimension (length, mass, time, etc) of various parameters that are relevant to that object.
Proposed Interface
interface IDimension {
/**
* Returns the unit of this dimension as derived in the given system of units.
*/
IUnit getUnit(in IUnitSystem aUnitSystem);
/**
* The signature is the exponents of each of the base dimensions forming the
* given dimension. Base dimensions are, in order: length, mass, time, current,
* temperature, number, luminosity.
*/
void getSignature(out unsigned long count,
[array, size_is(count), retval] out double tags);
}
Use
Graphical elements that interact with the user can then use the dimension to guess an appropriate IUnit for some default IUnitSystem, or to give the user a choice of IUnit.
An IDimension might be associated with IData from a data stream, or simulation element (such as a molecular dynamics integrator) might also have a property with a dimension ("time" for a time step).
