/*
JScript example : shows how to retrieve the equivalent of the normalized
UV values: .5, .5; from NurbsSurface.GetUVFromNormalizedUV2
*/
var oRoot = Application.ActiveProject.ActiveScene.Root;
var oSphere = oRoot.AddGeometry( "Sphere", "NurbsSurface" );
// convert VB array to JScript array
var vbArgs = new VBArray(oSphere.ActivePrimitive.Geometry.Surfaces(0).GetUVFromNormalizedUV2( .5, .5 ));
var args = vbArgs.toArray();
// get the U value
LogMessage("U value: " + args[0] );
// get the V value
LogMessage("V value: " + args[1] );
|