Skip to content

Commit

Permalink
Minor changes in installation, some documentation added.
Browse files Browse the repository at this point in the history
  • Loading branch information
pazdera committed May 18, 2011
1 parent 9508189 commit 025c75e
Show file tree
Hide file tree
Showing 25 changed files with 62 additions and 78 deletions.
6 changes: 3 additions & 3 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT = src/ include/ test/
INPUT = src/ test/

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
Expand Down Expand Up @@ -684,7 +684,7 @@ FILTER_SOURCE_FILES = NO
# Note: To get rid of all source code in the generated output, make sure also
# VERBATIM_HEADERS is set to NO.

SOURCE_BROWSER = NO
SOURCE_BROWSER = YES

# Setting the INLINE_SOURCES tag to YES will include the body
# of functions and classes directly in the documentation.
Expand Down Expand Up @@ -1352,7 +1352,7 @@ HIDE_UNDOC_RELATIONS = YES
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
# have no effect if this option is set to NO (the default)

HAVE_DOT = YES
HAVE_DOT = NO

# By default doxygen will write a font called FreeSans.ttf to the output
# directory and reference it in all dot files that doxygen generates. This
Expand Down
26 changes: 17 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ DOCUMENTATION_DIR=doc
UNITTESTCPP_LIB=../UnitTest++/libUnitTest++.a
UNITTESTCPP_INCLUDE_DIR=../UnitTest++/src/

HEADERS_INSTALL_PATH=/usr/local/include
LIB_INSTALL_PATH=/usr/local/lib

.PHONY: install uninstall static dynamic clean doc headers test

all: static dynamic headers

# LIB Object files and sources ##########################

# Geometry package
GEOMETRY_PACKAGE=src/geometry/curve.o \
src/geometry/line.o \
GEOMETRY_PACKAGE=src/geometry/line.o \
src/geometry/linesegment.o \
src/geometry/point.o \
src/geometry/vector.o \
Expand All @@ -32,8 +34,6 @@ GEOMETRY_PACKAGE=src/geometry/curve.o \
# Streetgraph package
STREETGRAPH_PACKAGE=src/streetgraph/intersection.o \
src/streetgraph/road.o \
src/streetgraph/primaryroad.o \
src/streetgraph/secondaryroad.o \
src/streetgraph/streetgraph.o \
src/streetgraph/path.o \
src/streetgraph/rasterroadpattern.o \
Expand Down Expand Up @@ -105,21 +105,29 @@ headers:
mkdir -p $(HEADERS_DIR)
cd src/ && find . -name "*.h" -exec rsync -R {} ../$(HEADERS_DIR) \; >/dev/null

install:

install: all
mkdir -p $(HEADERS_INSTALL_PATH)/libcity
cp -r include/* $(HEADERS_INSTALL_PATH)/libcity
cp libcity.h $(HEADERS_INSTALL_PATH)
cp libcity.so $(LIB_INSTALL_PATH)
cp libcity.a $(LIB_INSTALL_PATH)

uninstall:

rm -rf $(HEADERS_INSTALL_PATH)/libcity
rm -f $(HEADERS_INSTALL_PATH)/libcity.h
rm -f $(LIB_INSTALL_PATH)/libcity.so
rm -f $(LIB_INSTALL_PATH)/libcity.a

test: $(TEST_OBJECTS) static
$(COMPILER) $(COMPILER_FLAGS) -I$(UNITTESTCPP_INCLUDE_DIR) -o $(TEST_FILENAME) $(TEST_OBJECTS) $(UNITTESTCPP_LIB) libcity.a

doc:
rm -rf doc/
doxygen Doxyfile

clean:
rm -rf *.o *.so *~
rm -rf $(DOCUMENTATION_DIR)
rm -rf $(HEADERS_DIR)
rm $(LIB_OBJECTS)
rm $(TEST_OBJECTS)
rm -f $(LIB_OBJECTS)
rm -f $(TEST_OBJECTS)
6 changes: 6 additions & 0 deletions libcity.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LIBCITY_WRAPER_H_
#define __LIBCITY_WRAPER_H_

#include "libcity/libcity.h"

#endif
6 changes: 3 additions & 3 deletions plan.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ Plan:
- http://amazingtextures.com/textures/cat-buildings-28.htm
- http://cg.tutsplus.com/articles/where-to-get-your-textures-19-free-photo-source-sites-for-cg-artists/
- DONE Ogre3D static geometry http://www.ogre3d.org/tikiwiki/Intermediate+Tutorial+5&structure=Tutorials
- Flatten terrain under roads
- Try out terrain
- Another buildings
- NAH Flatten terrain under roads
- NAH Try out terrain
- DONE Another buildings
- Documentation
- Github
- Store road information into lots (which edge has road access?)
Expand Down
2 changes: 1 addition & 1 deletion src/area/area.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @date 26.04.2011
* @author Radek Pazdera ([email protected])
*
* @see lot.h
* @see area.h
*
*/

Expand Down
8 changes: 7 additions & 1 deletion src/area/area.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ class RoadLSystem;
class Intersection;
class Block;

class Area;
/**
Base class for city areas (zones, districts, blocks, alottments).
Each area:
- has defined some constraints
- can be a part of an larger area (can have a parent)
*/
class Area
{
public:
Expand Down
14 changes: 14 additions & 0 deletions src/area/block.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ class Zone;
class Lot;
class SubRegion;

/**
Area that represents a building block.
That is an area enclosed by a loop in a street graph.
Blocks are grouped to zones. Each block can be subdivided
into allotments */
class Block : public Area
{
public:
Expand All @@ -38,6 +43,15 @@ class Block : public Area

~Block();

/**
Subdivision algorithm that subdivides a signle block
into a list of smaller areas - allotments.
@param[in] lotWidth Desired width of lots.
@param[in] lotHeight Desired height of lots.
@param[in] deviance Deviance factor in lot creation.
@return Lost of lots.
*/
void createLots(double lotWidth, double lotHeight, double deviance);
std::list<Lot*> getLots();

Expand Down
2 changes: 1 addition & 1 deletion src/city.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @date 06.03.2011
* @author Radek Pazdera ([email protected])
*
* @brief !!! NOT SURE YET
* @brief Library interface for the city creation process.
*
*/

Expand Down
4 changes: 2 additions & 2 deletions src/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include <iostream>

/* Debugging is ON */
#define DEBUG
/* Debugging is OFF */
// #define DEBUG

#ifdef DEBUG
#define debug(x) std::cerr << "DEBUG: " << x << std::endl
Expand Down
Empty file removed src/geometry/curve.cpp
Empty file.
23 changes: 0 additions & 23 deletions src/geometry/curve.h

This file was deleted.

1 change: 1 addition & 0 deletions src/geometry/polygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ Vector Polygon::normal() const
}

assert("HERE should be exception" == 0);
return Vector(1,0,0);
}

Vector Polygon::edgeNormal(unsigned int edgeNumber) const
Expand Down
10 changes: 0 additions & 10 deletions src/streetgraph/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,6 @@ void Path::shorten(Point const& newBegining, Point const& newEnd)
representation->setBegining(newEnd);
}

void Path::snap(Point const& intersection)
{

}

void Path::snap(Path const& road)
{

}

std::string Path::toString()
{
return "Path(" + representation->toString() + ")";
Expand Down
14 changes: 0 additions & 14 deletions src/streetgraph/path.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,6 @@ class Path

void shorten(Point const& newBegining, Point const& newEnd);

/**
NOT IMPLEMENTED
@todo
What should this do? Can it be removed?
*/
void snap(Point const& intersection);

/**
NOT IMPLEMENTED
@todo
What should this do? Can it be removed?
*/
void snap(Path const& road);

std::string toString();
private:
LineSegment *representation;
Expand Down
Empty file removed src/streetgraph/primaryroad.cpp
Empty file.
Empty file removed src/streetgraph/primaryroad.h
Empty file.
Empty file removed src/streetgraph/secondaryroad.cpp
Empty file.
Empty file removed src/streetgraph/secondaryroad.h
Empty file.
4 changes: 0 additions & 4 deletions src/streetgraph/streetgraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ class StreetGraph
more than one road may be added at a time. If an
intersection with an existing road is detected,
the new road is split into two.
@todo
Clarify connecting Roads with Intersections and
synchronising both levels of the graph. Beware
this is source of particularly horrible bugs.
@param[in] path Path of the new road (low level part of the graph).
*/
Expand Down
4 changes: 2 additions & 2 deletions test/main.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* This code is part of libcity library.
*
* @file main.cpp
* @file test/main.cpp
* @date 17.02.2011
* @author Radek Pazdera ([email protected])
*
* Main program for the unit tests.
* @brief Main program for the unit tests.
*
*/

Expand Down
2 changes: 1 addition & 1 deletion test/testBlock.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code is part of libcity library.
*
* @file test/testPath.cpp
* @file test/testBlock.cpp
* @date 25.04.2011
* @author Radek Pazdera ([email protected])
*
Expand Down
2 changes: 1 addition & 1 deletion test/testGraphicLSystem.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code is part of libcity library.
*
* @file test/testGraphicLSystem.h
* @file test/testGraphicLSystem.cpp
* @date 13.03.2011
* @author Radek Pazdera ([email protected])
*
Expand Down
2 changes: 1 addition & 1 deletion test/testLSystem.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code is part of libcity library.
*
* @file test/testlsystem.cpp
* @file test/testLSystem.cpp
* @date 13.03.2011
* @author Radek Pazdera ([email protected])
*
Expand Down
2 changes: 1 addition & 1 deletion test/testPoint.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code is part of libcity library.
*
* @file point.class.test.h
* @file test/testPoint.cpp
* @date 13.03.2011
* @author Radek Pazdera ([email protected])
*
Expand Down
2 changes: 1 addition & 1 deletion test/testRandom.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This code is part of libcity library.
*
* @file test/testStreetGraph.cpp
* @file test/testRandom.cpp
* @date 23.03.2011
* @author Radek Pazdera ([email protected])
*
Expand Down

0 comments on commit 025c75e

Please sign in to comment.