Jypeli.Physics2d
Takes a 2D Boolean array with a true value representing a collidable pixel and converts
it to an array of vertex that surrounds that bitmap. The bitmap should be a single piece
if there are many pieces it will only return the geometry of the first piece it comes
across. Make sure there are at least 3 pixels in a piece otherwise an exception will be
thrown (it wont be a polygon).
a bitmap to be converted. true means its collidable.
A Vector2D[] representing the bitmap.
creates vertexes that describe a Rectangle.
The length of the Rectangle
array of vectors the describe a rectangle
Calculates the moment of inertia for a polygon
the moment of inertia
INCOMPLETE! TODO: FINISH
makes sure the distance between 2 vertexes is under the length passed, by adding vertexes between them.
the original vertexes.
the maximum distance allowed between 2 vertexes
The new vertexes.
makes sure the distance between 2 vertexes is under the length passed, by adding vertexes between them.
the original vertexes.
the maximum distance allowed between 2 vertexes
if it should check the distance between the first and last vertex.
The new vertexes.
Reduces a Polygon's number of vertexes.
The Polygon to reduce.
The reduced vertexes.
Reduces a Polygon's number of vertexes.
The Polygon to reduce.
The amount the removal of a vertex is allowed to change the area of the polygon.
(Setting this value to 0 will reverse what the Subdivide method does)
The reduced vertexes.
Calculates the area of a polygon.
The vertexes of the polygon.
The area.
Calculates the Centroid of a polygon.
The vertexes of the polygon.
The Centroid of a polygon.
This is Also known as Center of Gravity/Mass.
repositions the polygon so the Centroid is the origin.
The vertexes of the polygon.
The vertexes of the polygon with the Centroid as the Origin.
A Circle
Creates a new Circle Instance.
how large the circle is.
The number or vertex that will be generated along the perimeter of the circle.
This is for collision detection.
Creates a new Circle Instance.
how large the circle is.
The number or vertex that will be generated along the perimeter of the circle.
This is for collision detection.
How hard it is to turn the shape. Depending on the construtor in the
Body this will be multiplied with the mass to determine the moment of inertia.
the distance from the position where the circle ends.
A shape that contains multiple polygons.
Represents a Single point.
All particles are the same! so use this one!
Creates a new Particle Instance.
Use this to Represent a Polygon in the engine
Creates a new Polygon Instance.
the vertexes that make up the shape of the Polygon
How large a grid cell is. Usualy you will want at least 2 cells between major vertexes.
The smaller this is the better precision you get, but higher cost in memory.
The larger the less precision and if it's to high collision detection may fail completely.
How hard it is to turn the shape. Depending on the construtor in the
Body this will be multiplied with the mass to determine the moment of inertia.
A Ray Segment is a Ray that has a length. It can be used to represent
lasers or very fast projectiles.
The information of an intersection with another shape.
An collection of distances away from the Ray Segments.
The indexes match up with the Segments in the Ray Segments class.
A negative value means there was no intersection.
A shape that holds multiple Ray Segments and generates custom collision events
for when they intersect something. The Sequential Impulses Solver does not
handle collisions with this shape.
These are the normals for the original vertexes.
Class Used to store a Linear Value along with an Angular Value. Like Position and Orientation.
ALVector2D(0,Vector2D.Zero)
This is the Angular value of this ALVector2D.
Example: Angular would be Orientation and Linear would be Location Completly describing a Position.
This is the Linear value of this ALVector2D.
Example: Angular would be Orientation and Linear would be Location Completly describing a Position.
Creates a new ALVector2D instance on the stack.
The Angular value.
The Linear value.
The Linear.X component
The Linear.Y component
Does Addition of 2 ALVector2Ds.
The left ALVector2D operand.
The right ALVector2D operand.
The Sum of the ALVector2Ds.
Does Subtraction of 2 ALVector2Ds.
The left ALVector2D operand.
The right ALVector2D operand.
The Difference of the ALVector2Ds.
Does Multiplication of 2 ALVector2Ds
The ALVector2D to be Multiplied.
The Scalar multiplier.
The Product of the ALVector2Ds.
It does normal Multiplication of the Angular value but does Scalar Multiplication of the Linear value.
Does Multiplication of 2 ALVector2Ds
The Scalar multiplier.
The ALVector2D to be Multiplied.
The Product of the ALVector2Ds.
It does normal Multiplication of the Angular value but does Scalar Multiplication of the Linear value.
This is the Physical Body that collides in the engine.
Raised when the Lifetime property has been Changed.
Raised when the Shape of the Body has been Changed.
Raised when the object is Added to the engine but is not yet part of the update process.
Raised when the object is added to a Physics Engine.
Raised when the object is Removed from a Physics Engine.
Raised when the Position has been Changed.
Raised by either the Solver or a call to ApplyMatrix.
Raised when the Body has been updated to a change in time.
Raised when the Body collides with another.
Raised constantly when the Body is colliding with another.
Raised when a joint is added that affects this body.
Raised when a joint is removed that affects this body.
Creates a new Body Instance.
The State of the Body.
The Shape of the Body.
The mass of the Body The inertia will be aquired from the Shape.
A object containing coefficients.
A object Describing how long the object will be in the engine.
Creates a new Body Instance.
The State of the Body.
The Shape of the Body.
A object describing the mass and inertia of the Body.
A object containing coefficients.
A object Describing how long the object will be in the engine.
This is the Baunding rectangle It is calculated on the call to apply matrix.
The Matrices that are tranfroming this bodies Shape.
Gets and Sets The value represents how much Linear velocity is kept each time step.
This Dampens the Body's Linear velocity a little per time step. Valid values are zero exclusive to one inclusive.
Gets and Sets The value represents how much Angular velocity is kept each time step.
This Dampens the Body's Angular velocity a little per time step. Valid values are zero exclusive to one inclusive.
These are bodies that are mirrors of this body.
It's useful for bodies that are being teleported.
The number of proxies that this body has.
Unique ID of a PhysicsEntity in the PhysicsEngine
Assigned on being Added.
Gets The PhysicsEngine the object is currently in. Null if it is in none.
Gets The current State of the object IE Velocity
Gets and Sets the Shape of the Body.
If setting the shape to a shape another body has it will duplicate the shape.
Gets The MassInfo of the body.
Gets and Sets the Ignore object that decides what collisons to ignore.
Gets and Sets the Ignore object that decides what collison events to ignore.
Gets and Sets the Coefficients for the class.
Gets and Sets the LifeTime of the object. The object will be removed from the engine when it is Expired.
Gets and Sets a User defined object.
Gets a Solver Defined object.
Gets a Detector Defined object.
Gets the Joints attached to this body.
Gets and Sets if the Body will ignore Gravity.
Gets and Sets if the Body will Ignore all Physics Logics
Gets and Sets if the Object will ignore the collison Responce but still generate the Collision event.
Gets and Sets if this body's shape's Vertexes will be used in collision detection.
Gets if it has been added the the Engine's PendingQueue, but not yet added to the engine.
Gets if the object has been added to the engine.
gets and sets if the body will have any collision detection ran on it.
Gets and Sets if other objects will have their collided
event raised when colliding with this body
Gets and Sets if the Body will trigger the Collided event at the broadphase level
Gets the Total Kinetic Energy of the Body.
Gets and Sets the Matrix2x3 that transforms the Shape belonging to the Body.
This applys the proxy.
This will cause all other bodies in the proxy list to have their velocity set
to this body’s.
With the appropriate transformations applied.
This will remove this body from any proxy list it is a part of.
Updates all the values caluclated from the State.Position.
Re-calculates the Matrices property the re-calculates the Rectangle property
from that.
Sets Acceleration and ForceAccumulator to Zero.
Applys a Force
The direction and magnitude of the force
Applys a Force
The direction and magnitude of the force
Applys a Force
The direction and magnitude of the force
The Location where the force will be applied (Offset: Body Rotation: World)
Applys a Force
The direction and magnitude of the force
The Location where the force will be applied (Offset: Body Rotation: World)
Applys Torque
The direction and magnitude of the torque
Applys Impulse
The direction and magnitude of the impulse
Applys Impulse
The direction and magnitude of the impulse.
Applys Impulse
The direction and magnitude of the impulse.
The Location where the impulse will be applied (Offset: Body Rotation: World)
Applys Impulse
The direction and magnitude of the impulse.
The Location where the impulse will be applied (Offset: Body Rotation: World)
A class used by some Shape Objects for Narrow Phased collision.
Describes a Contact in a collision.
Gets The world coordinates of the contact.
Gets a Direction Vector Pointing away from the Edge.
Gets The distance the contact is inside the other object.
Gets The First Body that is part of the Contact.
(The Normal belongs to this Body.)
Gets The Second Body that is part of the Contact.
(The Position of the Vertex belongs to this Body.)
A object that describes the time a object will remain in the Physics engine.
Creates a new Lifespan Instance that is Immortal.
Creates a new Lifespan Instance that is mortal.
How long the item will stay in the engine. (in seconds)
Creates a new Lifespan Instance that is mortal and has already aged.
How old the item is. (in seconds)
How long the item will stay in the engine. (in seconds)
Gets and Sets if it IsExpired and should be removed from the engine.
Gets if the only way for the object to leave the engine is for it to be set to expired.
Gets if it is expired becuase of old age.
Gets and Sets how long the object will stay in the engine.
Gets how much time the object has left.
Gets and Sets The current age of the object.
Increases the Age of object by a change in time.
the update's number (It wont age more then once on a update)
The TimeStep describing the change in time.
The Engine that will Apply Physics to object added to it.
This is the ID the first body added to the engine will get.
Generated when Bodies are truly added to the Engine.
Generated when Joints are truly added to the Engine.
Generated when PhysicsLogics are truly added to the Engine.
Generated when a Bodies are removed to the Engine.
Generated when a Joints are removed to the Engine.
Generated when a PhysicsLogics are removed to the Engine.
Generated when the engine is update;
Gets A threadSafe List of Joints (You wont get the "The collection has changed" Exception with this)
Gets A threadSafe List of Bodies (You wont get the "The collection has changed" Exception with this)
Gets A threadSafe List of PhysicsLogics (You wont get the "The collection has changed" Exception with this)
Gets and Sets The BroadPhase collision Detector. (This must be Set to a non-Null value before any calls to Update)
Gets and Sets the Collision Solver (This must be Set to a non-Null value before any calls to Update)
The number of updates that the engine has completed.
This is used for making sure actions are not duplicated on a single time step.
Adds a Body to the pending queue and will be truly added on a call to Update.
The Body to be added.
Adds a collection of Bodies to the pending queue and will be truly added on a call to Update.
The collection to be Added
Adds a Joint to the pending queue and will be truly added on a call to Update.
The Joint to be added.
Adds a collection of Joints to the pending queue and will be truly added on a call to Update.
The collection to be Added
Adds a collection of Joints to the pending queue and will be truly added on a call to Update.
The collection to be Added
A Type inherited from Joint
Adds a PhysicsLogic to the pending queue and will be truly added on a call to Update.
The PhysicsLogic to be added.
Adds a collection of PhysicsLogics to the pending queue and will be truly added on a call to Update.
The collection to be Added
Adds a collection of PhysicsLogics to the pending queue and will be truly added on a call to Update.
The collection to be Added
A Type inherited from PhysicsLogic
Adds 2 bodies to the same proxy list.
If they are both already part of their own proxy list then the lists will merge.
The transformations will be calcualted automatically.
The first Body.
The second Body.
How velocities will be transformed from body1 to body2.
This will most likely be removed if i ever figure out how to make a joint like this.
Updates the Engine with a change in time.
This call will block all access to the engine while it is running.
A complete call to this method is also known as a timestep.
The change in time since the last call to this method. (In Seconds)
Clears the Engine of all objects. Also clears the Detector and Solver.
contains some methods to do physics calculations.
The State of a PhysicsTimer
The PhysicsTimer is Paused.
The PhysicsTimer's calls to the Callback are on time.
The PhysicsTimer's calls to the Callback are behind schedule.
The PhysicsTimer's calls to the Callback are delayed to be on time.
The PhysicsTimer is Disposed.
A Callback used by the PhysicsTimer
The change in time.
A class to update the PhysicsEngine at regular intervals.
Creates a new PhysicsTimer Instance.
The callback to call.
The target change in time. (in seconds)
Gets or sets a value indicating whether or not the thread that runs the time is a background thread.
Gets and Sets if the PhysicsTimer is currently calling the Callback.
Gets and Sets the desired Interval between Callback calls.
Gets the current State of the PhysicsTimer.
Gets and Sets the current Callback that will be called.
Stops the Timer
This is a Proxy. That keeps 2 bodies velocities synchronized.
This is the other body to be Synchronized with.
This is the other body to be Synchronized with.
This is how the Velocity will be transformed when syncronized.
This is the inverted twin of this velocity. It's matrix will be invert of this one's.
And its body will be the body that contains this.
Describes the Coefficients of a surface.
AKA Bounciness. This is how much energy is kept as kinetic energy after a collision.
(NOT USED)
http://en.wikipedia.org/wiki/Friction
http://en.wikipedia.org/wiki/Friction
a generic EventArgs for read only collections.
The type of the items on the collection.
The readonly collection of items.
(In Body Coordinates)
Custom linked list that allows more liberal insertion of nodes
unlike the one provided by .net framework 4.5
This class Stores mass information and Moment of Inertia Together since they are very closly related.
A body with this mass will not be affected by forces or impulse.
This is the mass of Chuck Norris.
The matrix that is multiplied against to transform a vertex from relative
to the Body to the vertex relative to the World.
The matrix that is multiplied against to transform a vertex from relative
to the World to the vertex relative to the Body.
The matrix that is multiplied against to transform a normal (unit vector) from relative
to the Body to the normal relative to the World.
This class holds the variables usually changed mulitple times each update like the postion of an object.
This is Position and Orientation.
Angular and Linear Velocity.
Angular and Linear Acceleration.
Torque and Force
Class that holds information about a change in time;
Creates a new Timestep instance.
The current change in time. (seconds)
The number for the current update.
The current change in time. (seconds)
The inverse of the change in time. (0 if dt is 0)
The actaul change in time. (seconds)
The inverse of the actaul change in time. (0 if dt is 0)
The number for the current update.
Full name is Frame Coherent Sweep and Prune.
This class is used to isolate the AABB pairs that are currently in a collision
state without having to check all pair combinations. It relies heavily on frame
coherence or the idea that objects will typically be near their last position
from frame to frame. The class caches the various state information and doesn't
update it unless an extent on an axis "swaps" positions with its neighbor.
Note: If your application has "teleporting" objects or objects that are
extremely high-speed in relation to other objects, then this Sweep and Prune
method may breakdown.
This class keeps a list of information that relates extents to geometries.
This class is used to keep track of the pairs of geometry that need to be
passed on to the narrow phase. The keys stored in the dictionary are
the actual geometry pairs (the boolean value is currently unused).
NOTE: May eventually want to add OnEnterCollisionState /
OnExitCollisionState callbacks which might be useful for debugging
or possibly in user applications.
Houses collision pairs as geom1 and geom2. The pairs are always ordered such
that the lower id geometry is first. This allows the CollisionPairDictionary
to have a consistent key / hash code for a pair of geometry.
This class represents a single extent of an AABB on a single axis. It has a
reference to ExtentInfo which has information about the geometry it belongs
to.
Represents a lists of extents for a given axis. This list will be kept
sorted incrementally.
Incrementally sorts ExtentList. It is assumed that there is a high level
of frame coherence and that much of the list is already fairly well
sorted. This algorithm makes use of "insert sort" which is notoriously
slow - except for when a list is already almost sorted - which is the
case when there is high frame coherence.
This class contains represents additional extent info for a particular axis
It has a reference to the geometry whose extents are being tracked. It
also has a min and max extent reference into the ExtentList itself.
The class keeps track of overlaps with other geometries.
Test AABB collisions between two geometries. Tests include checking if the
geometries are enabled, static, in the right collision categories, etc.
Returns true if there is a collision, false otherwise
This method is used by the PhysicsSimulator to notify Sweep and Prune that
new geometry is to be tracked.
The geometry to be added
Updates the values in the x and y extent lists by the changing aabb values.
Iterates over the collision pairs and creates arbiters.
Just calls Update.
Incrementally updates the system. Assumes relatively good frame coherence.
This function can be used for times when frame-coherence is temporarily lost
or when it is simply more convenient to completely rebuild all the cached
data instead of incrementally updating it. Currently it is used after
removing disposed/removed geometries. If your application had an object
that teleported across the universe or some other situation where
frame-coherence was lost, you might consider this function.
Faster then sweep and prune and does not stutter like SingleSweep
Compare-metodia varten metodi, jolla tarkistetaan yhtäsuuruutta
valuen ollessa samat.
Yritys korjata kaatumisbugi fysiikkamoottorissa, joka johtui siitä
että Compare ei aina ollut looginen ja merkinnyt erilaisia Stubeja
konsistentisti erisuuriksi.
updates all the nodes to their new values and sorts the lists
Finds how many collisions there are on the x and y and returns if
the x axis has the least
The Sweep and Prune detector should be O(nlogn), but can be O(n^2) if everything is colliding.
A collision ignorer that uses group numbers to do collision ignoring.
If a object is member of a group that the other body is ignoring then they will not collide.
A collection that stores ints that represent groups
Gets the number of collison Groups the ignorer is part of.
Trys to add a group.
The group ID to add.
false if the ignorer was already part of the group; otherwise false.
adds an array of group ids.
The array of group IDs. (this will be sorted)
the number of IDs that were not already part of the group.
returns true if the ignorer is part of the group.
The group ID.
true if the ignorer is part of the group; otherwise false.
returns the number of groups in the array it is part of.
The array of group IDs. (this will be sorted)
The number of groups in the array it is part of.
Trys to remove the ignorer from a group.
The group ID.
true if the ignore was part of the group; otherwise false.
Trys to remove the ignorer from a range of groups.
The array of group IDs. (this will be sorted)
the number of groups the ignore was removed from.
returns if the 2 ignores are not part of the same group.
the other CollisionGroupIgnorer
true if they are not part of the same group; otherwiase false.
removes the ignorer from all groups.
A collision ignorer that uses group numbers to do collision ignoring.
If 2 objects are members of the same group then they will not collide.
Base class for Collision Ignorers to impliment.
Get and sets if the result of this ignorer is inverted.
A collision ignorer that uses reference comparison.
All Bodies with the same instance of this ignorer then they will not collide.
this allows you to have platforms that are one way. like in platform games.
this allows you to have platforms that are one way. like in platform games.
A Joint between 2 Bodies that will keep the Angles between the 2 bodies at a certain amount.
A Joint between 2 Bodies that will keep the Angles between the 2 bodies at a certain amount.
A joint that makes a single Body Pivot around an Anchor.
The distance the joint can stretch before breaking.
A Joint Between 2 Bodies that will pivot around an Anchor.
Creates a new HingeJoint Instance.
One of the bodies to be Jointed.
One of the bodies to be Jointed.
The location of the Hinge.
A object Describing how long the object will be in the engine.
The Distance the joint can stretch before breaking.
Describes a Connection between 2 objects.
Raised when the Lifetime property has been Changed.
Raised when the object is added to a Physics Engine.
Raised when the object is Added to the engine but is not yet part of the update process.
Raised when the object is Removed from a Physics Engine.
Gets if it has been added the the Engine's PendingQueue, but not yet added to the engine.
Gets and Sets a User defined object.
Gets and Sets the LifeTime of the object. The object will be removed from the engine when it is Expired.
Gets The PhysicsEngine the object is currently in. Null if it is in none.
Gets if the object has been added to the engine.
Gets the bodies the Joint effects.
Before the item is allowed to be added to pending this method is called to
throw any exceptions without corrupting the state of the Physics engine.
The engine the item is about to be added too.
Simulates a simple explosion.
Creates a new instance of the ExplosionLogic
ground zero
the velocity of the explosion (this would be from the missile or bomb that spawns it).
the speed at which the explosion expands
the drag Coefficient
the mass of the expanding cloud
Applys drag and buoyancy to all items in the engine.
A Gravity Field that apply gravity pulling in one direction regardless of the Body's position with zero dropoff.
Creates a new GravityField Instance.
The direction and magnitude of the gravity.
A object Describing how long the object will be in the engine.
A PhysicsLogic to causes a Gravity a a certain point with zero dropoff.
Creates a new GravityPointField Instance.
The location of the Gravity point.
A PhysicsLogic to causes a Body to have a realistic pull of Gravity with a exponential drop-off.
Creates a new GravityPointMass Instance.
The body that will be the source of gravity.
A object Describing how long the object will be in the engine.
Creates a new GravityPointMass Instance.
The body that will be the source of gravity.
The scale of of the universe.
A object Describing how long the object will be in the engine.
Applys drag and buoyancy to items on one side of a line;
A class that will apply Force to move an object to a certain point and stop it once it gets there.
Creates a new MoveToPointLogic object.
The Body this logic will act on.
The Point it will move the Body too.
The maximum acceleration to be applied to the Body
Creates a new MoveToPointLogic object.
The Body this logic will act on.
The Point it will move the Body too.
The maximum acceleration to be applied to the Body
The maximum velocity this logic will accelerate the Body too.
A physics logic is a way for the engine to effect object within the Update call.
Gravity is a Example of a PhysicsLogic.
Raised when the Lifetime property has been Changed.
Raised when the object is added to a Physics Engine.
Raised when the object is Added to the engine but is not yet part of the update process.
Raised when the object is Removed from a Physics Engine.
Gets if it has been added the the Engine's PendingQueue, but not yet added to the engine.
Gets if the object has been added to the engine.
Gets The PhysicsEngine the object is currently in. Null if it is in none.
Gets and Sets a User defined object.
Gets and Sets the LifeTime of the object. The object will be removed from the engine when it is Expired.
Get and Sets The order number of when it will be ran.
All Logics with a higher order will run after this one and all logics
with a lower order number will be ran before this one.
Before the item is allowed to be added to pending this method is called to
throw any exceptions without corrupting the state of the Physics engine.
The engine the item is about to be added too.
A class to manage a RaySegmentsShape collisions
The engine this solver is in.
Peliolio, joka noudattaa fysiikkamoottorin määräämiä fysiikan lakeja.
Voidaan kuitenkin myös laittaa noudattamaan lakeja valikoidusti.
Lepokitka. Liikkeen alkamista vastustava voima, joka ilmenee kun olio yrittää lähteä liikkeelle
toisen olion pinnalta (esim. laatikkoa yritetään työntää eteenpäin).
Liikekitka. Liikettä vastustava voima joka ilmenee kun kaksi oliota liikkuu toisiaan vasten
(esim. laatikko liukuu maata pitkin). Arvot välillä 0.0 (ei kitkaa) ja 1.0 (täysi kitka).
Olion kimmoisuus. Arvo välillä 0.0-1.0.
Arvolla 1.0 olio säilyttää kaiken vauhtinsa törmäyksessä. Mitä pienempi arvo,
sitä enemmän olion vauhti hidastuu törmäyksessä.
Olio, jolla voi välttää oliota osumasta tiettyihin muihin olioihin.
Jättääkö olio törmäyksen huomioimatta. Jos tosi, törmäyksestä
tulee tapahtuma, mutta itse törmäystä ei tapahdu.
Tapahtuu kun olio törmää toiseen.
Tapahtuu kun olio on törmäyksessä toiseen.
Tekee oliosta läpimentävän alhaalta ylöspäin (tasohyppelytaso).
Huom. ei toimi yhdessä CollisionIgnoreGroupien kanssa!
Tekee oliosta läpimentävän vektorin suuntaan.
Huom. ei toimi yhdessä CollisionIgnoreGroupien kanssa!
Fysiikkamoottorin käyttämä tietorakenne.
Olion paikka koordinaatistossa. Käsittää sekä X- että Y-koordinaatin.
Olion koko (x on leveys, y on korkeus).
Kulma, jossa olio on. Oliota voi pyörittää kulmaa vaihtamalla.
Olion muoto.
Creates a shape to be used in the Physics Body. A physics shape is scaled to the
size of the object. In addition, it has more vertices and some additional info
that is used in collision detection.
Jos false, olio ei voi pyöriä.
Olion massa. Mitä suurempi massa, sitä suurempi voima tarvitaan olion liikuttamiseksi.
Massan asettaminen muuttaa myös hitausmomenttia (MomentOfInertia).
Olion hitausmomentti. Mitä suurempi hitausmomentti, sitä enemmän vääntöä tarvitaan
olion pyörittämiseksi.
Tekee oliosta staattisen. Staattinen olio ei liiku muiden olioiden törmäyksistä,
vaan ainoastaan muuttamalla suoraan sen paikkaa tai nopeutta.
Olion hidastuminen. Hidastaa olion vauhtia, vaikka se ei
osuisi mihinkään. Vähän kuin väliaineen (esim. ilman tai veden)
vastus. Oletusarvo on 1.0, jolloin hidastumista ei ole. Mitä
pienempi arvo, sitä enemmän kappale hidastuu.
Yleensä kannattaa käyttää arvoja, jotka ovat lähellä ykköstä,
esim. 0.95.
Olion pyörimisen hidastuminen.
This updates the mass and momentOfInertia based on the new mass.
Olion nopeus.
Olion kulmanopeus.
Suurin nopeus, jonka olio voi saavuttaa.
Suurin kulmanopeus, jonka olio voi saavuttaa.
Olion kiihtyvyys.
Olion kulmakiihtyvyys.
Kohdistaa kappaleeseen voiman.
Voima, jolla oliota työnnetään.
Kohdistaa kappaleeseen impulssin. Tällä kappaleen saa nopeasti liikkeeseen.
Kohdistaa kappaleeseen vääntövoiman. Voiman suunta riippuu merkistä.
Vääntövoima.
Pysäyttää olion.
Pysäyttää liikkeen akselin suunnassa.
Akseli vektorina (ei väliä pituudella)
Pysäyttää kaiken pyörimisliikkeen.
Kappaleen omistajaolio.
Jättääkö olio painovoiman huomioimatta.
Jättääkö olio kaikki fysiikkalogiikat (ks. AddPhysicsLogic)
huomiotta. Vaikuttaa esim. painovoimaan, mutta ei törmäyksiin.
Luo uuden fysiikkaolion.
Leveys.
Korkeus.
Luo uuden fysiikkaolion.
Leveys.
Korkeus.
Muoto.
Luo fysiikkaolion, jonka muotona on säde.
Säde.
Initializes the object with the given physics shape. The size of
the physicsShape must be the one given.
Törmäyskuvion laatuun vaikuttavat parametrit.
Kappaleen kuvion laatu törmäyksentunnistuksessa.
Laatuarvo.
Alustaa uuden laatuattribuutin.
Lukuarvo välillä 0.0 (huonoin) ja 1.0 (paras).
Huonoin mahdollinen laatu, nopea mutta epätarkka.
Välttävä laatu.
Hyvä laatu.
Paras mahdollinen laatu, tarkka mutta hidas.
Saranaliitos kahden olion välille.
Ensimmäinen olio.
Toinen olio (null jos ensimmäinen olio on sidottu pisteeseen)
Pyörimisakselin (tämänhetkiset) koordinaatit.
Liitoksen pehmeys eli kuinka paljon sillä on liikkumavaraa.
Kiinnittää olion akselilla pelikenttään.
Olio
Luo uuden akseliliitoksen olion ja pisteen välille.
Ensimmäinen olio
Liitoksen akselin paikka
Luo uuden akseliliitoksen kahden olion välille.
Ensimmäinen olio
Toinen olio
Liitoksen akselin paikka
Luo uuden akseliliitoksen kahden olion välille.
Liitos sijoitetaan toisen olion keskipisteeseen.
Ensimmäinen olio
Toinen olio
Onko liitos tuhottu.
Tapahtuu kun liitos on tuhottu.
Tuhoaa liitoksen.
Peli, jossa on fysiikan laskenta mukana. Peliin lisätyt PhysicsObject
-oliot
käyttäytyvät fysiikan lakien mukaan.
Käynnissä olevan fysiikkapelin pääolio.
Alustaa uuden fysiikkapelin.