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.

NativeArray Locks

The locks applied to simulation mesh descriptors.

NativeArray SimulationMeshDescriptors

The simulation mesh descriptors.

NativeArray TotalMass

The total mass of each simulation mesh descriptor.

NativeArray CovarianceMatrix

The covariance matrix for each simulation mesh descriptor.

NativeArray CenterOfMassPosition

The center of mass position for each simulation mesh descriptor.

NativeArray CenterOfMassRotation

The center of mass rotation for each simulation mesh descriptor.

NativeArray ContainsParticlesWithInfiniteMass

Flags indicating if any particles within the simulation mesh descriptor have infinite mass.

NativeArray ParticlesEnabledStateHasChanged

Flags indicating if the enabled state of particles has changed.

NativeArray DistanceConstraintsEnabledStateHasChanged

Flags indicating if the enabled state of distance constraints has changed.

NativeArray VolumeConstraintsEnabledStateHasChanged

Flags indicating if the enabled state of volume constraints has changed.

NativeArray ShapeMatchingConstraintsEnabledStateHasChanged

Flags indicating if the enabled state of shape matching constraints has changed.

NativeArray CollinearConstraintsEnabledStateHasChanged

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.