CompareInventorSceneSampling¶
- MLModule¶
 author
package
dll
definition
see also
OffscreenRenderer,VoxelizeInventorScene,ImageCompare,DicomTreeComparekeywords
offscreen,rendering,testing,comparison,inventor,scene,graph
Purpose¶
CompareInventorSceneSampling allows the storage of an Open Inventor scene as rendered primitives and provides comparison functionality to check whether a stored scene equals the currently connected one. Therefore it is a useful module to write tests for scene object modules.
Caveats:
Primitives can only be compared if the Open Inventor modules which generate them also implement the SoCallbackAction correctly.
Texture features are compared, however, but not the contents of the texture images themselves.
On SoText2 nodes all field contents are also stored and restored for comparisons although not rendered as primitives. It has been implemented as special case since it’s often used and important for testing.
Windows¶
Default Panel¶
Input Fields¶
inInventorScene¶
- name: inInventorScene, type: SoNode¶
 The Open Inventor scene graph to be stored as rendered primitives or to be compared with.
Parameter Fields¶
Field Index¶
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
|
  | 
|
  | 
Visible Fields¶
File Name¶
- name: fileName, type: String¶
 The file name in which the primitives can be stored or from which the primitives are read when compared.
Save¶
Remove File¶
Compare¶
- name: compare, type: Trigger¶
 Renders the connected scene graph as primitives and compares them with those loaded from the file defined in
File Name. If they equal theTest Passedis enabled, otherwise disabled. IfPost ML error on failureis enabled and comparison fails then also an ML error is posted as described forPost ML error on failure.
Float Epsilon¶
- name: floatEpsilon, type: Float, default: 0.001, minimum: 0¶
 When comparing a primitives from a stored file and rendered ones from the connected input scene then floating point numbers typically will normally differ due imprecise numerical calculations. This epsilon is the maximum difference allowed between floating point number before they are considered different.
Post ML error on failure¶
- name: postMLErrorOnFailure, type: Bool, default: TRUE¶
 If enabled and a comparison with
Compareor a save operation withSavefails, then an ML error is posted to the ML error handler. This is useful to make scene equality tests fail. If disabled then onlyStatusandTest Passedwill show information about the success of the recent operations.
Error Post Prefix¶
- name: errorPostPrefix, type: String, default: Failure in scene primitive operation:¶
 Only sensitive if
Post ML error on failureis enabled. If that one is on and an operation fails then the posted ML error log will getError Post Prefixas prefix. This can be useful to describe the type of the error, or to make differences to the results of other compare modules more obvious.
Num Primitives¶
- name: numPrimitives, type: Integer, minimum: 0, persistent: no¶
 Shows the whole number of stored primitives (vertices+lines+triangles) after save operations.
Num Vertices¶
- name: numVertices, type: Integer, minimum: 0, persistent: no¶
 Shows the number of stored vertices after save operations.
Num Lines¶
- name: numLines, type: Integer, minimum: 0, persistent: no¶
 Shows the number of stored lines after save operations.
Num Triangles¶
- name: numTriangles, type: Integer, minimum: 0, persistent: no¶
 Shows the number of stored triangles after save operations.
Test Passed¶
- name: testPassed, type: Bool, persistent: no¶
 Checked after a successful compare operation with
Compare, otherwise false. Can be used to test for a successful operation, especially if ML error posting withPost ML error on failureis disabled.
Status¶
- name: status, type: String, persistent: no¶
 Shows information about and results of the recently performed module operation.