|
Purpose:
|
Defines a class to control output from IHL.
|
|
|
Derivation:
|
IHL_OUTPUT_MANAGER : -
|
|
|
Filename:
|
ihl/ihl_husk/meshmgr/ihloutp.hxx
|
|
|
Description:
|
By deriving a child of this class, the application can control output from IHL. (For example, the
IHL_STDOUT_MANAGER class is a child of
IHL_OUTPUT_MANAGER, whose methods have been written to define how output is processed in the default case where the application has not yet specified any output manager.)
|
|
|
The application controls what happens to the hidden line output by overriding the
announce_2D_segment,
announce_3D_segment, and
announce_next_object methods.
|
|
|
The application activates a particular output manager by calling
api_ihl_set_output_manager and passing it an instance of the
IHL_OUTPUT_MANAGER class.
|
|
|
The application specifies the type of hidden line output needed by calling the
need_3D_coordinates,
need_hidden_segments, and
need_interior_segments methods.
|
|
|
Hidden line output is then generated by calling the
api_ihl_compute_from_meshes function and the resulting output is handled by the active output manager.
|
|
|
The
IHL_OUTPUT_MANAGER class works similarly to the output manager of the faceter.
|
|
|
Constructor:
|
public: IHL_OUTPUT_MANAGER::IHL_OUTPUT_MANAGER
();
|
|
|
C++ allocation constructor requests memory for this object but does not populate it.
|
|
|
|
|
|
Destructor:
|
public: IHL_OUTPUT_MANAGER::~IHL_OUTPUT_MANAGER
();
|
|
|
C++ destructor for
IHL_OUTPUT_MANAGER which deallocates memory.
|
|
|
|
|
Methods:
|
public: virtual void
|
|
|
IHL_OUTPUT_MANAGER::add_seg_to_list (
|
|
|
IHL_SEGMENT* seg
|
|
// pointer to segment
|
|
|
);
|
|
|
Add the segment to the segment list.
|
|
|
|
|
|
|
public: virtual void
|
|
|
IHL_OUTPUT_MANAGER::announce_2D_segment (
|
|
|
double* lseg,
|
// array of 4 doubles
|
|
|
|
|
// with start/end
|
|
|
|
|
// 2D-coordinates
|
|
|
double* l3seg,
|
// array of 6 doubles
|
|
|
|
|
// with start/end
|
|
|
|
|
// 3D-coordinates
|
|
|
double* lseguv,
|
// array of 4 doubles
|
|
|
|
|
// with start/end
|
|
|
|
|
// uv-coordinates
|
|
|
double* lsegt,
|
// array of 2 doubles
|
|
|
|
|
// with start/end tpars
|
|
|
void* tag,
|
// void* from the
|
|
|
|
|
// corresponding PE_EDGE
|
|
|
logical fVisible,
|
// TRUE if segment is
|
|
|
|
|
// visible
|
|
|
double tpar,
|
// tpar from begin to end
|
|
|
|
|
// of segment(silh point)
|
|
|
logical onsil,
|
// if segment on
|
|
|
|
|
// silhouette edge
|
|
|
IHL_SEGMENT_JOIN_TYPE
|
// how to connect to
|
|
|
|
join
|
// cur_seg
|
|
|
);
|
|
|
Announces to the draw routine that a 2D segment needs to be drawn.
|
|
|
|
|
|
|
public: virtual void
|
|
|
IHL_OUTPUT_MANAGER::announce_3D_segment (
|
|
|
double* lseg,
|
//array of 6 doubles with
|
|
|
|
|
// start/end
|
|
|
|
|
// 3D-coordinates
|
|
|
void* tag,
|
// void* from the
|
|
|
|
|
// corresponding PE_EDGE
|
|
|
logical fVisible
|
// TRUE if segment is
|
|
|
|
|
// visible
|
|
|
);
|
|
|
Announces to the draw routine that a 3D segment needs to be drawn.
|
|
|
|
|
|
|
public: virtual void
|
|
|
IHL_OUTPUT_MANAGER::announce_next_object ();
|
|
|
Announces to the draw routine that
IHL will compute line segments for the next object in the list of bodies (meshes). It is called once for each body/mesh but it is the responsibility of the derived class to keep track of the bodies.
IHL_STDOUT_MANAGER overrides this to attach
ATTRIB_IHL_VW attributes to bodies.
|
|
|
|
|
|
|
public: virtual IHL_SEGMENT* IHL_OUTPUT_MANAGER::
|
|
|
get_cur_seg ();
|
|
|
Get the current segment which is newly allocated.
|
|
|
|
|
|
|
public: virtual logical
|
|
|
IHL_OUTPUT_MANAGER::need_3D_coordinates ();
|
|
|
Override this method and return
TRUE if you wish
IHL to output 3D coordinates in the line segments rather than 2D. The default is
FALSE.
|
|
|
|
|
|
|
public: virtual logical
|
|
|
IHL_OUTPUT_MANAGER::need_hidden_segments ();
|
|
|
Override this method and return
TRUE if you wish
IHL to output visible and nonvisible line segments. The default is
FALSE.
|
|
|
|
|
|
|
public: virtual logical
|
|
|
IHL_OUTPUT_MANAGER::need_interior_segments ();
|
|
|
Override this method and return
TRUE if you wish
IHL to output line segments interior to a face. The default is
FALSE.
|
|
|
|
|
|
|
public: virtual logical
|
|
|
IHL_OUTPUT_MANAGER::need_no_hidden_calc ();
|
|
|
Override this method and return
TRUE if you wish
IHL to not calculate hidden line and only output silhouette segments. The default is
FALSE.
|
|
|
|
|
|
|
public: virtual void
|
|
|
IHL_OUTPUT_MANAGER::set_cur_seg (
|
|
|
IHL_SEGMENT* seg
|
// pointer to segment
|
|
|
);
|
|
|
Set the current segment which is newly allocated
|