Beispiel #1
0
static int l_physics_getShapeElasticity(lua_State* state)
{
    l_physics_Shape* shape = (l_physics_Shape*)lua_touserdata(state, 1);

    lua_pushnumber(state, cpShapeGetElasticity(shape->shape));

    return 1;
}
float CCPhysicsShape::getElasticity(void)
{
    return cpShapeGetElasticity(m_shape);
}
	void RigidBody2D::CopyShapeData(cpShape* from, cpShape* to)
	{
		cpShapeSetElasticity(to, cpShapeGetElasticity(from));
		cpShapeSetFriction(to, cpShapeGetFriction(from));
		cpShapeSetSurfaceVelocity(to, cpShapeGetSurfaceVelocity(from));
	}
	float Nz::RigidBody2D::GetElasticity(std::size_t shapeIndex) const
	{
		assert(shapeIndex < m_shapes.size());
		return float(cpShapeGetElasticity(m_shapes[shapeIndex]));
	}
Beispiel #5
0
GLMFloat worldShape_elasticity(WorldShape_t *aEntity)
{
    return cpShapeGetElasticity(aEntity->cpShape);
}
		cpFloat shape::elasticity( void ) {	return cpShapeGetElasticity( this->m_shape );	}