User:Le Forgeron/compound
< User:Le Forgeron
Jump to navigation
Jump to search
Revision as of 11:10, 4 July 2018 by Le Forgeron (talk | contribs) (Created page with "{{User:Le_Forgeron/HgPovray38/soon}} == Access to part of compound object == Compound objects can be made of: * Constructive Solid Geometry (CSG : difference, union, merge, ...")
- Everything about HgPovray38 in User:Le_Forgeron/HgPovray38
- Not yet available
Access to part of compound object
Compound objects can be made of:
- Constructive Solid Geometry (CSG : difference, union, merge, intersection)
- Generalised Symetric Difference (GSD: interunion, intermerge)
Data access
The children
function take an object as parameter, and return the number of first level sub-objects in it.
- if parameter is not compound compatible, it returns -1
Getting a copy of an object inside a compound object
A small SDL extension, to retrieve the object inside an existing compound object (CSG or GSD).
child { CSG_Object_ID }( Index )
The index start at 0 for the first child of the CSG. Only the first level of the CSG is explored (recursion in CSG structure must be handled the same way: with recursion).
It is recommended to use children( CSG_Object_ID )
to check the object first, as child
generates an error whenever:
- the object is not compound
- the index is out of bound in regard to the number of first level subobject in the compound object