DinoFracture 2.11.1
A Dynamic Fracture Library
Loading...
Searching...
No Matches

DinoFracture.FractureDetails Class Reference

Basic information for any sort of mesh fragmentation. More...

Inheritance diagram for DinoFracture.FractureDetails:
[legend]
Collaboration diagram for DinoFracture.FractureDetails:
[legend]

Public Member Functions

virtual bool IsValid ()
 Returns true if the details are filled in correctly, false otherwise.
 

Public Attributes

UnityEngine.Mesh Mesh
 The mesh to fracture.
 
Vector3 MeshScale
 The scale of the mesh's game object. The meshes of fracture pieces will be scaled by this amount to allow their game object's scales to be one.
 
FractureUVScale UVScale
 Scaling algorithm used on triangles produced during the fracture.
 
UVBounds UVBounds = new UVBounds(Vector2.zero, Vector2.one)
 Final 'inside' triangles will be remapped to be within this range after the UV scale is applied.
 
FractureIssueResolution IssueResolution
 How to deal with potentially poorly generated pieces.
 
bool Asynchronous
 If true, fracturing is done on a background thread and results may not be ready by the time FractureBuilder.Fracture() finishes. If false, fracturing is guaranteed to be done by the time FractureBuilder.Fracture() finishes.
 
int InsideMaterialIndex
 The material / sub-mesh index that newly formed triangles should be put in.
 
bool SeparateDisjointPieces
 If true, a final pass will be done to separate out meshes that are not physically connected. This can only happen when the mesh has concave parts.
 
VertexMergingPolicy VertexMergingPolicy = VertexMergingPolicy.Default
 Defines how aggressively to merge the vertices of this fracture. More aggressive merging will result in meshes that have a reduced number of vertices and triangles at the cost of more computation time during fracture.
 
MeshValidity Validity = MeshValidity.Unknown
 Highly recommended to call.
 

Properties

int FractureFrame [get, set]
 The frame the fracture started on. Can be used to group separate fractures that should be treated as one.
 

Detailed Description

Basic information for any sort of mesh fragmentation.

Member Function Documentation

◆ IsValid()

virtual bool DinoFracture.FractureDetails.IsValid ( )
inlinevirtual

Returns true if the details are filled in correctly, false otherwise.

Returns

Reimplemented in DinoFracture.ShatterDetails, and DinoFracture.SliceDetails.

Member Data Documentation

◆ InsideMaterialIndex

int DinoFracture.FractureDetails.InsideMaterialIndex

The material / sub-mesh index that newly formed triangles should be put in.

Specify -1 to put at the end of the list.

◆ IssueResolution

FractureIssueResolution DinoFracture.FractureDetails.IssueResolution

How to deal with potentially poorly generated pieces.

Note: Any generated mesh with zero triangles is automatically removed.

◆ SeparateDisjointPieces

bool DinoFracture.FractureDetails.SeparateDisjointPieces

If true, a final pass will be done to separate out meshes that are not physically connected. This can only happen when the mesh has concave parts.

This process can be slow. It is recommended to be off for runtime fractures unless there is a good chance of disjoint pieces.

◆ VertexMergingPolicy

VertexMergingPolicy DinoFracture.FractureDetails.VertexMergingPolicy = VertexMergingPolicy.Default

Defines how aggressively to merge the vertices of this fracture. More aggressive merging will result in meshes that have a reduced number of vertices and triangles at the cost of more computation time during fracture.

Vertex merging only applies to vertices on the ring of a slice. The original hull of the mesh will never have vertices merged.