Obi
6.4
Unified particle physics for Unity
|
Public Attributes | |
float | tearCapacity = 0.5f |
float[] | tearResistance |
Vector2Int[] | distanceConstraintMap |
Public Attributes inherited from Obi.ObiClothBlueprintBase | |
HalfEdgeMesh | topology |
int[] | deformableTriangles = null |
Vector3[] | restNormals = null |
float[] | areaContribution = null |
const float | DEFAULT_PARTICLE_MASS = 0.1f |
Public Attributes inherited from Obi.ObiMeshBasedActorBlueprint | |
Mesh | inputMesh |
Vector3 | scale = Vector3.one |
Quaternion | rotation = Quaternion.identity |
Public Attributes inherited from Obi.ObiActorBlueprint | |
Vector3[] | positions = null |
Vector4[] | restPositions = null |
Quaternion[] | orientations = null |
Quaternion[] | restOrientations = null |
Vector3[] | velocities = null |
Vector3[] | angularVelocities = null |
float[] | invMasses = null |
float[] | invRotationalMasses = null |
int[] | filters = null |
Vector3[] | principalRadii = null |
Color[] | colors = null |
int[] | points = null |
int[] | edges = null |
int[] | triangles = null |
ObiDistanceConstraintsData | distanceConstraintsData = null |
ObiBendConstraintsData | bendConstraintsData = null |
ObiSkinConstraintsData | skinConstraintsData = null |
ObiTetherConstraintsData | tetherConstraintsData = null |
ObiStretchShearConstraintsData | stretchShearConstraintsData = null |
ObiBendTwistConstraintsData | bendTwistConstraintsData = null |
ObiShapeMatchingConstraintsData | shapeMatchingConstraintsData = null |
ObiAerodynamicConstraintsData | aerodynamicConstraintsData = null |
ObiChainConstraintsData | chainConstraintsData = null |
ObiVolumeConstraintsData | volumeConstraintsData = null |
List< ObiParticleGroup > | groups = new List<ObiParticleGroup>() |
Protected Member Functions | |
override IEnumerator | Initialize () |
override IEnumerator | CreateDistanceConstraints () |
Protected Member Functions inherited from Obi.ObiClothBlueprint | |
virtual IEnumerator | CreateAerodynamicConstraints () |
virtual IEnumerator | CreateBendingConstraints () |
virtual IEnumerator | CreateVolumeConstraints () |
Protected Member Functions inherited from Obi.ObiClothBlueprintBase | |
override void | SwapWithFirstInactiveParticle (int index) |
virtual IEnumerator | GenerateDeformableTriangles () |
virtual IEnumerator | CreateSimplices () |
Properties | |
int | PooledParticles [get] |
override bool | usesTethers [get] |
Properties inherited from Obi.ObiClothBlueprint | |
override bool | usesTethers [get] |
Properties inherited from Obi.ObiClothBlueprintBase | |
HalfEdgeMesh | Topology [get] |
Properties inherited from Obi.ObiActorBlueprint | |
int | particleCount [get] |
int | activeParticleCount [get] |
bool | usesOrientedParticles [get] |
virtual bool | usesTethers [get] |
bool | empty [get] |
Bounds | bounds [get] |
Properties inherited from Obi.IObiParticleCollection | |
int | particleCount [get] |
int | activeParticleCount [get] |
bool | usesOrientedParticles [get] |
Additional Inherited Members | |
Public Member Functions inherited from Obi.ObiClothBlueprint | |
override void | ClearTethers () |
override void | GenerateTethers (bool[] selected) |
Public Member Functions inherited from Obi.ObiActorBlueprint | |
delegate void | BlueprintCallback (ObiActorBlueprint blueprint) |
bool | IsParticleActive (int index) |
bool | ActivateParticle (int index) |
bool | DeactivateParticle (int index) |
void | RecalculateBounds () |
IEnumerable< IObiConstraints > | GetConstraints () |
IObiConstraints | GetConstraintsByType (Oni.ConstraintType type) |
int | GetParticleRuntimeIndex (int blueprintIndex) |
Vector3 | GetParticlePosition (int index) |
Quaternion | GetParticleOrientation (int index) |
void | GetParticleAnisotropy (int index, ref Vector4 b1, ref Vector4 b2, ref Vector4 b3) |
float | GetParticleMaxRadius (int index) |
Color | GetParticleColor (int index) |
void | GenerateImmediate () |
IEnumerator | Generate () |
void | Clear () |
ObiParticleGroup | InsertNewParticleGroup (string name, int index, bool saveImmediately=true) |
ObiParticleGroup | AppendNewParticleGroup (string name, bool saveImmediately=true) |
bool | RemoveParticleGroupAt (int index, bool saveImmediately=true) |
bool | SetParticleGroupName (int index, string name, bool saveImmediately=true) |
void | ClearParticleGroups (bool saveImmediately=true) |
void | RemoveSelectedParticles (ref bool[] selected, bool optimize=true) |
void | RestoreRemovedParticles () |
Protected Attributes inherited from Obi.ObiActorBlueprint | |
bool | m_Empty = true |
int | m_ActiveParticleCount = 0 |
int | m_InitialActiveParticleCount = 0 |
Bounds | _bounds = new Bounds() |
Events inherited from Obi.ObiActorBlueprint | |
BlueprintCallback | OnBlueprintGenerate |
|
protectedvirtual |
Have a map for half-edge->constraint. Initially create all constraints and pre-cook them. Constraints at each side of the same edge, are in different batches.
Reimplemented from Obi.ObiClothBlueprint.
float [] Obi.ObiTearableClothBlueprint.tearResistance |
Per-particle tear resistance.
|
get |
constraintHalfEdgeMap[half-edge index] = distance constraint index, or -1 if there's no constraint. Each initial constraint is the lower-index of each pair of half-edges. When a half-edge is split during tearing, one of the two half-edges gets its constraint updated and the other gets a new constraint.