Class Polygonal
- Namespace
Methods
configureFunctionLogger
polygonal.configureFunctionLogger(functionName, enableFunction, enableParameters, enableExecutionTime)
Parameters
computeMeshTopoChecksum
Compute a checksum of the mesh topology, connectivity
polygonal.computeMeshTopoChecksum(mesh) -> core.String
Parameters
mesh
MeshThe mesh
Returns
- String
The mesh
computeMeshVertexPositionsChecksum
Compute a checksum of the mesh vertices positions
polygonal.computeMeshVertexPositionsChecksum(mesh, precisionFloat) -> core.String
Parameters
mesh
MeshThe mesh
precisionFloat
IntFloating point precision [1..24], number of significant numbers kept. -1 means no rounded will be applied
Returns
- String
The mesh
computeUVTopoChecksum
Compute a checksum of the uvs topology, connectivity
polygonal.computeUVTopoChecksum(mesh, uvChannel) -> core.String
Parameters
Returns
- String
The mesh
computeUVVertexPositionsChecksum
Compute a checksum of the vertices positions in uv space
polygonal.computeUVVertexPositionsChecksum(mesh, uvChannel, precisionFloat) -> core.String
Parameters
mesh
MeshThe mesh
uvChannel
IntThe uv channel
precisionFloat
IntFloating point precision [1..24], number of significant numbers kept. -1 means no rounded will be applied
Returns
- String
The mesh
dracoDecode
decode a mesh using draco
polygonal.dracoDecode(buffer, jointIndicesId, jointWeightsId) -> polygonal.StaticMesh
Parameters
buffer
ByteListjointIndicesId
IntUnique ID of Generic attribute encoding joint indices
jointWeightsId
IntUnique ID of Generic attribute encoding joint weights
Returns
dracoEncode
encode a mesh using draco
polygonal.dracoEncode(mesh, compressionLevel, quantizationPosition, quantizationNormal, quantizationTexCoord) -> core.ByteList, core.Int, core.Int
Parameters
mesh
StaticMeshcompressionLevel
Int0=faster but the worst compression, 10=slower but the best compression
quantizationPosition
IntNumber of quantization bits used for position attributes
quantizationNormal
IntNumber of quantization bits used for normal attributes
quantizationTexCoord
IntNumber of quantization bits used for texture coordinates attributes
Returns
getNormal
Return the normal attribute of a polygon at a specified vertex
polygonal.getNormal(Polygon, Vertex) -> geom.Vector3
Parameters
Returns
- Vector3
The normal
getTextureCoordinates
Return the texture coordinates attribute of all the polygons from the tessellation
polygonal.getTextureCoordinates(tessellation) -> polygonal.UVCoordList
Parameters
tessellation
TessellationThe tessellation of the wanted polygons
Returns
- UVCoordList
The textures coordinates
getVisiblePolygons
return the visible polygons from the Visibility attributes (see algo.createVisibilityAttributes)
polygonal.getVisiblePolygons(tessellation) -> polygonal.PolygonList, core.IntList
Parameters
tessellation
TessellationThe tessellation of the wanted polygons
Returns
- PolygonList
The polygons seen at least once
createJointPlaceholders
Create fake joint to store in mesh definitions. Thus we can retrieve stored data from getJointPlaceholders
polygonal.createJointPlaceholders(data, worldMatrices) -> polygonal.PlaceholderJointList
Parameters
data
ULongListCreate as much joints as there are data, each joint store one data
worldMatrices
Matrix4ListWorld matrix for each joints
Returns
- PlaceholderJointList
Returns one placeholder joint per given data
createMeshFromDefinition
Create a new mesh with the given MeshDefinition
polygonal.createMeshFromDefinition(meshDefinition) -> polygonal.Mesh
Parameters
meshDefinition
MeshDefinitionMesh definition
Returns
- Mesh
The new mesh
createMeshesFromDefinitions
Create new meshes with the given MeshDefinitions
polygonal.createMeshesFromDefinitions(meshDefinitions) -> polygonal.MeshList
Parameters
meshDefinitions
MeshDefinitionListThe MeshDefinitions
Returns
- MeshList
The new Meshes
getEdgePolygons
Returns the polygons connected to an edge
polygonal.getEdgePolygons(edge) -> polygonal.PolygonList
Parameters
edge
EdgeThe edge
Returns
- PolygonList
The edge polygons
getEdgeVertices
Returns the vertices of an edge
polygonal.getEdgeVertices(edge) -> polygonal.VertexList
Parameters
edge
EdgeThe edge
Returns
- VertexList
The edge vertices
getEdges
Returns the edges corresponding to the given connectivity
polygonal.getEdges(tessellation, category) -> polygonal.EdgeList
Parameters
tessellation
TessellationThe tessellation
category
TopologyCategoryMaskCategory mask of the wanted edges
Returns
- EdgeList
The edges
getFreeEdges
Returns the free edges of a tessellation
polygonal.getFreeEdges(tessellation) -> polygonal.EdgeList
Parameters
tessellation
TessellationThe tessellation
Returns
- EdgeList
All free edges of the tessellation
getFreeVertices
Returns the free vertices of a tessellation
polygonal.getFreeVertices(tessellation) -> polygonal.VertexList
Parameters
tessellation
TessellationThe tessellation
Returns
- VertexList
All free vertices of the tessellation
getJointPlaceholders
Get data stored in joint placeholders
polygonal.getJointPlaceholders(joints) -> core.ULongList
Parameters
joints
PlaceholderJointListPlaceholder joints to get data from
Returns
- ULongList
Data stored in each placehold joint (for invalid joint, returned data is undefined)
getMeshDefinition
Returns the definition
polygonal.getMeshDefinition(mesh) -> polygonal.MeshDefinition
Parameters
mesh
MeshThe mesh to get definition
Returns
- MeshDefinition
Mesh definition
getMeshDefinitions
Returns the definition
polygonal.getMeshDefinitions(meshes) -> polygonal.MeshDefinitionList
Parameters
meshes
MeshListThe meshes to get definitions
Returns
- MeshDefinitionList
The MeshDefinitions
getMeshSkinning
Returns the joints/IBMs list of a given mesh (those referenced by jointIndices)
polygonal.getMeshSkinning(mesh) -> polygonal.JointList, geom.Matrix4List
Parameters
mesh
StaticMesh
Returns
getPatches
Returns the patches of a tessellation
polygonal.getPatches(tessellation) -> polygonal.PatchList
Parameters
tessellation
TessellationThe tessellation
Returns
- PatchList
All patches of the tessellation
getPolygonEdges
Returns the edges of a a polygon
polygonal.getPolygonEdges(polygon) -> polygonal.EdgeList
Parameters
polygon
PolygonThe polygon
Returns
- EdgeList
The polygon edges
getPolygonVertices
Returns the vertices of a a polygon
polygonal.getPolygonVertices(polygon) -> polygonal.VertexList
Parameters
polygon
PolygonThe polygon
Returns
- VertexList
The polygon vertices
getPolygons
Returns the polygons of a tessellation
polygonal.getPolygons(tessellation) -> polygonal.PolygonList
Parameters
tessellation
TessellationThe tessellation
Returns
- PolygonList
All polygons of the tessellation
getTessellationBoundaries
Get boundary edges of a tessellation grouped by cycles
polygonal.getTessellationBoundaries(tessellation) -> polygonal.EdgeListList
Parameters
tessellation
TessellationThe Tessellation
Returns
- EdgeListList
List of boundary edges grouped by cycles in the given tessellation
getVertexCoordinates
Returns the vertex coordinates in the tessellation local space
polygonal.getVertexCoordinates(vertex) -> geom.Point3
Parameters
vertex
VertexThe vertex
Returns
- Point3
Vertex coordinates
getVertexEdges
Returns the edges connected to a vertex
polygonal.getVertexEdges(vertex) -> polygonal.EdgeList
Parameters
vertex
VertexThe vertex
Returns
- EdgeList
The vertex edges
getVertexPolygons
Returns the polygons connected to a vertex
polygonal.getVertexPolygons(vertex) -> polygonal.PolygonList
Parameters
vertex
VertexThe vertex
Returns
- PolygonList
The vertex polygons
getVertices
Returns the vertices of a tessellation
polygonal.getVertices(tessellation, category) -> polygonal.VertexList
Parameters
tessellation
TessellationThe tessellation
category
TopologyCategoryMaskCategory mask of the wanted edges
Returns
- VertexList
All vertices of the tessellation
hasMeshJoints
Check if the mesh has joints
polygonal.hasMeshJoints(mesh) -> core.Bool
Parameters
mesh
MeshThe Mesh
Returns
- Bool
Return True if the mesh contains joints
setMeshSkinning
Set/Replace the list of joints/IBMs of a given mesh (those referenced by jointIndices)
polygonal.setMeshSkinning(mesh, joints, IBMs)
Parameters
mesh
StaticMeshjoints
JointListIBMs
Matrix4ListInverse Bind Matrices
destroyElements
Destroy all the given elements
polygonal.destroyElements(elements)
Parameters
elements
ElementListList of elements to destroy
invertElements
Invert the orientation of all the given elements
polygonal.invertElements(elements)
Parameters
elements
ElementListList of elements to invert