v5.0
ポイントロケータが定義されているサブサーフェイスインデックスを戻します。
この情報はNurbsSurfaceMeshポイントロケータ定義の一部であり、トポロジにのみ影響されます(ジオメトリが変形しても更新されません)。
サブサーフェイス内の正規化されたUVパラメータはNurbsSurfaceMesh.GetNormalizedUVArrayを使用してクエリできます。
oArray = NurbsSurfaceMesh.GetSubSurfaceIndexArray( PtLocators, [PointLocatorsIndices] ); |
ポイントロケータインデックスの 1DArray
パラメータ | タイプ | 詳細 |
---|---|---|
PtLocators | PointLocatorData | ポイントロケータは記述されます。 |
PointLocatorsIndices | 1DArray | 記述するポイントロケータのインデックス(無指定の場合はすべてのポイントロケータが対象となります)。 |
/* This example topologically describes the point locators resulting from the shrink-wrapping of a cube onto a NURBS surface sphere. */ NewScene( null, false ); var root = Application.ActiveSceneRoot; var CubePositionArray = root.AddGeometry("Cube", "MeshSurface").ActivePrimitive.Geometry.Points.PositionArray; var NurbsSphereGeom = root.AddGeometry("Sphere", "NurbsSurface").ActivePrimitive.Geometry; var CubeOnSpherePointLocators = NurbsSphereGeom.GetClosestLocations(CubePositionArray); var PtLocIndices = new Array(1); for(i = 0; i < CubeOnSpherePointLocators.Count; i++) { PtLocIndices[0] = i; var PtLocSubSurf = NurbsSphereGeom.GetSubSurfaceIndexArray( CubeOnSpherePointLocators, PtLocIndices).toArray(); var PtLocUVs = NurbsSphereGeom.GetNormalizedUVArray( CubeOnSpherePointLocators, PtLocIndices).toArray(); logmessage("Point locator " + i + " is on subsurface " + PtLocSubSurf[0] + " at {U = " + PtLocUVs[0] + " , V = " + PtLocUVs[1] + "}."); } // Expected results: //INFO : Point locator 0 is on subsurface 0 at {U = 1.3552785236419922e-16 , V = 0.3042299747467041}. //INFO : Point locator 1 is on subsurface 0 at {U = 0.75 , V = 0.3040647506713867}. //INFO : Point locator 2 is on subsurface 0 at {U = 2.4521901608032514e-17 , V = 0.6954541206359863}. //INFO : Point locator 3 is on subsurface 0 at {U = 0.75 , V = 0.6959285140037537}. //INFO : Point locator 4 is on subsurface 0 at {U = 0.25 , V = 0.3040647506713867}. //INFO : Point locator 5 is on subsurface 0 at {U = 0.5 , V = 0.3040647506713867}. //INFO : Point locator 6 is on subsurface 0 at {U = 0.25 , V = 0.6959285140037537}. //INFO : Point locator 7 is on subsurface 0 at {U = 0.5 , V = 0.6959285140037537}. |
PointLocatorData Geometry Geometry.GetClosestLocations Geometry.GetClosestLocationsWithinRadius Geometry.GetRaycastIntersections Geometry.SetupPointLocatorQueries Geometry.GetSurfacePointLocatorsFromPoints Geometry.EvaluatePositions Geometry.EvaluateNormals Geometry.EvaluateClusterProperty PolygonMesh.GetPolygonIndexArray PolygonMesh.GetTriangleVertexIndexArray PolygonMesh.GetTriangleNodeIndexArray PolygonMesh.GetTriangleWeightArray PolygonMesh.ConstructPointLocators NurbsSurfaceMesh.GetNormalizedUVArray NurbsSurfaceMesh.ConstructPointLocators