|
delegate void | SolverCallback (ObiSolver solver) |
|
delegate void | SolverStepCallback (ObiSolver solver, float timeToSimulate, float substepTime) |
|
delegate void | CollisionCallback (ObiSolver solver, ObiNativeContactList contacts) |
|
delegate void | SpatialQueryCallback (ObiSolver solver, ObiNativeQueryResultList results) |
|
void | OnEnable () |
|
void | Initialize () |
|
void | Teardown () |
|
void | UpdateBackend () |
|
void | EnsureRigidbodyArraysCapacity (int count) |
|
void | StartSimulation (float stepDelta, int simulationSteps) |
|
void | CompleteSimulation () |
|
void | Render (float unsimulatedTime) |
| Performs physics state interpolation and updates rendering. More...
|
|
bool | AddActor (ObiActor actor) |
| Adds an actor to the solver. More...
|
|
bool | RemoveActor (ObiActor actor) |
| Attempts to remove an actor from this solver, and returns whether this was sucessful or not. More...
|
|
void | PushSolverParameters () |
| Updates solver parameters. More...
|
|
Oni.ConstraintParameters | GetConstraintParameters (Oni.ConstraintType constraintType) |
| Returns the parameters used by a given constraint type. More...
|
|
IObiConstraints | GetConstraintsByType (Oni.ConstraintType type) |
| Returns the runtime representation of constraints of a given type being simulated by this solver. More...
|
|
void | RegisterRenderSystem (IRenderSystem renderSystem) |
|
void | UnregisterRenderSystem (IRenderSystem renderSystem) |
|
RenderSystem< T > | GetRenderSystem< T > () |
|
IRenderSystem | GetRenderSystem (Oni.RenderingSystemType type) |
|
int | EnqueueSpatialQuery (QueryShape shape, AffineTransform transform) |
| Enqueues a generic spatial query to be performed during the next physics update. If called when the solver is yet uninitialized, the query will be ignored and this method will return -1. More...
|
|
int | EnqueueSpatialQueries (ObiNativeQueryShapeList shapes, ObiNativeAffineTransformList transforms) |
| Enqueues multiple generic spatial query to be performed during the next physics update. If called when the solver is yet uninitialized, the query will be ignored and this method will return -1. More...
|
|
int | EnqueueRaycast (Ray ray, int filter, float maxDistance=100, float rayThickness=0) |
| Enqueues a raycast to be performed during the next physics update. If called when the solver is yet uninitialized, the query will be ignored and this method will return -1. More...
|
|
|
bool | simulateWhenInvisible = true |
|
int | substeps = 4 |
|
int | maxStepsPerFrame = 1 |
|
Synchronization | synchronization = Synchronization.Asynchronous |
|
Oni.SolverParameters | parameters |
|
uint | maxQueryResults = 8192 |
|
uint | maxFoamParticles = 8192 |
|
uint | maxParticleNeighbors = 128 |
|
uint | maxParticleContacts = 6 |
|
Vector3 | gravity = new Vector3(0, -9.81f, 0) |
|
Space | gravitySpace = Space.Self |
|
Vector3 | ambientWind = new Vector3(0, 0, 0) |
|
Space | windSpace = Space.Self |
|
int | foamSubsteps = 1 |
|
float | maxFoamVelocityStretch = 0.3f |
|
Vector2 | foamFade = new Vector2(0.05f, 0.8f) |
|
Vector2 | foamAccelAgingRange = new Vector2(0.5f, 0.8f) |
|
float | foamAccelAging = 4 |
|
float | worldLinearInertiaScale = 0 |
|
float | worldAngularInertiaScale = 0 |
|
List< ObiActor > | actors = new List<ObiActor>() |
|
ObiNativeIntList | deformableTriangles |
|
ObiNativeIntList | deformableEdges |
|
ObiNativeVector2List | deformableUVs |
|
SimplexCounts | m_SimplexCounts |
|
bool | dirtyDeformableTriangles = true |
|
bool | dirtyDeformableEdges = true |
|
Oni.SimplexType | dirtySimplices = Oni.SimplexType.All |
|
int | dirtyRendering = 0 |
|
int | dirtyConstraints = 0 |
|
bool | synchronousSpatialQueries = false |
|
Oni.ConstraintParameters | distanceConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Sequential, 1) |
|
Oni.ConstraintParameters | bendingConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1) |
|
Oni.ConstraintParameters | particleCollisionConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Sequential, 1) |
|
Oni.ConstraintParameters | particleFrictionConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1) |
|
Oni.ConstraintParameters | collisionConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Sequential, 1) |
|
Oni.ConstraintParameters | frictionConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1) |
|
Oni.ConstraintParameters | skinConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Sequential, 1) |
|
Oni.ConstraintParameters | volumeConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1) |
|
Oni.ConstraintParameters | shapeMatchingConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1) |
|
Oni.ConstraintParameters | tetherConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1) |
|
Oni.ConstraintParameters | pinConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1) |
|
Oni.ConstraintParameters | pinholeConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1) |
|
Oni.ConstraintParameters | stitchConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1) |
|
Oni.ConstraintParameters | densityConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1) |
|
Oni.ConstraintParameters | stretchShearConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Sequential, 1) |
|
Oni.ConstraintParameters | bendTwistConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Sequential, 1) |
|
Oni.ConstraintParameters | chainConstraintParameters = new Oni.ConstraintParameters(false, Oni.ConstraintParameters.EvaluationOrder.Sequential, 1) |
|
int | pendingQueryCount => bufferedQueryShapes.count |
|
int | activeParticleCount => activeParticles.count |
|
ObiSolver simulates particles and constraints, provided by a list of ObiActor. Particles belonging to different solvers won't interact with each other in any way.
bool Obi.ObiSolver.AddActor |
( |
ObiActor |
actor | ) |
|
Adds an actor to the solver.
Attemps to add the actor to this solver returning whether this was successful or not. In case the actor was already added, or had no reference to a blueprint, this operation will return false. If this was the first actor added to the solver, will attempt to initialize the solver. While in play mode, if the actor is sucessfully added to the solver, will also call actor.LoadBlueprint().
- Parameters
-
- Returns
- Whether the actor was sucessfully added.
bool Obi.ObiSolver.RemoveActor |
( |
ObiActor |
actor | ) |
|
Attempts to remove an actor from this solver, and returns whether this was sucessful or not.
Will only reurn true if the actor had been previously added successfully to this solver. If the actor is sucessfully removed from the solver, will also call actor.UnloadBlueprint(). Once the last actor is removed from the solver, this method will attempt to tear down the solver.
- Parameters
-
- Returns
- Whether the actor was sucessfully removed.