Obi  6.4
Unified particle physics for Unity
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Obi.ObiConstraintsBatch Class Referenceabstract
Inheritance diagram for Obi.ObiConstraintsBatch:
Obi.IObiConstraintsBatch Obi.ObiAerodynamicConstraintsBatch Obi.ObiBendConstraintsBatch Obi.ObiBendTwistConstraintsBatch Obi.ObiChainConstraintsBatch Obi.ObiDistanceConstraintsBatch Obi.ObiPinConstraintsBatch Obi.ObiShapeMatchingConstraintsBatch Obi.ObiSkinConstraintsBatch Obi.ObiStretchShearConstraintsBatch Obi.ObiTetherConstraintsBatch Obi.ObiVolumeConstraintsBatch

Public Member Functions

virtual void Merge (ObiActor actor, IObiConstraintsBatch other)
 
abstract void GetParticlesInvolved (int index, List< int > particles)
 
abstract void AddToSolver (ObiSolver solver)
 
abstract void RemoveFromSolver (ObiSolver solver)
 
virtual void Clear ()
 
int GetConstraintIndex (int constraintId)
 
bool IsConstraintActive (int index)
 
bool ActivateConstraint (int constraintIndex)
 
bool DeactivateConstraint (int constraintIndex)
 
void DeactivateAllConstraints ()
 
void RemoveConstraint (int constraintIndex)
 
void ParticlesSwapped (int index, int newIndex)
 

Public Attributes

ObiNativeIntList particleIndices = new ObiNativeIntList()
 
ObiNativeFloatList lambdas = new ObiNativeFloatList()
 

Protected Member Functions

abstract void SwapConstraints (int sourceIndex, int destIndex)
 
virtual void CopyConstraint (ObiConstraintsBatch batch, int constraintIndex)
 
void RegisterConstraint ()
 

Protected Attributes

List< int > m_IDs = new List<int>()
 
List< int > m_IDToIndex = new List<int>()
 
int m_ConstraintCount = 0
 
int m_ActiveConstraintCount = 0
 
int m_InitialActiveConstraintCount = 0
 

Properties

int constraintCount [get]
 
int activeConstraintCount [get, set]
 
virtual int initialActiveConstraintCount [get, set]
 
abstract Oni.ConstraintType constraintType [get]
 
abstract IConstraintsBatchImpl implementation [get]
 
- Properties inherited from Obi.IObiConstraintsBatch
int constraintCount [get]
 
int activeConstraintCount [get, set]
 
int initialActiveConstraintCount [get, set]
 
Oni.ConstraintType constraintType [get]
 
IConstraintsBatchImpl implementation [get]
 

Member Function Documentation

int Obi.ObiConstraintsBatch.GetConstraintIndex ( int  constraintId)

Given the id of a constraint, return its index in the constraint data arrays. Will return -1 if the constraint does not exist.

void Obi.ObiConstraintsBatch.RegisterConstraint ( )
protected

Registers a new constraint. Call this before adding a new contraint to the batch, so that the constraint is given an ID and the amount of constraints increased.

Member Data Documentation

ObiNativeFloatList Obi.ObiConstraintsBatch.lambdas = new ObiNativeFloatList()

constraint lambdas

List<int> Obi.ObiConstraintsBatch.m_IDToIndex = new List<int>()
protected

maps from constraint ID to constraint index. When activating/deactivating constraints, their order changes. That makes this map necessary. All active constraints are at the beginning of the constraint arrays, in the 0, activeConstraintCount index range.

ObiNativeIntList Obi.ObiConstraintsBatch.particleIndices = new ObiNativeIntList()

particle indices, amount of them per constraint can be variable.


The documentation for this class was generated from the following file: