mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-04 17:40:06 +00:00
add latex source of Bullet 2.82 quickstart guide, todo: update to current release
This commit is contained in:
parent
fcb841018a
commit
283c7ffd12
@ -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
|
||||
|
BIN
docs/BulletQuickstart.pdf
Normal file
BIN
docs/BulletQuickstart.pdf
Normal file
Binary file not shown.
106
docs/latex/BulletQuickstart.tex
Normal file
106
docs/latex/BulletQuickstart.tex
Normal file
@ -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
docs/latex/building.tex
Normal file
45
docs/latex/building.tex
Normal file
@ -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.
|
1815
docs/latex/bullet_logo_2010_9.eps
Normal file
1815
docs/latex/bullet_logo_2010_9.eps
Normal file
File diff suppressed because it is too large
Load Diff
3
docs/latex/faq.tex
Normal file
3
docs/latex/faq.tex
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
\chapter{Frequently asked questions}
|
||||
Here is a placeholder for a future FAQ. For more information it is best to visit the Bullet Physics forums and wiki at \url{http://bulletphysics.org}.
|
15
docs/latex/helloworld.tex
Normal file
15
docs/latex/helloworld.tex
Normal file
@ -0,0 +1,15 @@
|
||||
\chapter{Hello World}
|
||||
\section{C++ console program}
|
||||
Let's discuss the creation of a basic Bullet simulation from the beginning to the end. For simplicity we print the state of the simulation to console using printf, instead of using 3D graphics to display the objects. The source code of this tutorial is located in \path{examples/HelloWorld/HelloWorld.cpp}.
|
||||
|
||||
It is a good idea to try to compile, link and run this HelloWorld.cpp program first.
|
||||
|
||||
As you can see in \ref{helloworld_includefiles} you can include a convenience header file \path{btBulletDynamicsCommon.h}.
|
||||
|
||||
\lstinputlisting[caption=HelloWorld.cpp include header, label=helloworld_includefiles,linerange=includes_start-includes_end]{../../examples/HelloWorld/HelloWorld.cpp}
|
||||
Now we create the dynamics world:
|
||||
\lstinputlisting[caption=HelloWorld.cpp initialize world, label=stepsimulation,linerange=initialization_start-initialization_end]{../../examples/HelloWorld/HelloWorld.cpp}
|
||||
Once the world is created you can step the simulation as follows:
|
||||
\lstinputlisting[caption=HelloWorld.cpp step simulation, label=stepsimulation,linerange=stepsimulation_start-stepsimulation_end]{../../examples/HelloWorld/HelloWorld.cpp}
|
||||
At the end of the program you delete all objects in the reverse order of creation. Here is the cleanup listing of our HelloWorld.cpp program.
|
||||
\lstinputlisting[caption=HelloWorld.cpp cleanup, label=cleanup,linerange=cleanup_start-cleanup_end]{../../examples/HelloWorld/HelloWorld.cpp}
|
47
docs/latex/intro.tex
Normal file
47
docs/latex/intro.tex
Normal file
@ -0,0 +1,47 @@
|
||||
|
||||
%Use the \path{Demos/MyDemo} instead of \texttt{Demos/MyDemo} otherwise text doesn't wrap
|
||||
%and runs into the right margin
|
||||
|
||||
\chapter{Introduction to Bullet}
|
||||
%\section{blablaIntroduction}
|
||||
Bullet Physics is a professional open source collision detection, rigid body and soft body dynamics library. The library is free for commercial use under the \index{zlib license} \href{http://opensource.org/licenses/zlib-license.php}{zlib license}.
|
||||
|
||||
\section{Main Features}
|
||||
|
||||
\begin{itemize}
|
||||
\item Open source C++ code under zlib license and free for any commercial use on all platforms including PLAYSTATION 3, XBox 360, Wii, PC, Linux, Mac OSX, Android and iPhone
|
||||
\item Discrete and continuous collision detection including ray and convex sweep test. Collision shapes include concave and convex meshes and all basic primitives
|
||||
\item Fast and stable rigid body dynamics constraint solver, vehicle dynamics, character controller and slider, hinge, generic 6DOF and cone twist constraint for ragdolls
|
||||
\item Soft Body dynamics for cloth, rope and deformable volumes with two-way interaction with rigid bodies, including constraint support
|
||||
\item Maya Dynamica plugin, Blender integration, COLLADA physics import/export support
|
||||
\end{itemize}
|
||||
|
||||
\section{Contact and Support}
|
||||
\begin{itemize}
|
||||
\item Public forum for support and feedback is available at \url{http://bulletphysics.org}
|
||||
\end{itemize}
|
||||
|
||||
\section{What's new}
|
||||
|
||||
\subsection{Preparing for Bullet 3.0 alpha}
|
||||
\begin{itemize}
|
||||
\item The new Bullet 3.x version is making good progress, and the performance on high-end GPUs such as AMD 7970 and NVIDIA 680 is good. See the github repository at \url{https://github.com/erwincoumans/bullet3}
|
||||
\end{itemize}
|
||||
\subsection{New in Bullet 2.82}
|
||||
\begin{itemize}
|
||||
\item Featherstone articulated body algorithm implementation with integration in the Bullet constraint solver. See See \path{Demos/FeatherstoneMultiBodyDemo}
|
||||
\item New MLCP constraint solver interface for higher quality direct solvers. Dantzig (OpenDE), PATH and Projected Gauss Seidel MLCP solvers, with fallback to the original Bullet sequential impulse solver. See \path{src/BulletDynamics/MLCPSolvers}
|
||||
\item New btFixedConstraint as alternative to a btGeneric6DofConstraint with all DOFs locked. See \path{Demos/VoronoiFractureDemo}
|
||||
\item Various bug fixes, related to force feedback and friction. Improved performance between btCompoundShape using the new btCompoundCompoundCollisionAlgorithm. See the commit log at \url{https://code.google.com/p/bullet/source/list}
|
||||
\end{itemize}
|
||||
\subsection{New in Bullet 2.81}
|
||||
\begin{itemize}
|
||||
\item SIMD and Neon optimizations for iOS and Mac OSX, thanks to a contribution from Apple
|
||||
\item Rolling Friction using a constraint, thanks to Erin Catto for the idea. See \path{Demos/RollingFrictionDemo/RollingFrictionDemo.cpp}
|
||||
\item XML serialization. See \path{Bullet/Demos/BulletXmlImportDemo} and \path{Bullet/Demos/SerializeDemo}
|
||||
\item Gear constraint. See \path{Bullet/Demos/ConstraintDemo}.
|
||||
\item Improved continuous collision response, feeding speculative contacts to the constraint solver. See \path{Bullet/Demos/CcdPhysicsDemo}
|
||||
\item Improved premake4 build system including support for Mac OSX, Linux and iOS
|
||||
\item Refactoring of collision detection pipeline using stack allocation instead of modifying the collision object. This will allow better future multithreading optimizations.
|
||||
\end{itemize}
|
||||
|
68
docs/latex/titlepic.sty
Normal file
68
docs/latex/titlepic.sty
Normal file
@ -0,0 +1,68 @@
|
||||
% titlepic.sty is a LaTeX package to show a picture on the cover produced by \maketitle.
|
||||
% By Thomas ten Cate <ttencate@gmail.com>. Free software, no warranty of any kind.
|
||||
%
|
||||
% Version history:
|
||||
% 1.1: now more self-contained, comes with a PDF manual
|
||||
% 1.0: first release
|
||||
%
|
||||
% -----------------------------------------------------------------------------
|
||||
|
||||
% No idea whether it works on older LaTeXes.
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
|
||||
% Package identification and version number.
|
||||
\ProvidesPackage{titlepic}[2009/08/03 1.1 Package to display a picture on the title page]
|
||||
|
||||
% Declare the options.
|
||||
\DeclareOption{tt}{\gdef\@tptopspace{}\gdef\@tpsepspace{\vskip 3em}}
|
||||
\DeclareOption{tc}{\gdef\@tptopspace{}\gdef\@tpsepspace{\vfil}}
|
||||
\DeclareOption{cc}{\gdef\@tptopspace{\null\vfil}\gdef\@tpsepspace{\vskip 3em}}
|
||||
\ExecuteOptions{cc}
|
||||
\ProcessOptions
|
||||
|
||||
% Define the sole command introduced by this package.
|
||||
% Very similar to the definition of \title, etc.
|
||||
\def\titlepic#1{\gdef\@titlepic{#1}}
|
||||
\def\@titlepic{\@empty} % default: no picture
|
||||
|
||||
% If a title page was requested from the document class (article/report/book),
|
||||
% override \maketitle to show our picture.
|
||||
\if@titlepage
|
||||
\renewcommand\maketitle{
|
||||
\begin{titlepage}%
|
||||
\let\footnotesize\small
|
||||
\let\footnoterule\relax
|
||||
\let \footnote \thanks
|
||||
\@tptopspace%
|
||||
\begin{center}%
|
||||
{\LARGE \@title \par}%
|
||||
\vskip 3em%
|
||||
{\large
|
||||
\lineskip .75em%
|
||||
\begin{tabular}[t]{c}%
|
||||
\@author
|
||||
\end{tabular}\par%
|
||||
}%
|
||||
\vskip 1.5em%
|
||||
{\large \@date \par}% % Set date in \large size.
|
||||
\end{center}\par
|
||||
\@tpsepspace%
|
||||
{\centering\@titlepic\par}
|
||||
\vfil
|
||||
\@thanks
|
||||
\end{titlepage}%
|
||||
\setcounter{footnote}{0}%
|
||||
\global\let\thanks\relax
|
||||
\global\let\maketitle\relax
|
||||
\global\let\@thanks\@empty
|
||||
\global\let\@author\@empty
|
||||
\global\let\@date\@empty
|
||||
\global\let\@title\@empty
|
||||
\global\let\@titlepic\@empty
|
||||
\global\let\title\relax
|
||||
\global\let\author\relax
|
||||
\global\let\date\relax
|
||||
\global\let\and\relax
|
||||
\global\let\titlepic\relax
|
||||
}
|
||||
\fi
|
Loading…
Reference in New Issue
Block a user