// Lattice type 2x2x2, 3x3x3... public FFDLatticeType CurrentLatticeType { get; } // Custom node shape - Octahedron, Sphere, Cube, Custom publicFFDNodeShape CurrentNodeShape { get; } // Current total weight between the mesh and FFD modifier publicfloat CurrentWeight { get; set; } // FFD threshold intensity for mesh vertices publicfloat CurrentThreshold { get; set; } publicfloat CurrentDensity { get; set; } publicfloat CurrentMultiplier { get; set; } publicfloat CurrentDistanceLimitation { get; set; }
// Is the lattice on the FFD modifier generated? publicbool IsLatticeGenerated { get; } // Readonly collection of nodes generated as gameObjects publicIReadOnlyCollection<Transform> GeneratedGameObjectNodes { get; } // Readonly collection of vecs3 of initial node positions of the lattice publicIReadOnlyCollection<Vector3> InitialNodePositions { get; } // Current raw node positions of the FFD lattice publicVector3[] LatticeNodePositions { get; }
Public Methods
// Generate a FFD grid with nodes as GameObjects on the current mesh with customized settings publicvoid FFD_GenerateLatticeAsGameObjects( int latticeGridSize = 2, FFDNodeShape gameObjectNodeShapeType = FFDNodeShape.Octahedron, float nodeSize = 0.25f, float latticeBoundaryOffset = 0.1f, GameObject customNodeShape = null) // Generate a FFD grid on the current mesh with current inspector publicvoid FFD_GenerateLattice() // Bake current lattice to the backup vertices. You still will be able to restore the mesh to its original state publicvoid FFD_BakeLattice() // Release FFD grid (if possible) and keep the edited mesh publicvoid FFD_ReleaseLattice()