9.5.2

Table Of Contents
1102 CHAPTER 22
XPRESSO EDITOR 1103
Distance: If the ray has hit a polygon, this port outputs the distance from Ray
Point1 to the polygon rst hit by the ray. To switch on this port, in the Attribute
manager, disable Test Only.
Face Index: If a collision has taken place, this port outputs the index number
of the rst polygon hit by the ray. To switch on this port, in the Attribute
manager, disable Test Only.
Face Normal: If the ray has hit a surface, this port outputs the normal of
the polygon hit. To switch on this port, in the Attribute manager, disable Only
Test.
Hit Position: Outputs the position where the ray rst hit the object (recall
that the ray travels from Ray Point 1 to Ray Point2). This vector can only be
calculated if a collision has taken place. To switch on this port, in the Attribute
manager, disable Test Only. The Hit Position is given in either local or global
coordinates, depending on whether Global Coordinates is enabled in the
Attribute manager.
Is Backface: This port outputs a Bool value that indicates whether the ray
hit a backface (output is 1) or a frontface (output is 0). Note that the direction
of the polygon’s surface normal determines which side is the front and which
is the back.
Phong Normal: In contrast to Face Normal, this port’s output depends on the
normals of the polygons that surround the polygon hit by the ray. To switch
on this port, in the Attribute manager, disable Only Test.
Reference
This Reference node nds the object that is directly below the Cube object (Path = ‘D’ for ‘Down’), i.e.
the Sphere object. Once found, the object (i.e. the Sphere) is then passed to an Object node, which in
turn outputs the object’s name: ‘Sphere’.
With this node, you can access an object using a relative search path. This path is described by the
letters ‘U’, ‘D’, ‘N’ and ‘P. Use ‘U’ and ‘D’ to move up or down a hierarchy level respectively, and ‘N’
and ‘P’ to move to the next or previous element respectively. The Object node also references objects
in this way — see the description of the Object node for more details.