struct MAGES::MeshDeformations::RuntimeCollinearConstraintData¶
Overview¶
Runtime data for CollinearConstraint. More…
struct RuntimeCollinearConstraintData
{
// fields
bool IsCreated;
int Count;
NativeArray Enabled;
NativeArray Breakable;
NativeArray PhysicsMaterialIndex;
NativeArray ParticleA;
NativeArray ParticleB;
NativeArray ParticleC;
NativeArray SimulationMeshDescriptorIndex;
// methods
void Create(
in int size,
NativeArrayOptions nativeArrayOptions = NativeArrayOptions.ClearMemory
);
int Resize(in int newSize);
int InsertAdditionalEmptySpace(in int additionalSize, in int emptySpacePosition);
void RemoveRange(in int index, in int length);
void Dispose();
};
Detailed Documentation¶
Runtime data for CollinearConstraint.
Fields¶
bool IsCreated
Indicates whether the constraint data has been initialized.
int Count
The number of constraints.
NativeArrayEnabled
Indicates whether each constraint is enabled.
NativeArrayBreakable
Indicates whether each constraint is breakable.
NativeArrayPhysicsMaterialIndex
The index of the physics material for each constraint.
NativeArrayParticleA
The index of the first particle involved in each constraint.
NativeArrayParticleB
The index of the second particle involved in each constraint.
NativeArrayParticleC
The index of the third particle involved in each constraint.
NativeArraySimulationMeshDescriptorIndex
The index of the simulation mesh descriptor for each constraint.
Methods¶
void Create(
in int size,
NativeArrayOptions nativeArrayOptions = NativeArrayOptions.ClearMemory
)
Initializes the data arrays.
Parameters:
size |
The size of the arrays. |
nativeArrayOptions |
Options for array memory initialization. |
int Resize(in int newSize)
Resizes the data arrays.
Parameters:
newSize |
The new size. |
Returns:
The index at which the new cells begin.
int InsertAdditionalEmptySpace(in int additionalSize, in int emptySpacePosition)
Inserts additional empty space into the data arrays.
Parameters:
additionalSize |
The size of the additional space to insert. |
emptySpacePosition |
The index at which the new empty space will be located. |
Returns:
The index at which the new cells begin.
void RemoveRange(in int index, in int length)
Removes a range of data from the arrays.
Parameters:
index |
The starting index of the range to remove. |
length |
The length of the range to remove. |
void Dispose()
Disposes of the native arrays.