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

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

Serving Software Downloads in 956 Categories, Downloaded 50.241.423 Times

Lib3df 20030825

  Date Added: June 20, 2010  |  Visits: 822

Lib3df

Report Broken Link
Printer Friendly Version


Product Homepage
Download (91 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  -  GNU C library 2.4
GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions. GNU C library is used by almost all C programs and provides the most essential program interface. The history of Unix and various...
19.5 MB  
Libraries  -  LibIdent C library 0.32
LibIdent is a small C library for interfacing with RFC 1413 Identification protocol servers, which are used for identifying users. LibIdent C library supports both IPv4 and IPv6 addresses transparently. It is meant to be used by daemons to try...
286.72 KB  
Libraries  -  Nana C++ Library 0.1.14
Nana C++ Library was designed in order to provide a software framework for cross-platform programming. Many components, such as graphics user interface and threads are present. Nana is an Open-Source library written in C++ with OO and generic.
 
Libraries  -  Micro C++ Library 1.3
The Micro C++ Library, also known as libmicxx, is a small set of portable and easy-to-use classes. The are built in order to provide core features commonly used in modern applications. It is based completely on the Standard C++ Template Library...
 
Libraries  -  Simple SOAP C++ Library 2.2
Simple SOAP C++ Library is a useful C++ production ready implementation of Scott Seely's Simple SOAP RPC code. OS neutral, HTTP transport, XML validation, envelope parsing, RPC dispatching, extendable data types, fault generation and a...
 
Libraries  -  Chilkat XML C++ Library 9.2.1
Chilkat XML C++ Library is a high-level non-validating XML parser component that is free for both commercial and non-commercial use. Give Chilkat XML C++ Library a try to see what it's all about!
 
Libraries  -  Chilkat MHT C++ Library 9.2.1
Chilkat MHT is a C++ library that enables you to encode HTML files to self-contained .MHT web archives. Can also convert HTML into a self-contained email with all referenced images embedded within the email. Chilkat MHT can download HTML from a...
 
Development Tools  -  Chilkat MHT C Library 1.0
Chilkat MHT C Library converts HTML to self-contained .MHT web archives. It can also convert HTML into a self-contained email with all referenced images embedded within the email. Chilkat MHT can download HTML from a url, load HTML from a file, or...
 
Development Tools  -  Chilkat MIME C Library 1.0
Chilkat MIME C Library  allows you to create an manipulate MIME and S/MIME messages. Features: - Navigate the MIME message tree structure via the NumParts property and GetPart(index) method. - Retrieve header field names and values. - Add...
 
Development Tools  -  Chilkat Zip C Library 1.0
Chilkat Zip C Library is a Zip compression component with loads of features and extremely easy to use. Features: - Callbacks for zip/unzip progress monitoring. - Zip an entire directory tree. - Append entries to a Zip from in-memory data. -...
 
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.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...
3.88 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