Skip to content

Newton API specs

hyuglim edited this page Jan 17, 2017 · 10 revisions

The following will go into the header file for Newton API. The caller of the API should call getPhysics whenever an unknown type is detected and fill in Physics field of NewtonIrNode with the returned value. The caller should also call checkSingleConstraint at appropriate times. The Report struct will contain the results of this call.

// COMPILE OR RUN TIME METHODS

Physics* getPhysics(char* physicsIdentifierString); Report* checkSingleConstraint(NewtonIrNode* subtreeRoot);

// SANITY MEHTODS

NewtonIrNode* getAST(); Dimension* getAllDimensions(); Dimension* getDimensionByName(char * dimensionName); Physics* getAllPhysics(); Physics* getPhysicsByName(char * physicsName);

NewtonIrNode should have dimension, physics, values, type, source info, .. just reuse NoisyIrNode minus all the scope nodes

For the Newton Standard AST, we will just reuse NoisyIrNode minus all the scope nodes NewtonIrNode should have dimension, physics, values, type, source info, ..

Clone this wiki locally