Skip to content

Commit

Permalink
add latex source of Bullet 2.82 quickstart guide, todo: update to cur…
Browse files Browse the repository at this point in the history
…rent release
  • Loading branch information
erwincoumans committed Apr 29, 2015
1 parent fcb8410 commit 283c7ff
Show file tree
Hide file tree
Showing 9 changed files with 2,100 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

The files in this repository are licensed under the zlib license, except for the files under examples/ThirdPartyLibs.
The files in this repository are licensed under the zlib license, except for the files under 'Extras' and examples/ThirdPartyLibs.

Bullet Continuous Collision Detection and Physics Library
http://bulletphysics.org
Expand Down
Binary file added docs/BulletQuickstart.pdf
Binary file not shown.
106 changes: 106 additions & 0 deletions docs/latex/BulletQuickstart.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@

% Bullet Physics manual
% http://bulletphysics.org
% Written by Erwin Coumans

% Preamble (global definitions of the book/manual)
% Use openany option for documentclass to avoid empty page after TOC

\documentclass[openany]{book}
%scrbook is easier on the eyes, and use a bigger font
%\documentclass[openany,DIV=calc,16pt]{scrbook}

% The english package can help breaking words
\usepackage[english]{babel}

%The Charter or Utopia font is easier on the eyes for screen
\renewcommand{\familydefault}{bch}%Charter font
%\renewcommand{\familydefault}{put} %Utopia font


% Titlepic allows us to use a picture on the frontpage
\usepackage{titlepic}
\usepackage{graphicx}

\usepackage[a4paper, left=2cm, right=1cm, top=2cm, bottom=3.5cm]{geometry}
\usepackage[latin1]{inputenc}

% If using \doublespacing include the setspace package
% \usepackage{setspace}
\usepackage{fancyhdr}
\usepackage{tocloft}


% The hyperref package already include package url
\usepackage[colorlinks=true, linkcolor=blue, urlcolor=blue]{hyperref}

% \setcounter{secnumdepth}{4}
\usepackage{makeidx}\makeindex

%support for C++ source code snippets
%you can even import existing C++ code as-is
%or a range of lines within markers beween rangeprefix/rangesuffix
\usepackage{listings}
%\usepackage{color}
\renewcommand{\lstlistingname}{Source Code}
\renewcommand{\lstlistlistingname}{Source Code Listings}
\lstset{
tabsize=2, language=C++, keywordstyle=\color[rgb]{0,0,1},
commentstyle=\color[rgb]{0.133,0.545,0.133},
stringstyle=\color[rgb]{0.627,0.126,0.941},
breaklines=true,
numberstyle=\small,
basicstyle=\ttfamily\small,
rangeprefix=///-----, rangesuffix=-----,
includerangemarker=false,
numbers=left, stepnumber=1,
frame=single,
}


% Set the tolerance so TeX really breaks the line
% and don't run into the right margin (avoid overfull boxes)
\tolerance=10000

%end of preamble

\begin{document}

% \pagestyle{fancy}

%\pagenumbering{}
%
\title{\textbf{Bullet 2.83 Quickstart Guide}}
\titlepic{\includegraphics[width=0.4\textwidth]{bullet_logo_2010_9.eps}}
%
\author{Erwin Coumans}
\maketitle


\renewcommand{\cftchapdotsep}{\cftdotsep}
\tableofcontents
\pagenumbering{arabic}

% \fancyhf{}
% \doublespacing

% include all the chapters as separate tex files
% on Mac OSX it is really nice to use the Texpad application for automatic navigation


\include{intro}
\include{building}
\include{helloworld}
\include{faq}

\clearpage
\addcontentsline{toc}{chapter}{Source code listings}
\lstlistoflistings

\clearpage
\addcontentsline{toc}{chapter}{Index}
\printindex


\end{document}

45 changes: 45 additions & 0 deletions docs/latex/building.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
\chapter{Building the Bullet SDK and demos}
Windows developers can download the zipped sources of Bullet from \url{http://bullet.googlecode.com}. Mac OS X, Linux and other developers should download the gzipped tar archive.
Bullet provides several build systems.

\section{Microsoft Visual Studio}
After unzipping the source code you can open the \path{Bullet/build/vs2010/0BulletSolution.sln}, hit F5 and your first Bullet demo will run. Note that by default Visual Studio uses an unoptimized Debug configuration that is very slow. It is best to enable the Release configuration.

\section{Using Premake}
\index{premake}\href{http://industriousone.com/premake}{Premake} is a meta build system based on the Lua scripting language that can generate project files for Microsoft Visual Studio, Apple Xcode as well as Makefiles for GNU make and other build systems. Bullet comes with Premake executables for Windows, Mac OSX and Linux.
\subsection{Premake Visual Studio project generation}
You can double-click on \path{Bullet/build/vs2010.bat} to generate Visual Studio 2010 project files and solution. This batch file calls Premake. Just open \path{Bullet/build/vs2010/0BulletSolution.sln}
\subsection{Premake Mac OSX Xcode project generation}
On Mac OSX it is easiest to open a Terminal window and switch current directory to Bullet/build and use the following command to generate XCode projects:
\begin{lstlisting}[caption=Premake for Mac OSX, label=premake_osx]
cd Bullet/build
./premake_osx xcode4
open xcode4/0BulletSolution.xcworkspace
\end{lstlisting}

\subsection{Premake iOS Xcode project generation}
XCode project generation for iOS, such as iPhone and iPad, is similar to Mac OSX. Just provide the --ios option to premake and premake will automatically customize the project and append ios to the directory:
\begin{lstlisting}[caption=Premake for iOS, label=premake_ios]
cd Bullet/build
./premake_osx --ios xcode4
open xcode4ios/0BulletSolution.xcworkspace
\end{lstlisting}
Note that Bullet comes with a modified version of \path{premake_osx} that enables the iOS specific customizations that are required by XCode.
\subsection{Premake GNU Makefile generation}
You can also generate GNU Makefiles for Mac OSX or Linux using premake:
\begin{lstlisting}[caption=Premake to GNU Makefile, label=premake_make]
cd Bullet/build
./premake_osx gmake
cd gmake
make config=release64
\end{lstlisting}
\section{Using cmake}
Similar to premake, CMake adds support for many other build environments and platforms, including Microsoft Visual Studio, XCode for Mac OSX, KDevelop for Linux and Unix Makefiles. Download and install \index{CMake}CMake from \url{http://cmake.org} and use the CMake cmake-gui tool.
\section{Using autotools}
Open a shell terminal and go to the Bullet root directory. Then execute
\begin{lstlisting}[caption=autotools to Makefile, label=autotools_make]
./autogen.sh
./configure
make
\end{lstlisting}
The \path{autogen.sh} step is optional and not needed for downloaded packages.
Loading

0 comments on commit 283c7ff

Please sign in to comment.