Difference between revisions of "ChainShape"

(Added ChainShape.)
 
m
Line 16: Line 16:
 
}}
 
}}
 
== Supertypes ==
 
== Supertypes ==
[[Shape]]
+
* [[parent::Shape]]
[[Object]]
+
* [[parent::Object]]
 
== See Also ==
 
== See Also ==
 
* [[parent::love.physics]]
 
* [[parent::love.physics]]

Revision as of 00:31, 16 October 2012

Available since LÖVE 0.8.0
This shape is not supported in earlier versions.

A ChainShape consists of multiple line segments. It can be used to create the boundaries of your terrain. The shape does not have volume and can only collide with PolygonShape and CircleShape.

Unlike the PolygonShape, the ChainShape does not have a vertices limit or has to form a convex shape, but self intersections are not supported.

Constructors

love.physics.newChainShapeCreates a new ChainShape.

Functions

ChainShape:getChildEdgeReturns a child of the shape as an EdgeShape.
ChainShape:getNextVertexGets the vertex that establishes a connection to the next shape.
ChainShape:getPointReturns a point of the shape.
ChainShape:getPointsReturns all points of the shape.
ChainShape:getPreviousVertexGets the vertex that establishes a connection to the previous shape.
ChainShape:getVertexCountReturns the number of vertices the shape has.
ChainShape:setNextVertexSets a vertex that establishes a connection to the next shape.
ChainShape:setPrevVertexSets a vertex that establishes a connection to the previous shape.
ChainShape:setPreviousVertexSets a vertex that establishes a connection to the previous shape.
Object:releaseImmediately destroys the object's Lua reference.
Object:typeGets the type of the object as a string.
Object:typeOfChecks whether an object is of a certain type.
Shape:computeAABBReturns the points of the bounding box for the transformed shape.
Shape:computeMassComputes the mass properties for the shape.
Shape:destroyExplicitly destroys the Shape.
Shape:getBodyGet the body the shape is attached to.
Shape:getBoundingBoxGets the bounding box of the shape.
Shape:getCategoryGets the categories this shape is a member of.
Shape:getCategoryBitsGets the categories as a 16-bit integer.
Shape:getChildCountReturns the number of children the shape has.
Shape:getDataGet the data set with setData.
Shape:getDensityGets the density of the Shape.
Shape:getFilterDataGets the filter data of the Shape.
Shape:getFrictionGets the friction of this shape.
Shape:getMaskGets which categories this shape should NOT collide with.
Shape:getRadiusGets the radius of the shape.
Shape:getRestitutionGets the restitution of this shape.
Shape:getTypeGets a string representing the Shape.
Shape:isSensorChecks whether a Shape is a sensor or not.
Shape:rayCastCasts a ray against the shape.
Shape:setCategorySets the categories this shape is a member of.
Shape:setDataSet data to be passed to the collision callback.
Shape:setDensitySets the density of a Shape.
Shape:setFilterDataSets the filter data for a Shape.
Shape:setFrictionSets the friction of the shape.
Shape:setMaskSets which categories this shape should NOT collide with.
Shape:setRestitutionSets the restitution of the shape.
Shape:setSensorSets whether this shape should act as a sensor.
Shape:testPointChecks whether a point lies inside the shape.
Shape:testSegmentChecks whether a line segment intersects a shape.

Supertypes

See Also


Other Languages