1 /******************************************************************************* 2 * Copyright 2011 See AUTHORS file. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 ******************************************************************************/ 16 17 package com.badlogic.gdx.physics.box2d; 18 19 import com.badlogic.gdx.utils.SharedLibraryLoader; 20 21 /** This class's only purpose is to initialize Box2D by calling its {@link #init()} method. 22 * @author Daniel Holderbaum */ 23 public final class Box2D { 24 25 private Box2D () { 26 } 27 28 /** Loads the Box2D native library and initializes the gdx-box2d extension. Must be called before any of the box2d 29 * classes/methods can be used. Currently with the exception of the {@link World} class, which will also cause the Box2D 30 * natives to be loaded. */ 31 public static void init () { 32 new SharedLibraryLoader().load("gdx-box2d"); 33 } 34 35 } 36