Polygonal
Python API types
Read time 8 minutesLast updated 8 months ago
Edge
An Edge is composed by two vertices and is connected to the polygons of a tessellation. It is the dimension-1 element.
Base class: polygonal.Element
Functions accepting this type or a list of this type as a parameter:
- geom.applyTransform
- geom.getEntityAABB
- core.cloneEntity
- core.deleteEntities
- core.entityExists
- core.getEntityType
- core.getEntityTypeString
- core.addCustomProperties
- core.addCustomProperty
- core.getProperties
- core.getProperty
- core.getPropertyInfo
- core.hasCustomProperty
- core.hasProperty
- core.listProperties
- core.listPropertiesBatch
- core.removeCustomProperty
- core.setProperties
- core.setProperty
- core.supportCustomProperties
- core.unsetProperty
- scene.linkPropertyToAnimation
- scene.unlinkPropertyToAnimation
Element
Element is the base type for polygons, edges and vertices.
Base class: geom.GeomEntity
Derived classes:
Functions accepting this type or a list of this type as a parameter:
- geom.applyTransform
- geom.getEntityAABB
- core.cloneEntity
- core.deleteEntities
- core.entityExists
- core.getEntityType
- core.getEntityTypeString
- core.addCustomProperties
- core.addCustomProperty
- core.getProperties
- core.getProperty
- core.getPropertyInfo
- core.hasCustomProperty
- core.hasProperty
- core.listProperties
- core.listPropertiesBatch
- core.removeCustomProperty
- core.setProperties
- core.setProperty
- core.supportCustomProperties
- core.unsetProperty
- scene.linkPropertyToAnimation
- scene.unlinkPropertyToAnimation
Joint
A Joint is a bone of a skeleton.
Base class: core.Entity
Derived class: PlaceholderJoint
Functions accepting this type or a list of this type as a parameter:
- polygonal.setMeshSkinning
- scene.getJointDefinition
- scene.getJointDefinitions
- core.cloneEntity
- core.deleteEntities
- core.entityExists
- core.getEntityType
- core.getEntityTypeString
- core.addCustomProperties
- core.addCustomProperty
- core.getProperties
- core.getProperty
- core.getPropertyInfo
- core.hasCustomProperty
- core.hasProperty
- core.listProperties
- core.listPropertiesBatch
- core.removeCustomProperty
- core.setProperties
- core.setProperty
- core.supportCustomProperties
- core.unsetProperty
- scene.linkPropertyToAnimation
- scene.unlinkPropertyToAnimation
JointList
List of polygonal.Joint
Functions accepting this type or a list of this type as a parameter:
Mesh
A mesh is the base class for a polygonal mesh. It is structured with polygons, edges and vertices.
Base class: geom.GeomEntity
Derived classes:
Functions accepting this type or a list of this type as a parameter:
- polygonal.getPolygonCount
- polygonal.computeMeshTopoChecksum
- polygonal.computeMeshVertexPositionsChecksum
- polygonal.computeUVTopoChecksum
- polygonal.computeUVVertexPositionsChecksum
- polygonal.getMeshDefinition
- polygonal.getMeshDefinitions
- polygonal.hasMeshJoints
- polygonal.hasNormalizedUVs
- polygonal.hasUVs
- scene.createPartsFromMeshes
- scene.createSceneFromMeshes
- scene.setPartMesh
- geom.applyTransform
- geom.getEntityAABB
- core.cloneEntity
- core.deleteEntities
- core.entityExists
- core.getEntityType
- core.getEntityTypeString
- core.addCustomProperties
- core.addCustomProperty
- core.getProperties
- core.getProperty
- core.getPropertyInfo
- core.hasCustomProperty
- core.hasProperty
- core.listProperties
- core.listPropertiesBatch
- core.removeCustomProperty
- core.setProperties
- core.setProperty
- core.supportCustomProperties
- core.unsetProperty
- scene.linkPropertyToAnimation
- scene.unlinkPropertyToAnimation
MeshDefinition
Mesh definition.
Fields
Type | Name | Default | Description |
|---|---|---|---|
| id | Mesh | 0 | The mesh from which we get the definition. |
| externalId | Ident | 0 | External ID used for API integrations. |
| vertices | Point3List | Vertices coordinates. | |
| normals | Vector3List | Vertices normals. | |
| tangents | Vector4List | Vertices tangents. | |
| uvChannels | IntList | UV channels. | |
| uvs | Point2ListList | Array of vertices uv coordinates (one array per channel). | |
| vertexColors | ColorAlphaList | Vertex colors. | |
| curvatures | CurvaturesList | Vertices curvatures. | |
| triangles | IntList | Triangles (vertex indices). | |
| quadrangles | IntList | Quadrangles (vertex indices). | |
| vertexMerged | IntList | Array which contains for each vertex in vertices the vertex that it is merged with. | |
| submeshes | SubmeshList | Array which contain information about multi materials mesh. | |
| linesVertices | Point3List | Lines vertices coordinates. | |
| lines | StylizedLineList | Lines vertices indices. | |
| points | Point3List | Points. | |
| pointsColors | Vector3List | Points colors. | |
| joints | JointList | Joints (bones) identifiers. | |
| inverseBindMatrices | Matrix4List | Joints inverse bind matrices (bones poses). | |
| jointWeights | Vector4List | Joints (bones) weights. | |
| jointIndices | Vector4IList | Joints (bones) indices. |
Functions accepting this type or a list of this type as a parameter:
- polygonal.createMeshFromDefinition
- polygonal.createMeshFromDefinitions
- polygonal.createMeshesFromDefinitions
MeshDefinitionList
List of polygonal.MeshDefinition
Functions accepting this type or a list of this type as a parameter:
MeshList
List of polygonal.Mesh
Functions accepting this type or a list of this type as a parameter:
PlaceholderJoint
A placeholder joint is a fake joint that contains user defined data for SDK integration purpose.
Base class: polygonal.Joint
Functions accepting this type or a list of this type as a parameter:
- polygonal.getJointPlaceholders
- polygonal.setMeshSkinning
- scene.getJointDefinition
- scene.getJointDefinitions
- core.cloneEntity
- core.deleteEntities
- core.entityExists
- core.getEntityType
- core.getEntityTypeString
- core.addCustomProperties
- core.addCustomProperty
- core.getProperties
- core.getProperty
- core.getPropertyInfo
- core.hasCustomProperty
- core.hasProperty
- core.listProperties
- core.listPropertiesBatch
- core.removeCustomProperty
- core.setProperties
- core.setProperty
- core.supportCustomProperties
- core.unsetProperty
- scene.linkPropertyToAnimation
- scene.unlinkPropertyToAnimation
PlaceholderJointList
List of polygonal.PlaceholderJoint
Functions accepting this type or a list of this type as a parameter:
Polygon
A Polygon is composed by 3 or more edges. It is the dimension-2 element.
Base class: polygonal.Element
Functions accepting this type or a list of this type as a parameter:
- geom.applyTransform
- geom.getEntityAABB
- core.cloneEntity
- core.deleteEntities
- core.entityExists
- core.getEntityType
- core.getEntityTypeString
- core.addCustomProperties
- core.addCustomProperty
- core.getProperties
- core.getProperty
- core.getPropertyInfo
- core.hasCustomProperty
- core.hasProperty
- core.listProperties
- core.listPropertiesBatch
- core.removeCustomProperty
- core.setProperties
- core.setProperty
- core.supportCustomProperties
- core.unsetProperty
- scene.linkPropertyToAnimation
- scene.unlinkPropertyToAnimation
StaticMesh
A static mesh is a mesh representation used for storage.
Base class: polygonal.Mesh
Functions accepting this type or a list of this type as a parameter:
- polygonal.dracoEncode
- polygonal.getMeshSkinning
- polygonal.setMeshSkinning
- scene.addMeshToAnnotation
- polygonal.getPolygonCount
- polygonal.computeMeshTopoChecksum
- polygonal.computeMeshVertexPositionsChecksum
- polygonal.computeUVTopoChecksum
- polygonal.computeUVVertexPositionsChecksum
- polygonal.getMeshDefinition
- polygonal.getMeshDefinitions
- polygonal.hasMeshJoints
- polygonal.hasNormalizedUVs
- polygonal.hasUVs
- scene.createPartsFromMeshes
- scene.createSceneFromMeshes
- scene.setPartMesh
- geom.applyTransform
- geom.getEntityAABB
- core.cloneEntity
- core.deleteEntities
- core.entityExists
- core.getEntityType
- core.getEntityTypeString
- core.addCustomProperties
- core.addCustomProperty
- core.getProperties
- core.getProperty
- core.getPropertyInfo
- core.hasCustomProperty
- core.hasProperty
- core.listProperties
- core.listPropertiesBatch
- core.removeCustomProperty
- core.setProperties
- core.setProperty
- core.supportCustomProperties
- core.unsetProperty
- scene.linkPropertyToAnimation
- scene.unlinkPropertyToAnimation
StyleType
Enum of core.Long
Name | Value |
|---|---|
| NORMAL | 0 |
| STIPPLE | 1 |
StylizedLine
Fields
Type | Name | Default | Description |
|---|---|---|---|
| lineVertexIndices | IntList | List of lineVertices index. The indices for a line must be chained (e.g. 0 3 2 1 will create edges 0-3 3-2 2-1). | |
| material | Material | 0 | Material applied to the line if any. |
| externalId | Ident | 0 | External ID. |
StylizedLineList
List of polygonal.StylizedLine
Submesh
Submesh for polygon material assignation.
Fields
Type | Name | Default | Description |
|---|---|---|---|
| material | Material | 0 | Polygon material's dressed with. |
| firstTri | Int | 0 | First triangle. |
| triCount | Int | 0 | Number of triangles. |
| firstQuad | Int | 0 | First quad. |
| quadCount | Int | 0 | Number of quad. |
| externalId | Ident | 0 | External ID. |
SubmeshList
List of polygonal.Submesh
Tessellation
A Tessellation is a dynamic mesh representation.
Base class: polygonal.Mesh
Functions accepting this type or a list of this type as a parameter:
- polygonal.getPolygonCount
- polygonal.computeMeshTopoChecksum
- polygonal.computeMeshVertexPositionsChecksum
- polygonal.computeUVTopoChecksum
- polygonal.computeUVVertexPositionsChecksum
- polygonal.getMeshDefinition
- polygonal.getMeshDefinitions
- polygonal.hasMeshJoints
- polygonal.hasNormalizedUVs
- polygonal.hasUVs
- scene.createPartsFromMeshes
- scene.createSceneFromMeshes
- scene.setPartMesh
- geom.applyTransform
- geom.getEntityAABB
- core.cloneEntity
- core.deleteEntities
- core.entityExists
- core.getEntityType
- core.getEntityTypeString
- core.addCustomProperties
- core.addCustomProperty
- core.getProperties
- core.getProperty
- core.getPropertyInfo
- core.hasCustomProperty
- core.hasProperty
- core.listProperties
- core.listPropertiesBatch
- core.removeCustomProperty
- core.setProperties
- core.setProperty
- core.supportCustomProperties
- core.unsetProperty
- scene.linkPropertyToAnimation
- scene.unlinkPropertyToAnimation
TessellationAttribute
A TessellationAttribute is an attribute applied to the elements of the tessellation. It can be normals, texture coordinates, patches or more advanced types like visibility attributes, curvatures attributes, etc...
Base class: core.Entity
Functions accepting this type or a list of this type as a parameter:
- core.cloneEntity
- core.deleteEntities
- core.entityExists
- core.getEntityType
- core.getEntityTypeString
- core.addCustomProperties
- core.addCustomProperty
- core.getProperties
- core.getProperty
- core.getPropertyInfo
- core.hasCustomProperty
- core.hasProperty
- core.listProperties
- core.listPropertiesBatch
- core.removeCustomProperty
- core.setProperties
- core.setProperty
- core.supportCustomProperties
- core.unsetProperty
- scene.linkPropertyToAnimation
- scene.unlinkPropertyToAnimation
TessellationList
List of polygonal.Tessellation
TopologyCategoryMask
The topology cmasl is a combination of TopologyConnectivityMask and TopologyDimensionMask.
Fields
Type | Name | Default | Description |
|---|---|---|---|
| dimension | TopologyDimensionMask | ALL | |
| connectivity | TopologyConnectivityMask | ALL |
Functions accepting this type or a list of this type as a parameter:
TopologyConnectivityMask
The topology connectivity mask is used to filter some processus using the topological connectivity of elements (border, non-manifold, etc...).
Enum of core.Long
Name | Value |
|---|---|
| NONE | 0 |
| MANIFOLD | 1 |
| BOUNDARY | 2 |
| NONMANIFOLD | 4 |
| BOUNDARY_NONMANIFOLD | 6 |
| FREE | 8 |
| ALL | 15 |
TopologyDimensionMask
The topology dimension mask is used to filter some processes using the topological dimension of the support of vertices.
Enum of core.Long
Name | Value |
|---|---|
| NONE | 0 |
| VERTEX | 1 |
| LINE | 2 |
| FACE | 4 |
| ALL | 7 |
Vertex
A Vertex is defined by a position and is connected to the edges of a tessellation. It is the dimension-0 element.
Base class: polygonal.Element
Functions accepting this type or a list of this type as a parameter:
- geom.applyTransform
- geom.getEntityAABB
- core.cloneEntity
- core.deleteEntities
- core.entityExists
- core.getEntityType
- core.getEntityTypeString
- core.addCustomProperties
- core.addCustomProperty
- core.getProperties
- core.getProperty
- core.getPropertyInfo
- core.hasCustomProperty
- core.hasProperty
- core.listProperties
- core.listPropertiesBatch
- core.removeCustomProperty
- core.setProperties
- core.setProperty
- core.supportCustomProperties
- core.unsetProperty
- scene.linkPropertyToAnimation
- scene.unlinkPropertyToAnimation