# class
PackedGeometryData
PackedGeometryData keeps the same information as GeometryData, but with all corner data fields moved into per-vertex fields. No per-corner fields exist, apart from the VertexIds field. Please note that the number of vertices in an PackedGeometryData is commonly higher than in an GeometryData, as vertices must be split to accommodate for different corner data.
See also: GeometryData
# Properties
Property | Description |
---|---|
Name | The name of the PackedGeometryData object. (Inherited from Object) |
TriangleCount | The number of triangles in the geometry. |
VertexCount | The number of vertices in the geometry. |
# Methods
Method | Description |
---|---|
AddBaseTypeUserTriangleField | Adds an empty user-specified triangle field. To be able to add a field, it must have a name that does not conflict with the existing triangle fields. |
AddBaseTypeUserVertexField | Adds an empty user-specified vertex field. To be able to add a field, it must have a name that does not conflict with the existing vertex fields. |
AddBoneWeights | Adds the BoneWeights and BoneIds fields in the vertices. The BoneWeights and BoneIds fields are added and removed in unison, and should always be the same tuple size. (Field names: "BoneWeights" & "BoneIds", Tuple size: varying , Stored as: Vertex attribute) |
AddColors | Adds a Color field in the vertices. The valid id range of the level parameter is 0-255, which equals fields 'Colors0' - 'Colors255' (Field name: "Colors0" - "Colors255", Tuple size: 4 , Stored as: Vertex attribute) |
AddGroupIds | Adds the GroupIds field in the triangles. (Field name: "GroupIds", Tuple size: 1 , Stored as: triangle attribute) |
AddMaterialIds | Adds the MaterialIds field in the triangles. (Field name: "MaterialIds", Tuple size: 1 , Stored as: triangle attribute) |
AddNamedColors | Adds a named Color field in the corners. (Field name: "Colors0" - "Colors255", Tuple size: 4 , Stored as: Corner attribute) |
AddNamedTexCoords | Adds a named TexCoords field in the corners. (Field name: "TexCoords0" - "TexCoords255", Tuple size: 2 , Stored as: Corner attribute) |
AddNormals | Adds the Normals field in the vertices. (Field name: "Normals" , Tuple size: 3 , Stored as: Vertex attribute) |
AddObserver | Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object) |
AddTangents | Adds a Tangents field in the vertices. (Field name: "Tangents0" - "Tangents255" & "Bitangents0" - "Bitangents255", Tuple size: 3 , Stored as: Vertex attribute) |
AddTexCoords | Adds a TexCoords field in the vertices. The valid id range of the level parameter is 0-255, which equals fields 'TexCoords0' - 'TexCoords255' (Field name: "TexCoords0" - "TexCoords255", Tuple size: 2 , Stored as: Vertex attribute) |
AddTriangles | Increases the triangle count by the specified value. |
AddUserTriangleField | Adds a user-specified triangle field from an already populated array. To be able to add a field, it must have a name that does not conflict with the existing triangle fields. |
AddUserVertexField | Adds a user-specified vertex field from an already populated value array. To be able to add a field, it must have a name that does not conflict with the existing vertex fields. |
AddVertexLocks | Adds the VertexLocks field for the vertices. If the value for a vertex is true, then the vertex should be locked, and not be removed in the collapse-process. (Field name: "VertexLocks", Tuple size: 1 , Stored as: Vertex attribute) |
AddVertexWeighting | Adds the VertexWeighting field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute) |
AddVertexWeights | Adds the VertexWeights field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute) |
AddVertices | AddVertices increases the vertex count by the specified value. |
AppendPackedGeometry | Appends all vertex-tuples in "source" that don't already exists in the current GeometryData. For each vertex field in this PackedGeometryData, the "source" must contain a corresponding vertex or corner field. All extra-fields in "source" will be skipped however. Returns the number of new and unique vertices created, and the NewVertexIds will contain the indices for the triangles of the "source" Geometry. The VertexIds of the current GeometryData will still be valid. If collapseToOriginalVertices is set to true, all vertices from source will be collapsed to the closest matching vertex of the current geometry. This means that no new vertices will be added, so the returned value will always be 0. If the "NewVertexIds"-array is not initiated before send into this function, it will do nothing and return -1 instead, as error value. The method does not append triangle ids or triangle field data from "source" to the current object. |
DeepCopy | Copies the field setup and data from another object. To only copy the setup, set copy_data to false. |
GetBitangents | Gets a Bitangents field in the vertices. (Field name: "Tangents0" - "Tangents255" & "Bitangents0" - "Bitangents255", Tuple size: 3 , Stored as: Vertex attribute) |
GetBoneIds | The BoneIds field. (Field name: "BoneIds", Tuple size: varying , Stored as: Vertex attribute) |
GetBoneWeights | The BoneWeights field. (Field name: "BoneWeights", Tuple size: varying , Stored as: Vertex attribute) |
GetClass | Get the name of the PackedGeometryData class. (Inherited from Object) |
GetColors | Gets a Color field in the vertices. The valid id range of the level parameter is 0-255, which equals fields 'Colors0' - 'Colors255' (Field name: "Colors0" - "Colors255", Tuple size: 4 , Stored as: Vertex attribute) |
GetCoords | The Coords field in the vertices. (Field name: "Coords", Tuple size: 3 , Stored as: Vertex attribute) |
GetExtents | Get the extents object in the geometry. |
GetGroupIds | The GroupIds field in the triangles. (Field name: "GroupIds", Tuple size: 1 , Stored as: triangle attribute) |
GetInf | The inferior (minimum) extent of the geometry. |
GetMaterialIds | The MaterialIds field in the triangles. (Field name: "MaterialIds", Tuple size: 1 , Stored as: triangle attribute) |
GetNamedColors | Gets a Color field, using the alternative name instead of the index. |
GetNamedTexCoords | Gets a TexCoords field, using the alternative name instead of the index. |
GetNormals | The Normals field in the vertices. (Field name: "Normals" , Tuple size: 3 , Stored as: Vertex attribute) |
GetSup | The superior (maximum) extent of the geometry. |
GetTangents | Gets a Tangents field in the vertices. (Field name: "Tangents0" - "Tangents255" & "Bitangents0" - "Bitangents255", Tuple size: 3 , Stored as: Vertex attribute) |
GetTexCoords | Gets a TexCoords field in the vertices. The valid id range of the level parameter is 0-255, which equals fields 'TexCoords0' - 'TexCoords255' (Field name: "TexCoords0" - "TexCoords255", Tuple size: 2 , Stored as: Vertex attribute) |
GetTriangles | Retrieves the ReFieldData object that contains the triangle fields. |
GetUserTriangleField | Gets a user-specified triangle field. To be able to add a field, it must have a name that does not conflict with the existing triangle fields. |
GetUserVertexField | Gets a user-specified vertex field. |
GetVertexIds | The VertexIds field in the triangles. |
GetVertexLocks | The VertexLocks field for the vertices. If the value for a vertex is true, then the vertex should be locked, and not be removed in the collapse-process. (Field name: "VertexLocks", Tuple size: 1 , Stored as: Vertex attribute) |
GetVertexWeighting | The VertexWeighting field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute) |
GetVertexWeights | The VertexWeights field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute) |
GetVertices | Retrieves the FieldData object that contains the vertex fields. |
IsA | Returns true if PackedGeometryData is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
IsNull | Returns true if the PackedGeometryData object is invalid. (Inherited from Object) |
IsSameObjectAs | Returns true if the PackedGeometryData object is valid. (Inherited from Object) |
NewCopy | Creates another geometry data object with the same field setup. To also copy the data to the new object, set copy_data to true. |
NewUnpackedCopy | Creates an "unpacked" GeometryData object. Please note that since the data in the PackedGeometryData structure is per-vertex, you may have to weld the resulting GeometryData to remove vertices with the same spatial coordinates. |
NonNull | Returns true if the PackedGeometryData object is valid. (Inherited from Object) |
PrintInfo | Prints the content/info of the PackedGeometryData object to the log. (Inherited from Object) |
RemoveBoneWeights | Removes the BoneWeights and BoneIds fields in the vertices. The BoneWeights and BoneIds fields are added and removed in unison, and should always be the same tuple size. (Field names: "BoneWeights" & "BoneIds", Tuple size: varying , Stored as: Vertex attribute) |
RemoveColors | Removes a Color field in the vertices. The valid id range of the level parameter is 0-255, which equals fields 'Colors0' - 'Colors255' (Field name: "Colors0" - "Colors255", Tuple size: 4 , Stored as: Vertex attribute) |
RemoveGroupIds | Removes the GroupIds field in the triangles. (Field name: "GroupIds", Tuple size: 1 , Stored as: triangle attribute) |
RemoveMaterialIds | Removes the MaterialIds field in the triangles. (Field name: "MaterialIds", Tuple size: 1 , Stored as: triangle attribute) |
RemoveNamedColors | Removes a named Color field in the corners. (Field name: "Colors0" - "Colors255", Tuple size: 4 , Stored as: Corner attribute) |
RemoveNamedTexCoords | Removes a named TexCoords field in the corners. 'TexCoords0' - 'TexCoords255' (Field name: "TexCoords0" - "TexCoords255", Tuple size: 2 , Stored as: Corner attribute) |
RemoveNormals | Removes the Normals field in the vertices. (Field name: "Normals" , Tuple size: 3 , Stored as: Vertex attribute) |
RemoveObserver | Removes a previously added observer object. (Inherited from Object) |
RemoveTangents | Removes a Tangents field in the vertices. (Field name: "Tangents0" - "Tangents255" & "Bitangents0" - "Bitangents255", Tuple size: 3 , Stored as: Vertex attribute) |
RemoveTexCoords | Removes a TexCoords field in the vertices. The valid id range of the level parameter is 0-255, which equals fields 'TexCoords0' - 'TexCoords255' (Field name: "TexCoords0" - "TexCoords255", Tuple size: 2 , Stored as: Vertex attribute) |
RemoveUserTriangleField | Removes a user-specified triangle field. To be able to add a field, it must have a name that does not conflict with the existing triangle fields. |
RemoveUserVertexField | Removes a user-specified vertex field. |
RemoveVertexLocks | Removes the VertexLocks field for the vertices. If the value for a vertex is true, then the vertex should be locked, and not be removed in the collapse-process. (Field name: "VertexLocks", Tuple size: 1 , Stored as: Vertex attribute) |
RemoveVertexWeighting | Removes the VertexWeighting field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute) |
RemoveVertexWeights | Removes the VertexWeights field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute) |
SetInf | The inferior (minimum) extent of the geometry. |
SetSup | The superior (maximum) extent of the geometry. |
# Static methods
Method | Description |
---|---|
IsClassA | Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
SafeCast | SafeCast makes sure the input object is of a class that can be cast into spPackedGeometryData, and if this is the case, returns the object cast into spPackedGeometryData. (Inherited from Object) |
# Properties details
# Name
The name of the PackedGeometryData object. (Inherited from Object)
# TriangleCount
The number of triangles in the geometry.
# VertexCount
The number of vertices in the geometry.
# Methods details
# AddBaseTypeUserTriangleField
Adds an empty user-specified triangle field. To be able to add a field, it must have a name that does not conflict with the existing triangle fields.
# AddBaseTypeUserVertexField
Adds an empty user-specified vertex field. To be able to add a field, it must have a name that does not conflict with the existing vertex fields.
# AddBoneWeights
Adds the BoneWeights and BoneIds fields in the vertices. The BoneWeights and BoneIds fields are added and removed in unison, and should always be the same tuple size. (Field names: "BoneWeights" & "BoneIds", Tuple size: varying , Stored as: Vertex attribute)
# AddColors
Adds a Color field in the vertices. The valid id range of the level parameter is 0-255, which equals fields 'Colors0' - 'Colors255' (Field name: "Colors0" - "Colors255", Tuple size: 4 , Stored as: Vertex attribute)
# AddGroupIds
Adds the GroupIds field in the triangles. (Field name: "GroupIds", Tuple size: 1 , Stored as: triangle attribute)
# AddMaterialIds
Adds the MaterialIds field in the triangles. (Field name: "MaterialIds", Tuple size: 1 , Stored as: triangle attribute)
# AddNamedColors
Adds a named Color field in the corners. (Field name: "Colors0" - "Colors255", Tuple size: 4 , Stored as: Corner attribute)
# AddNamedTexCoords
Adds a named TexCoords field in the corners. (Field name: "TexCoords0" - "TexCoords255", Tuple size: 2 , Stored as: Corner attribute)
# AddNormals
Adds the Normals field in the vertices. (Field name: "Normals" , Tuple size: 3 , Stored as: Vertex attribute)
# AddObserver
Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
# AddTangents
Adds a Tangents field in the vertices. (Field name: "Tangents0" - "Tangents255" & "Bitangents0" - "Bitangents255", Tuple size: 3 , Stored as: Vertex attribute)
# AddTexCoords
Adds a TexCoords field in the vertices. The valid id range of the level parameter is 0-255, which equals fields 'TexCoords0' - 'TexCoords255' (Field name: "TexCoords0" - "TexCoords255", Tuple size: 2 , Stored as: Vertex attribute)
# AddTriangles
Increases the triangle count by the specified value.
# AddUserTriangleField
Adds a user-specified triangle field from an already populated array. To be able to add a field, it must have a name that does not conflict with the existing triangle fields.
# AddUserVertexField
Adds a user-specified vertex field from an already populated value array. To be able to add a field, it must have a name that does not conflict with the existing vertex fields.
# AddVertexLocks
Adds the VertexLocks field for the vertices. If the value for a vertex is true, then the vertex should be locked, and not be removed in the collapse-process. (Field name: "VertexLocks", Tuple size: 1 , Stored as: Vertex attribute)
# AddVertexWeighting
Adds the VertexWeighting field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute)
# AddVertexWeights
Adds the VertexWeights field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute)
# AddVertices
AddVertices increases the vertex count by the specified value.
# AppendPackedGeometry
Appends all vertex-tuples in "source" that don't already exists in the current GeometryData. For each vertex field in this PackedGeometryData, the "source" must contain a corresponding vertex or corner field. All extra-fields in "source" will be skipped however. Returns the number of new and unique vertices created, and the NewVertexIds will contain the indices for the triangles of the "source" Geometry. The VertexIds of the current GeometryData will still be valid. If collapseToOriginalVertices is set to true, all vertices from source will be collapsed to the closest matching vertex of the current geometry. This means that no new vertices will be added, so the returned value will always be 0. If the "NewVertexIds"-array is not initiated before send into this function, it will do nothing and return -1 instead, as error value. The method does not append triangle ids or triangle field data from "source" to the current object.
# DeepCopy
Copies the field setup and data from another object. To only copy the setup, set copy_data to false.
# GetBitangents
Gets a Bitangents field in the vertices. (Field name: "Tangents0" - "Tangents255" & "Bitangents0" - "Bitangents255", Tuple size: 3 , Stored as: Vertex attribute)
# GetBoneIds
The BoneIds field. (Field name: "BoneIds", Tuple size: varying , Stored as: Vertex attribute)
# GetBoneWeights
The BoneWeights field. (Field name: "BoneWeights", Tuple size: varying , Stored as: Vertex attribute)
# GetClass
Get the name of the PackedGeometryData class. (Inherited from Object)
# GetColors
Gets a Color field in the vertices. The valid id range of the level parameter is 0-255, which equals fields 'Colors0' - 'Colors255' (Field name: "Colors0" - "Colors255", Tuple size: 4 , Stored as: Vertex attribute)
# GetCoords
The Coords field in the vertices. (Field name: "Coords", Tuple size: 3 , Stored as: Vertex attribute)
# GetExtents
Get the extents object in the geometry.
# GetGroupIds
The GroupIds field in the triangles. (Field name: "GroupIds", Tuple size: 1 , Stored as: triangle attribute)
# GetInf
The inferior (minimum) extent of the geometry.
# GetMaterialIds
The MaterialIds field in the triangles. (Field name: "MaterialIds", Tuple size: 1 , Stored as: triangle attribute)
# GetNamedColors
Gets a Color field, using the alternative name instead of the index.
# GetNamedTexCoords
Gets a TexCoords field, using the alternative name instead of the index.
# GetNormals
The Normals field in the vertices. (Field name: "Normals" , Tuple size: 3 , Stored as: Vertex attribute)
# GetSup
The superior (maximum) extent of the geometry.
# GetTangents
Gets a Tangents field in the vertices. (Field name: "Tangents0" - "Tangents255" & "Bitangents0" - "Bitangents255", Tuple size: 3 , Stored as: Vertex attribute)
# GetTexCoords
Gets a TexCoords field in the vertices. The valid id range of the level parameter is 0-255, which equals fields 'TexCoords0' - 'TexCoords255' (Field name: "TexCoords0" - "TexCoords255", Tuple size: 2 , Stored as: Vertex attribute)
# GetTriangles
Retrieves the ReFieldData object that contains the triangle fields.
# GetUserTriangleField
Gets a user-specified triangle field. To be able to add a field, it must have a name that does not conflict with the existing triangle fields.
# GetUserVertexField
Gets a user-specified vertex field.
# GetVertexIds
The VertexIds field in the triangles.
# GetVertexLocks
The VertexLocks field for the vertices. If the value for a vertex is true, then the vertex should be locked, and not be removed in the collapse-process. (Field name: "VertexLocks", Tuple size: 1 , Stored as: Vertex attribute)
# GetVertexWeighting
The VertexWeighting field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute)
# GetVertexWeights
The VertexWeights field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute)
# GetVertices
Retrieves the FieldData object that contains the vertex fields.
# IsA
Returns true if PackedGeometryData is a or is a descendant of the class named as the type parameter. (Inherited from Object)
# IsNull
Returns true if the PackedGeometryData object is invalid. (Inherited from Object)
# IsSameObjectAs
Returns true if the PackedGeometryData object is valid. (Inherited from Object)
# NewCopy
Creates another geometry data object with the same field setup. To also copy the data to the new object, set copy_data to true.
# NewUnpackedCopy
Creates an "unpacked" GeometryData object. Please note that since the data in the PackedGeometryData structure is per-vertex, you may have to weld the resulting GeometryData to remove vertices with the same spatial coordinates.
# NonNull
Returns true if the PackedGeometryData object is valid. (Inherited from Object)
# PrintInfo
Prints the content/info of the PackedGeometryData object to the log. (Inherited from Object)
# RemoveBoneWeights
Removes the BoneWeights and BoneIds fields in the vertices. The BoneWeights and BoneIds fields are added and removed in unison, and should always be the same tuple size. (Field names: "BoneWeights" & "BoneIds", Tuple size: varying , Stored as: Vertex attribute)
# RemoveColors
Removes a Color field in the vertices. The valid id range of the level parameter is 0-255, which equals fields 'Colors0' - 'Colors255' (Field name: "Colors0" - "Colors255", Tuple size: 4 , Stored as: Vertex attribute)
# RemoveGroupIds
Removes the GroupIds field in the triangles. (Field name: "GroupIds", Tuple size: 1 , Stored as: triangle attribute)
# RemoveMaterialIds
Removes the MaterialIds field in the triangles. (Field name: "MaterialIds", Tuple size: 1 , Stored as: triangle attribute)
# RemoveNamedColors
Removes a named Color field in the corners. (Field name: "Colors0" - "Colors255", Tuple size: 4 , Stored as: Corner attribute)
# RemoveNamedTexCoords
Removes a named TexCoords field in the corners. 'TexCoords0' - 'TexCoords255' (Field name: "TexCoords0" - "TexCoords255", Tuple size: 2 , Stored as: Corner attribute)
# RemoveNormals
Removes the Normals field in the vertices. (Field name: "Normals" , Tuple size: 3 , Stored as: Vertex attribute)
# RemoveObserver
Removes a previously added observer object. (Inherited from Object)
# RemoveTangents
Removes a Tangents field in the vertices. (Field name: "Tangents0" - "Tangents255" & "Bitangents0" - "Bitangents255", Tuple size: 3 , Stored as: Vertex attribute)
# RemoveTexCoords
Removes a TexCoords field in the vertices. The valid id range of the level parameter is 0-255, which equals fields 'TexCoords0' - 'TexCoords255' (Field name: "TexCoords0" - "TexCoords255", Tuple size: 2 , Stored as: Vertex attribute)
# RemoveUserTriangleField
Removes a user-specified triangle field. To be able to add a field, it must have a name that does not conflict with the existing triangle fields.
# RemoveUserVertexField
Removes a user-specified vertex field.
# RemoveVertexLocks
Removes the VertexLocks field for the vertices. If the value for a vertex is true, then the vertex should be locked, and not be removed in the collapse-process. (Field name: "VertexLocks", Tuple size: 1 , Stored as: Vertex attribute)
# RemoveVertexWeighting
Removes the VertexWeighting field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute)
# RemoveVertexWeights
Removes the VertexWeights field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute)
# SetInf
The inferior (minimum) extent of the geometry.
# SetSup
The superior (maximum) extent of the geometry.
# Static methods details
# IsClassA
Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
# SafeCast
SafeCast makes sure the input object is of a class that can be cast into spPackedGeometryData, and if this is the case, returns the object cast into spPackedGeometryData. (Inherited from Object)