Difference between revisions of "Portal:CoherencyTest"

From COLLADA Public Wiki
Jump to: navigation, search
(New page: {{portalheader|title=COLLADA DOM|description=Collected information about the COLLADA DOM API}} __NOTOC__ <div style="background-color: #eeeeee; border:1px solid #999999; color:#000; paddi...)
 
Line 1: Line 1:
{{portalheader|title=COLLADA DOM|description=Collected information about the COLLADA DOM API}}
+
{{portalheader|title=COLLADA CoherencyTest|description=It is a simple test that check if a COLLADA document is properly composed}}
 
__NOTOC__
 
__NOTOC__
 
<div style="background-color: #eeeeee;  border:1px solid #999999; color:#000; padding-top: 3px; padding-left:5px; padding-right:5px; padding-bottom: 3px;">
 
<div style="background-color: #eeeeee;  border:1px solid #999999; color:#000; padding-top: 3px; padding-left:5px; padding-right:5px; padding-bottom: 3px;">
  
This '''COLLADA DOM portal''' is a place to collect links for information about the API. Anyone can browse those pages, insert questions, add more material, and so on. So please do. For more info, see [[Help:editing wiki articles|editing wiki articles]].
+
COLLADA Coherency Test is a command line version of CoherencyTest from
 +
COLLADA Refinery. It will check if a Collada dae files is coherent or
 +
properly compose. It is build using Collada Dom Library from
 +
http://sourceforge.net/projects/collada-dom
 +
 
 +
It is developed in C/C++ and build using MSVC.
 +
 
 +
If you have any sugguest of what should go into the coherencytest,
 +
please email me at herbert_law@playstation.sony.com
 +
 
 +
==List of Checks==
 +
Check_links      -It checks if all id are valid reference and if we
 +
                  can resolveElement and getElement from a link   
 +
 
 +
Check_unique_id -It checks if all Ids in each document are unique   
 +
 
 +
Check_counts -It checks number counts are correctly set, eg.
 +
                  skin vertex count should be = mesh vertex count   
 +
                  accessor has the right count on arrays from stride
 +
                  and counts.
 +
 
 +
Check_files      -It checks if the image files, cg/fx files, and other
 +
                  non-dae files that the document referenced exist   
 +
 
 +
Check_textures  -It checks if the textures are correctly defined/used
 +
                  (image, surface, sampler, instancing...) <texture>
 +
                  shouldn't directly reference to <image> id.
 +
                  it should reference <newparam>'s sid, and have
 +
                  <sampler2D> with <source> reference to another
 +
                  <newparam>'s sid that have <surface> with
 +
                  <init_from> refernce to <image> id.
 +
 
 +
Check_URI        -It checks if the URI are correct. It should also
 +
                  check for unescaped spaces because a xml validator
 +
                  won't catch the problem. Reference
 +
                  http://www.w3.org/TR/xmlschema-2/#anyURI
 +
 
 +
Check_schema    -It checks if the document validates against the Schema 
 +
 
 +
Check_inputs    -It checks if the required number of input elements
 +
                  are present and that they have the correct semantic
 +
                  values for their sources. 
 +
 
 +
Check_skin      -It will check if values in name_array should only
 +
                  reference to an existing SID, and values in
 +
                  IDREF_array should only reference to an existing ID 
 +
 
 +
Check_InstanceGeometry -It checks if all Intance_geometry has
 +
                  bind_material that has a correct matching
 +
                  bind_material between symbol and target
 +
 
 +
Check_Controller -It checks if skin have same number of vertices
 +
                  weight as the vertices number of geometry. It
 +
                  checks if morph have same number of vertices
 +
                  from source geometry as number of vertices in
 +
                  all other target geometry.
 +
 
 +
Check_Float_array -It checks if NaN, INF, -INF exist in all the float
 +
                  array 
 +
 
 +
Check_sid   -It checks if a sid is a valid sid 
 +
 
 +
Check_morph      -It checks if a morph have same number of targets and target_weights
 +
                  -It checks if all targets have the same number of vertices.
 +
 
 +
 
 +
 
  
== Topics==
 
 
===User guide===
 
===User guide===
The [[COLLADA DOM user guide]] contains the following chapters:
+
Usage: coherencytest filename.dae ... [OPTION]...
{{:COLLADA DOM user guide/TOC}} <!-- to edit this list, go to the article COLLADA DOM user guide/TOC (you can put that in the search box) -->
+
option:                           \n"
 +
filename.dae   - check collada file filename.dae,
 +
                            filename.dae should be a url format
 +
-log filename.log        - log warnings and errors in filename.log         
 +
-check SCHEMA COUNTS ..  - check SCHEMA and COUNTS only, test all
 +
                            if not specify any
 +
                            available checks:            
 +
                            SCHEMA
 +
                            UNIQUE_ID
 +
                            COUNTS
 +
                            LINKS
 +
                            TEXTURE
 +
                            FILES
 +
                            SKIN
 +
                            FLOAT_ARRAY
 +
                            CIRCULR_REFERENCE
 +
                            INDEX_RANGE
 +
    SID
 +
    MORPH
 +
-ignore SCHEMA COUNTS ..  - ignore SCHEMA and COUNTS only, test all
 +
                            if not specify any
 +
-quiet -q                - disable printfs and MessageBox
 +
-version                  - print version and copyright information
 +
-xmlschema schema.xsd    - use your own version of schema.xsd to do schema check
 +
                          - the defualt schema is http://www.collada.org/2005/11/COLLADASchema.xsd
 +
 
  
 
===Subsystems===
 
===Subsystems===
Line 20: Line 110:
 
* [[DOM COLLADA code generator]]
 
* [[DOM COLLADA code generator]]
  
==See also==
+
==Changes (for developer)==
===Terminology===
+
 
* [[:Category:COLLADA terminology]]
+
  Date      Version    Description
* [[:Category:DOM terminology]]
+
- 04-24-2007 1.0        Inital Version
* [[:Category:XML terminology]]
+
- 04-26-2007 printf date and time when test starts
 +
Add separator in log file between on differen
 +
file checks
 +
- 05-07-2007            add #ifdef and -ctf support
 +
Split into header files
 +
                        catch all daeErrorhandler errors as test fails
 +
                        Fix Accessor CHECK_count
 +
size of param should be <= stride
 +
size of param + offset should be <= stride
 +
size of data_array should be reference from
 +
                        accessor source instead of the one within the
 +
same source.
 +
- 05-09-2007 1.1        Add make files to build in linux
 +
- 06-11-2007         pass all collada_dom errors and warnings as
 +
CoherencyTest errors and warnings
 +
 
 +
- 06-19-2007 update makefiles for linux build
 +
- 07-09-2007 Add check_Sid if Sid contains any illegal characters
 +
add Check_bind_material to check if <instance_controller>
 +
has <bind_material> correctly.
 +
add check if controller has skin or morph.
 +
- 07-18-2007 add -xmlschema option to use your own schema.xsd
 +
- 07-19-2007 remove dependency on iconv
  
===Miscellaneous===
+
- 07-30-2007 1.2 if inputs that should reference to source is not
* [[DOM API changes]]
+
reference to a source, report error
* [[DOM future work]]
+
if Index_Range in CHECK_Index_Range() is 0,
* [[Building libxml]]
 
  
 
{{DOM navigation}}
 
{{DOM navigation}}

Revision as of 21:20, 30 July 2007

Welcome to the COLLADA CoherencyTest portal
It is a simple test that check if a COLLADA document is properly composed

Portals:  • Products  • Extensions  • Tools  • Conditioners  • COLLADA DOM  • Coherency Test  • Tech topics  • Tutorials

COLLADA Coherency Test is a command line version of CoherencyTest from COLLADA Refinery. It will check if a Collada dae files is coherent or properly compose. It is build using Collada Dom Library from http://sourceforge.net/projects/collada-dom

It is developed in C/C++ and build using MSVC.

If you have any sugguest of what should go into the coherencytest, please email me at herbert_law@playstation.sony.com

List of Checks

Check_links -It checks if all id are valid reference and if we

                 can resolveElement and getElement from a link    

Check_unique_id -It checks if all Ids in each document are unique

Check_counts -It checks number counts are correctly set, eg.

                 skin vertex count should be = mesh vertex count     
                 accessor has the right count on arrays from stride
                 and counts.

Check_files -It checks if the image files, cg/fx files, and other

                 non-dae files that the document referenced exist     

Check_textures -It checks if the textures are correctly defined/used

                 (image, surface, sampler, instancing...) <texture> 
                 shouldn't directly reference to <image> id.
                 it should reference <newparam>'s sid, and have 
                 <sampler2D> with <source> reference to another 
                 <newparam>'s sid that have <surface> with 
                 <init_from> refernce to <image> id.

Check_URI -It checks if the URI are correct. It should also

                 check for unescaped spaces because a xml validator 
                 won't catch the problem. Reference 
                 http://www.w3.org/TR/xmlschema-2/#anyURI

Check_schema -It checks if the document validates against the Schema

Check_inputs -It checks if the required number of input elements

                 are present and that they have the correct semantic 
                 values for their sources.   

Check_skin -It will check if values in name_array should only

                 reference to an existing SID, and values in 
                 IDREF_array should only reference to an existing ID  

Check_InstanceGeometry -It checks if all Intance_geometry has

                 bind_material that has a correct matching 
                 bind_material between symbol and target

Check_Controller -It checks if skin have same number of vertices

                 weight as the vertices number of geometry. It 
                 checks if morph have same number of vertices 
                 from source geometry as number of vertices in 
                 all other target geometry.

Check_Float_array -It checks if NaN, INF, -INF exist in all the float

                 array  

Check_sid -It checks if a sid is a valid sid

Check_morph -It checks if a morph have same number of targets and target_weights

                 -It checks if all targets have the same number of vertices.



User guide

Usage: coherencytest filename.dae ... [OPTION]...

option:                           \n"
filename.dae		   - check collada file filename.dae, 
                            filename.dae should be a url format
-log filename.log         - log warnings and errors in filename.log          
-check SCHEMA COUNTS ..   - check SCHEMA and COUNTS only, test all 
                            if not specify any
                            available checks:              
                            SCHEMA						
                            UNIQUE_ID 					
                            COUNTS						
                            LINKS							
                            TEXTURE					
                            FILES						
                            SKIN						
                            FLOAT_ARRAY				
                            CIRCULR_REFERENCE			
                            INDEX_RANGE

SID MORPH

-ignore SCHEMA COUNTS ..  - ignore SCHEMA and COUNTS only, test all
                            if not specify any
-quiet -q                 - disable printfs and MessageBox
-version                  - print version and copyright information
-xmlschema schema.xsd     - use your own version of schema.xsd to do schema check
                          - the defualt schema is http://www.collada.org/2005/11/COLLADASchema.xsd


Subsystems

Internal, advanced, and conceptual information about the COLLADA DOM:

Changes (for developer)

 Date       Version    Description

- 04-24-2007 1.0 Inital Version - 04-26-2007 printf date and time when test starts Add separator in log file between on differen file checks - 05-07-2007 add #ifdef and -ctf support Split into header files

                       catch all daeErrorhandler errors as test fails
                       Fix Accessor CHECK_count

size of param should be <= stride size of param + offset should be <= stride size of data_array should be reference from

                       accessor source instead of the one within the 

same source. - 05-09-2007 1.1 Add make files to build in linux - 06-11-2007 pass all collada_dom errors and warnings as CoherencyTest errors and warnings

- 06-19-2007 update makefiles for linux build - 07-09-2007 Add check_Sid if Sid contains any illegal characters add Check_bind_material to check if <instance_controller> has <bind_material> correctly. add check if controller has skin or morph. - 07-18-2007 add -xmlschema option to use your own schema.xsd - 07-19-2007 remove dependency on iconv

- 07-30-2007 1.2 if inputs that should reference to source is not reference to a source, report error if Index_Range in CHECK_Index_Range() is 0,


COLLADA DOM - Version 2.4 Historical Reference
List of main articles under the DOM portal.
User Guide chapters:  • Intro  • Architecture  • Setting up  • Working with documents  • Creating docs  • Importing docs  • Representing elements  • Working with elements  • Resolving URIs  • Resolving SIDs  • Using custom COLLADA data  • Integration templates  • Error handling

Systems:  • URI resolver  • Meta  • Load/save flow  • Runtime database  • Memory • StringRef  • Code generator
Additional information:  • What's new  • Backward compatibility  • Future work
Terminology categories:  • COLLADA  • DOM  • XML