Help needed to use bullet library

Post Reply
sarbartha
Posts: 5
Joined: Fri Apr 19, 2013 5:18 am

Help needed to use bullet library

Post by sarbartha »

I am very new to this library. I am trying to use this library for collision detection.

I am working in cloth-simulation. I have implemented a cloth simulation in CPP using opengl. I want to use this library to detect collisions.
But I am not being able to merge this library with my code. I am pasting my makefile for my program. Can anyone guide me how to integrate the library with my code?

My MakeFile:
-------------------

GLLIBS = -lGL -lGLU -lglut
CPP = g++
CPPFLAGS = -Wall -pedantic -g -O2 -DNDEBUG
CC=g++
CCC=cc
OBJ1=matvec.o
OBJ2=cloth.o
OBJ3=triangle.o
OBJ4=expansion.o
OBJ5=interval.o
OBJ6=rootparitycollisiontest.o
OBJ = $(OBJ1) $(OBJ3) $(OBJ2) $(OBJ4) $(OBJ5) $(OBJ6)
CFLAGS=-c -Wall
CSWITCHES = -O0 -ggdb -g3 -DLINUX -I/usr/X11R6/include -L/usr/X11R6/lib
TRILIBDEFS = -DTRILIBRARY

.SUFFIXES:.cpp .o .hpp

all: expansion.o interval.o rootparitycollisiontest.o triangle.o cloth


expansion.o:
$(CPP) $(CPPFLAGS) -o $@ -c expansion.cpp -pg

interval.o:
$(CPP) $(CPPFLAGS) -o $@ -c interval.cpp -pg

rootparitycollisiontest.o:
$(CPP) $(CPPFLAGS) -o $@ -c rootparitycollisiontest.cpp -pg
triangle.o:
$(CCC) $(CSWITCHES) $(TRILIBDEFS) -c -o triangle.o triangle.c -pg
.cpp.o:
$(CC) $(CSWITCHES) $(TRILIBDEFS) $(CFLAGS) -o $@ $*.cpp $(GLLIBS)

cloth: $(OBJ)
$(CC) $(OFLAGS) $(CSWITCHES) $(OBJ) -g -lm -o cloth $(GLLIBS) -pg

clean:
rm -f *.o core *~

cleanbin:
rm -f test

cleanall: clean cleanbin

cloth.o: matvec.hpp cloth.hpp triangle.h tri.h rootparitycollisiontest.h readPPM.hpp expansion.h interval.h vec.h globalVariable.h display.h clothMain.h collision.h forcesandconstraints.h
matvec.o: matvec.hpp
triangle.o: triangle.h
expansion.o: expansion.cpp expansion.h
interval.o: interval.cpp interval.h
========================================================
rootparitycollisiontest.o: rootparitycollisiontest.cpp expansion.h interval.h vec.h
Post Reply