Establishes a procedural link between HOOPS database traversal and immediate mode rendering.
- Parameters:
-
| callbacks | - List of callbacks. |
- Supported Options:
- draw 3d curve(s), draw 3d cylinder(s), draw 3d ellipse(s), draw 3d elliptical arc(s), draw 3d geometry, draw 3d grid(s), draw 3d image(s), draw 3d isoline(s), draw 3d marker(s), draw 3d mesh(es), draw 3d nurbs curve(s), draw 3d nurbs surface(s), draw 3d polygon(s), draw 3d polyline(s), draw 3d polymarker(s), draw 3d polycylinder(s), draw 3d polyedge(s), draw 3d polyhedron, draw 3d shell(s), draw 3d sphere(s), draw 3d surface(s), draw 3d text, draw 3d tristrip(s), draw 3d text area, draw 3d text stroke, draw dc colorized face(s), draw dc colorized line(s), draw dc colorized marker(s), draw dc colorized polyline(s), draw dc colorized polymarker(s), draw dc colorized polytriangle(s), draw dc colorized triangle(s), draw dc cut line(s), draw dc edge(s), draw dc face(s), draw dc gouraud line(s), draw dc gouraud polyline(s), draw dc gouraud polytriangle(s), draw dc gouraud triangle(s), draw dc line(s), draw dc marker(s), draw dc phong polyline(s), draw dc phong polytriangle(s), draw dc polyline(s), draw dc polymarker(s), draw dc polytriangle(s), draw dc reshaded line(s), draw dc reshaded triangle(s), draw dc text area(s), draw dc text stroke(s), draw dc textured polyline(s), draw dc textured polytriangle(s), draw dc triangle(s), draw segment(s), draw segment tree, draw text, draw window(s), draw window frame(s), driver shutdown, driver startup, finish picture, hlr hidden marker(s), hlr hidden polyline(s), hlr marker(s), hlr polyline(s), [no] redraw, segment activity change, select 3d geometry, select 3d marker(s), select 3d polygon(s), select 3d polyline(s), select geometry, select marker(s), select polygon(s), select polyline(s), select segment(s), select segment tree(s), select text, select window(s), set shader
This routine establishes a callback using a name previously made known to the system with
Define_Callback_Name() .
The list of callbacks is a comma-separated list of expressions of the form "callback point = name", where "callback point" is one of the valid IM callback points, and "name" is the name you used in registering the callback function with HC_Define_Callback_Name . This function sets the specified callbacks in the attribute information for the currently open segment.
For each of the callback points whose name is a plural form, e.g. "draw 3d polylines", the singular form, e.g. "draw 3d polyline", is equally acceptable for "callback point". When the system calls one of your callback functions, it passes a list of arguments, which is the argument list for the respective method, and which depends on the callback point. Note that your callback function must have the exact same signature as the corresponding HIC function for the callback point you are registering. Please see The HOOPS I.M. Programming Guide for a list the callback points and their corresponding HIC functions.
The following is a sample of how you might set up a callback:
void draw3dpolyline( struct ht_net_rendition *nr, struct ht_polyline *p )
{
HIC_Draw_3D_Polyline( nr, p );
}
int main()
{
Point pts[5] = {
{ -0.5, -0.5, 0.0 },
{ 0.5, -0.5, 0.0 },
{ 0.5, 0.5, 0.0 },
{ -0.5, 0.5, 0.0 },
{ -0.5, -0.5, 0.0 }
};
HC_Define_Callback_Name ("draw3dpolyline", draw3dpolyline);
HC_Open_Segment ("?picture");
HC_Set_Callback ("draw 3d polylines = draw3dpolyline");
HC_Insert_Polyline(5, pts);
HC_Close_Segment ();
HC_Exit_Program ();
return 0;
}
The following is a brief description of the options available for Set_Callback:
- draw 3d curve(s)
This callback option is the same as the "draw 3d nurbs curve" option which allows you to trap the draw 3d NURBS curve method.
- draw 3d cylinder(s)
This callback option allows you to trap the draw 3d cylinder method.
- draw 3d ellipse(s)
This callback option allows you to trap the draw 3d ellipse method.
- draw 3d elliptical arc(s)
This callback option allows you to trap the draw 3d elliptical arc method.
- draw 3d geometry
This callback point allows you to trap the "draw 3d ..." method for all of the HOOPS 3D geometry types (ellipses, circles, arcs, etc). If you set a callback both at "draw 3d geometry" and at a type-specific callback point like "draw 3d marker", then the latter callback will be called instead of your "draw 3d geometry" callback for that geometry type.
- draw 3d grid(s)
This callback option allows you to trap the draw 3d grid method.
- draw 3d image(s)
This callback option allows you to trap the draw 3d image method.
- draw 3d isoline(s)
This callback option allows you to trap the method used to draw isolines.
- draw 3d marker(s)
This callback option allows you to trap the draw 3d marker method.
- draw 3d mesh(es)
This callback option allows you to trap the draw 3d mesh method.
- draw 3d nurbs curve(s)
This callback is the same as the "draw 3d curve" callback which allows you to trap the draw 3d NURBS curve method.
- draw 3d nurbs surface(s)
This callback option is the same as the "draw 3d surface" option which allows you to trap the draw 3d NURBS surface method.
- draw 3d polygon(s)
This callback option allows you to trap the draw 3d polygon method.
- draw 3d polyline(s)
This callback option allows you to trap the draw 3d polyline method.
- draw 3d polymarker(s)
This callback option allows you to trap the draw 3d polymarker method.
- draw 3d polycylinder(s)
This callback option allows you to trap the draw 3d polycylinder method.
- draw 3d polyedge(s)
This callback option allows you to trap the draw 3d polyedge method.
- draw 3d polyhedron(s)
This callback option allows you to trap the draw 3d polyhedron method.
- draw 3d shell(s)
This callback option allows you to trap the draw 3d shell method.
- draw 3d sphere(s)
This callback option allows you to trap the draw 3d sphere method.
- draw 3d surface(s)
This callback option is the same as the "draw 3d NURBS surface" option which allows you to trap the draw 3d NURBS surface method.
- draw 3d text
This callback option allows you to trap the draw 3d text where it is called once for each inserted string.
- draw 3d tristrip(s)
This callback option allows you to trap the draw 3d tristrip method.
- draw 3d text area
The "draw 3d text area" callback option allows you an entry point into the "draw 3d polygon" method when it is called from "draw text" for transformable text.
- draw 3d text stroke
The "draw 3d text stroke" callback option allows you an entry point to the "draw 3d polyline" method when it is called from the "draw text" method for the transformable text.
- draw dc colorized face(s)
This callback option allows you to trap the draw 3d colorized face method.
- draw dc colorized line(s)
This callback option allows you to trap the draw 3d colorized line method.
- draw dc colorized marker(s)
This callback option allows you to trap the draw 3d colorized marker method.
- draw dc colorized polyline(s)
This callback option allows you to trap the draw 3d colorized polyline method.
- draw dc colorized polymarker(s)
This callback option allows you to trap the draw 3d colorized polymarker method.
- draw dc colorized polytriangle(s)
This callback option allows you to trap the draw 3d colorized polytriangle method.
- draw dc colorized triangle(s)
This callback option allows you to trap the draw 3d colorized triangle method.
- draw dc cut line(s)
This callback option allows you to trap the draw dc cut line method.
- draw dc edge(s)
This callback option allows you to trap the draw dc edge method.
- draw dc face(s)
This callback option allows you to trap the draw dc face method.
- draw dc gouraud line(s)
This callback option allows you to trap the draw dc gouraud line method.
- draw dc gouraud polyline(s)
This callback option allows you to trap the draw dc gouraud polyline method.
- draw dc gouraud polytriangle(s)
This callback option allows you to trap the draw dc gouraud polytriangle method.
- draw dc gouraud triangle(s)
This callback option allows you to trap the draw dc gouraud triangle method.
- draw dc line(s)
This callback option allows you to trap the draw dc line method.
- draw dc marker(s)
This callback option allows you to trap the draw dc marker method.
- draw dc phong polyline(s)
This callback option allows you to trap the draw dc phong polyline method.
- draw dc phong polytriangle(s)
This callback option allows you to trap the draw dc phong polytriangle method.
- draw dc polyline(s)
This callback option allows you to trap the draw dc polyline method.
- draw dc polymarker(s)
This callback option allows you to trap the draw dc polymarker method.
- draw dc polytriangle(s)
This callback option allows you to trap the draw dc polytriangle method.
- draw dc reshaded line(s)
This callback option allows you to trap the draw dc reshaded line method.
- draw dc reshaded triangle(s)
This callback option allows you to trap the draw dc reshaded triangle method.
- draw dc text area
The "draw dc text area" callback option allows you an entry point into the "draw dc face" method when it is called through the text drawing pipeline.
- draw dc text stroke
The "draw dc text area" callback option allows you an entry point into the "draw dc polyline" method when it is called through the text drawing pipeline.
- draw dc texture polyline(s)
This callback option allows you to trap the draw dc texture polyline method.
- draw dc texture polytriangle(s)
This callback option allows you to trap the draw dc texture polytriangle method.
- draw dc triangle(s)
This callback option allows you to trap the draw dc triangle method.
- draw segment(s)
This callback is called at the beginning of processing each segment for which it is in effect.
- draw segment tree(s)
This callback is called at the beginning of processing each segment for which it is in effect. However, it is not called successively for each succesive subsegment.
- draw text
The "draw text" callback option is at an intermediate level of the text processing, below the level of "draw 3d text".
- draw window(s)
This callback is called to fill in the segment's window with the background pattern, subject to the current hard clip limits
- draw window frame(s)
This callback is called to draw a frame around a segment's window.
- driver shutdown
The "driver shutdown" callback is called when the HOOPS driver instance is destroyed. This callback does not correspond with any HIC function.
- driver startup
The "driver startup" callback is called when the HOOPS driver instance is created. This callback does not correspond with any HIC function.
- finish picture
The "finish picture" callback is called when the HOOPS driver finishes drawing to a device.
- hlr hidden marker
When hidden line is the active hidden surface removal algorithm, this callback option allows you to trap the "draw dc marker" method so that you can access the hidden makers.
- hlr hidden polyline
When hidden line is the active hidden surface removal algorithm, this callback option allows you to trap the "draw dc polyline" method so that you can access the hidden polylines.
- hlr marker
When hidden line is the active hidden surface removal algorithm, this callback option allows you to trap the "draw dc marker" method so that you can access the visible makers.
- hlr polyline
When hidden line is the active hidden surface removal algorithm, this callback option allows you to trap the "draw dc polyline" method so that you can access the visible polylines.
- [no] redraw
This option tells HOOPS to redraw or not to redraw the scene after any user defined callback has been called.
- segment activity change
This callback is called when there has been a change to the HOOPS database. The associated callback function is passed an HT_Segment pointer and two ints indicating old and new activity bits, respectively. The callback does not correspond to any HIC function.
- select 3d geometry
This callback option is the same as the "select geometry" which allows you to trap the select geometry method.
- select 3d marker(s)
This callback option is the same as the "select marker" which allows you to trap the select geometry method for markers.
- select 3d polygon(s)
This callback option is the same as the "select polygon" which allows you to trap the select geometry method for polygons.
- select 3d polyline(s)
This callback option is the same as the "select polyline" which allows you to trap the select geometry method for polylines.
- select geometry
This callback option is the same as the "select 3d geometry" which allows you to trap the select geometry method.
- select marker
This callback option is the same as the "select 3d marker" which allows you to trap the select geometry method for markers.
- select polygon
This callback option is the same as the "select 3d polygon" which allows you to trap the select geometry method for polygons.
- select polyline
This callback option is the same as the "select 3d polyline" which allows you to trap the select geometry method for polylines.
- select segment(s)
This callback option allows you to trap the select segment method.
- select segment tree(s)
This callback option allows you to trap the select segment method without getting recursive calls through the subsequent child segments.
- select text
This callback option is the same as the "select 3d text" which allows you to trap the select text method for text.
- select window(s)
This callback option allows you to trap the select window method.
The
Set_Callback_With_Data() version of this interface allows the user to provide a pointer to some data that will be accessible within this callback. The data is accessible via a call to HIC_Show_Callback_Data from within the callback function.
- See also: