Brief Index      Full Index      Events Index      I.M. Reference

Show_Include_Segment

Functions

HC_KEY Show_Include_Segment (HC_KEY key, char *pathname)

Function Documentation

HC_KEY Show_Include_Segment ( HC_KEY  key,
char *  pathname 
)

Returns the segment that is referenced by an inclusion.

Parameters:
key- Unique numeric identifier pointing to a previously defined include reference.
pathname- Full pathname of the segment that is referenced by key.
Returns:
The key of the segment that is referenced by the passed key.

DETAILS

Given the key returned by a previous call to Include_Segment(), Find_Contents(), or Begin_Contents_Search() in which the type returned was an "include", this routine will indicate which segment was included. This information might be used, for example, to copy the "include" into a new segment in order to use the instanced geometry but change an attribute (e.g.: color).

Show_Include_Segment() returns the key of the segment instead of the pathname.

NOTES

Include Segment Pathnames

Suppose there is an include segment with a pathname such as:


		/include/a/b

wherein "a" contains a matrix, and "b" contains geometry. This segment is used in a scene as follows:

		Open_Segment ("?picture")
		    Include_Segment ("/include/a")
		    Include_Segment ("/include/a/b")
		Close_Segment()

The HOOPS picture in this case would show two versions of the geometry, as one would expect. However, prior to HOOPS 6.2 a selection on either instance of the geometry would have returned the same path:
		/include/a/b 
		<  /driver/msw/window0

From this construct, there was no way to distinguish which version of the object was hit. HOOPS 6.2 added additional arrows to indicate that the selected instance was to a containing segment. Thus, a selection of the direct instance of "b" will be the same as the old version, but a selection of the geometry instanced by an include of the "a" segment will return:
		/include/a/b 
		<<  /driver/msw/window0

Some programs may directly parse the path string and so depend on the old behavior. To accommodate those there is a new System_Option "old style pathnames" which will cause Hoops to generate the old form only.

RESTRICTIONS

See also:
Include_Segment, Begin_Contents_Search.

Brief Index      Full Index      Events Index      I.M. Reference