Facet.NbPoints operator

導入

v4.2

詳細

指定されたファセット内のポイント数をIntegerとして戻します。

C#構文

// get accessor

Int32 rtn = Facet.NbPoints;

1. VBScript の例

set oRoot = ActiveProject.ActiveScene.Root

set oSphere = oRoot.AddGeometry( "Sphere", "MeshSurface" )

set oGeometry = oSphere.ActivePrimitive.Geometry

set oFacets = oGeometry.Facets

for each oFacet in oFacets

	logMessage "Facet #" & oFacet.Index & " has " & oFacet.NbPoints & " points."

next

' Expected Result:

'INFO : Facet #0 has 3 points.

'INFO : Facet #1 has 4 points.

'INFO : Facet #2 has 4 points.

'	<snip>

'INFO : Facet #61 has 4 points.

'INFO : Facet #62 has 4 points.

'INFO : Facet #63 has 3 points.

2. JScript の例

var oRoot = ActiveProject.ActiveScene.Root;

var oSphere = oRoot.AddGeometry( "Sphere", "MeshSurface" );

var oGeometry = oSphere.ActivePrimitive.Geometry;

var oFacets = oGeometry.Facets;

facetEnum = new Enumerator(oFacets);

var oFacet;

for( ; !facetEnum.atEnd(); facetEnum.moveNext() ) {

	oFacet = facetEnum.item();

	LogMessage( "Facet #" + oFacet.Index + " has " + oFacet.NbPoints + " points." );

}

// Expected result:

//INFO : Facet #0 has 3 points.

//INFO : Facet #1 has 4 points.

//INFO : Facet #2 has 4 points.

//	<snip>

//INFO : Facet #61 has 4 points.

//INFO : Facet #62 has 4 points.

//INFO : Facet #63 has 3 points.