Verlet Intergration Soft Body
Loading...
Searching...
No Matches
PhysicsCSAlevlProject.FileWriteableMesh Class Reference

The FileWriteableMesh class serves as a serializable representation of the Mesh class, allowing for easy saving and loading of mesh data to and from JSON format. It contains nested classes for particle and stick data, as well as collider information, and provides methods to convert between the FileWriteableMesh and the original Mesh class. This design enables the application to persist mesh configurations, including particle properties, stick connections, and colliders, while also supporting oscillating particles with their specific parameters. The ToMesh method reconstructs a Mesh instance from the stored data, ensuring that all relevant properties are correctly transferred for accurate physics simulations when loaded back into the application. More...

Classes

class  OscillationData
 stores the data for a oscilating particle in a way that can be easily serialized to json, no anchor position as that is stored as the main position of the particle, but includes the amplitude, frequency and angle of the oscilation More...
class  particleData
 stores the data for a particle in a way that can be easily serialized to json More...
class  stickData
 stores the data for a stick in a way that can be easily serialized to json More...

Public Member Functions

 FileWriteableMesh (Mesh mesh)
Mesh ToMesh ()

Public Attributes

List< particleDataParticles = new List<particleData>()
List< stickDataSticks = new List<stickData>()
List< ColliderColliders = new()
float SpringConstant = 10000f
float Drag = 0.997f
float Mass = 1f

Detailed Description

The FileWriteableMesh class serves as a serializable representation of the Mesh class, allowing for easy saving and loading of mesh data to and from JSON format. It contains nested classes for particle and stick data, as well as collider information, and provides methods to convert between the FileWriteableMesh and the original Mesh class. This design enables the application to persist mesh configurations, including particle properties, stick connections, and colliders, while also supporting oscillating particles with their specific parameters. The ToMesh method reconstructs a Mesh instance from the stored data, ensuring that all relevant properties are correctly transferred for accurate physics simulations when loaded back into the application.


The documentation for this class was generated from the following file:
  • PhysicsCSAlevlProject/Objects.FileWriteableMesh.cs