class HT_Vertex_Set
See Also
HT_Point_Set, HT_Tristrip,HT_Vertex_Set_Data,HT_Renderer::draw_3D_tristrip, HT_Line_Strip, HT_Marker_Strip, HT_Point
Access Methods
connectivity
Defines the interconnection of vertices in the vertex set.
connectivity_length
Returns the size of the connectivity array.
vertex_colors
Defines the color per vertex.
vertex_homogeneous
Defines the homogeneous perspective projection term per vertex.
vertex_normals
Defines the normals per vertex.
vertex_parameters
Defines the texture mapping parameters per vertex.
Constructor/Destructor
HT_Vertex_Set
Constructs an HT_Vertex_Set object.
~HT_Vertex_Set
Destroys an HT_Vertex_Set object.  
Friend Class
HT_Vertex_Set_Data::set_vertex_parameters
Allows for "n" triplets of texture vertex parameter data to be associated with each vertex.



HT_Vertex_Set::connectivity

Purpose

Defines the interconnection of vertices in the vertex set. Synopsis
void set_connectivity (int count, int const * connect, HT_Boolean copy)
int const * connectivity (void)
void set_connectivity (void * dummy)
Details The connectivity defines the sequence of vertices defining a higher order object. The contents of the connectivity vary by the object from which the vertex set is derived. For examples of the definition of the connectivity set, see HT_Renderer::draw_3d_linestrip, HT_Renderer::draw_3d_markerstrip, or HT_Renderer::draw_3d_tristrip.

The first method sets the connectivity array. If copy is HK_True, then allocation is made to copy the information, in the array connect, into the object. If copy is HK_False, then no allocation is made. Instead, the object refers directly to the information in the connect array.

The second method returns a pointer to the connectivity information for this object.
 
 


HT_Vertex_Set::connectivity_length

Purpose

Returns the size of the connectivity array. Synopsis
int connectivity_length (void)
Details For more information about the connectivity array, see HT_Vertex_Set::connectivity, in this section.
HT_Vertex_Set::HT_Vertex_Set

Purpose

Creates a vertex set object. Synopsis
HT_Vertex_Set ()
HT_Vertex_Set(int count, HT_Point const * points)
HT_Vertex_Set(int count, HT_Point const * points, HT_Boolean copy)
Details An empty vertex set is created. To add vertices, use member functions of the base class HT_Point_Set. To add colors, normals, or texture parameters, use the member functions of this class. If copy is HK_True, then allocation is made to copy the information, in the array connect, into the object. If copy is HK_False, then no allocation is made. Instead, the object refers directly to the information in the points array.
HT_Vertex_Set::~HT_Vertex_Set

Purpose

Destroys a vertex set object. Synopsis
HT_Vertex_Set (void)
Details The vertex set is deleted and all allocation for the object is released.
HT_Vertex_Set::vertex_colors

Purpose

Defines the color per vertex. Synopsis
void set_vertex_colors (HT_RGB const * colors, HT_Boolean copy)
HT_RGB const * vertex_colors () const
Details This method can be used to read or write the color per vertex information for this vertex set.

The first method sets the vertex colors in this object. If copy is HK_True, then allocation is made to copy the colors, in the array colors, into the object. If copy is FALSE, then no allocation is made. Instead, the object refers directly to the colors in the colors array.

The second method returns a pointer to the vertex color array for this object.
 
 


HT_Vertex_Set::vertex_homogeneous

Purpose

Defines the perspective correction term per vertex. Synopsis
void set_vertex_homogeneous (float const *w, HT_Boolean copy = HK_False)
float const *vertex_homogeneous () const
Details This method can be used to read or write the perspective correction term per vertex information for this vertex set.

The first method sets the vertex perspective corrections in this object. If copy is HK_True, then allocation is made to copy the perspective corrections (in the array perspective correction) into the object. If copy is HK_False, then no allocation is made. Instead, the object refers directly to the perspective correction in the w array.

The second method returns a pointer to the vertex perspective correction array for this object.
 
 


HT_Vertex_Set::vertex_normals

Purpose

Defines the normal per vertex. Synopsis
void set_vertex_normals (
    HT_Vector const *normals,
    HT_Boolean copy = HK_False)
HT_Vector const *vertex_normals () const
Details This method can be used to read or write the normal per vertex information for this vertex set.

The first method sets the vertex normals in this object. If copy is HK_True, then allocation is made to copy the normals, in the array normals, into the object. If copy is HK_False, then no allocation is made. Instead, the object refers directly to the normals in the normals array.

The second method returns a pointer to the vertex normal array for this object.
 
 


HT_Vertex_Set::vertex_parameters

Purpose

Defines the texture parameter per vertex. Synopsis
void set_vertex_parameters (HT_Parameter const *parameters, int width = 1, HT_Boolean copy = HK_False) alter
HT_Parameter const *vertex_parameters () const
Details This method can be used to read or write the texture parameter per vertex information for this vertex set.

The first method sets the vertex texture parameters in this object. If copy is HK_True, then allocation is made to copy the texture parameters, in the array parameters, into the object. If copy is HK_False, then no allocation is made. Instead, the object refers directly to the texture parameters in the parameters array.

The interface now allows for "n" triplets of texture vertex parameter data to be associated with each vertex of tristrips.  This is first seen is in the set_vertex_parameters() member function of HT_Tristrip.  For more information see HT_Vertex_Set::set_vertex_parameters following.

The second method returns a pointer to the vertex texture parameter array for this object.


HT_Vertex_Set_Data::set_vertex_parameters

Purpose

HT_Vertex_Set_Data is a "friend" data class of HT_Vertex_Set. The interface allows for "n" triplets of texture vertex parameter data to be associated with each vertex of, for example, tristrips. Synopsis
void set_vertex_parameters (HT_Parameter const *parameters,
    int width,
    HT_Boolean copy) alter;
Details parameters is the parameter array.
The int width "n" defaults to 1.
copy is the copy data and defaults to 1.

This is first seen in the set_vertex_parameters() member function of HT_Tristrip.

For example, if the tristrip has 100 points and the parameter width is specified as 3, the array of parameters should be 300 long, the first 3 associated with the first vertex, the next 3 with the second, and so forth.

The exact same change is made on HT_Linestrip and HT_MarkerStrip.

Additionally, this new information must be passed on through to all of the functions that may make use of it.  In all cases it is an optional int function argument, also defaulting to 1, that is added immediately after the HT_Parameter * param argument. Following is a list of these functions:
 

HT_Renderer:  // both float-point and int-point versions
    draw_2d_textured_polytriangle()
    draw_dc_textured_polytriangle()
    draw_2d_textured_polyline()
    draw_dc_textured_polyline()
    draw_2d_textured_polymarker()
    draw_dc_textured_polymarker()
HT_Material/HT_Shader:
    shade()
HT_Texture:
    value()
HT_Shape_Engine:  // both float-point and int-point versions
    draw_2d_polytriangle()
    draw_2d_polyline()
    draw_2d_polymarker()