SilverScreen Solid Modeler

SS_TRIANGLE_INFO        

SS_TRIANGLE_INFO        

Previous topic Next topic  

SS_TRIANGLE_INFO        

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

SS_TRIANGLE_INFO

 

Structure

A data type that stores information retrieved from the triangulation routines about a single triangle.

 

 

 struct SS_TRIANGLE_INFO

    {

    SS_XYZ   points[3];

    SS_XYZ   normals[3];

    SS_XYZ   texture_coord[3];

    VERTEX   vertices[3];

    int      winding_order_index[3];

    BOOLEAN  is_original_edge[3];                                  

    RGB      edge_rgb[3];

    USINT32  edge_type[3];  

    };

 

 


Members

Member

Description

points

An array of 3D points that make up a triangle. The triangle is formed by the lines points[0] to points[1], points[1] to points[2], and points[2] to points[0].

normals

Three vertex normals associated with the three points in 'points' that are boundary-averaged if appropriate.

texture_coord

The 2D texture coordinates corresponding to 'points'.

vertices

Either 0, or a vertex number associated with each point. The vertex number references the vertex table of the parent OBJECT_NODE of the primitive being triangulated.

winding_order_index

This is a primitive-local index corresponding to each 3D point. It is provided as a convenience, but is not tied to the OBJECT_NODE vertex tables (the way 'vertices' is).

is_original_edge

If is_original_edge[0] is TRUE, then the points from points[0] to points[1] form a line that belongs to the primitive being triangulated. If it is FALSE, then the lined formed from points[0] to points[1] was introduced by the triangulator. is_original_edge[1] applies to the line formed from points[1] to points[2], and is_original_edge[2] applies to the line formed from points[2] to points[0].

edge_rgb

edge_rgb[0] is an edge color for the line formed between points[0] and points[1]. edge_rgb[1] applies to the line formed from points[1] to points[2], and edge_rgb[2] applies to the line formed from points[2] to points[0].

edge_type

edge_type[0] is a line width and style index for the line formed between points[0] and points[1]. edge_type[1] applies to the line formed from points[1] to points[2], and edge_type[2] applies to the line formed from points[2] to points[0].

 

 

Remarks

points[0] corresponds with normals[0], texture_coord[0], vertices[0], and so on. points[1] corresponds with normlas[1], texture_coord[1], vertices[1] and so on.

 

A vertex number might be 0 if a polygon being triangulated contains an arc. In this case, the facets which are generated to approximate the arc do not have vertex numbers (except at the end-points).

 

 

See Also

prim_triangle_get, LINE_WIDTH, LINE_STYLE

 

Header

silver.h