예제 #1
0
파일: physics.c 프로젝트: dns/CLove
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;
}
예제 #2
0
float CCPhysicsShape::getElasticity(void)
{
    return cpShapeGetElasticity(m_shape);
}
예제 #3
0
	void RigidBody2D::CopyShapeData(cpShape* from, cpShape* to)
	{
		cpShapeSetElasticity(to, cpShapeGetElasticity(from));
		cpShapeSetFriction(to, cpShapeGetFriction(from));
		cpShapeSetSurfaceVelocity(to, cpShapeGetSurfaceVelocity(from));
	}
예제 #4
0
	float Nz::RigidBody2D::GetElasticity(std::size_t shapeIndex) const
	{
		assert(shapeIndex < m_shapes.size());
		return float(cpShapeGetElasticity(m_shapes[shapeIndex]));
	}
예제 #5
0
파일: world.c 프로젝트: fjolnir/Dynamo
GLMFloat worldShape_elasticity(WorldShape_t *aEntity)
{
    return cpShapeGetElasticity(aEntity->cpShape);
}
예제 #6
0
		cpFloat shape::elasticity( void ) {	return cpShapeGetElasticity( this->m_shape );	}