The ray object uses base point and direction vector properties to define the geometry to be
drawn. In examples, the pRay variable stores a pointer to the ray object.
Base Point
The Base Point property defines the base point of the ray in three-dimensional coordinates. The base point
is the point from which the ray begins, outward in the specified direction. Rotating and moving the ray are
performed relative to the base point. The base point has the coordinates (0,0,0) by default.
To get the base point, use the basePoint() method which does not have arguments and returns the
three-dimensional point as an instance of the OdGePoint3d type. For example:
OdGePoint3d base = pRay->basePoint();
odPrintConsoleString(L"\nBase point = (%g,%g,%g)", base.x, base.y, base.z);
To set the base point, use the setBasePoint() method which requires the three-dimensional point as
an argument of the OdGePoint3d type and does not return a value. For example:
The Direction property defines the direction of the ray in three-dimensional coordinates. The direction is
automatically converted to a unit vector which defines the direction from the base point. The direction
vector has the coordinates (0,0,1) by default.
To get the direction, use the unitDir() method which does not have arguments and returns the
three-dimensional vector as an instance of the OdGeVector3d type. For example:
To set the direction, use the setUnitDir() method which requires the three-dimensional vector as
an argument of the OdGeVector3d type and does not return a value. For example: