marker
A surface position marker.
Details
Example
solid a = sphere()
marker m = a.mark( <[1.0, 1.0, 1.0]> )
solid b = scaling( 1.0, 1.0, 2.0 ) >> a
echo( m.pos( b ) )
Members
- bool is_attached( solid s )
-
Returns, whether the marker is attached to a certain solid. Solids inherit markers when they are derived from other solids.
- vector pos( solid s )
-
Returns the position of the marker on solid s, if the marker is attached to the solid. (Otherwise it returns a vector <[0,0,0]>.)
- vector normal( solid s )
-
Returns the normal at the position of the marker on solid s, if the marker is attached to the solid. (Otherwise it returns a vector <[0,0,1]>.)
- vector t1( solid s )
-
Returns one tangential vector at the position of the marker on solid s, if the marker is attached to the solid. (Otherwise it returns a vector <[1,0,0]>.) In combination with member t2 this can be used for setting an rotational orientation in the tangential plane.
- vector t2( solid s )
-
Returns one tangential vector at the position of the marker on solid s that is orthogonal to t1, if the marker is attached to the solid. (Otherwise it returns a vector <[0,1,0]>.) In combination with member a1 this can be used for setting an rotational orientation in the tangential plane.