From the above line that i extracted from the collada file.I just like to know what actually collada does with centimeters or meter or feet.I found that this is used for scaling purpose.if so then what could make differences from centimeters,meter,foot etc.What collada do with centimeters…
COLLADA stores the unit of distance measure of the real world values in the document or asset.
It means that all the real world values of distance and position in the asset (document in this case) are in centimeters. For example, a vertex position of (1,2,3) means (1cm,2cm,3cm).
If your application works in centimeters (like Maya) then you’re fine.
Otherwise you may have to apply the appropriate scale to bring the values into proportion with other objects that are modeled with a different measure of distance. For example, if your viewer is using meters (and you care, i.e. some tools are unit-less) then you would scale that vertex position to (.01m,.02m,0.3m) with the <unit> information.
Examples of real world values affects by the unit of distance include:
[ul]
[li] position[/2rtx1zhu][/li][li] translate[/2rtx1zhu][/li][li] scale[/2rtx1zhu][/li][li] matrix[/2rtx1zhu][/li][li] lookat[/2rtx1zhu][/li][li] znear and zfar (of cameras)[/2rtx1zhu][/li][li] gravity[/2rtx1zhu][/li][] animation data of any of the above[/*2rtx1zhu][/ul]
I would like to specify a unit in meters, instead of centimeters (as seen in most samples):
daeElement* unit = asset->add("unit");
result = unit->setAttribute("meter", "1.0");
assert(result);
result = unit->setAttribute("name", "meter");
assert(result);
I don’t get any assert, so I first guessed it was fine, but in the .dae my unit section is empty :