SilverScreen Solid Modeler

Transform method

Transform method

Previous topic Next topic  

Transform method

Previous topic Next topic JavaScript is required for the print function  

SilverSharpAPI

 

void Transform(ref SS_XYZ[] pts);

 

ref SS_XYZ[] pts;   // A reference to an array of SS_XYZ's

 

 

 




Synopsis

using SilverSharp;

 

The Transform method transforms all of the points in an array of 3D points by the SilverSharp.MATRIX object

 

 

Parameters

pts is a reference to an array of SilverSharp.SS_XYZ objects

 

 

Return Value

none

 

 

See Also

MATRIX, tm_transform

 

 

Example

The following code creates an array of 3D points, builds a matrix to scale x and y coordinates by 2, then transforms the array and draws a polygon:

 

C# Code

 

 using SilverSharp;

 

 . . .

 

 SS_XYZ[] square_points =

    {

    new SS_XYZ(0.0, 0.0, 0.0),

    new SS_XYZ(10.0, 0.0, 0.0),

    new SS_XYZ(10.0, 10.0, 0.0),

    new SS_XYZ(0.0, 10.0, 0.0),

    };

 

 MATRIX mx = new MATRIX();

 

 mx.Scale(2.0, 2.0, 1.0);

 

 mx.Transform(ref square_points);

 

 SC.draw_polygon(square_points);