struct MAGES::MeshDeformations::RuntimeSimulationMeshDescriptorData¶
Overview¶
Represents the runtime data for simulation mesh descriptors in the XPBD solver. More…
struct RuntimeSimulationMeshDescriptorData
{
// fields
bool IsCreated;
int Count;
NativeArray Locks;
NativeArray SimulationMeshDescriptors;
NativeArray TotalMass;
NativeArray CovarianceMatrix;
NativeArray CenterOfMassPosition;
NativeArray CenterOfMassRotation;
NativeArray ContainsParticlesWithInfiniteMass;
NativeArray ParticlesEnabledStateHasChanged;
NativeArray DistanceConstraintsEnabledStateHasChanged;
NativeArray VolumeConstraintsEnabledStateHasChanged;
NativeArray ShapeMatchingConstraintsEnabledStateHasChanged;
NativeArray CollinearConstraintsEnabledStateHasChanged;
// methods
void Create(
in int size,
NativeArrayOptions nativeArrayOptions = NativeArrayOptions.ClearMemory
);
int Resize(in int newSize);
void RemoveAt(in int index);
void Dispose();
};
Detailed Documentation¶
Represents the runtime data for simulation mesh descriptors in the XPBD solver.
Fields¶
bool IsCreated
Indicates whether the simulation mesh descriptor data has been initialized.
int Count
The number of simulation mesh descriptors.
NativeArrayLocks
The locks applied to simulation mesh descriptors.
NativeArraySimulationMeshDescriptors
The simulation mesh descriptors.
NativeArrayTotalMass
The total mass of each simulation mesh descriptor.
NativeArrayCovarianceMatrix
The covariance matrix for each simulation mesh descriptor.
NativeArrayCenterOfMassPosition
The center of mass position for each simulation mesh descriptor.
NativeArrayCenterOfMassRotation
The center of mass rotation for each simulation mesh descriptor.
NativeArrayContainsParticlesWithInfiniteMass
Flags indicating if any particles within the simulation mesh descriptor have infinite mass.
NativeArrayParticlesEnabledStateHasChanged
Flags indicating if the enabled state of particles has changed.
NativeArrayDistanceConstraintsEnabledStateHasChanged
Flags indicating if the enabled state of distance constraints has changed.
NativeArrayVolumeConstraintsEnabledStateHasChanged
Flags indicating if the enabled state of volume constraints has changed.
NativeArrayShapeMatchingConstraintsEnabledStateHasChanged
Flags indicating if the enabled state of shape matching constraints has changed.
NativeArrayCollinearConstraintsEnabledStateHasChanged
Flags indicating if the enabled state of collinear constraints has changed.
Methods¶
void Create(
in int size,
NativeArrayOptions nativeArrayOptions = NativeArrayOptions.ClearMemory
)
Initializes the simulation mesh descriptor data arrays.
Parameters:
size |
The size of the arrays. |
nativeArrayOptions |
Options for array memory initialization. |
int Resize(in int newSize)
Resizes the data arrays to a new size.
Parameters:
newSize |
The new size for the data arrays. |
Returns:
The old size before resizing.
void RemoveAt(in int index)
Removes a simulation mesh descriptor at the specified index.
Parameters:
index |
The index of the simulation mesh descriptor to remove. |
void Dispose()
Disposes of the native arrays.