Skip to content
On this page

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

PropertyDescription
NameThe name of the PackedGeometryData object. (Inherited from Object)
TriangleCountThe number of triangles in the geometry.
VertexCountThe number of vertices in the geometry.

Methods

MethodDescription
AddBaseTypeUserTriangleFieldAdds 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.
AddBaseTypeUserVertexFieldAdds 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.
AddBoneWeightsAdds 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)
AddColorsAdds 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)
AddGroupIdsAdds the GroupIds field in the triangles. (Field name: "GroupIds", Tuple size: 1 , Stored as: triangle attribute)
AddMaterialIdsAdds the MaterialIds field in the triangles. (Field name: "MaterialIds", Tuple size: 1 , Stored as: triangle attribute)
AddNamedColorsAdds a named Color field in the corners. (Field name: "Colors0" - "Colors255", Tuple size: 4 , Stored as: Corner attribute)
AddNamedTexCoordsAdds a named TexCoords field in the corners. (Field name: "TexCoords0" - "TexCoords255", Tuple size: 2 , Stored as: Corner attribute)
AddNormalsAdds the Normals field in the vertices. (Field name: "Normals" , Tuple size: 3 , Stored as: Vertex attribute)
AddObserverAdds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
AddTangentsAdds a Tangents field in the vertices. (Field name: "Tangents0" - "Tangents255" & "Bitangents0" - "Bitangents255", Tuple size: 3 , Stored as: Vertex attribute)
AddTexCoordsAdds 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)
AddTrianglesIncreases the triangle count by the specified value.
AddUserTriangleFieldAdds 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.
AddUserVertexFieldAdds 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.
AddVertexLocksAdds 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)
AddVertexWeightingAdds the VertexWeighting field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute)
AddVertexWeightsAdds the VertexWeights field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute)
AddVerticesAddVertices increases the vertex count by the specified value.
AppendPackedGeometryAppends 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.
DeepCopyCopies the field setup and data from another object. To only copy the setup, set copy_data to false.
GetBitangentsGets a Bitangents field in the vertices. (Field name: "Tangents0" - "Tangents255" & "Bitangents0" - "Bitangents255", Tuple size: 3 , Stored as: Vertex attribute)
GetBoneIdsThe BoneIds field. (Field name: "BoneIds", Tuple size: varying , Stored as: Vertex attribute)
GetBoneWeightsThe BoneWeights field. (Field name: "BoneWeights", Tuple size: varying , Stored as: Vertex attribute)
GetClassGet the name of the PackedGeometryData class. (Inherited from Object)
GetColorsGets 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)
GetCoordsThe Coords field in the vertices. (Field name: "Coords", Tuple size: 3 , Stored as: Vertex attribute)
GetExtentsGet the extents object in the geometry.
GetGroupIdsThe GroupIds field in the triangles. (Field name: "GroupIds", Tuple size: 1 , Stored as: triangle attribute)
GetInfThe inferior (minimum) extent of the geometry.
GetMaterialIdsThe MaterialIds field in the triangles. (Field name: "MaterialIds", Tuple size: 1 , Stored as: triangle attribute)
GetNamedColorsGets a Color field, using the alternative name instead of the index.
GetNamedTexCoordsGets a TexCoords field, using the alternative name instead of the index.
GetNormalsThe Normals field in the vertices. (Field name: "Normals" , Tuple size: 3 , Stored as: Vertex attribute)
GetSupThe superior (maximum) extent of the geometry.
GetTangentsGets a Tangents field in the vertices. (Field name: "Tangents0" - "Tangents255" & "Bitangents0" - "Bitangents255", Tuple size: 3 , Stored as: Vertex attribute)
GetTexCoordsGets 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)
GetTrianglesRetrieves the ReFieldData object that contains the triangle fields.
GetUserTriangleFieldGets 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.
GetUserVertexFieldGets a user-specified vertex field.
GetVertexIdsThe VertexIds field in the triangles.
GetVertexLocksThe 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)
GetVertexWeightingThe VertexWeighting field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute)
GetVertexWeightsThe VertexWeights field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute)
GetVerticesRetrieves the FieldData object that contains the vertex fields.
IsAReturns true if PackedGeometryData is a or is a descendant of the class named as the type parameter. (Inherited from Object)
IsNullReturns true if the PackedGeometryData object is invalid. (Inherited from Object)
IsSameObjectAsReturns true if the PackedGeometryData object is valid. (Inherited from Object)
NewCopyCreates another geometry data object with the same field setup. To also copy the data to the new object, set copy_data to true.
NewUnpackedCopyCreates 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.
NonNullReturns true if the PackedGeometryData object is valid. (Inherited from Object)
PrintInfoPrints the content/info of the PackedGeometryData object to the log. (Inherited from Object)
RemoveBoneWeightsRemoves 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)
RemoveColorsRemoves 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)
RemoveGroupIdsRemoves the GroupIds field in the triangles. (Field name: "GroupIds", Tuple size: 1 , Stored as: triangle attribute)
RemoveMaterialIdsRemoves the MaterialIds field in the triangles. (Field name: "MaterialIds", Tuple size: 1 , Stored as: triangle attribute)
RemoveNamedColorsRemoves a named Color field in the corners. (Field name: "Colors0" - "Colors255", Tuple size: 4 , Stored as: Corner attribute)
RemoveNamedTexCoordsRemoves a named TexCoords field in the corners. 'TexCoords0' - 'TexCoords255' (Field name: "TexCoords0" - "TexCoords255", Tuple size: 2 , Stored as: Corner attribute)
RemoveNormalsRemoves the Normals field in the vertices. (Field name: "Normals" , Tuple size: 3 , Stored as: Vertex attribute)
RemoveObserverRemoves a previously added observer object. (Inherited from Object)
RemoveTangentsRemoves a Tangents field in the vertices. (Field name: "Tangents0" - "Tangents255" & "Bitangents0" - "Bitangents255", Tuple size: 3 , Stored as: Vertex attribute)
RemoveTexCoordsRemoves 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)
RemoveUserTriangleFieldRemoves 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.
RemoveUserVertexFieldRemoves a user-specified vertex field.
RemoveVertexLocksRemoves 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)
RemoveVertexWeightingRemoves the VertexWeighting field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute)
RemoveVertexWeightsRemoves the VertexWeights field for the vertices. (Field name: "VertexWeights", Tuple size: 1 , Stored as: Vertex attribute)
SetInfThe inferior (minimum) extent of the geometry.
SetSupThe superior (maximum) extent of the geometry.

Static methods

MethodDescription
IsClassAReturns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
SafeCastSafeCast 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)