#include <DynamicMeshToMeshDescription.h>
|
| void MESHCONVERSION_API | SetMaterialIDMapFromInverseMap (TArrayView< const int32 > PolygroupIDToMaterialIDMap) |
| |
| | FDynamicMeshToMeshDescription () |
| |
| | FDynamicMeshToMeshDescription (FConversionToMeshDescriptionOptions ConversionOptions) |
| |
| MESHCONVERSION_API bool | HaveMatchingElementCounts (const FDynamicMesh3 *DynamicMesh, const FMeshDescription *MeshDescription) |
| |
| MESHCONVERSION_API void | Convert (const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut, bool bCopyTangents=false) |
| |
| MESHCONVERSION_API void | UpdateUsingConversionOptions (const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut) |
| |
| MESHCONVERSION_API void | Update (const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut, bool bUpdateNormals=true, bool bUpdateTangents=false, bool bUpdateUVs=false) |
| |
| MESHCONVERSION_API void | UpdateAttributes (const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut, bool bUpdateNormals, bool bUpdateTangents, bool bUpdateUVs) |
| |
| MESHCONVERSION_API void | UpdateTangents (const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut, const UE::Geometry::TMeshTangents< double > *SrcTangents) |
| |
| MESHCONVERSION_API void | UpdateTangents (const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut) |
| |
| MESHCONVERSION_API void | UpdateVertexColors (const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut) |
| |
| MESHCONVERSION_API void | Convert_NoAttributes (const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut) |
| |
| MESHCONVERSION_API void | Convert_SharedInstances (const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut) |
| |
| MESHCONVERSION_API void | Convert_NoSharedInstances (const FDynamicMesh3 *MeshIn, FMeshDescription &MeshOut, bool bCopyTangents) |
| |
Convert FDynamicMesh3 to FMeshDescription
◆ FDynamicMeshToMeshDescription() [1/2]
| FDynamicMeshToMeshDescription::FDynamicMeshToMeshDescription |
( |
| ) |
|
|
inline |
◆ FDynamicMeshToMeshDescription() [2/2]
◆ ApplyVertexColorTransform()
| void FDynamicMeshToMeshDescription::ApplyVertexColorTransform |
( |
FVector4f & |
Color | ) |
const |
|
protected |
Applies an optional sRGB-to-Linear color transform on the input. The color transform is controlled by ConversionOptions.bTransformVtxColorsSRGBToLinear.
The counterpart to this method is MeshDescriptionToDynamicMesh::ApplyVertexColorTransform which will undo this color transformation when the MeshDescription is read back.
- Parameters
-
◆ Convert()
Default conversion of DynamicMesh to MeshDescription. Calls functions below depending on mesh state
- Parameters
-
| bCopyTangents | - should tangent, bitangent overlays exist on the MeshIn, this will use them when producing the MeshDescription MeshOut |
Note: Don't copy tangents if the resulting MeshDescription corresponds to a StaticMesh with autogenerated tangents in this case the MeshDescription is expected to have empty tangents.
◆ Convert_NoAttributes()
Ignore any Attributes on input Mesh, calculate per-vertex normals and have MeshDescription compute tangents. One VertexInstance per input vertex is generated
◆ Convert_NoSharedInstances()
Convert with no shared VertexInstances. A new VertexInstance is created for each triangle vertex (ie corner). However vertex positions are shared and the shared UVs structures are populated.
- Parameters
-
| bCopyTangents | - should tangent, bitangent overlays exist on the MeshIn, this will use them when producing the MeshDescription MeshOut |
Note: Don't copy tangents if the resulting MeshDescription corresponds to a StaticMesh with autogenerated tangents in this case the MeshDescription is expected to have empty tangents.
◆ Convert_SharedInstances()
Convert while minimizing VertexInstance count, IE new VertexInstances are only created if a unique UV or Normal is required.
Note: This doesn't copy any tangents from the FDynamicMesh Note: This conversion is not currently being used. It is unclear if all consumers of FMeshDescription can handle such shared vertex instances
◆ ConvertPolygroupLayers()
Transfer PolygroupLayers from DynamicMesh AttributeSet to MeshDescription. Will copy to existing MeshDescription TriangleAttribute<int32> if one with the same name exists. Otherwise will register a new one.
◆ ConvertWeightLayers()
Transfer WeightLayers from DynamicMesh AttributeSet to MeshDescription. Will copy to existing MeshDescription VertexAttribute<float> if one with the same name exists. Otherwise will register a new one.
◆ HaveMatchingElementCounts() [1/2]
Checks if element counts match. If false then Update can't be called – you must call Convert Result is based on the current ConversionOptions (e.g. if you are only updating vertices, mismatched triangles are ok)
- Parameters
-
| DynamicMesh | The dynamic mesh with updated vertices or attributes |
| MeshDescription | The corresponding mesh description |
◆ HaveMatchingElementCounts() [2/2]
Checks if element counts match. If false then Update can't be called – you must call Convert
- Parameters
-
| DynamicMesh | The dynamic mesh with updated vertices or attributes |
| MeshDescription | The corresponding mesh description |
| bVerticesOnly | If true, only check vertex counts match |
| bAttributesOnly | If true, only check what needs to be checked for UpdateAttributes (will check vertices or triangles depending on whether attributes are per vertex or in overlays) |
◆ SetMaterialIDMapFromInverseMap()
| void FDynamicMeshToMeshDescription::SetMaterialIDMapFromInverseMap |
( |
TArrayView< const int32 > |
PolygroupIDToMaterialIDMap | ) |
|
◆ Update()
Update existing MeshDescription based on DynamicMesh. Assumes mesh topology has not changed. Copies positions optionally, normals, tangents and UVs
◆ UpdateAttributes()
Update only attributes, assuming the mesh topology has not changed. Does not touch positions. NOTE: assumes the order of triangles in the MeshIn correspond to the ordering you'd get by iterating over triangles, on MeshOut This matches conversion currently used in MeshDescriptionToDynamicMesh.cpp, but if that changes we will need to change this function to match!
- Parameters
-
| bUpdateNormals | Specifies if the normals should be transfered from the MeshIn PrimaryNormal overlay if it exists |
| bUpdateTangents | Specifies if the tangent and bitangent sign should be populated from the MeshIn PrimaryTangents and PrimaryBiTangents. this requires the PrimaryNormals to exist as well. |
| bUpdateUVs | Specifices if the UV layers should be transfered from the MeshIn overlays. |
◆ UpdateTangents() [1/2]
Use the MeshIn Overlays to update the Tangent and BinormalSign attributes of the MeshDescription, assuming mesh topology has not changed. Does not modify any other attributes. NOTE: assumes the order of triangles in the MeshIn correspond to the ordering you'd get by iterating over triangles, on MeshOut This matches conversion currently used in MeshDescriptionToDynamicMesh.cpp, but if that changes we will need to change this function to match!
◆ UpdateTangents() [2/2]
Use the TMeshTangents to update the Tangent and BinormalSign attributes of the MeshDescription, assuming mesh topology has not changed. Does not modify any other attributes. NOTE: this ignores any tangent or bitangent overlays on the MeshIn, and instead uses the tangent and bitangent information stored in the TMeshTangents NOTE: assumes the order of triangles in the MeshIn correspond to the ordering you'd get by iterating over triangles, on MeshOut This matches conversion currently used in MeshDescriptionToDynamicMesh.cpp, but if that changes we will need to change this function to match!
◆ UpdateUsingConversionOptions()
Updates the given mesh description based conversion options provided in the constructor. Assumes the mesh topology has not changed. Annoyingly, this can't just be named Update() due to ambiguity with the function below, which existed beforehand and should probably have been this function instead.
◆ UpdateVertexColors()
Update only vertex colors, assuming the mesh topology has not changed. Does not touch positions or other attributes. NOTE: assumes the order of triangles in the MeshIn correspond to the ordering you'd get by iterating over triangles, on MeshOut This matches conversion currently used in MeshDescriptionToDynamicMesh.cpp, but if that changes we will need to change this function to match!
◆ bPrintDebugMessages
| bool FDynamicMeshToMeshDescription::bPrintDebugMessages = false |
If true, will print some possibly-helpful debugging spew to output log
◆ ConversionOptions
General settings for conversions to mesh description
The documentation for this class was generated from the following files: