![]() |
Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2025.
|
Provide various SPoly texturing manipulation methods. More...
Functions | |
| Object | ColorizeCloudFromImage (SCloud cloud, SImage image) |
| Colorize a SCloud with a SImage. More... | |
| Object | ConvertInspectionToTexture (SPoly poly, number textureWidth=4096) |
| Convert inspection to texture on a SPoly. 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 | 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::ConvertInspectionToTexture | ( | SPoly | poly, |
| number | textureWidth = 4096 |
||
| ) |
| 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::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
|