|  | Cyclone 3DR Script
    from Technodigit, part of Hexagon. Copyright 1997-2023. | 
Provide various SPoly texturing manipulation methods. More...
| Functions | |
| Object | ColorizeCloudFromImage (SCloud cloud, SImage image) | 
| Colorize a SCloud with a SImage.  More... | |
| Object | ConvertColorToTexture (SPoly meshToTexture, number pixelsPerTriangle, boolean isUpdateOnlyTriWithoutTexture=false) | 
| Convert colors/inspections of a SPoly into texture.  More... | |
| Object | ConvertTextureMapsToAtlas (SPoly poly) | 
| Convert all the texture maps of a SPoly into one (or several) texture atlas.  More... | |
| Object | ExtractImageFromTexture (SPoly poly) | 
| Convert dynamic textures from a SPoly to scene SImage.  More... | |
| number | GetNumberOfTextureMaps (SPoly poly) | 
| Return the number of dynamic textures (texture maps) applied to the SPoly.  More... | |
| number | GetNumberOfTextures (SPoly poly) | 
| Return the number of textures applied to the SPoly.  More... | |
| Object | GetTextureName (SPoly poly, number textureIdx) | 
| Return the original name of a dynamic texture (texture map) applied to a SPoly.  More... | |
| Object | RemoveTexture (SPoly poly) | 
| Remove all textures applied to the SPoly.  More... | |
| Object | TakeColorFromClouds (SPoly meshToColor, Array< SCloud > cloudsTable, number ignoreOver, number resetColor, number defaultRed, number defaultGreen, number defaultBlue) | 
| Use the color (or the color of inspection) of SCloud to color the vertices on the current SPoly.  More... | |
| Object | TextureAddRepetitive (SPoly meshToTexture, string filePathName, number nbRepWidth, number nbRepHeight, SVector dirXScreen, SVector dirYScreen, SPoint imageOrigin) | 
| Add repetitive texture to a SPoly.  More... | |
| Object | TextureFromClouds (SPoly meshToTexture, Array< SCloud > cloudsTable, number ignoreOverInM, number defaultRed, number defaultGreen, number defaultBlue, number pixelSize=0.01, number existingOption=0) | 
| Use the color (or the color of inspection) of SCloud to texture the current SPoly.  More... | |
| Object | TextureMeshSmart (SPoly meshToTexture, Array< SImage > imagesTable, number pixelSize=0.01, number textureSize=4096, number existingOption=0, Array< SPoly > obstaclesTbl=[], boolean considerTrianglesOrientation=false) | 
| Texture a SPoly with SImage, using the Smart Texture method.  More... | |
| Object | TextureMeshStandard (SPoly meshToTexture, Array< SImage > imagesTable, number visibilityOption, number imageOption, number existingOption=0) | 
| Texture a SPoly with SImage.  More... | |
Provide various SPoly texturing manipulation methods.
| Object STexturingUtil::ConvertColorToTexture | ( | SPoly | meshToTexture, | 
| number | pixelsPerTriangle, | ||
| boolean | isUpdateOnlyTriWithoutTexture = false | ||
| ) | 
Convert colors/inspections of a SPoly into texture.
| Object STexturingUtil::ConvertTextureMapsToAtlas | ( | SPoly | poly | ) | 
Convert all the texture maps of a SPoly into one (or several) texture atlas.
| Object STexturingUtil::ExtractImageFromTexture | ( | SPoly | poly | ) | 
| number STexturingUtil::GetNumberOfTextureMaps | ( | SPoly | poly | ) | 
| number STexturingUtil::GetNumberOfTextures | ( | SPoly | poly | ) | 
| Object STexturingUtil::GetTextureName | ( | SPoly | poly, | 
| number | textureIdx | ||
| ) | 
| Object STexturingUtil::RemoveTexture | ( | SPoly | poly | ) | 
| Object STexturingUtil::TakeColorFromClouds | ( | SPoly | meshToColor, | 
| Array< SCloud > | cloudsTable, | ||
| number | ignoreOver, | ||
| number | resetColor, | ||
| number | defaultRed, | ||
| number | defaultGreen, | ||
| number | defaultBlue | ||
| ) | 
Use the color (or the color of inspection) of SCloud to color the vertices on the current SPoly.
| meshToColor | (SPoly) The SPoly to color using the SCloud | 
| cloudsTable | (Array<SCloud>) The table of SCloud containing the colors. Each of the SCloud must have a colored information, else the SCloud is not taken into account | 
| ignoreOver | (number) If a point of the SCloud has a distance to the current SPoly greater than this value, it is ignored. The color of a point moves to a vertex only if the distance to the SPoly is less than this value. If this value is zero or less, takes 1% of the SPoly size | 
| resetColor | (number) When should we use the default color? 
 | 
| defaultRed | (number) The red color (between 0 and 1) to be used for the non colored vertices | 
| defaultGreen | (number) The green color (between 0 and 1) to be used for the non colored vertices | 
| defaultBlue | (number) The blue color (between 0 and 1) to be used for the non colored vertices | 
| Object STexturingUtil::TextureAddRepetitive | ( | SPoly | meshToTexture, | 
| string | filePathName, | ||
| number | nbRepWidth, | ||
| number | nbRepHeight, | ||
| SVector | dirXScreen, | ||
| SVector | dirYScreen, | ||
| SPoint | imageOrigin | ||
| ) | 
Add repetitive texture to a SPoly.
| meshToTexture | (SPoly) The SPoly to texture | 
| filePathName | (string) The path to the texture | 
| nbRepWidth | (number) The number of repetitions in width of the screen | 
| nbRepHeight | (number) The number of repetitions in height of the screen | 
| dirXScreen | (SVector) The X direction of the projection plane | 
| dirYScreen | (SVector) The Y direction of the projection plane | 
| imageOrigin | (SPoint) The origin of the SImage | 
| Object STexturingUtil::TextureFromClouds | ( | SPoly | meshToTexture, | 
| Array< SCloud > | cloudsTable, | ||
| number | ignoreOverInM, | ||
| number | defaultRed, | ||
| number | defaultGreen, | ||
| number | defaultBlue, | ||
| number | pixelSize = 0.01, | ||
| number | existingOption = 0 | ||
| ) | 
Use the color (or the color of inspection) of SCloud to texture the current SPoly.
| meshToTexture | (SPoly) The SPoly to texture | 
| cloudsTable | (Array<SCloud>) The table of SCloud containing the colors. Each of the SCloud must have a colored information, else the cloud is not taken into account | 
| ignoreOverInM | (number) The maximum distance between SPoly and points to apply the texture, in meter. If this value is zero or less, taking 1% of the SPoly size. | 
| defaultRed | (number) The red color (between 0 and 1) to be used for the triangles that are not textured | 
| defaultGreen | (number) The green color (between 0 and 1) to be used for the triangles that are not textured | 
| defaultBlue | (number) The blue color (between 0 and 1) to be used for the triangles that are not textured | 
| pixelSize | (number) The size of a pixel | 
| existingOption | (number) Used if the SPoly is already textured 
 | 
| Object STexturingUtil::TextureMeshSmart | ( | SPoly | meshToTexture, | 
| Array< SImage > | imagesTable, | ||
| number | pixelSize = 0.01, | ||
| number | textureSize = 4096, | ||
| number | existingOption = 0, | ||
| Array< SPoly > | obstaclesTbl = [], | ||
| boolean | considerTrianglesOrientation = false | ||
| ) | 
Texture a SPoly with SImage, using the Smart Texture method.
| meshToTexture | (SPoly) The SPoly to texture | 
| imagesTable | (Array<SImage>) The table of SImage used for texturing | 
| pixelSize | (number) The target pixel size, in file unit per pixel | 
| textureSize | (number) The final texture will have a maximum size of iTextureSize * iTextureSize pixels. A common value is 2048. | 
| existingOption | (number) Used if the SPoly is already textured 
 | 
| obstaclesTbl | (Array<SPoly>) A list of SPoly to be considered as obstacles when selecting SImage to texture | 
| considerTrianglesOrientation | (boolean) If checked, a triangle can be textured only by an image facing it. Otherwise, any image may be selected | 
| Object STexturingUtil::TextureMeshStandard | ( | SPoly | meshToTexture, | 
| Array< SImage > | imagesTable, | ||
| number | visibilityOption, | ||
| number | imageOption, | ||
| number | existingOption = 0 | ||
| ) | 
| meshToTexture | (SPoly) The SPoly to texture | 
| imagesTable | (Array<SImage>) The table of SImage used for texturing | 
| visibilityOption | (number) Triangles that will be textured 
 | 
| imageOption | (number) Used if imagesTable contains more than one SImage | 
| existingOption | (number) Used if the SPoly is already textured 
 |