SilverScreen Solid Modeler

MESH_NODE

MESH_NODE

Previous topic Next topic  

MESH_NODE

Previous topic Next topic JavaScript is required for the print function  

SilverSharpAPI

 

SilverSharp.MESH_NODE

 

Structure

A SilverSharp.MESH_NODE object stores information about a SilverScreen Bezier mesh primitive

 

 

 

C# Code

 

 class MESH_NODE sealed : PRIM_NODE

    {

    MESH_NODE(MESH_NODE rhs);

    MESH_NODE(string mesh_path);

 

    readonly SURFACE_NODE sn;

    readonly TEXTURE_DATA texture;

 

    property SS_RGB       surface_rgb            { get; }

    property uint         surface_pattern_number { get; }

    property SS_RGB       mesh_rgb               { get; }

    property WidthStyle   mesh_width_style       { get; }

    property uint         rows                   { get; }

    property uint         cols                   { get; }

 

    PATCH_NODE MESH_NODE[int row, int col];

    };

 

 

 

Properties

The following read-only properties mimic the purpose of their counter-parts in the SilverC MESH_NODE:

 

Name

Description

sn

A SURFACE_NODE reference, that if not null, stores the surface properties for rendering this primitive. When this member is null, then the surface properties from the parent OBJECT_NODE will be used to render this primitive.

texture

A TEXTURE_DATA reference, that if not null, stores the texture properties for rendering this primitive. When this member is null, then the texture properties from the parent OBJECT_NODE will be used to render this primitive.

surface_rgb

The fill color used to render the Bezier mesh surface

surface_pattern_number

The surface pattern index used to render the Bezier Mesh Surface

mesh_rgb

The edge color used to render the Bezier Mesh Surface

mesh_width_style

A WidthStyle object that provides the edge width and style index used to render the Bezeir Mesh Surface

rows

The number of rows of PATCH_NODEs making up the Bezier mesh surface.

cols

The number of columns of PATCH_NODEs making up the Bezier mesh surface

 

The following read-only properties extend MESH_NODE for SilverSharp:

 

Name

Description

MESH_NODE[int row, int col]

A read-only indexer to provide access to a MESH_NODE as if it were a 2D array of PATCH_NODEs. This indexer replaces the 'index' property of the SilverC MESH_NODE.

 

 

Members

Member

Description

MESH_NODE

Constructors to initialize the object

 

 

Remarks

A SilverSharp.MESH_NODE inherits from a SilverSharp.PRIM_NODE and therefore includes those properties and methods as well; for instance, Path, Type, and PrimBits are inherited properties of a SilverSharp.PRIM_NODE.

 

Note: A SilverSharp.MESH_NODE is a SilverSharp.PRIM_NODE, but the reverse is not true.

 

 

See Also

Primitive Types, PATCH_NODE, PRIM_NODE, SIlverC MESH_NODE

 

 

Example

The following example shows how to use the patch enumerator to visit every control point of every patch node in a SilverSharp.MESH_NODE object:

 

C# Code

 

 MESH_NODE  mesh = new MESH_NODE("mesh \\obj1.1");

 PATCH_NODE patch;

 int pr, pc;

 int mr, mc;

 

 for (mr = 0; mr < mesh.rows; mr++)

    {

    for (mc = 0; mc < mesh.cols; mc++)

       {

       patch = mesh[mr, mc];

 

       for (pr = 0; pr < patch.rows; pr++)

          {

          for (pc = 0; pc < patch.cols; pc++)

             {

             VisitOnePatchPoint(patch[pr, pc]);

             }

          }

       }

    }