Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.879.990 Times

Lib3df 20030825

  Date Added: June 20, 2010  |  Visits: 614

Lib3df

Report Broken Link
Printer Friendly Version


Product Homepage
Download (74 downloads)



Lib3df is a C++ library to load 3D world. It works under Windows,MacOS,Linux and most Unixes. HLIB is a C++ library intended to facilitate the use of ".MAP" files in applications. ".MAP" files are produced by the "Valve Hammer Editor" availlable at: http://collective.valve-erc.com/ . This is the editor used to create Half-Life, Team Fortress Classic, Counter-Strike and Day of Defeat maps. A lot of models are availlable in this format on the internet and the abillity to read such format may greatly help game programmer. HLIB is intended to be portable accross many platforms including: GNU/Linux, All UNIX*S, MS-Windows > 95. HOW IT WORKS: HLIB doesnt impose you anything about how the map data will be presented in memory. Instead the library calls the methods of a "builder" object you supplied, to inform your program that some kind of 3D objects has been found in the map file. For instance when the library finds a polygon it calls: BeginPolygon(); then all subsequent method call will refer to this polygon. When there is no more data about the polygon, the library calls: EndPolygon(); A map is made of many entities. Each entity can have many key-value pairs (such as: "classname" "player", which says: this entity is of class player). In addition, an entity can have some brushes. A brush is a convex set of polygons. Each polygon has: - one texture name - at least 3 vertex - one normal per vertex - one UV coordinate per vertex First you have to create a "builder". You do this by subclassing the HLMapBuilder class: class MyBuilder : public HLMapBuilder { public: MyBuilder(void) {} virtual ~MyBuilder(void) {} } Then you have to create an HLMap object and a builder and link them together: HLMap theMap; MyBuilder theBuilder theMap.SetBuilder(theBuilder); std::ifstream theMapFile("mymap.map"); theMap.BuildFromStream(theMapFile); The HLMap object will parse the file and call the following methods of the builder object: // Cancel everything (error) virtual void BuildError(void); // Begins a map building virtual void BuildBeginMap(void); // Begins an entity building virtual void BuildBeginEntity(void); // Builds an option virtual void BuildOption(const char* option, const char* value); // Begins a brush building (an entity may have many brushes) virtual void BuildBeginBrush(void); // Builds a facet (deprecated) virtual void BuildFacet(sgVec3 A, sgVec3 B, sgVec3 C, const char* texture, sgVec3 U, int ushift, sgVec3 V, int vshift, float rotation, float xscale, float yscale); // Begins a polygon building virtual void BuildBeginPolygon(void); // Builds the polygons texture virtual void BuildTexture(const char* texture); // Get the last built texture height and width virtual void GetTextureDimension(int* w, int* h); // Builds one polygons vertex virtual void BuildNormal(sgVec3 v); // Builds one polygons vertex virtual void BuildVertex(sgVec3 v); // Builds the vertex UV mapping virtual void BuildUVMapping(sgVec3 uv); // Ends a polygon building virtual void BuildEndPolygon(void); // Ends a brush building (an entity may have many brushes) virtual void BuildEndBrush(void); // Ends an entity building virtual void BuildEndEntity(void); // Ends a map building virtual void BuildEndMap(void); Here is the list of method call produced for a map containing only a single pyramidal object: BuildBeginMap(); // this is a new map BuildBeginEntity(); // this is a new entity BuildOption("classname", "pyramid"); // this entitys classname is: "pyramid" BuildOption("name", "The Big Pyramid"); // this entitys name is: "The Big Pyramid" BuildBeginBrush(); // this entity contains a brush BuildBeginPolygon(); // lets go for the brushs first polygon BuildTexture("GoodOldPyramid"); // it uses the good old pyramid texture GetTextureDimension(&w, &h); // the builder has to give the with and height // of the texture /// it is needed because the HLMap object doesnt // know anything about image file format BuildVertex(v); // the first vertex BuildNormal(n); // its normal BuildUVMapping(uv); // its UV corrdinate BuildVertex(v); // the second vertex BuildNormal(n); // its normal BuildUVMapping(uv); // its UV corrdinate ... BuildEndPolygon(); // this polygon is finished BuildPolygon(); // The second polygon ... BuildEndPolygon(); // the second polygon is finished ... BuildEndBrush(); // this brush is finished BuildBeginBrush(); // a second brush ... BuildEndBrush(); // the second brush is finished ... BuildEndEntity(); // The first entity is finished BuildBeginEntity(); // a second entity ... BuildEndEntity(); // the second entity is finished ... BuildEndMap(); // the map is finished HLIB contains a HLMapBuilder class which is a basic builder. It doesnt do anything but donc break anything. It is the base class for all your builder. A real life builder is given in example with the PlibMapBuilder class. It is up to you to customize these methods to produce something usefull. HLIB is just a parser with some 3D geometry CSG calculations. Due to the file format, HLIB has to do a lot of 3D calculation when reading the map file. To help with these calculations HLIB uses PLIB. PLIB is a 3D library availlable at: http://sourceforge.net/projects/plib PLIB is made of many components: - SG: which deals with geometry and is used extensively throughout HLIB - SSG: which deals with rendering - UL: which is a utility library, (only used in HLIB for some defines) - .... HLIB uses SG internally and externally: the sgVec3 type is defined by SG and is used to pass vertex data from the director (HLMap) to the builder (HLMapBuilder derived classes). HLIB uses SSG in one class only: PlibMapBuilder. You can safely remove this class if you dont want SSG at all..

Requirements: No special requirements
Platforms: Linux
Keyword: C Library Const Char Entity Hlib Hlmapbuilder Libraries Library Map Mybuilder Polygon Uv Virtual Void
Users rating: 0/10

License: Freeware Size: 2.5 MB
USER REVIEWS
More Reviews or Write Review


LIB3DF RELATED
Libraries  -  GNUstep Database Library 2 0.10.1
GNUstep Database Library 2 (GDL2) is a set of libraries to map Objective-C objects to rows of relational database management systems (RDBMS). GNUstep Database Library 2 aims to be compatible with Enterprise Objects Framework (EOF) as released...
593.92 KB  
Libraries  -  SoundTouch Sound Processing Library 1.3.0
SoundTouch Sound Processing Library is an open-source audio processing library for changing the Tempo, Pitch and Playback Rates of audio streams or files: - Tempo (time-stretch): Changes the sound to play at faster or slower speed than original,...
430.08 KB  
Libraries  -  CoreLinux++ Function Load Library 0.1.1
CoreLinux++ Function Load Library (libclfll++) takes advantage of the abstract Library Load framework in the CoreLinux libclfw++ library by providing management of loading Linux shared libraries. Application developers define function objects as...
93.18 KB  
Multimedia & Graphics  -  OpenGL Class Library 0.0.1
The OpenGL Class Library (GLCL) is intented to be a set of C++ classes,available through static and dynamic libraries, that will allow thedeveloper to create OpenGL applications using C++ quickly.
118.58 KB  
Miscellaneous  -  The Online Lending Library 2.0
The Online Lending Library is a platform for lending libraries to deliver their digital assets and collections to clients over the internet.
5.59 MB  
Libraries  -  AeroGlass-Library 1.1
The AeroGlass-Library was specially designed to be a library (written in C# ) that is supposed to make the implementation of extended Aero Glass areas in Windows forms applications easier. Now it is very easy to implement the Aero interface with...
 
Libraries  -  TrotiNet 0.5.1 Alpha
TrotiNet was designed using C# as an accessible and handy HTTP proxy library. The library aims at delivering a simple, reusable framework for developing any sort of HTTP proxies. Now you can further improve your development process.
 
Programming  -  C Embedded Perl Library 0.1
C Embedded Perl is an easy-to-use library for executing perl codes from C programs.
78.33 KB  
Programming  -  dyncall 0.5
The dyncall library encapsulates architecture-, OS- and compiler-specific function call semantics in a virtual "bind argument parameters from left to right and then call" interface allowing programmers to call C functions in a completely dynamic...
256 KB  
Games  -  BomberLAN 0.0.2
BomberLAN is a GPLed 2d game with planned network support written in C++ with the aid of the SDL libraries. BomberLAN is easy to pick up and play, but still extremely fun, similar to the classic Bomberman games on NES and SNES.
942.08 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.11.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB