mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 11:26:11 +00:00
remove lib3ds source and download it using cmake
This commit is contained in:
parent
1c135c59ff
commit
c5ded4317b
3
src/external/cgal.cmake
vendored
3
src/external/cgal.cmake
vendored
@ -28,7 +28,7 @@ elseif(MESHLAB_ALLOW_DOWNLOAD_SOURCE_CGAL)
|
||||
message(STATUS "- CGAL - using downloaded source")
|
||||
add_library(external-cgal INTERFACE)
|
||||
target_include_directories(external-cgal INTERFACE "${CGAL_DIR}/include/")
|
||||
|
||||
|
||||
if (WIN32)
|
||||
add_library(mpfr SHARED IMPORTED GLOBAL)
|
||||
set_property(TARGET mpfr PROPERTY IMPORTED_IMPLIB "${CGAL_DIR}/auxiliary/gmp/lib/libmpfr-4.lib")
|
||||
@ -44,7 +44,6 @@ elseif(MESHLAB_ALLOW_DOWNLOAD_SOURCE_CGAL)
|
||||
target_include_directories(external-cgal SYSTEM INTERFACE ${GMP_INCLUDE_DIRS})
|
||||
target_link_libraries(external-cgal INTERFACE ${GMP_LIBRARIES} mpfr Threads::Threads)
|
||||
endif()
|
||||
|
||||
|
||||
if (WIN32)
|
||||
if (DEFINED MESHLAB_LIB_OUTPUT_DIR)
|
||||
|
||||
59
src/external/lib3ds-1.3.0/3ds-utils.spec.in
vendored
59
src/external/lib3ds-1.3.0/3ds-utils.spec.in
vendored
@ -1,59 +0,0 @@
|
||||
# Note that this is NOT a relocatable package
|
||||
%define ver @LIB3DS_VERSION@
|
||||
%define prefix /usr
|
||||
BuildRoot: /tmp/lib3ds-%{PACKAGE_VERSION}-root
|
||||
|
||||
Summary: 3DS Viewing and Conversion Utilities
|
||||
Name: lib3ds-utils
|
||||
Version: %ver
|
||||
Release: 1
|
||||
Copyright: LGPL
|
||||
Group: Aplpications/Multimedia
|
||||
Source: http://download.sourceforge.net/lib3ds/lib3ds-%{ver}.tar.gz
|
||||
URL: http://lib3ds.sourceforge.net
|
||||
Docdir: %{prefix}/share/doc
|
||||
|
||||
%description
|
||||
|
||||
Lib3ds is a free alternative to Autodesk's 3DS File Toolkit for handling
|
||||
3DS files It's main goal is to simplify the creation of 3DS import and
|
||||
export filters.
|
||||
|
||||
This package contains some conversion and viewing utilities.
|
||||
|
||||
This project is not related in any form to Autodesk. The library is
|
||||
based on unofficial information about the 3DS format found on the web.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
||||
The official Lib3ds Homepage can be found under:
|
||||
http://lib3ds.sourceforge.net
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
./configure --prefix=%{prefix}
|
||||
make
|
||||
|
||||
%install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc AUTHORS ChangeLog NEWS README COPYING TODO
|
||||
%{prefix}/bin/*
|
||||
%{prefix}/man/man1/3dsplayer.1
|
||||
%{prefix}/man/man1/3ds2m.1
|
||||
%{prefix}/man/man1/3dsdump.1
|
||||
|
||||
20
src/external/lib3ds-1.3.0/AUTHORS
vendored
20
src/external/lib3ds-1.3.0/AUTHORS
vendored
@ -1,20 +0,0 @@
|
||||
|
||||
lib3ds was originally written by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
The project is currently administered by Reed Hedges <reed@zerohour.net>.
|
||||
Please contact Reed with any inquiries.
|
||||
|
||||
Since April, 2004, the following people have contributed additional
|
||||
changes to lib3ds:
|
||||
|
||||
David Rogers
|
||||
Edward Falk
|
||||
Gernot Zeigler
|
||||
Haik Lorenz
|
||||
Jean-Charles Quillet
|
||||
Mike Frysinger
|
||||
Miles Bader
|
||||
Tomas Rapkauskas
|
||||
Torsten Blank
|
||||
Ralf Corsepius
|
||||
Stephane Denis
|
||||
340
src/external/lib3ds-1.3.0/COPYING
vendored
340
src/external/lib3ds-1.3.0/COPYING
vendored
@ -1,340 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
304
src/external/lib3ds-1.3.0/ChangeLog
vendored
304
src/external/lib3ds-1.3.0/ChangeLog
vendored
@ -1,304 +0,0 @@
|
||||
2007-06-20 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* Fixed loading of files without NODE_ID
|
||||
* Updated Xcode projects
|
||||
* Updated project files to improve doxygen output
|
||||
|
||||
2007-06-15 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* Removed float.c/float.h to avoid conflicts with ISO header
|
||||
* Removed LIB3DS_EXPORT define from files
|
||||
|
||||
2007-06-14 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* Added support for object flags in meshes, cameras and lights
|
||||
* Fixed bug #1240026: 3dsplay can't display files without keyframer section
|
||||
* Fixed node eval if no scale track is present
|
||||
* Fixed bug# 1231343: basketball assert
|
||||
* Added lib3ds_file_bounding_box_of_objects/of_nodes to fix bug #1160806
|
||||
* Replaced lib3ds_matrix_mul by lib3ds_matrix_mult
|
||||
* Updated Copyright information in files
|
||||
* Created new Visual Studio 8 project files
|
||||
* Renamed player.c to 3dsplay.c
|
||||
* Removed out-dated examples (3ds2rib, 3ds2m)
|
||||
* Revised configure.in and Makefile.am files Added support for shared and
|
||||
static libs via libtool. Removed support to build 3dsplay to simplify
|
||||
configuration
|
||||
* Fixed bug #1691746: io.c has one more strict aliasing violation
|
||||
* Fixed bug #1077795: incorrect orientation matrices
|
||||
* Fixed bug #1581774: Lib3dsTextureMapFlags
|
||||
* Fixed bug #1726844: memory leak in lib3ds_file_load
|
||||
* Applied patch 1550343: Possible memory leak in lib3ds_file_free()
|
||||
* Fixed bug #998502: automake parameters missed in autogen.sh
|
||||
* Fixed bug #1433032: lib3ds on 64 bit platforms
|
||||
* Use size_t for lib3ds_io_read/write
|
||||
* Fixed type conversion warnings (Visual Studio 8)
|
||||
* Removed Lib3dsFile::num_meshes
|
||||
* Removed DMALLOC support
|
||||
|
||||
2005-05-07 Reed Hedges <reed@interreality.org>
|
||||
|
||||
* Prerelease 1.3.0-pre1. This release adds 'player' in the installation
|
||||
as '3dsplayer'
|
||||
|
||||
2004-11-20 Edward Falk <efalk@sourceforge.net>
|
||||
|
||||
* Fixed bugs in matrix.c and vector.c relating to degenerate cases.
|
||||
* Added lots of doxygen comments to several files.
|
||||
* Incorporated SELF_ILPCT patch by Lee Butler (Patch #787678)
|
||||
* Incorporated texture matching patch by Gernot Ziegler
|
||||
* Fixed mesh interpolation bug (first approximation)
|
||||
* Major enhancements throughout player.c
|
||||
* Added more dump functions.
|
||||
* Added lib3ds_object_bounding_box()
|
||||
* Added "rpm" target to Makefie.am
|
||||
* Bumped to version 1.3.0
|
||||
|
||||
2004-06-04 Reed Hedges <reed@interreality.org>
|
||||
|
||||
* Some fixes contributed by Stephane Denis were previously applied
|
||||
* Added IDE project files for MSVC7 and XCode contributed by Stephane Denis.
|
||||
|
||||
2002-09-19 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* matrix.c: lib3ds_matrix_dump, fixed lib3ds_matrix_camera.
|
||||
* camera.c: lib3ds_camera_dump
|
||||
|
||||
2002-01-14 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* Added configure and aclocal.m4 to CVS.
|
||||
WARNING: Files may not be up to date !!!
|
||||
* Removed libtool. Building shared libs using the GNU
|
||||
build tools is no longer supported.
|
||||
* material.c: Added default initializations for material
|
||||
(including the texture maps)
|
||||
* m4/glut.m4: Checking now for win32 GL/GLU/GLUT libraries
|
||||
when compiling with cygwin.
|
||||
Added -lobjc to LIBS for MacOS X.
|
||||
|
||||
2001-11-14 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* glstub.h: Created as default glstub.h.in for MSVC.
|
||||
|
||||
2001-10-14 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* viewport.c: Calling lib3ds_viewport_set_views with parameter
|
||||
views == 0 will now be handled proper for the case that no
|
||||
views are allocated.
|
||||
|
||||
2001-09-16 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* mesh.c: Fixed bug in lib3ds_mesh_dump(). The face list loops on
|
||||
mesh->points length - which should be mesh->faces.(Reported by
|
||||
lib3ds@lee-morgan.net)
|
||||
|
||||
2001-07-24 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* autogen.sh: Added a check in the search for `aclocal` support paths
|
||||
such that the path is only included if aclocal is not installed in
|
||||
that path (if aclocal is installed in /usr/bin/ then /usr/share is
|
||||
skipped). Removed the break in the search so that again all search
|
||||
paths are used.
|
||||
* configure.in, Doxyfile: Changed version to 1.2.0.
|
||||
|
||||
2001-07-23 Eric Sunshine <sunshine@sunshineco.com>
|
||||
|
||||
* autogen.sh: Augmented the search for `aclocal' support files so that
|
||||
only the first found-path is used (that is, only one `-I' directive
|
||||
is added to the command line). Also altered the search path priority
|
||||
so that /usr/local/share is preferred over /usr/share. Hopefully
|
||||
this will fix the problem of `aclocal' complaining about duplicate
|
||||
macro definitions on some installations where, presumably,
|
||||
/usr/share/aclocal and /usr/local/share/aclocal both point at the
|
||||
same physical directory or are at least copies of one another.
|
||||
|
||||
2001-07-20 Eric Sunshine <sunshine@sunshineco.com>
|
||||
|
||||
* autogen.sh: Augmented to work correctly despite absence of GNU
|
||||
libtool and libtoolize on MacOS/X. The libtool program on
|
||||
MacOS/X was developed independently and is a completely distinct
|
||||
beast from the GNU libtool. If libtoolize is missing,
|
||||
autogen.sh now manually grabs the needed support files
|
||||
(config.sub, config.guess, ltconfig, and ltmain.sh).
|
||||
|
||||
2001-07-19 Eric Sunshine <sunshine@sunshineco.com>
|
||||
|
||||
* m4/glut.m4: Augmented CONFIGURE_GLUT() macro so that it now
|
||||
checks for gl.h, glu.h, and glut.h in <OpenGL/*> and <GLUT/*> in
|
||||
addition to <GL/*>. Also now checks if `-framework GLUT' and
|
||||
`-framework OpenGL' are required when linking an application.
|
||||
These changes allow the example applications to build on
|
||||
MacOS/X.
|
||||
* configure.in: Now generates `examples/glstub.h' from the new
|
||||
`examples/glstub.h.in'. This file imports the OpenGL and GLUT
|
||||
headers using the paths determined by the CONFIGURE_GLUT() macro
|
||||
(i.e. <OpenGL/gl.h> on MacOS/X; rather than <GL/gl.h> for other
|
||||
platforms).
|
||||
* examples/player.c: Now includes "glstub.h" rather than
|
||||
<GL/glut.h>.
|
||||
* m4/glut.m4: Fixed a bug in CONFIGURE_GLUT() where it ignored
|
||||
user-supplied CFLAGS from --with-glut-cflags when checking for
|
||||
the presence of gl.h, glu.h, and glut.h.
|
||||
|
||||
2001-07-18 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* m4/glut.m4: Added GL/GLU/glut check.
|
||||
* Retructured files. Create tools directory for tools that get
|
||||
installed. Moved 3dsdump and 3ds2m to tools. Renamed 3dsplay
|
||||
the examples directory into player (names which do not start
|
||||
with a digit are much easier to handle with automake).
|
||||
* tools/3ds2m: we do NOT need to multiply with the mesh matrix
|
||||
(changed 2001-01-09 but 3ds2m has not been updated).
|
||||
|
||||
2001-07-07 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* shaders: Added shaders directory. Contains Renderman shaders
|
||||
to emulate the 3ds renderer (materials and lights). Only poor
|
||||
results at the moment.
|
||||
* examples/3ds2rib: Modified to use new shaders.
|
||||
|
||||
2001-06-16 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* fixed spotlight reader/writer
|
||||
* added lib3ds_light_dump, lib3ds_camera_dump
|
||||
* updated lib3ds_material_dump
|
||||
* added lib3ds_file_bounding_box
|
||||
* Release 1.1.0
|
||||
|
||||
2001-06-07 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* write only necessary chunks to .3ds file
|
||||
* file.h/file.c: renamed lib3ds_open to lib3ds_file_load
|
||||
removed lib3ds_close (use lib3ds_file_free instead !!)
|
||||
created lib3ds_file_save.
|
||||
* Added msvc project file to create a dll.
|
||||
* LIB3DS_KFHDR remains unchanged when saving a previously loaded
|
||||
file.
|
||||
|
||||
2001-06-05 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* node.h/node.c, file.h/file.c: renamed "id" to node_id
|
||||
* recreated MSVC project files. Only static library creation
|
||||
supported at the moment.
|
||||
|
||||
2001-05-08 Michael Fink <michael.fink@redspark.com>
|
||||
|
||||
* in lib3ds_atmosphere_write() the two chunk id's were
|
||||
accidentally swapped
|
||||
* in lib3ds_mesh_write(), the chunks were reordered to enable a
|
||||
successful import into AutoCAD 2000i and 3d Studio MAX 3.1
|
||||
* in the struct _Lib3dsMapData the "maptype" data member was
|
||||
added, increasing the size of the chunk LIB3DS_MESH_TEXTURE_INFO
|
||||
to 92 bytes (as seen in 3ds files from 3d Studio)
|
||||
* the chunk LIB3DS_SHADOW_RANGE contains, according to the 3ds
|
||||
file development kit (3ds-fdk) a dword chunk; reading and
|
||||
writing the chunk should be fixed.
|
||||
|
||||
2001-03-20 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* examples/3dsplay.c: new simples 3dsplayer example
|
||||
using glut. msvc support only at the moment.
|
||||
* lib3ds/mesh.c: started working on vertex normal support
|
||||
(smoothing not supported at the moment, can't test them)
|
||||
* Doxygen documentation files changed from *.doc to *.txt
|
||||
to avoid collisions with MS-Word on windows platforms
|
||||
|
||||
2001-01-15 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* lib3ds/material.c (lib3ds_material_dump):
|
||||
Added dumping of ambient, diffuse, specular, shininess,
|
||||
shin_strength, shading and texture1/texture2 properties
|
||||
* examples/3dsdump.c (main):
|
||||
Added suport for dumping the 3ds chunk structure
|
||||
* lib3ds.spec: Updated
|
||||
|
||||
2001-01-14 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* Removed Warnings (gcc & msvc++6.0)
|
||||
* Cleaning up
|
||||
* lib3ds.spec: Recreated
|
||||
|
||||
2001-01-10 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* Wrote writing code for keyframer, background, atmosphere and
|
||||
shadow settings.
|
||||
|
||||
2001-01-09 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* lib3ds/mesh.c (lib3ds_mesh_write):
|
||||
the point list is no loner retransformed to avoid numerical
|
||||
problems. to use meshes with the keyframer all points must be
|
||||
transformed by the inverse mesh-matrix manually.
|
||||
* lib3ds/camera.c (lib3ds_camera_write):
|
||||
bugfix LIB3DS_N_CAMERA (fov)
|
||||
* lib3ds/light.c (lib3ds_light_write):
|
||||
bugfix LIB3DS_DL_SPOTLIGHT
|
||||
* lib3ds/material.c (texture_map_write):
|
||||
write only chunks for maps with name != ""
|
||||
(int_percentage_read), (int_percentage_write):
|
||||
bugfix rounding error
|
||||
|
||||
2001-01-04 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* lib3ds/readwrite.c: cpu independent endiness handling
|
||||
as suggested by Daniel Richard G. <straker@mit.edu>
|
||||
|
||||
2001-01-03 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* lib3ds/mesh.c: Added missing texture mapping handling
|
||||
LIB3DS_TEX_VERTS
|
||||
LIB3DS_MESH_TEXTURE_INFO
|
||||
* lib3ds/matrix.c
|
||||
(lib3ds_matrix_camera): Bug #124414 fixed
|
||||
* lib3ds/material.c
|
||||
(color_read): Bug #124399 fixed
|
||||
(texture_map_read): texture percentage fixed
|
||||
|
||||
2000-10-30 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* Renamed tools (examples) from lib3ds* -> 3ds*
|
||||
* configure.in: Removed all non GCC compiler options,
|
||||
leaving cflags untouched
|
||||
|
||||
2000-10-27 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* doc/mainpage.doc: Added view3ds OpenGL realtime previewer example.
|
||||
Avaiable as separate distributon.
|
||||
No Changes to the library.
|
||||
|
||||
2000-10-25 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* Release 0.9.1
|
||||
* Examples get installed now
|
||||
* Man pages get installed now
|
||||
|
||||
2000-10-24 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* lib3ds.spec: Created
|
||||
|
||||
2000-10-19 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* CVSROOT/cvswrappers: created entries for msvc project files
|
||||
* Created MSVC project files
|
||||
* Setting up cvs commit logging
|
||||
|
||||
2000-10-17 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* Release: 0.9.0
|
||||
|
||||
2000-10-09 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* Using now doxygen for documentation and webpage
|
||||
|
||||
2000-10-05 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* Turned all double linked lists into single linked lists
|
||||
* Added dmalloc support for memory leak tracking
|
||||
* Added support to deallocate allocated memory
|
||||
|
||||
2000-10-04 Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
|
||||
* ANSI C fixes. Using now -ansi & -pedantic-errors for debug mode
|
||||
* Improved little/endian checks & debug mode handling
|
||||
* lib3ds/file.h: Added material lookup functions
|
||||
* Starting ChangeLog
|
||||
229
src/external/lib3ds-1.3.0/INSTALL
vendored
229
src/external/lib3ds-1.3.0/INSTALL
vendored
@ -1,229 +0,0 @@
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
88
src/external/lib3ds-1.3.0/Makefile.am
vendored
88
src/external/lib3ds-1.3.0/Makefile.am
vendored
@ -1,88 +0,0 @@
|
||||
#
|
||||
# The 3D Studio File Format Library
|
||||
# Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
# License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.27 2007/06/20 09:05:29 jeh Exp $
|
||||
#
|
||||
|
||||
|
||||
VERSION = @LIB3DS_VERSION@
|
||||
|
||||
SUBDIRS = lib3ds tools
|
||||
|
||||
bin_SCRIPTS = lib3ds-config
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
|
||||
man_MANS = \
|
||||
lib3ds-config.1
|
||||
|
||||
EXTRA_DIST = \
|
||||
lib3ds.m4 \
|
||||
lib3ds-config.1 \
|
||||
AUTHORS \
|
||||
COPYING \
|
||||
ChangeLog \
|
||||
INSTALL \
|
||||
README \
|
||||
TODO \
|
||||
examples/3dsplay.c \
|
||||
msvc8/lib3ds.sln \
|
||||
msvc8/lib3ds.vcproj \
|
||||
msvc8/lib3ds.rc \
|
||||
msvc8/3dsdump.vcproj \
|
||||
msvc8/3dsplay.vcproj
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
m4data_DATA = lib3ds.m4
|
||||
|
||||
.PHONY: release snapshot
|
||||
|
||||
release:
|
||||
rm -rf .deps */.deps
|
||||
$(MAKE) distcheck
|
||||
|
||||
snapshot:
|
||||
$(MAKE) dist-zip distdir=$(PACKAGE)-`date +"%Y%m%d"`
|
||||
|
||||
|
||||
DIST_NAME = lib3ds-$(VERSION)
|
||||
DIST_DIR = /tmp/$(DIST_NAME)
|
||||
|
||||
RPM_SOURCE_DIR = /tmp/rpmsource-$(DIST_NAME)
|
||||
RPM_BUILD_DIR = /tmp/rpmbuild-$(DIST_NAME)
|
||||
RPM_DEST_DIR = .
|
||||
|
||||
|
||||
rpm: $(DIST_NAME).tar.gz
|
||||
rm -rf $(RPM_SOURCE_DIR)
|
||||
rm -rf $(RPM_BUILD_DIR)
|
||||
mkdir -p $(RPM_SOURCE_DIR)
|
||||
mkdir -p $(RPM_BUILD_DIR)
|
||||
cp $(DIST_NAME).tar.gz $(RPM_SOURCE_DIR)
|
||||
|
||||
rpmbuild -bb lib3ds.spec \
|
||||
--define "_sourcedir ${RPM_SOURCE_DIR}" \
|
||||
--define "_builddir ${RPM_BUILD_DIR}" \
|
||||
--define "_rpmdir ${RPM_SOURCE_DIR}"
|
||||
|
||||
mv ${RPM_SOURCE_DIR}/i386/lib3ds-*.rpm ${RPM_DEST_DIR}
|
||||
rm -rf ${RPM_SOURCE_DIR} ${RPM_BUILD_DIR}
|
||||
|
||||
|
||||
|
||||
820
src/external/lib3ds-1.3.0/Makefile.in
vendored
820
src/external/lib3ds-1.3.0/Makefile.in
vendored
@ -1,820 +0,0 @@
|
||||
# Makefile.in generated by automake 1.10 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/3ds-utils.spec.in \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/config.h.in $(srcdir)/lib3ds-config.1.in \
|
||||
$(srcdir)/lib3ds-config.in $(srcdir)/lib3ds.spec.in \
|
||||
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
|
||||
TODO config.guess config.sub depcomp install-sh ltmain.sh \
|
||||
missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = lib3ds-config lib3ds-config.1 lib3ds.spec \
|
||||
3ds-utils.spec
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
|
||||
"$(DESTDIR)$(m4datadir)"
|
||||
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
man1dir = $(mandir)/man1
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
m4dataDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(m4data_DATA)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIB3DS_MAJOR_VERSION = @LIB3DS_MAJOR_VERSION@
|
||||
LIB3DS_MICRO_VERSION = @LIB3DS_MICRO_VERSION@
|
||||
LIB3DS_MINOR_VERSION = @LIB3DS_MINOR_VERSION@
|
||||
LIB3DS_VERSION = @LIB3DS_VERSION@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @LIB3DS_VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = lib3ds tools
|
||||
bin_SCRIPTS = lib3ds-config
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
man_MANS = \
|
||||
lib3ds-config.1
|
||||
|
||||
EXTRA_DIST = \
|
||||
lib3ds.m4 \
|
||||
lib3ds-config.1 \
|
||||
AUTHORS \
|
||||
COPYING \
|
||||
ChangeLog \
|
||||
INSTALL \
|
||||
README \
|
||||
TODO \
|
||||
examples/3dsplay.c \
|
||||
msvc8/lib3ds.sln \
|
||||
msvc8/lib3ds.vcproj \
|
||||
msvc8/lib3ds.rc \
|
||||
msvc8/3dsdump.vcproj \
|
||||
msvc8/3dsplay.vcproj
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
m4data_DATA = lib3ds.m4
|
||||
DIST_NAME = lib3ds-$(VERSION)
|
||||
DIST_DIR = /tmp/$(DIST_NAME)
|
||||
RPM_SOURCE_DIR = /tmp/rpmsource-$(DIST_NAME)
|
||||
RPM_BUILD_DIR = /tmp/rpmbuild-$(DIST_NAME)
|
||||
RPM_DEST_DIR = .
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
lib3ds-config: $(top_builddir)/config.status $(srcdir)/lib3ds-config.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
lib3ds-config.1: $(top_builddir)/config.status $(srcdir)/lib3ds-config.1.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
lib3ds.spec: $(top_builddir)/config.status $(srcdir)/lib3ds.spec.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
3ds-utils.spec: $(top_builddir)/config.status $(srcdir)/3ds-utils.spec.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
install-man1: $(man1_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
1*) ;; \
|
||||
*) ext='1' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
|
||||
done
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
1*) ;; \
|
||||
*) ext='1' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
|
||||
done
|
||||
install-m4dataDATA: $(m4data_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)"
|
||||
@list='$(m4data_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(m4dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(m4datadir)/$$f'"; \
|
||||
$(m4dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(m4datadir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-m4dataDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(m4data_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(m4datadir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(m4datadir)/$$f"; \
|
||||
done
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d $(distdir) || mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(SCRIPTS) $(MANS) $(DATA) config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(m4datadir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-m4dataDATA install-man
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-exec-am: install-binSCRIPTS
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man: install-man1
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-m4dataDATA uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||
install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-binSCRIPTS install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am \
|
||||
install-m4dataDATA install-man install-man1 install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-binSCRIPTS uninstall-m4dataDATA uninstall-man \
|
||||
uninstall-man1
|
||||
|
||||
#
|
||||
# The 3D Studio File Format Library
|
||||
# Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
# License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.27 2007/06/20 09:05:29 jeh Exp $
|
||||
#
|
||||
|
||||
.PHONY: release snapshot
|
||||
|
||||
release:
|
||||
rm -rf .deps */.deps
|
||||
$(MAKE) distcheck
|
||||
|
||||
snapshot:
|
||||
$(MAKE) dist-zip distdir=$(PACKAGE)-`date +"%Y%m%d"`
|
||||
|
||||
rpm: $(DIST_NAME).tar.gz
|
||||
rm -rf $(RPM_SOURCE_DIR)
|
||||
rm -rf $(RPM_BUILD_DIR)
|
||||
mkdir -p $(RPM_SOURCE_DIR)
|
||||
mkdir -p $(RPM_BUILD_DIR)
|
||||
cp $(DIST_NAME).tar.gz $(RPM_SOURCE_DIR)
|
||||
|
||||
rpmbuild -bb lib3ds.spec \
|
||||
--define "_sourcedir ${RPM_SOURCE_DIR}" \
|
||||
--define "_builddir ${RPM_BUILD_DIR}" \
|
||||
--define "_rpmdir ${RPM_SOURCE_DIR}"
|
||||
|
||||
mv ${RPM_SOURCE_DIR}/i386/lib3ds-*.rpm ${RPM_DEST_DIR}
|
||||
rm -rf ${RPM_SOURCE_DIR} ${RPM_BUILD_DIR}
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
0
src/external/lib3ds-1.3.0/NEWS
vendored
0
src/external/lib3ds-1.3.0/NEWS
vendored
15
src/external/lib3ds-1.3.0/README
vendored
15
src/external/lib3ds-1.3.0/README
vendored
@ -1,15 +0,0 @@
|
||||
|
||||
Lib3ds is a free toolkit for handling the "3DS" format for 3D model files.
|
||||
Its main goal is to simplify the creation of 3DS import and export filters.
|
||||
|
||||
This project is not related in any form to Autodesk Inc. The library is
|
||||
based on unofficial information about the 3DS format found on the web.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
||||
The official Lib3ds Homepage can be found under:
|
||||
http://lib3ds.sourceforge.net
|
||||
|
||||
1
src/external/lib3ds-1.3.0/TODO
vendored
1
src/external/lib3ds-1.3.0/TODO
vendored
@ -1 +0,0 @@
|
||||
|
||||
7270
src/external/lib3ds-1.3.0/aclocal.m4
vendored
7270
src/external/lib3ds-1.3.0/aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
1500
src/external/lib3ds-1.3.0/config.guess
vendored
1500
src/external/lib3ds-1.3.0/config.guess
vendored
File diff suppressed because it is too large
Load Diff
55
src/external/lib3ds-1.3.0/config.h.in
vendored
55
src/external/lib3ds-1.3.0/config.h.in
vendored
@ -1,55 +0,0 @@
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
1616
src/external/lib3ds-1.3.0/config.sub
vendored
1616
src/external/lib3ds-1.3.0/config.sub
vendored
File diff suppressed because it is too large
Load Diff
20674
src/external/lib3ds-1.3.0/configure
vendored
20674
src/external/lib3ds-1.3.0/configure
vendored
File diff suppressed because it is too large
Load Diff
42
src/external/lib3ds-1.3.0/configure.in
vendored
42
src/external/lib3ds-1.3.0/configure.in
vendored
@ -1,42 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(Makefile.am)
|
||||
|
||||
LIB3DS_MAJOR_VERSION=1
|
||||
LIB3DS_MINOR_VERSION=3
|
||||
LIB3DS_MICRO_VERSION=0
|
||||
LIB3DS_VERSION=$LIB3DS_MAJOR_VERSION.$LIB3DS_MINOR_VERSION.$LIB3DS_MICRO_VERSION
|
||||
AC_SUBST(LIB3DS_MAJOR_VERSION)
|
||||
AC_SUBST(LIB3DS_MINOR_VERSION)
|
||||
AC_SUBST(LIB3DS_MICRO_VERSION)
|
||||
AC_SUBST(LIB3DS_VERSION)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(lib3ds, $LIB3DS_VERSION)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AC_MSG_CHECKING([for debugging mode])
|
||||
AC_ARG_ENABLE(debug-mode,
|
||||
[ --enable-debug-mode enable debugging mode],
|
||||
[
|
||||
LIB3DS_DEBUG_MODE=yes
|
||||
]
|
||||
)
|
||||
if test "$LIB3DS_DEBUG_MODE" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
CFLAGS="$CFLAGS -D_DEBUG"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_OUTPUT([ \
|
||||
lib3ds-config \
|
||||
lib3ds-config.1 \
|
||||
Makefile \
|
||||
lib3ds/Makefile \
|
||||
tools/Makefile \
|
||||
tools/3dsdump.1 \
|
||||
lib3ds.spec \
|
||||
3ds-utils.spec \
|
||||
],[chmod a+x lib3ds-config])
|
||||
584
src/external/lib3ds-1.3.0/depcomp
vendored
584
src/external/lib3ds-1.3.0/depcomp
vendored
@ -1,584 +0,0 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2006-10-15.18
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
1334
src/external/lib3ds-1.3.0/examples/3dsplay.c
vendored
1334
src/external/lib3ds-1.3.0/examples/3dsplay.c
vendored
File diff suppressed because it is too large
Load Diff
507
src/external/lib3ds-1.3.0/install-sh
vendored
507
src/external/lib3ds-1.3.0/install-sh
vendored
@ -1,507 +0,0 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2006-10-14.15
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
posix_glob=
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
chgrpcmd=
|
||||
stripcmd=
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dstarg=
|
||||
no_target_directory=
|
||||
|
||||
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
-c (ignored)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
shift
|
||||
shift
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t) dstarg=$2
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-T) no_target_directory=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dstarg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dstarg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dstarg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src ;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dstarg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dstarg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst ;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dstarg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix=/ ;;
|
||||
-*) prefix=./ ;;
|
||||
*) prefix= ;;
|
||||
esac
|
||||
|
||||
case $posix_glob in
|
||||
'')
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=true
|
||||
else
|
||||
posix_glob=false
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob && set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob && set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
{ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
|
||||
|| {
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
if test -f "$dst"; then
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null \
|
||||
|| { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
|
||||
&& { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
|
||||
|| {
|
||||
echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
} || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
61
src/external/lib3ds-1.3.0/lib3ds-config.1
vendored
61
src/external/lib3ds-1.3.0/lib3ds-config.1
vendored
@ -1,61 +0,0 @@
|
||||
.TH lib3ds 1 "16 Jun 2001" 1.3.0
|
||||
.SH NAME
|
||||
lib3ds-config - script to get information about the installed version of lib3ds
|
||||
.SH SYNOPSIS
|
||||
.B lib3ds-config
|
||||
[\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags]
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fIlib3ds-config\fP is a tool that is used to configure to determine
|
||||
the compiler and linker flags that should be used to compile and link
|
||||
programs that use \fIlib3ds\fP. It is also used internally to the .m4
|
||||
macros for GNU autoconf that are included with \fIlib3ds\fP.
|
||||
.
|
||||
.SH OPTIONS
|
||||
.l
|
||||
\fIlib3ds-config\fP accepts the following options:
|
||||
.TP 8
|
||||
.B \-\-version
|
||||
Print the currently installed version of \fIlib3ds\fP on the standard
|
||||
output.
|
||||
.TP 8
|
||||
.B \-\-libs
|
||||
Print the linker flags that are necessary to link a \fIlib3ds\fP
|
||||
program.
|
||||
.TP 8
|
||||
.B \-\-cflags
|
||||
Print the compiler flags that are necessary to compile a \fIlib3ds\fP
|
||||
program.
|
||||
.TP 8
|
||||
.B \-\-prefix=PREFIX
|
||||
If specified, use PREFIX instead of the installation prefix that
|
||||
\fIlib3ds\fP was built with when computing the output for the
|
||||
\-\-cflags and \-\-libs options. This option is also used for the exec
|
||||
prefix if \-\-exec\-prefix was not specified. This option must be
|
||||
specified before any \-\-libs or \-\-cflags options.
|
||||
.TP 8
|
||||
.B \-\-exec\-prefix=PREFIX
|
||||
If specified, use PREFIX instead of the installation exec prefix that
|
||||
\fIlib3ds\fP was built with when computing the output for the
|
||||
\-\-cflags and \-\-libs options. This option must be specified before
|
||||
any \-\-libs or \-\-cflags options.
|
||||
.SH COPYRIGHT
|
||||
.PP
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
your option) any later version.
|
||||
.PP
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
.PP
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
.SH AUTHOR
|
||||
This manpage is an almost word-for-word copy of the gtk-config
|
||||
manpage, written by Owen Taylor. It was modified by Marcelo
|
||||
E. Magallon <mmagallo@debian.org>, for the Debian GNU/Linux system
|
||||
(but may be used by others).
|
||||
61
src/external/lib3ds-1.3.0/lib3ds-config.1.in
vendored
61
src/external/lib3ds-1.3.0/lib3ds-config.1.in
vendored
@ -1,61 +0,0 @@
|
||||
.TH lib3ds 1 "16 Jun 2001" @LIB3DS_VERSION@
|
||||
.SH NAME
|
||||
lib3ds-config - script to get information about the installed version of lib3ds
|
||||
.SH SYNOPSIS
|
||||
.B lib3ds-config
|
||||
[\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags]
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fIlib3ds-config\fP is a tool that is used to configure to determine
|
||||
the compiler and linker flags that should be used to compile and link
|
||||
programs that use \fIlib3ds\fP. It is also used internally to the .m4
|
||||
macros for GNU autoconf that are included with \fIlib3ds\fP.
|
||||
.
|
||||
.SH OPTIONS
|
||||
.l
|
||||
\fIlib3ds-config\fP accepts the following options:
|
||||
.TP 8
|
||||
.B \-\-version
|
||||
Print the currently installed version of \fIlib3ds\fP on the standard
|
||||
output.
|
||||
.TP 8
|
||||
.B \-\-libs
|
||||
Print the linker flags that are necessary to link a \fIlib3ds\fP
|
||||
program.
|
||||
.TP 8
|
||||
.B \-\-cflags
|
||||
Print the compiler flags that are necessary to compile a \fIlib3ds\fP
|
||||
program.
|
||||
.TP 8
|
||||
.B \-\-prefix=PREFIX
|
||||
If specified, use PREFIX instead of the installation prefix that
|
||||
\fIlib3ds\fP was built with when computing the output for the
|
||||
\-\-cflags and \-\-libs options. This option is also used for the exec
|
||||
prefix if \-\-exec\-prefix was not specified. This option must be
|
||||
specified before any \-\-libs or \-\-cflags options.
|
||||
.TP 8
|
||||
.B \-\-exec\-prefix=PREFIX
|
||||
If specified, use PREFIX instead of the installation exec prefix that
|
||||
\fIlib3ds\fP was built with when computing the output for the
|
||||
\-\-cflags and \-\-libs options. This option must be specified before
|
||||
any \-\-libs or \-\-cflags options.
|
||||
.SH COPYRIGHT
|
||||
.PP
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
your option) any later version.
|
||||
.PP
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
.PP
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
.SH AUTHOR
|
||||
This manpage is an almost word-for-word copy of the gtk-config
|
||||
manpage, written by Owen Taylor. It was modified by Marcelo
|
||||
E. Magallon <mmagallo@debian.org>, for the Debian GNU/Linux system
|
||||
(but may be used by others).
|
||||
84
src/external/lib3ds-1.3.0/lib3ds-config.in
vendored
84
src/external/lib3ds-1.3.0/lib3ds-config.in
vendored
@ -1,84 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
exec_prefix_set=no
|
||||
|
||||
usage()
|
||||
{
|
||||
cat <<EOF
|
||||
Usage: lib3ds-config [OPTIONS] [LIBRARIES]
|
||||
Options:
|
||||
[--prefix[=DIR]]
|
||||
[--exec-prefix[=DIR]]
|
||||
[--version]
|
||||
[--libs]
|
||||
[--cflags]
|
||||
EOF
|
||||
exit $1
|
||||
}
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage 1 1>&2
|
||||
fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) optarg= ;;
|
||||
esac
|
||||
|
||||
case $1 in
|
||||
--prefix=*)
|
||||
prefix=$optarg
|
||||
if test $exec_prefix_set = no ; then
|
||||
exec_prefix=$optarg
|
||||
fi
|
||||
;;
|
||||
--prefix)
|
||||
echo_prefix=yes
|
||||
;;
|
||||
--exec-prefix=*)
|
||||
exec_prefix=$optarg
|
||||
exec_prefix_set=yes
|
||||
;;
|
||||
--exec-prefix)
|
||||
echo_exec_prefix=yes
|
||||
;;
|
||||
--version)
|
||||
echo @LIB3DS_VERSION@
|
||||
;;
|
||||
--cflags)
|
||||
echo_cflags=yes
|
||||
;;
|
||||
--libs)
|
||||
echo_libs=yes
|
||||
;;
|
||||
*)
|
||||
usage 1 1>&2
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test "$echo_prefix" = "yes"; then
|
||||
echo $prefix
|
||||
fi
|
||||
|
||||
if test "$echo_exec_prefix" = "yes"; then
|
||||
echo $exec_prefix
|
||||
fi
|
||||
|
||||
if test "$echo_cflags" = "yes"; then
|
||||
if test @includedir@ != /usr/include ; then
|
||||
echo -I@includedir@
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$echo_libs" = "yes"; then
|
||||
if test @libdir@ != /usr/lib ; then
|
||||
my_linker_flags="-L@libdir@"
|
||||
fi
|
||||
echo ${my_linker_flags} -l3ds
|
||||
fi
|
||||
|
||||
80
src/external/lib3ds-1.3.0/lib3ds.m4
vendored
80
src/external/lib3ds-1.3.0/lib3ds.m4
vendored
@ -1,80 +0,0 @@
|
||||
dnl
|
||||
dnl AM_PATH_LIB3DS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl
|
||||
AC_DEFUN([AM_PATH_LIB3DS],
|
||||
[
|
||||
|
||||
AC_ARG_WITH(lib3ds-prefix,[ --with-lib3ds-prefix=PFX Prefix where lib3ds is installed (optional)],
|
||||
lib3ds_config_prefix="$withval", lib3ds_config_prefix="")
|
||||
AC_ARG_WITH(lib3ds-exec-prefix,[ --with-lib3ds-exec-prefix=PFX Exec prefix where lib3ds is installed (optional)],
|
||||
lib3ds_config_exec_prefix="$withval", lib3ds_config_exec_prefix="")
|
||||
|
||||
if test x$lib3ds_config_exec_prefix != x ; then
|
||||
lib3ds_config_args="$lib3ds_config_args --exec-prefix=$lib3ds_config_exec_prefix"
|
||||
if test x${LIB3DS_CONFIG+set} != xset ; then
|
||||
LIB3DS_CONFIG=$lib3ds_config_exec_prefix/bin/lib3ds-config
|
||||
fi
|
||||
fi
|
||||
if test x$lib3ds_config_prefix != x ; then
|
||||
lib3ds_config_args="$lib3ds_config_args --prefix=$lib3ds_config_prefix"
|
||||
if test x${LIB3DS_CONFIG+set} != xset ; then
|
||||
LIB3DS_CONFIG=$lib3ds_config_prefix/bin/lib3ds-config
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(LIB3DS_CONFIG, lib3ds-config, no)
|
||||
lib3ds_version_min=$1
|
||||
|
||||
AC_MSG_CHECKING(for Lib3ds - version >= $lib3ds_version_min)
|
||||
no_lib3ds=""
|
||||
if test "$LIB3DS_CONFIG" = "no" ; then
|
||||
no_lib3ds=yes
|
||||
else
|
||||
LIB3DS_CFLAGS=`$LIB3DS_CONFIG --cflags`
|
||||
LIB3DS_LIBS=`$LIB3DS_CONFIG --libs`
|
||||
lib3ds_version=`$LIB3DS_CONFIG --version`
|
||||
|
||||
lib3ds_major_version=`echo $lib3ds_version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
lib3ds_minor_version=`echo $lib3ds_version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
lib3ds_micro_version=`echo $lib3ds_version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
|
||||
lib3ds_major_min=`echo $lib3ds_version_min | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
lib3ds_minor_min=`echo $lib3ds_version_min | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
lib3ds_micro_min=`echo $lib3ds_version_min | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
|
||||
lib3ds_version_proper=`expr \
|
||||
$lib3ds_major_version \> $lib3ds_major_min \| \
|
||||
$lib3ds_major_version \= $lib3ds_major_min \& \
|
||||
$lib3ds_minor_version \> $lib3ds_minor_min \| \
|
||||
$lib3ds_major_version \= $lib3ds_major_min \& \
|
||||
$lib3ds_minor_version \= $lib3ds_minor_min \& \
|
||||
$lib3ds_micro_version \>= $lib3ds_micro_min `
|
||||
|
||||
if test "$lib3ds_version_proper" = "1" ; then
|
||||
AC_MSG_RESULT([$lib3ds_major_version.$lib3ds_minor_version.$lib3ds_micro_version])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
no_lib3ds=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$no_lib3ds" = x ; then
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
LIB3DS_CFLAGS=""
|
||||
LIB3DS_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
|
||||
AC_SUBST(LIB3DS_CFLAGS)
|
||||
AC_SUBST(LIB3DS_LIBS)
|
||||
])
|
||||
|
||||
|
||||
|
||||
57
src/external/lib3ds-1.3.0/lib3ds.spec.in
vendored
57
src/external/lib3ds-1.3.0/lib3ds.spec.in
vendored
@ -1,57 +0,0 @@
|
||||
# Note that this is NOT a relocatable package
|
||||
%define ver @LIB3DS_VERSION@
|
||||
%define prefix /usr
|
||||
BuildRoot: /tmp/lib3ds-%{PACKAGE_VERSION}-root
|
||||
|
||||
Summary: The 3DS File Format Library
|
||||
Name: lib3ds
|
||||
Version: %ver
|
||||
Release: 1
|
||||
Copyright: LGPL
|
||||
Group: Development/Libraries
|
||||
Source: http://download.sourceforge.net/lib3ds/lib3ds-%{ver}.tar.gz
|
||||
URL: http://lib3ds.sourceforge.net
|
||||
Docdir: %{prefix}/share/doc
|
||||
|
||||
%description
|
||||
|
||||
Lib3ds is a free alternative to Autodesk's 3DS File Toolkit for handling
|
||||
3DS files It's main goal is to simplify the creation of 3DS import and
|
||||
export filters.
|
||||
|
||||
This project is not related in any form to Autodesk. The library is
|
||||
based on unofficial information about the 3DS format found on the web.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
||||
The official Lib3ds Homepage can be found under:
|
||||
http://lib3ds.sourceforge.net
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
./configure --prefix=%{prefix}
|
||||
make
|
||||
|
||||
%install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc AUTHORS ChangeLog NEWS README COPYING TODO
|
||||
%{prefix}/lib/*
|
||||
%{prefix}/include/lib3ds/*
|
||||
%{prefix}/share/aclocal/*
|
||||
%{prefix}/man/man1/lib3ds-config.1
|
||||
|
||||
86
src/external/lib3ds-1.3.0/lib3ds/Makefile.am
vendored
86
src/external/lib3ds-1.3.0/lib3ds/Makefile.am
vendored
@ -1,86 +0,0 @@
|
||||
#
|
||||
# The 3D Studio File Format Library
|
||||
# Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
# License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.15 2007/06/15 09:53:20 jeh Exp $
|
||||
#
|
||||
|
||||
lib3dsdir=$(includedir)/lib3ds
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
lib_LTLIBRARIES = lib3ds.la
|
||||
|
||||
lib3ds_la_LDFLAGS = \
|
||||
-version-info $(LIB3DS_MINOR_VERSION):$(LIB3DS_MICRO_VERSION):0 \
|
||||
-release $(LIB3DS_MAJOR_VERSION)
|
||||
|
||||
lib3ds_la_LIBADD = -lm
|
||||
|
||||
lib3ds_la_SOURCES = \
|
||||
io.c \
|
||||
vector.c \
|
||||
matrix.c \
|
||||
quat.c \
|
||||
tcb.c \
|
||||
ease.c \
|
||||
chunktable.h \
|
||||
chunk.c \
|
||||
file.c \
|
||||
background.c \
|
||||
atmosphere.c \
|
||||
shadow.c \
|
||||
viewport.c \
|
||||
material.c \
|
||||
mesh.c \
|
||||
camera.c \
|
||||
light.c \
|
||||
tracks.c \
|
||||
node.c
|
||||
|
||||
lib3ds_HEADERS = \
|
||||
types.h \
|
||||
io.h \
|
||||
vector.h \
|
||||
matrix.h \
|
||||
quat.h \
|
||||
tcb.h \
|
||||
ease.h \
|
||||
chunk.h \
|
||||
file.h \
|
||||
background.h \
|
||||
atmosphere.h \
|
||||
shadow.h \
|
||||
viewport.h \
|
||||
material.h \
|
||||
mesh.h \
|
||||
camera.h \
|
||||
light.h \
|
||||
tracks.h \
|
||||
node.h
|
||||
|
||||
EXTRA_DIST = \
|
||||
types.txt \
|
||||
chunktable.sed
|
||||
|
||||
chunktable.h: chunk.h chunktable.sed
|
||||
sed -f chunktable.sed chunk.h >chunktable.h
|
||||
|
||||
chunk.c: chunktable.h
|
||||
|
||||
|
||||
588
src/external/lib3ds-1.3.0/lib3ds/Makefile.in
vendored
588
src/external/lib3ds-1.3.0/lib3ds/Makefile.in
vendored
@ -1,588 +0,0 @@
|
||||
# Makefile.in generated by automake 1.10 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = lib3ds
|
||||
DIST_COMMON = $(lib3ds_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(lib3dsdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
lib3ds_la_DEPENDENCIES =
|
||||
am_lib3ds_la_OBJECTS = io.lo vector.lo matrix.lo quat.lo tcb.lo \
|
||||
ease.lo chunk.lo file.lo background.lo atmosphere.lo shadow.lo \
|
||||
viewport.lo material.lo mesh.lo camera.lo light.lo tracks.lo \
|
||||
node.lo
|
||||
lib3ds_la_OBJECTS = $(am_lib3ds_la_OBJECTS)
|
||||
lib3ds_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(lib3ds_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(lib3ds_la_SOURCES)
|
||||
DIST_SOURCES = $(lib3ds_la_SOURCES)
|
||||
lib3dsHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(lib3ds_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIB3DS_MAJOR_VERSION = @LIB3DS_MAJOR_VERSION@
|
||||
LIB3DS_MICRO_VERSION = @LIB3DS_MICRO_VERSION@
|
||||
LIB3DS_MINOR_VERSION = @LIB3DS_MINOR_VERSION@
|
||||
LIB3DS_VERSION = @LIB3DS_VERSION@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
lib3dsdir = $(includedir)/lib3ds
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
lib_LTLIBRARIES = lib3ds.la
|
||||
lib3ds_la_LDFLAGS = \
|
||||
-version-info $(LIB3DS_MINOR_VERSION):$(LIB3DS_MICRO_VERSION):0 \
|
||||
-release $(LIB3DS_MAJOR_VERSION)
|
||||
|
||||
lib3ds_la_LIBADD = -lm
|
||||
lib3ds_la_SOURCES = \
|
||||
io.c \
|
||||
vector.c \
|
||||
matrix.c \
|
||||
quat.c \
|
||||
tcb.c \
|
||||
ease.c \
|
||||
chunktable.h \
|
||||
chunk.c \
|
||||
file.c \
|
||||
background.c \
|
||||
atmosphere.c \
|
||||
shadow.c \
|
||||
viewport.c \
|
||||
material.c \
|
||||
mesh.c \
|
||||
camera.c \
|
||||
light.c \
|
||||
tracks.c \
|
||||
node.c
|
||||
|
||||
lib3ds_HEADERS = \
|
||||
types.h \
|
||||
io.h \
|
||||
vector.h \
|
||||
matrix.h \
|
||||
quat.h \
|
||||
tcb.h \
|
||||
ease.h \
|
||||
chunk.h \
|
||||
file.h \
|
||||
background.h \
|
||||
atmosphere.h \
|
||||
shadow.h \
|
||||
viewport.h \
|
||||
material.h \
|
||||
mesh.h \
|
||||
camera.h \
|
||||
light.h \
|
||||
tracks.h \
|
||||
node.h
|
||||
|
||||
EXTRA_DIST = \
|
||||
types.txt \
|
||||
chunktable.sed
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib3ds/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu lib3ds/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
lib3ds.la: $(lib3ds_la_OBJECTS) $(lib3ds_la_DEPENDENCIES)
|
||||
$(lib3ds_la_LINK) -rpath $(libdir) $(lib3ds_la_OBJECTS) $(lib3ds_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atmosphere.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/background.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camera.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chunk.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ease.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/light.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesh.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quat.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shadow.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcb.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tracks.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/viewport.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-lib3dsHEADERS: $(lib3ds_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(lib3dsdir)" || $(MKDIR_P) "$(DESTDIR)$(lib3dsdir)"
|
||||
@list='$(lib3ds_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(lib3dsHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(lib3dsdir)/$$f'"; \
|
||||
$(lib3dsHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(lib3dsdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-lib3dsHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib3ds_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(lib3dsdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(lib3dsdir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(lib3dsdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-lib3dsHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-lib3dsHEADERS uninstall-libLTLIBRARIES
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am \
|
||||
install-lib3dsHEADERS install-libLTLIBRARIES install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-lib3dsHEADERS uninstall-libLTLIBRARIES
|
||||
|
||||
#
|
||||
# The 3D Studio File Format Library
|
||||
# Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
# License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.15 2007/06/15 09:53:20 jeh Exp $
|
||||
#
|
||||
|
||||
chunktable.h: chunk.h chunktable.sed
|
||||
sed -f chunktable.sed chunk.h >chunktable.h
|
||||
|
||||
chunk.c: chunktable.h
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
296
src/external/lib3ds-1.3.0/lib3ds/atmosphere.c
vendored
296
src/external/lib3ds-1.3.0/lib3ds/atmosphere.c
vendored
@ -1,296 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: atmosphere.c,v 1.12 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/atmosphere.h>
|
||||
#include <lib3ds/chunk.h>
|
||||
#include <lib3ds/io.h>
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup atmosphere Atmosphere Settings
|
||||
*/
|
||||
|
||||
|
||||
static Lib3dsBool
|
||||
fog_read(Lib3dsFog *fog, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
Lib3dsWord chunk;
|
||||
|
||||
if (!lib3ds_chunk_read_start(&c, LIB3DS_FOG, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
fog->near_plane = lib3ds_io_read_float(io);
|
||||
fog->near_density=lib3ds_io_read_float(io);
|
||||
fog->far_plane=lib3ds_io_read_float(io);
|
||||
fog->far_density=lib3ds_io_read_float(io);
|
||||
lib3ds_chunk_read_tell(&c, io);
|
||||
|
||||
while ((chunk=lib3ds_chunk_read_next(&c, io))!=0) {
|
||||
switch (chunk) {
|
||||
case LIB3DS_LIN_COLOR_F:
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
fog->col[i]=lib3ds_io_read_float(io);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LIB3DS_COLOR_F:
|
||||
break;
|
||||
case LIB3DS_FOG_BGND:
|
||||
{
|
||||
fog->fog_background=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
lib3ds_chunk_unknown(chunk);
|
||||
}
|
||||
}
|
||||
|
||||
lib3ds_chunk_read_end(&c, io);
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
static Lib3dsBool
|
||||
layer_fog_read(Lib3dsLayerFog *fog, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
Lib3dsWord chunk;
|
||||
Lib3dsBool have_lin=LIB3DS_FALSE;
|
||||
|
||||
if (!lib3ds_chunk_read_start(&c, LIB3DS_LAYER_FOG, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
fog->near_y=lib3ds_io_read_float(io);
|
||||
fog->far_y=lib3ds_io_read_float(io);
|
||||
fog->density=lib3ds_io_read_float(io);
|
||||
fog->flags=lib3ds_io_read_dword(io);
|
||||
lib3ds_chunk_read_tell(&c, io);
|
||||
|
||||
while ((chunk=lib3ds_chunk_read_next(&c, io))!=0) {
|
||||
switch (chunk) {
|
||||
case LIB3DS_LIN_COLOR_F:
|
||||
lib3ds_io_read_rgb(io, fog->col);
|
||||
have_lin=LIB3DS_TRUE;
|
||||
break;
|
||||
case LIB3DS_COLOR_F:
|
||||
lib3ds_io_read_rgb(io, fog->col);
|
||||
break;
|
||||
default:
|
||||
lib3ds_chunk_unknown(chunk);
|
||||
}
|
||||
}
|
||||
|
||||
lib3ds_chunk_read_end(&c, io);
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
static Lib3dsBool
|
||||
distance_cue_read(Lib3dsDistanceCue *cue, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
Lib3dsWord chunk;
|
||||
|
||||
if (!lib3ds_chunk_read_start(&c, LIB3DS_DISTANCE_CUE, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
cue->near_plane=lib3ds_io_read_float(io);
|
||||
cue->near_dimming=lib3ds_io_read_float(io);
|
||||
cue->far_plane=lib3ds_io_read_float(io);
|
||||
cue->far_dimming=lib3ds_io_read_float(io);
|
||||
lib3ds_chunk_read_tell(&c, io);
|
||||
|
||||
while ((chunk=lib3ds_chunk_read_next(&c, io))!=0) {
|
||||
switch (chunk) {
|
||||
case LIB3DS_DCUE_BGND:
|
||||
{
|
||||
cue->cue_background=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
lib3ds_chunk_unknown(chunk);
|
||||
}
|
||||
}
|
||||
|
||||
lib3ds_chunk_read_end(&c, io);
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup atmosphere
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_atmosphere_read(Lib3dsAtmosphere *atmosphere, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
|
||||
if (!lib3ds_chunk_read(&c, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
|
||||
switch (c.chunk) {
|
||||
case LIB3DS_FOG:
|
||||
{
|
||||
lib3ds_chunk_read_reset(&c, io);
|
||||
if (!fog_read(&atmosphere->fog, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LIB3DS_LAYER_FOG:
|
||||
{
|
||||
lib3ds_chunk_read_reset(&c, io);
|
||||
if (!layer_fog_read(&atmosphere->layer_fog, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DISTANCE_CUE:
|
||||
{
|
||||
lib3ds_chunk_read_reset(&c, io);
|
||||
if (!distance_cue_read(&atmosphere->dist_cue, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LIB3DS_USE_FOG:
|
||||
{
|
||||
atmosphere->fog.use=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
case LIB3DS_USE_LAYER_FOG:
|
||||
{
|
||||
atmosphere->fog.use=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
case LIB3DS_USE_DISTANCE_CUE:
|
||||
{
|
||||
atmosphere->dist_cue.use=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup atmosphere
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_atmosphere_write(Lib3dsAtmosphere *atmosphere, Lib3dsIo *io)
|
||||
{
|
||||
if (atmosphere->fog.use) { /*---- LIB3DS_FOG ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_FOG;
|
||||
if (!lib3ds_chunk_write_start(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
lib3ds_io_write_float(io, atmosphere->fog.near_plane);
|
||||
lib3ds_io_write_float(io, atmosphere->fog.near_density);
|
||||
lib3ds_io_write_float(io, atmosphere->fog.far_plane);
|
||||
lib3ds_io_write_float(io, atmosphere->fog.far_density);
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_COLOR_F;
|
||||
c.size=18;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_rgb(io, atmosphere->fog.col);
|
||||
}
|
||||
if (atmosphere->fog.fog_background) {
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_FOG_BGND;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
}
|
||||
if (!lib3ds_chunk_write_end(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
if (atmosphere->layer_fog.use) { /*---- LIB3DS_LAYER_FOG ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_LAYER_FOG;
|
||||
c.size=40;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_float(io, atmosphere->layer_fog.near_y);
|
||||
lib3ds_io_write_float(io, atmosphere->layer_fog.far_y);
|
||||
lib3ds_io_write_float(io, atmosphere->layer_fog.near_y);
|
||||
lib3ds_io_write_dword(io, atmosphere->layer_fog.flags);
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_COLOR_F;
|
||||
c.size=18;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_rgb(io, atmosphere->fog.col);
|
||||
}
|
||||
}
|
||||
|
||||
if (atmosphere->dist_cue.use) { /*---- LIB3DS_DISTANCE_CUE ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DISTANCE_CUE;
|
||||
if (!lib3ds_chunk_write_start(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
lib3ds_io_write_float(io, atmosphere->dist_cue.near_plane);
|
||||
lib3ds_io_write_float(io, atmosphere->dist_cue.near_dimming);
|
||||
lib3ds_io_write_float(io, atmosphere->dist_cue.far_plane);
|
||||
lib3ds_io_write_float(io, atmosphere->dist_cue.far_dimming);
|
||||
if (atmosphere->dist_cue.cue_background) {
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DCUE_BGND;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
}
|
||||
if (!lib3ds_chunk_write_end(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
if (atmosphere->fog.use) { /*---- LIB3DS_USE_FOG ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_USE_FOG;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
}
|
||||
|
||||
if (atmosphere->layer_fog.use) { /*---- LIB3DS_USE_LAYER_FOG ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_USE_LAYER_FOG;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
}
|
||||
|
||||
if (atmosphere->dist_cue.use) { /*---- LIB3DS_USE_DISTANCE_CUE ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_USE_V_GRADIENT;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
}
|
||||
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
100
src/external/lib3ds-1.3.0/lib3ds/atmosphere.h
vendored
100
src/external/lib3ds-1.3.0/lib3ds/atmosphere.h
vendored
@ -1,100 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_ATMOSPHERE_H
|
||||
#define INCLUDED_LIB3DS_ATMOSPHERE_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: atmosphere.h,v 1.8 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Fog atmosphere settings
|
||||
* \ingroup atmosphere
|
||||
*/
|
||||
typedef struct Lib3dsFog {
|
||||
Lib3dsBool use;
|
||||
Lib3dsRgb col;
|
||||
Lib3dsBool fog_background;
|
||||
Lib3dsFloat near_plane;
|
||||
Lib3dsFloat near_density;
|
||||
Lib3dsFloat far_plane;
|
||||
Lib3dsFloat far_density;
|
||||
} Lib3dsFog;
|
||||
|
||||
/**
|
||||
* Layer fog atmosphere flags
|
||||
* \ingroup atmosphere
|
||||
*/
|
||||
typedef enum Lib3dsLayerFogFlags {
|
||||
LIB3DS_BOTTOM_FALL_OFF =0x00000001,
|
||||
LIB3DS_TOP_FALL_OFF =0x00000002,
|
||||
LIB3DS_FOG_BACKGROUND =0x00100000
|
||||
} Lib3dsLayerFogFlags;
|
||||
|
||||
/**
|
||||
* Layer fog atmosphere settings
|
||||
* \ingroup atmosphere
|
||||
*/
|
||||
typedef struct Lib3dsLayerFog {
|
||||
Lib3dsBool use;
|
||||
Lib3dsDword flags;
|
||||
Lib3dsRgb col;
|
||||
Lib3dsFloat near_y;
|
||||
Lib3dsFloat far_y;
|
||||
Lib3dsFloat density;
|
||||
} Lib3dsLayerFog;
|
||||
|
||||
/**
|
||||
* Distance cue atmosphere settings
|
||||
* \ingroup atmosphere
|
||||
*/
|
||||
typedef struct Lib3dsDistanceCue {
|
||||
Lib3dsBool use;
|
||||
Lib3dsBool cue_background;
|
||||
Lib3dsFloat near_plane;
|
||||
Lib3dsFloat near_dimming;
|
||||
Lib3dsFloat far_plane;
|
||||
Lib3dsFloat far_dimming;
|
||||
} Lib3dsDistanceCue;
|
||||
|
||||
/**
|
||||
* Atmosphere settings
|
||||
* \ingroup atmosphere
|
||||
*/
|
||||
struct Lib3dsAtmosphere {
|
||||
Lib3dsFog fog;
|
||||
Lib3dsLayerFog layer_fog;
|
||||
Lib3dsDistanceCue dist_cue;
|
||||
};
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_atmosphere_read(Lib3dsAtmosphere *atmosphere, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_atmosphere_write(Lib3dsAtmosphere *atmosphere, Lib3dsIo *io);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
255
src/external/lib3ds-1.3.0/lib3ds/background.c
vendored
255
src/external/lib3ds-1.3.0/lib3ds/background.c
vendored
@ -1,255 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: background.c,v 1.12 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/background.h>
|
||||
#include <lib3ds/chunk.h>
|
||||
#include <lib3ds/io.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup background Background Settings
|
||||
*/
|
||||
|
||||
|
||||
static Lib3dsBool
|
||||
solid_bgnd_read(Lib3dsBackground *background, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
Lib3dsWord chunk;
|
||||
Lib3dsBool have_lin=LIB3DS_FALSE;
|
||||
|
||||
if (!lib3ds_chunk_read_start(&c, LIB3DS_SOLID_BGND, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
|
||||
while ((chunk=lib3ds_chunk_read_next(&c, io))!=0) {
|
||||
switch (chunk) {
|
||||
case LIB3DS_LIN_COLOR_F:
|
||||
lib3ds_io_read_rgb(io, background->solid.col);
|
||||
have_lin=LIB3DS_TRUE;
|
||||
break;
|
||||
case LIB3DS_COLOR_F:
|
||||
lib3ds_io_read_rgb(io, background->solid.col);
|
||||
break;
|
||||
default:
|
||||
lib3ds_chunk_unknown(chunk);
|
||||
}
|
||||
}
|
||||
|
||||
lib3ds_chunk_read_end(&c, io);
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
static Lib3dsBool
|
||||
v_gradient_read(Lib3dsBackground *background, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
Lib3dsWord chunk;
|
||||
int index[2];
|
||||
Lib3dsRgb col[2][3];
|
||||
int have_lin=0;
|
||||
|
||||
|
||||
if (!lib3ds_chunk_read_start(&c, LIB3DS_V_GRADIENT, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
background->gradient.percent=lib3ds_io_read_float(io);
|
||||
lib3ds_chunk_read_tell(&c, io);
|
||||
|
||||
index[0]=index[1]=0;
|
||||
while ((chunk=lib3ds_chunk_read_next(&c, io))!=0) {
|
||||
switch (chunk) {
|
||||
case LIB3DS_COLOR_F:
|
||||
lib3ds_io_read_rgb(io, col[0][index[0]]);
|
||||
index[0]++;
|
||||
break;
|
||||
case LIB3DS_LIN_COLOR_F:
|
||||
lib3ds_io_read_rgb(io, col[1][index[1]]);
|
||||
index[1]++;
|
||||
have_lin=1;
|
||||
break;
|
||||
default:
|
||||
lib3ds_chunk_unknown(chunk);
|
||||
}
|
||||
}
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
background->gradient.top[i]=col[have_lin][0][i];
|
||||
background->gradient.middle[i]=col[have_lin][1][i];
|
||||
background->gradient.bottom[i]=col[have_lin][2][i];
|
||||
}
|
||||
}
|
||||
lib3ds_chunk_read_end(&c, io);
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup background
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_background_read(Lib3dsBackground *background, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
|
||||
if (!lib3ds_chunk_read(&c, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
|
||||
switch (c.chunk) {
|
||||
case LIB3DS_BIT_MAP:
|
||||
{
|
||||
if (!lib3ds_io_read_string(io, background->bitmap.name, 64)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LIB3DS_SOLID_BGND:
|
||||
{
|
||||
lib3ds_chunk_read_reset(&c, io);
|
||||
if (!solid_bgnd_read(background, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LIB3DS_V_GRADIENT:
|
||||
{
|
||||
lib3ds_chunk_read_reset(&c, io);
|
||||
if (!v_gradient_read(background, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LIB3DS_USE_BIT_MAP:
|
||||
{
|
||||
background->bitmap.use=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
case LIB3DS_USE_SOLID_BGND:
|
||||
{
|
||||
background->solid.use=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
case LIB3DS_USE_V_GRADIENT:
|
||||
{
|
||||
background->gradient.use=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
static Lib3dsBool
|
||||
colorf_write(Lib3dsRgba rgb, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
|
||||
c.chunk=LIB3DS_COLOR_F;
|
||||
c.size=18;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_rgb(io, rgb);
|
||||
|
||||
c.chunk=LIB3DS_LIN_COLOR_F;
|
||||
c.size=18;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_rgb(io, rgb);
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
static Lib3dsBool
|
||||
colorf_defined(Lib3dsRgba rgb)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
if (fabs(rgb[i])>LIB3DS_EPSILON) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return(i<3);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup background
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_background_write(Lib3dsBackground *background, Lib3dsIo *io)
|
||||
{
|
||||
if (strlen(background->bitmap.name)) { /*---- LIB3DS_BIT_MAP ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_BIT_MAP;
|
||||
c.size=6+1+(Lib3dsDword)strlen(background->bitmap.name);
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_string(io, background->bitmap.name);
|
||||
}
|
||||
|
||||
if (colorf_defined(background->solid.col)) { /*---- LIB3DS_SOLID_BGND ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_SOLID_BGND;
|
||||
c.size=42;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
colorf_write(background->solid.col, io);
|
||||
}
|
||||
|
||||
if (colorf_defined(background->gradient.top) ||
|
||||
colorf_defined(background->gradient.middle) ||
|
||||
colorf_defined(background->gradient.bottom)) { /*---- LIB3DS_V_GRADIENT ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_V_GRADIENT;
|
||||
c.size=118;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_float(io, background->gradient.percent);
|
||||
colorf_write(background->gradient.top,io);
|
||||
colorf_write(background->gradient.middle,io);
|
||||
colorf_write(background->gradient.bottom,io);
|
||||
}
|
||||
|
||||
if (background->bitmap.use) { /*---- LIB3DS_USE_BIT_MAP ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_USE_BIT_MAP;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
}
|
||||
|
||||
if (background->solid.use) { /*---- LIB3DS_USE_SOLID_BGND ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_USE_SOLID_BGND;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
}
|
||||
|
||||
if (background->gradient.use) { /*---- LIB3DS_USE_V_GRADIENT ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_USE_V_GRADIENT;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
}
|
||||
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
85
src/external/lib3ds-1.3.0/lib3ds/background.h
vendored
85
src/external/lib3ds-1.3.0/lib3ds/background.h
vendored
@ -1,85 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_BACKGROUND_H
|
||||
#define INCLUDED_LIB3DS_BACKGROUND_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: background.h,v 1.8 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Bitmap background settings
|
||||
* \ingroup background
|
||||
*/
|
||||
typedef struct Lib3dsBitmap {
|
||||
Lib3dsBool use;
|
||||
char name[64];
|
||||
} Lib3dsBitmap;
|
||||
|
||||
/**
|
||||
* Solid color background settings
|
||||
* \ingroup background
|
||||
*/
|
||||
typedef struct Lib3dsSolid {
|
||||
Lib3dsBool use;
|
||||
Lib3dsRgb col;
|
||||
} Lib3dsSolid;
|
||||
|
||||
/**
|
||||
* Gradient background settings
|
||||
* \ingroup background
|
||||
*/
|
||||
typedef struct Lib3dsGradient {
|
||||
Lib3dsBool use;
|
||||
Lib3dsFloat percent;
|
||||
Lib3dsRgb top;
|
||||
Lib3dsRgb middle;
|
||||
Lib3dsRgb bottom;
|
||||
} Lib3dsGradient;
|
||||
|
||||
/**
|
||||
* Background settings
|
||||
* \ingroup background
|
||||
*/
|
||||
struct Lib3dsBackground {
|
||||
Lib3dsBitmap bitmap;
|
||||
Lib3dsSolid solid;
|
||||
Lib3dsGradient gradient;
|
||||
};
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_background_read(Lib3dsBackground *background, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_background_write(Lib3dsBackground *background, Lib3dsIo *io);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
231
src/external/lib3ds-1.3.0/lib3ds/camera.c
vendored
231
src/external/lib3ds-1.3.0/lib3ds/camera.c
vendored
@ -1,231 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: camera.c,v 1.17 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/camera.h>
|
||||
#include <lib3ds/chunk.h>
|
||||
#include <lib3ds/io.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup camera Cameras
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
* Return a new Lib3dsCamera object.
|
||||
*
|
||||
* Object is initialized with the given name and fov=45. All other
|
||||
* values are 0.
|
||||
*
|
||||
* \param name Name of this camera. Must not be NULL. Must be < 64 characters.
|
||||
*
|
||||
* \return Lib3dsCamera object or NULL on failure.
|
||||
*
|
||||
* \ingroup camera
|
||||
*/
|
||||
Lib3dsCamera*
|
||||
lib3ds_camera_new(const char *name)
|
||||
{
|
||||
Lib3dsCamera *camera;
|
||||
|
||||
ASSERT(name);
|
||||
ASSERT(strlen(name)<64);
|
||||
|
||||
camera=(Lib3dsCamera*)calloc(sizeof(Lib3dsCamera), 1);
|
||||
if (!camera) {
|
||||
return(0);
|
||||
}
|
||||
strcpy(camera->name, name);
|
||||
camera->fov=45.0f;
|
||||
return(camera);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Free a Lib3dsCamera object and all of its resources.
|
||||
*
|
||||
* \param camera Lib3dsCamera object to be freed.
|
||||
*
|
||||
* \ingroup camera
|
||||
*/
|
||||
void
|
||||
lib3ds_camera_free(Lib3dsCamera *camera)
|
||||
{
|
||||
memset(camera, 0, sizeof(Lib3dsCamera));
|
||||
free(camera);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Dump information about a Lib3dsCamera object to stdout.
|
||||
*
|
||||
* \param camera Object to be dumped.
|
||||
*
|
||||
* \see lib3ds_file_dump_cameras
|
||||
*
|
||||
* \ingroup camera
|
||||
*/
|
||||
void
|
||||
lib3ds_camera_dump(Lib3dsCamera *camera)
|
||||
{
|
||||
ASSERT(camera);
|
||||
printf(" name: %s\n", camera->name);
|
||||
printf(" position: (%f, %f, %f)\n",
|
||||
camera->position[0], camera->position[1], camera->position[2]);
|
||||
printf(" target (%f, %f, %f)\n",
|
||||
camera->target[0], camera->target[1], camera->target[2]);
|
||||
printf(" roll: %f\n", camera->roll);
|
||||
printf(" fov: %f\n", camera->fov);
|
||||
printf(" see_cone: %s\n", camera->see_cone ? "yes" : "no");
|
||||
printf(" near_range: %f\n", camera->near_range);
|
||||
printf(" far_range: %f\n", camera->far_range);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Read a camera definition from a file.
|
||||
*
|
||||
* This function is called by lib3ds_file_read(), and you probably
|
||||
* don't want to call it directly.
|
||||
*
|
||||
* \param camera A Lib3dsCamera to be filled in.
|
||||
* \param io A Lib3dsIo object previously set up by the caller.
|
||||
*
|
||||
* \return LIB3DS_TRUE on success, LIB3DS_FALSE on failure.
|
||||
*
|
||||
* \see lib3ds_file_read
|
||||
*
|
||||
* \ingroup camera
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_camera_read(Lib3dsCamera *camera, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
Lib3dsWord chunk;
|
||||
|
||||
if (!lib3ds_chunk_read_start(&c, LIB3DS_N_CAMERA, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
camera->position[i]=lib3ds_io_read_float(io);
|
||||
}
|
||||
for (i=0; i<3; ++i) {
|
||||
camera->target[i]=lib3ds_io_read_float(io);
|
||||
}
|
||||
}
|
||||
camera->roll=lib3ds_io_read_float(io);
|
||||
{
|
||||
float s;
|
||||
s=lib3ds_io_read_float(io);
|
||||
if (fabs(s)<LIB3DS_EPSILON) {
|
||||
camera->fov=45.0;
|
||||
}
|
||||
else {
|
||||
camera->fov=2400.0f/s;
|
||||
}
|
||||
}
|
||||
lib3ds_chunk_read_tell(&c, io);
|
||||
|
||||
while ((chunk=lib3ds_chunk_read_next(&c, io))!=0) {
|
||||
switch (chunk) {
|
||||
case LIB3DS_CAM_SEE_CONE:
|
||||
{
|
||||
camera->see_cone=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
case LIB3DS_CAM_RANGES:
|
||||
{
|
||||
camera->near_range=lib3ds_io_read_float(io);
|
||||
camera->far_range=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
lib3ds_chunk_unknown(chunk);
|
||||
}
|
||||
}
|
||||
|
||||
lib3ds_chunk_read_end(&c, io);
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Write a camera definition to a file.
|
||||
*
|
||||
* This function is called by lib3ds_file_write(), and you probably
|
||||
* don't want to call it directly.
|
||||
*
|
||||
* \param camera A Lib3dsCamera to be written.
|
||||
* \param io A Lib3dsIo object previously set up by the caller.
|
||||
*
|
||||
* \return LIB3DS_TRUE on success, LIB3DS_FALSE on failure.
|
||||
*
|
||||
* \see lib3ds_file_write
|
||||
*
|
||||
* \ingroup camera
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_camera_write(Lib3dsCamera *camera, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
|
||||
c.chunk=LIB3DS_N_CAMERA;
|
||||
if (!lib3ds_chunk_write_start(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
|
||||
lib3ds_io_write_vector(io, camera->position);
|
||||
lib3ds_io_write_vector(io, camera->target);
|
||||
lib3ds_io_write_float(io, camera->roll);
|
||||
if (fabs(camera->fov)<LIB3DS_EPSILON) {
|
||||
lib3ds_io_write_float(io, 2400.0f/45.0f);
|
||||
}
|
||||
else {
|
||||
lib3ds_io_write_float(io, 2400.0f/camera->fov);
|
||||
}
|
||||
|
||||
if (camera->see_cone) {
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_CAM_SEE_CONE;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
}
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_CAM_RANGES;
|
||||
c.size=14;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
lib3ds_io_write_float(io, camera->near_range);
|
||||
lib3ds_io_write_float(io, camera->far_range);
|
||||
}
|
||||
|
||||
if (!lib3ds_chunk_write_end(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
61
src/external/lib3ds-1.3.0/lib3ds/camera.h
vendored
61
src/external/lib3ds-1.3.0/lib3ds/camera.h
vendored
@ -1,61 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_CAMERA_H
|
||||
#define INCLUDED_LIB3DS_CAMERA_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: camera.h,v 1.11 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Camera object
|
||||
* \ingroup camera
|
||||
*/
|
||||
struct Lib3dsCamera {
|
||||
Lib3dsCamera *next;
|
||||
char name[64];
|
||||
Lib3dsDword object_flags; /*< @see Lib3dsObjectFlags */
|
||||
Lib3dsVector position;
|
||||
Lib3dsVector target;
|
||||
Lib3dsFloat roll;
|
||||
Lib3dsFloat fov;
|
||||
Lib3dsBool see_cone;
|
||||
Lib3dsFloat near_range;
|
||||
Lib3dsFloat far_range;
|
||||
};
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsCamera* lib3ds_camera_new(const char *name);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_camera_free(Lib3dsCamera *mesh);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_camera_dump(Lib3dsCamera *camera);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_camera_read(Lib3dsCamera *camera, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_camera_write(Lib3dsCamera *camera, Lib3dsIo *io);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
317
src/external/lib3ds-1.3.0/lib3ds/chunk.c
vendored
317
src/external/lib3ds-1.3.0/lib3ds/chunk.c
vendored
@ -1,317 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: chunk.c,v 1.18 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/chunk.h>
|
||||
#include <lib3ds/io.h>
|
||||
#include <lib3ds/chunktable.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
/*#define LIB3DS_CHUNK_DEBUG*/
|
||||
/*#define LIB3DS_CHUNK_WARNING*/
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup chunk Chunk Handling
|
||||
*/
|
||||
|
||||
|
||||
static Lib3dsBool enable_dump=LIB3DS_FALSE;
|
||||
static Lib3dsBool enable_unknown=LIB3DS_FALSE;
|
||||
static char lib3ds_chunk_level[128]="";
|
||||
|
||||
|
||||
static void
|
||||
lib3ds_chunk_debug_enter(Lib3dsChunk *c)
|
||||
{
|
||||
strcat(lib3ds_chunk_level, " ");
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
lib3ds_chunk_debug_leave(Lib3dsChunk *c)
|
||||
{
|
||||
lib3ds_chunk_level[strlen(lib3ds_chunk_level)-2]=0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
lib3ds_chunk_debug_dump(Lib3dsChunk *c)
|
||||
{
|
||||
if (enable_dump) {
|
||||
printf("%s%s (0x%X) size=%lu\n",
|
||||
lib3ds_chunk_level,
|
||||
lib3ds_chunk_name(c->chunk),
|
||||
c->chunk,
|
||||
c->size
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*/
|
||||
void
|
||||
lib3ds_chunk_enable_dump(Lib3dsBool enable, Lib3dsBool unknown)
|
||||
{
|
||||
enable_dump=enable;
|
||||
enable_unknown=unknown;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*
|
||||
* Reads a 3d-Studio chunk header from a little endian file stream.
|
||||
*
|
||||
* \param c The chunk to store the data.
|
||||
* \param io The file stream.
|
||||
*
|
||||
* \return True on success, False otherwise.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_chunk_read(Lib3dsChunk *c, Lib3dsIo *io)
|
||||
{
|
||||
ASSERT(c);
|
||||
ASSERT(io);
|
||||
c->cur=lib3ds_io_tell(io);
|
||||
c->chunk=lib3ds_io_read_word(io);
|
||||
c->size=lib3ds_io_read_dword(io);
|
||||
c->end=c->cur+c->size;
|
||||
c->cur+=6;
|
||||
if (lib3ds_io_error(io) || (c->size<6)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_chunk_read_start(Lib3dsChunk *c, Lib3dsWord chunk, Lib3dsIo *io)
|
||||
{
|
||||
ASSERT(c);
|
||||
ASSERT(io);
|
||||
if (!lib3ds_chunk_read(c, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
lib3ds_chunk_debug_enter(c);
|
||||
return((chunk==0) || (c->chunk==chunk));
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*/
|
||||
void
|
||||
lib3ds_chunk_read_tell(Lib3dsChunk *c, Lib3dsIo *io)
|
||||
{
|
||||
c->cur=lib3ds_io_tell(io);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*/
|
||||
Lib3dsWord
|
||||
lib3ds_chunk_read_next(Lib3dsChunk *c, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk d;
|
||||
|
||||
if (c->cur>=c->end) {
|
||||
ASSERT(c->cur==c->end);
|
||||
return(0);
|
||||
}
|
||||
|
||||
lib3ds_io_seek(io, (long)c->cur, LIB3DS_SEEK_SET);
|
||||
d.chunk=lib3ds_io_read_word(io);
|
||||
d.size=lib3ds_io_read_dword(io);
|
||||
lib3ds_chunk_debug_dump(&d);
|
||||
c->cur+=d.size;
|
||||
return(d.chunk);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*/
|
||||
void
|
||||
lib3ds_chunk_read_reset(Lib3dsChunk *c, Lib3dsIo *io)
|
||||
{
|
||||
lib3ds_io_seek(io, -6, LIB3DS_SEEK_CUR);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*/
|
||||
void
|
||||
lib3ds_chunk_read_end(Lib3dsChunk *c, Lib3dsIo *io)
|
||||
{
|
||||
lib3ds_chunk_debug_leave(c);
|
||||
lib3ds_io_seek(io, c->end, LIB3DS_SEEK_SET);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*
|
||||
* Writes a 3d-Studio chunk header into a little endian file stream.
|
||||
*
|
||||
* \param c The chunk to be written.
|
||||
* \param io The file stream.
|
||||
*
|
||||
* \return True on success, False otherwise.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_chunk_write(Lib3dsChunk *c, Lib3dsIo *io)
|
||||
{
|
||||
ASSERT(c);
|
||||
if (!lib3ds_io_write_word(io, c->chunk)) {
|
||||
LIB3DS_ERROR_LOG;
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
if (!lib3ds_io_write_dword(io, c->size)) {
|
||||
LIB3DS_ERROR_LOG;
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_chunk_write_start(Lib3dsChunk *c, Lib3dsIo *io)
|
||||
{
|
||||
ASSERT(c);
|
||||
c->size=0;
|
||||
c->cur=lib3ds_io_tell(io);
|
||||
if (!lib3ds_io_write_word(io, c->chunk)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
if (!lib3ds_io_write_dword(io, c->size)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_chunk_write_end(Lib3dsChunk *c, Lib3dsIo *io)
|
||||
{
|
||||
ASSERT(c);
|
||||
c->size=lib3ds_io_tell(io) - c->cur;
|
||||
lib3ds_io_seek(io, c->cur+2, LIB3DS_SEEK_SET);
|
||||
if (!lib3ds_io_write_dword(io, c->size)) {
|
||||
LIB3DS_ERROR_LOG;
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
|
||||
c->cur+=c->size;
|
||||
lib3ds_io_seek(io, c->cur, LIB3DS_SEEK_SET);
|
||||
if (lib3ds_io_error(io)) {
|
||||
LIB3DS_ERROR_LOG;
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_chunk_write_switch(Lib3dsWord chunk, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=chunk;
|
||||
c.size=6;
|
||||
return lib3ds_chunk_write(&c,io);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*/
|
||||
const char*
|
||||
lib3ds_chunk_name(Lib3dsWord chunk)
|
||||
{
|
||||
Lib3dsChunkTable *p;
|
||||
|
||||
for (p=lib3ds_chunk_table; p->name!=0; ++p) {
|
||||
if (p->chunk==chunk) {
|
||||
return(p->name);
|
||||
}
|
||||
}
|
||||
return("***UNKNOWN***");
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*/
|
||||
void
|
||||
lib3ds_chunk_unknown(Lib3dsWord chunk)
|
||||
{
|
||||
if (enable_unknown) {
|
||||
printf("%s***WARNING*** Unknown Chunk: %s (0x%X)\n",
|
||||
lib3ds_chunk_level,
|
||||
lib3ds_chunk_name(chunk),
|
||||
chunk
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup chunk
|
||||
*/
|
||||
void
|
||||
lib3ds_chunk_dump_info(const char *format, ...)
|
||||
{
|
||||
if (enable_dump) {
|
||||
char s[1024];
|
||||
va_list marker;
|
||||
|
||||
va_start(marker, format);
|
||||
vsprintf(s, format, marker);
|
||||
va_end(marker);
|
||||
|
||||
printf("%s%s\n", lib3ds_chunk_level, s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
290
src/external/lib3ds-1.3.0/lib3ds/chunk.h
vendored
290
src/external/lib3ds-1.3.0/lib3ds/chunk.h
vendored
@ -1,290 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_CHUNK_H
|
||||
#define INCLUDED_LIB3DS_CHUNK_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: chunk.h,v 1.16 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum _Lib3dsChunks {
|
||||
LIB3DS_NULL_CHUNK =0x0000,
|
||||
LIB3DS_M3DMAGIC =0x4D4D, /*3DS file*/
|
||||
LIB3DS_SMAGIC =0x2D2D,
|
||||
LIB3DS_LMAGIC =0x2D3D,
|
||||
LIB3DS_MLIBMAGIC =0x3DAA, /*MLI file*/
|
||||
LIB3DS_MATMAGIC =0x3DFF,
|
||||
LIB3DS_CMAGIC =0xC23D, /*PRJ file*/
|
||||
LIB3DS_M3D_VERSION =0x0002,
|
||||
LIB3DS_M3D_KFVERSION =0x0005,
|
||||
|
||||
LIB3DS_COLOR_F =0x0010,
|
||||
LIB3DS_COLOR_24 =0x0011,
|
||||
LIB3DS_LIN_COLOR_24 =0x0012,
|
||||
LIB3DS_LIN_COLOR_F =0x0013,
|
||||
LIB3DS_INT_PERCENTAGE =0x0030,
|
||||
LIB3DS_FLOAT_PERCENTAGE =0x0031,
|
||||
|
||||
LIB3DS_MDATA =0x3D3D,
|
||||
LIB3DS_MESH_VERSION =0x3D3E,
|
||||
LIB3DS_MASTER_SCALE =0x0100,
|
||||
LIB3DS_LO_SHADOW_BIAS =0x1400,
|
||||
LIB3DS_HI_SHADOW_BIAS =0x1410,
|
||||
LIB3DS_SHADOW_MAP_SIZE =0x1420,
|
||||
LIB3DS_SHADOW_SAMPLES =0x1430,
|
||||
LIB3DS_SHADOW_RANGE =0x1440,
|
||||
LIB3DS_SHADOW_FILTER =0x1450,
|
||||
LIB3DS_RAY_BIAS =0x1460,
|
||||
LIB3DS_O_CONSTS =0x1500,
|
||||
LIB3DS_AMBIENT_LIGHT =0x2100,
|
||||
LIB3DS_BIT_MAP =0x1100,
|
||||
LIB3DS_SOLID_BGND =0x1200,
|
||||
LIB3DS_V_GRADIENT =0x1300,
|
||||
LIB3DS_USE_BIT_MAP =0x1101,
|
||||
LIB3DS_USE_SOLID_BGND =0x1201,
|
||||
LIB3DS_USE_V_GRADIENT =0x1301,
|
||||
LIB3DS_FOG =0x2200,
|
||||
LIB3DS_FOG_BGND =0x2210,
|
||||
LIB3DS_LAYER_FOG =0x2302,
|
||||
LIB3DS_DISTANCE_CUE =0x2300,
|
||||
LIB3DS_DCUE_BGND =0x2310,
|
||||
LIB3DS_USE_FOG =0x2201,
|
||||
LIB3DS_USE_LAYER_FOG =0x2303,
|
||||
LIB3DS_USE_DISTANCE_CUE =0x2301,
|
||||
|
||||
LIB3DS_MAT_ENTRY =0xAFFF,
|
||||
LIB3DS_MAT_NAME =0xA000,
|
||||
LIB3DS_MAT_AMBIENT =0xA010,
|
||||
LIB3DS_MAT_DIFFUSE =0xA020,
|
||||
LIB3DS_MAT_SPECULAR =0xA030,
|
||||
LIB3DS_MAT_SHININESS =0xA040,
|
||||
LIB3DS_MAT_SHIN2PCT =0xA041,
|
||||
LIB3DS_MAT_TRANSPARENCY =0xA050,
|
||||
LIB3DS_MAT_XPFALL =0xA052,
|
||||
LIB3DS_MAT_USE_XPFALL =0xA240,
|
||||
LIB3DS_MAT_REFBLUR =0xA053,
|
||||
LIB3DS_MAT_SHADING =0xA100,
|
||||
LIB3DS_MAT_USE_REFBLUR =0xA250,
|
||||
LIB3DS_MAT_SELF_ILLUM =0xA080,
|
||||
LIB3DS_MAT_TWO_SIDE =0xA081,
|
||||
LIB3DS_MAT_DECAL =0xA082,
|
||||
LIB3DS_MAT_ADDITIVE =0xA083,
|
||||
LIB3DS_MAT_SELF_ILPCT =0xA084,
|
||||
LIB3DS_MAT_WIRE =0xA085,
|
||||
LIB3DS_MAT_FACEMAP =0xA088,
|
||||
LIB3DS_MAT_PHONGSOFT =0xA08C,
|
||||
LIB3DS_MAT_WIREABS =0xA08E,
|
||||
LIB3DS_MAT_WIRE_SIZE =0xA087,
|
||||
LIB3DS_MAT_TEXMAP =0xA200,
|
||||
LIB3DS_MAT_SXP_TEXT_DATA =0xA320,
|
||||
LIB3DS_MAT_TEXMASK =0xA33E,
|
||||
LIB3DS_MAT_SXP_TEXTMASK_DATA =0xA32A,
|
||||
LIB3DS_MAT_TEX2MAP =0xA33A,
|
||||
LIB3DS_MAT_SXP_TEXT2_DATA =0xA321,
|
||||
LIB3DS_MAT_TEX2MASK =0xA340,
|
||||
LIB3DS_MAT_SXP_TEXT2MASK_DATA =0xA32C,
|
||||
LIB3DS_MAT_OPACMAP =0xA210,
|
||||
LIB3DS_MAT_SXP_OPAC_DATA =0xA322,
|
||||
LIB3DS_MAT_OPACMASK =0xA342,
|
||||
LIB3DS_MAT_SXP_OPACMASK_DATA =0xA32E,
|
||||
LIB3DS_MAT_BUMPMAP =0xA230,
|
||||
LIB3DS_MAT_SXP_BUMP_DATA =0xA324,
|
||||
LIB3DS_MAT_BUMPMASK =0xA344,
|
||||
LIB3DS_MAT_SXP_BUMPMASK_DATA =0xA330,
|
||||
LIB3DS_MAT_SPECMAP =0xA204,
|
||||
LIB3DS_MAT_SXP_SPEC_DATA =0xA325,
|
||||
LIB3DS_MAT_SPECMASK =0xA348,
|
||||
LIB3DS_MAT_SXP_SPECMASK_DATA =0xA332,
|
||||
LIB3DS_MAT_SHINMAP =0xA33C,
|
||||
LIB3DS_MAT_SXP_SHIN_DATA =0xA326,
|
||||
LIB3DS_MAT_SHINMASK =0xA346,
|
||||
LIB3DS_MAT_SXP_SHINMASK_DATA =0xA334,
|
||||
LIB3DS_MAT_SELFIMAP =0xA33D,
|
||||
LIB3DS_MAT_SXP_SELFI_DATA =0xA328,
|
||||
LIB3DS_MAT_SELFIMASK =0xA34A,
|
||||
LIB3DS_MAT_SXP_SELFIMASK_DATA =0xA336,
|
||||
LIB3DS_MAT_REFLMAP =0xA220,
|
||||
LIB3DS_MAT_REFLMASK =0xA34C,
|
||||
LIB3DS_MAT_SXP_REFLMASK_DATA =0xA338,
|
||||
LIB3DS_MAT_ACUBIC =0xA310,
|
||||
LIB3DS_MAT_MAPNAME =0xA300,
|
||||
LIB3DS_MAT_MAP_TILING =0xA351,
|
||||
LIB3DS_MAT_MAP_TEXBLUR =0xA353,
|
||||
LIB3DS_MAT_MAP_USCALE =0xA354,
|
||||
LIB3DS_MAT_MAP_VSCALE =0xA356,
|
||||
LIB3DS_MAT_MAP_UOFFSET =0xA358,
|
||||
LIB3DS_MAT_MAP_VOFFSET =0xA35A,
|
||||
LIB3DS_MAT_MAP_ANG =0xA35C,
|
||||
LIB3DS_MAT_MAP_COL1 =0xA360,
|
||||
LIB3DS_MAT_MAP_COL2 =0xA362,
|
||||
LIB3DS_MAT_MAP_RCOL =0xA364,
|
||||
LIB3DS_MAT_MAP_GCOL =0xA366,
|
||||
LIB3DS_MAT_MAP_BCOL =0xA368,
|
||||
|
||||
LIB3DS_NAMED_OBJECT =0x4000,
|
||||
LIB3DS_N_DIRECT_LIGHT =0x4600,
|
||||
LIB3DS_DL_OFF =0x4620,
|
||||
LIB3DS_DL_OUTER_RANGE =0x465A,
|
||||
LIB3DS_DL_INNER_RANGE =0x4659,
|
||||
LIB3DS_DL_MULTIPLIER =0x465B,
|
||||
LIB3DS_DL_EXCLUDE =0x4654,
|
||||
LIB3DS_DL_ATTENUATE =0x4625,
|
||||
LIB3DS_DL_SPOTLIGHT =0x4610,
|
||||
LIB3DS_DL_SPOT_ROLL =0x4656,
|
||||
LIB3DS_DL_SHADOWED =0x4630,
|
||||
LIB3DS_DL_LOCAL_SHADOW2 =0x4641,
|
||||
LIB3DS_DL_SEE_CONE =0x4650,
|
||||
LIB3DS_DL_SPOT_RECTANGULAR =0x4651,
|
||||
LIB3DS_DL_SPOT_ASPECT =0x4657,
|
||||
LIB3DS_DL_SPOT_PROJECTOR =0x4653,
|
||||
LIB3DS_DL_SPOT_OVERSHOOT =0x4652,
|
||||
LIB3DS_DL_RAY_BIAS =0x4658,
|
||||
LIB3DS_DL_RAYSHAD =0x4627,
|
||||
LIB3DS_N_CAMERA =0x4700,
|
||||
LIB3DS_CAM_SEE_CONE =0x4710,
|
||||
LIB3DS_CAM_RANGES =0x4720,
|
||||
LIB3DS_OBJ_HIDDEN =0x4010,
|
||||
LIB3DS_OBJ_VIS_LOFTER =0x4011,
|
||||
LIB3DS_OBJ_DOESNT_CAST =0x4012,
|
||||
LIB3DS_OBJ_DONT_RCVSHADOW =0x4017,
|
||||
LIB3DS_OBJ_MATTE =0x4013,
|
||||
LIB3DS_OBJ_FAST =0x4014,
|
||||
LIB3DS_OBJ_PROCEDURAL =0x4015,
|
||||
LIB3DS_OBJ_FROZEN =0x4016,
|
||||
LIB3DS_N_TRI_OBJECT =0x4100,
|
||||
LIB3DS_POINT_ARRAY =0x4110,
|
||||
LIB3DS_POINT_FLAG_ARRAY =0x4111,
|
||||
LIB3DS_FACE_ARRAY =0x4120,
|
||||
LIB3DS_MSH_MAT_GROUP =0x4130,
|
||||
LIB3DS_SMOOTH_GROUP =0x4150,
|
||||
LIB3DS_MSH_BOXMAP =0x4190,
|
||||
LIB3DS_TEX_VERTS =0x4140,
|
||||
LIB3DS_MESH_MATRIX =0x4160,
|
||||
LIB3DS_MESH_COLOR =0x4165,
|
||||
LIB3DS_MESH_TEXTURE_INFO =0x4170,
|
||||
|
||||
LIB3DS_KFDATA =0xB000,
|
||||
LIB3DS_KFHDR =0xB00A,
|
||||
LIB3DS_KFSEG =0xB008,
|
||||
LIB3DS_KFCURTIME =0xB009,
|
||||
LIB3DS_AMBIENT_NODE_TAG =0xB001,
|
||||
LIB3DS_OBJECT_NODE_TAG =0xB002,
|
||||
LIB3DS_CAMERA_NODE_TAG =0xB003,
|
||||
LIB3DS_TARGET_NODE_TAG =0xB004,
|
||||
LIB3DS_LIGHT_NODE_TAG =0xB005,
|
||||
LIB3DS_L_TARGET_NODE_TAG =0xB006,
|
||||
LIB3DS_SPOTLIGHT_NODE_TAG =0xB007,
|
||||
LIB3DS_NODE_ID =0xB030,
|
||||
LIB3DS_NODE_HDR =0xB010,
|
||||
LIB3DS_PIVOT =0xB013,
|
||||
LIB3DS_INSTANCE_NAME =0xB011,
|
||||
LIB3DS_MORPH_SMOOTH =0xB015,
|
||||
LIB3DS_BOUNDBOX =0xB014,
|
||||
LIB3DS_POS_TRACK_TAG =0xB020,
|
||||
LIB3DS_COL_TRACK_TAG =0xB025,
|
||||
LIB3DS_ROT_TRACK_TAG =0xB021,
|
||||
LIB3DS_SCL_TRACK_TAG =0xB022,
|
||||
LIB3DS_MORPH_TRACK_TAG =0xB026,
|
||||
LIB3DS_FOV_TRACK_TAG =0xB023,
|
||||
LIB3DS_ROLL_TRACK_TAG =0xB024,
|
||||
LIB3DS_HOT_TRACK_TAG =0xB027,
|
||||
LIB3DS_FALL_TRACK_TAG =0xB028,
|
||||
LIB3DS_HIDE_TRACK_TAG =0xB029,
|
||||
|
||||
LIB3DS_POLY_2D = 0x5000,
|
||||
LIB3DS_SHAPE_OK = 0x5010,
|
||||
LIB3DS_SHAPE_NOT_OK = 0x5011,
|
||||
LIB3DS_SHAPE_HOOK = 0x5020,
|
||||
LIB3DS_PATH_3D = 0x6000,
|
||||
LIB3DS_PATH_MATRIX = 0x6005,
|
||||
LIB3DS_SHAPE_2D = 0x6010,
|
||||
LIB3DS_M_SCALE = 0x6020,
|
||||
LIB3DS_M_TWIST = 0x6030,
|
||||
LIB3DS_M_TEETER = 0x6040,
|
||||
LIB3DS_M_FIT = 0x6050,
|
||||
LIB3DS_M_BEVEL = 0x6060,
|
||||
LIB3DS_XZ_CURVE = 0x6070,
|
||||
LIB3DS_YZ_CURVE = 0x6080,
|
||||
LIB3DS_INTERPCT = 0x6090,
|
||||
LIB3DS_DEFORM_LIMIT = 0x60A0,
|
||||
|
||||
LIB3DS_USE_CONTOUR = 0x6100,
|
||||
LIB3DS_USE_TWEEN = 0x6110,
|
||||
LIB3DS_USE_SCALE = 0x6120,
|
||||
LIB3DS_USE_TWIST = 0x6130,
|
||||
LIB3DS_USE_TEETER = 0x6140,
|
||||
LIB3DS_USE_FIT = 0x6150,
|
||||
LIB3DS_USE_BEVEL = 0x6160,
|
||||
|
||||
LIB3DS_DEFAULT_VIEW = 0x3000,
|
||||
LIB3DS_VIEW_TOP = 0x3010,
|
||||
LIB3DS_VIEW_BOTTOM = 0x3020,
|
||||
LIB3DS_VIEW_LEFT = 0x3030,
|
||||
LIB3DS_VIEW_RIGHT = 0x3040,
|
||||
LIB3DS_VIEW_FRONT = 0x3050,
|
||||
LIB3DS_VIEW_BACK = 0x3060,
|
||||
LIB3DS_VIEW_USER = 0x3070,
|
||||
LIB3DS_VIEW_CAMERA = 0x3080,
|
||||
LIB3DS_VIEW_WINDOW = 0x3090,
|
||||
|
||||
LIB3DS_VIEWPORT_LAYOUT_OLD = 0x7000,
|
||||
LIB3DS_VIEWPORT_DATA_OLD = 0x7010,
|
||||
LIB3DS_VIEWPORT_LAYOUT = 0x7001,
|
||||
LIB3DS_VIEWPORT_DATA = 0x7011,
|
||||
LIB3DS_VIEWPORT_DATA_3 = 0x7012,
|
||||
LIB3DS_VIEWPORT_SIZE = 0x7020,
|
||||
LIB3DS_NETWORK_VIEW = 0x7030
|
||||
} Lib3dsChunks;
|
||||
|
||||
typedef struct Lib3dsChunk {
|
||||
Lib3dsWord chunk;
|
||||
Lib3dsDword size;
|
||||
Lib3dsDword end;
|
||||
Lib3dsDword cur;
|
||||
} Lib3dsChunk;
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_chunk_enable_dump(Lib3dsBool enable, Lib3dsBool unknown);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_chunk_read(Lib3dsChunk *c, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_chunk_read_start(Lib3dsChunk *c, Lib3dsWord chunk, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_chunk_read_tell(Lib3dsChunk *c, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsWord lib3ds_chunk_read_next(Lib3dsChunk *c, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_chunk_read_reset(Lib3dsChunk *c, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_chunk_read_end(Lib3dsChunk *c, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_chunk_write(Lib3dsChunk *c, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_chunk_write_start(Lib3dsChunk *c, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_chunk_write_end(Lib3dsChunk *c, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_chunk_write_switch(Lib3dsWord chunk, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI const char* lib3ds_chunk_name(Lib3dsWord chunk);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_chunk_unknown(Lib3dsWord chunk);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_chunk_dump_info(const char *format, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
264
src/external/lib3ds-1.3.0/lib3ds/chunktable.h
vendored
264
src/external/lib3ds-1.3.0/lib3ds/chunktable.h
vendored
@ -1,264 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_CHUNKTABLE_H
|
||||
#define INCLUDED_LIB3DS_CHUNKTABLE_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: chunktable.h,v 1.16 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_CHUNK_H
|
||||
#include <lib3ds/chunk.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct Lib3dsChunkTable {
|
||||
Lib3dsDword chunk;
|
||||
const char* name;
|
||||
} Lib3dsChunkTable;
|
||||
|
||||
static Lib3dsChunkTable lib3ds_chunk_table[]={
|
||||
{LIB3DS_NULL_CHUNK, "LIB3DS_NULL_CHUNK"},
|
||||
{LIB3DS_M3DMAGIC, "LIB3DS_M3DMAGIC"},
|
||||
{LIB3DS_SMAGIC, "LIB3DS_SMAGIC"},
|
||||
{LIB3DS_LMAGIC, "LIB3DS_LMAGIC"},
|
||||
{LIB3DS_MLIBMAGIC, "LIB3DS_MLIBMAGIC"},
|
||||
{LIB3DS_MATMAGIC, "LIB3DS_MATMAGIC"},
|
||||
{LIB3DS_CMAGIC, "LIB3DS_CMAGIC"},
|
||||
{LIB3DS_M3D_VERSION, "LIB3DS_M3D_VERSION"},
|
||||
{LIB3DS_M3D_KFVERSION, "LIB3DS_M3D_KFVERSION"},
|
||||
{LIB3DS_COLOR_F, "LIB3DS_COLOR_F"},
|
||||
{LIB3DS_COLOR_24, "LIB3DS_COLOR_24"},
|
||||
{LIB3DS_LIN_COLOR_24, "LIB3DS_LIN_COLOR_24"},
|
||||
{LIB3DS_LIN_COLOR_F, "LIB3DS_LIN_COLOR_F"},
|
||||
{LIB3DS_INT_PERCENTAGE, "LIB3DS_INT_PERCENTAGE"},
|
||||
{LIB3DS_FLOAT_PERCENTAGE, "LIB3DS_FLOAT_PERCENTAGE"},
|
||||
{LIB3DS_MDATA, "LIB3DS_MDATA"},
|
||||
{LIB3DS_MESH_VERSION, "LIB3DS_MESH_VERSION"},
|
||||
{LIB3DS_MASTER_SCALE, "LIB3DS_MASTER_SCALE"},
|
||||
{LIB3DS_LO_SHADOW_BIAS, "LIB3DS_LO_SHADOW_BIAS"},
|
||||
{LIB3DS_HI_SHADOW_BIAS, "LIB3DS_HI_SHADOW_BIAS"},
|
||||
{LIB3DS_SHADOW_MAP_SIZE, "LIB3DS_SHADOW_MAP_SIZE"},
|
||||
{LIB3DS_SHADOW_SAMPLES, "LIB3DS_SHADOW_SAMPLES"},
|
||||
{LIB3DS_SHADOW_RANGE, "LIB3DS_SHADOW_RANGE"},
|
||||
{LIB3DS_SHADOW_FILTER, "LIB3DS_SHADOW_FILTER"},
|
||||
{LIB3DS_RAY_BIAS, "LIB3DS_RAY_BIAS"},
|
||||
{LIB3DS_O_CONSTS, "LIB3DS_O_CONSTS"},
|
||||
{LIB3DS_AMBIENT_LIGHT, "LIB3DS_AMBIENT_LIGHT"},
|
||||
{LIB3DS_BIT_MAP, "LIB3DS_BIT_MAP"},
|
||||
{LIB3DS_SOLID_BGND, "LIB3DS_SOLID_BGND"},
|
||||
{LIB3DS_V_GRADIENT, "LIB3DS_V_GRADIENT"},
|
||||
{LIB3DS_USE_BIT_MAP, "LIB3DS_USE_BIT_MAP"},
|
||||
{LIB3DS_USE_SOLID_BGND, "LIB3DS_USE_SOLID_BGND"},
|
||||
{LIB3DS_USE_V_GRADIENT, "LIB3DS_USE_V_GRADIENT"},
|
||||
{LIB3DS_FOG, "LIB3DS_FOG"},
|
||||
{LIB3DS_FOG_BGND, "LIB3DS_FOG_BGND"},
|
||||
{LIB3DS_LAYER_FOG, "LIB3DS_LAYER_FOG"},
|
||||
{LIB3DS_DISTANCE_CUE, "LIB3DS_DISTANCE_CUE"},
|
||||
{LIB3DS_DCUE_BGND, "LIB3DS_DCUE_BGND"},
|
||||
{LIB3DS_USE_FOG, "LIB3DS_USE_FOG"},
|
||||
{LIB3DS_USE_LAYER_FOG, "LIB3DS_USE_LAYER_FOG"},
|
||||
{LIB3DS_USE_DISTANCE_CUE, "LIB3DS_USE_DISTANCE_CUE"},
|
||||
{LIB3DS_MAT_ENTRY, "LIB3DS_MAT_ENTRY"},
|
||||
{LIB3DS_MAT_NAME, "LIB3DS_MAT_NAME"},
|
||||
{LIB3DS_MAT_AMBIENT, "LIB3DS_MAT_AMBIENT"},
|
||||
{LIB3DS_MAT_DIFFUSE, "LIB3DS_MAT_DIFFUSE"},
|
||||
{LIB3DS_MAT_SPECULAR, "LIB3DS_MAT_SPECULAR"},
|
||||
{LIB3DS_MAT_SHININESS, "LIB3DS_MAT_SHININESS"},
|
||||
{LIB3DS_MAT_SHIN2PCT, "LIB3DS_MAT_SHIN2PCT"},
|
||||
{LIB3DS_MAT_TRANSPARENCY, "LIB3DS_MAT_TRANSPARENCY"},
|
||||
{LIB3DS_MAT_XPFALL, "LIB3DS_MAT_XPFALL"},
|
||||
{LIB3DS_MAT_USE_XPFALL, "LIB3DS_MAT_USE_XPFALL"},
|
||||
{LIB3DS_MAT_REFBLUR, "LIB3DS_MAT_REFBLUR"},
|
||||
{LIB3DS_MAT_SHADING, "LIB3DS_MAT_SHADING"},
|
||||
{LIB3DS_MAT_USE_REFBLUR, "LIB3DS_MAT_USE_REFBLUR"},
|
||||
{LIB3DS_MAT_SELF_ILLUM, "LIB3DS_MAT_SELF_ILLUM"},
|
||||
{LIB3DS_MAT_TWO_SIDE, "LIB3DS_MAT_TWO_SIDE"},
|
||||
{LIB3DS_MAT_DECAL, "LIB3DS_MAT_DECAL"},
|
||||
{LIB3DS_MAT_ADDITIVE, "LIB3DS_MAT_ADDITIVE"},
|
||||
{LIB3DS_MAT_SELF_ILPCT, "LIB3DS_MAT_SELF_ILPCT"},
|
||||
{LIB3DS_MAT_WIRE, "LIB3DS_MAT_WIRE"},
|
||||
{LIB3DS_MAT_FACEMAP, "LIB3DS_MAT_FACEMAP"},
|
||||
{LIB3DS_MAT_PHONGSOFT, "LIB3DS_MAT_PHONGSOFT"},
|
||||
{LIB3DS_MAT_WIREABS, "LIB3DS_MAT_WIREABS"},
|
||||
{LIB3DS_MAT_WIRE_SIZE, "LIB3DS_MAT_WIRE_SIZE"},
|
||||
{LIB3DS_MAT_TEXMAP, "LIB3DS_MAT_TEXMAP"},
|
||||
{LIB3DS_MAT_SXP_TEXT_DATA, "LIB3DS_MAT_SXP_TEXT_DATA"},
|
||||
{LIB3DS_MAT_TEXMASK, "LIB3DS_MAT_TEXMASK"},
|
||||
{LIB3DS_MAT_SXP_TEXTMASK_DATA, "LIB3DS_MAT_SXP_TEXTMASK_DATA"},
|
||||
{LIB3DS_MAT_TEX2MAP, "LIB3DS_MAT_TEX2MAP"},
|
||||
{LIB3DS_MAT_SXP_TEXT2_DATA, "LIB3DS_MAT_SXP_TEXT2_DATA"},
|
||||
{LIB3DS_MAT_TEX2MASK, "LIB3DS_MAT_TEX2MASK"},
|
||||
{LIB3DS_MAT_SXP_TEXT2MASK_DATA, "LIB3DS_MAT_SXP_TEXT2MASK_DATA"},
|
||||
{LIB3DS_MAT_OPACMAP, "LIB3DS_MAT_OPACMAP"},
|
||||
{LIB3DS_MAT_SXP_OPAC_DATA, "LIB3DS_MAT_SXP_OPAC_DATA"},
|
||||
{LIB3DS_MAT_OPACMASK, "LIB3DS_MAT_OPACMASK"},
|
||||
{LIB3DS_MAT_SXP_OPACMASK_DATA, "LIB3DS_MAT_SXP_OPACMASK_DATA"},
|
||||
{LIB3DS_MAT_BUMPMAP, "LIB3DS_MAT_BUMPMAP"},
|
||||
{LIB3DS_MAT_SXP_BUMP_DATA, "LIB3DS_MAT_SXP_BUMP_DATA"},
|
||||
{LIB3DS_MAT_BUMPMASK, "LIB3DS_MAT_BUMPMASK"},
|
||||
{LIB3DS_MAT_SXP_BUMPMASK_DATA, "LIB3DS_MAT_SXP_BUMPMASK_DATA"},
|
||||
{LIB3DS_MAT_SPECMAP, "LIB3DS_MAT_SPECMAP"},
|
||||
{LIB3DS_MAT_SXP_SPEC_DATA, "LIB3DS_MAT_SXP_SPEC_DATA"},
|
||||
{LIB3DS_MAT_SPECMASK, "LIB3DS_MAT_SPECMASK"},
|
||||
{LIB3DS_MAT_SXP_SPECMASK_DATA, "LIB3DS_MAT_SXP_SPECMASK_DATA"},
|
||||
{LIB3DS_MAT_SHINMAP, "LIB3DS_MAT_SHINMAP"},
|
||||
{LIB3DS_MAT_SXP_SHIN_DATA, "LIB3DS_MAT_SXP_SHIN_DATA"},
|
||||
{LIB3DS_MAT_SHINMASK, "LIB3DS_MAT_SHINMASK"},
|
||||
{LIB3DS_MAT_SXP_SHINMASK_DATA, "LIB3DS_MAT_SXP_SHINMASK_DATA"},
|
||||
{LIB3DS_MAT_SELFIMAP, "LIB3DS_MAT_SELFIMAP"},
|
||||
{LIB3DS_MAT_SXP_SELFI_DATA, "LIB3DS_MAT_SXP_SELFI_DATA"},
|
||||
{LIB3DS_MAT_SELFIMASK, "LIB3DS_MAT_SELFIMASK"},
|
||||
{LIB3DS_MAT_SXP_SELFIMASK_DATA, "LIB3DS_MAT_SXP_SELFIMASK_DATA"},
|
||||
{LIB3DS_MAT_REFLMAP, "LIB3DS_MAT_REFLMAP"},
|
||||
{LIB3DS_MAT_REFLMASK, "LIB3DS_MAT_REFLMASK"},
|
||||
{LIB3DS_MAT_SXP_REFLMASK_DATA, "LIB3DS_MAT_SXP_REFLMASK_DATA"},
|
||||
{LIB3DS_MAT_ACUBIC, "LIB3DS_MAT_ACUBIC"},
|
||||
{LIB3DS_MAT_MAPNAME, "LIB3DS_MAT_MAPNAME"},
|
||||
{LIB3DS_MAT_MAP_TILING, "LIB3DS_MAT_MAP_TILING"},
|
||||
{LIB3DS_MAT_MAP_TEXBLUR, "LIB3DS_MAT_MAP_TEXBLUR"},
|
||||
{LIB3DS_MAT_MAP_USCALE, "LIB3DS_MAT_MAP_USCALE"},
|
||||
{LIB3DS_MAT_MAP_VSCALE, "LIB3DS_MAT_MAP_VSCALE"},
|
||||
{LIB3DS_MAT_MAP_UOFFSET, "LIB3DS_MAT_MAP_UOFFSET"},
|
||||
{LIB3DS_MAT_MAP_VOFFSET, "LIB3DS_MAT_MAP_VOFFSET"},
|
||||
{LIB3DS_MAT_MAP_ANG, "LIB3DS_MAT_MAP_ANG"},
|
||||
{LIB3DS_MAT_MAP_COL1, "LIB3DS_MAT_MAP_COL1"},
|
||||
{LIB3DS_MAT_MAP_COL2, "LIB3DS_MAT_MAP_COL2"},
|
||||
{LIB3DS_MAT_MAP_RCOL, "LIB3DS_MAT_MAP_RCOL"},
|
||||
{LIB3DS_MAT_MAP_GCOL, "LIB3DS_MAT_MAP_GCOL"},
|
||||
{LIB3DS_MAT_MAP_BCOL, "LIB3DS_MAT_MAP_BCOL"},
|
||||
{LIB3DS_NAMED_OBJECT, "LIB3DS_NAMED_OBJECT"},
|
||||
{LIB3DS_N_DIRECT_LIGHT, "LIB3DS_N_DIRECT_LIGHT"},
|
||||
{LIB3DS_DL_OFF, "LIB3DS_DL_OFF"},
|
||||
{LIB3DS_DL_OUTER_RANGE, "LIB3DS_DL_OUTER_RANGE"},
|
||||
{LIB3DS_DL_INNER_RANGE, "LIB3DS_DL_INNER_RANGE"},
|
||||
{LIB3DS_DL_MULTIPLIER, "LIB3DS_DL_MULTIPLIER"},
|
||||
{LIB3DS_DL_EXCLUDE, "LIB3DS_DL_EXCLUDE"},
|
||||
{LIB3DS_DL_ATTENUATE, "LIB3DS_DL_ATTENUATE"},
|
||||
{LIB3DS_DL_SPOTLIGHT, "LIB3DS_DL_SPOTLIGHT"},
|
||||
{LIB3DS_DL_SPOT_ROLL, "LIB3DS_DL_SPOT_ROLL"},
|
||||
{LIB3DS_DL_SHADOWED, "LIB3DS_DL_SHADOWED"},
|
||||
{LIB3DS_DL_LOCAL_SHADOW2, "LIB3DS_DL_LOCAL_SHADOW2"},
|
||||
{LIB3DS_DL_SEE_CONE, "LIB3DS_DL_SEE_CONE"},
|
||||
{LIB3DS_DL_SPOT_RECTANGULAR, "LIB3DS_DL_SPOT_RECTANGULAR"},
|
||||
{LIB3DS_DL_SPOT_ASPECT, "LIB3DS_DL_SPOT_ASPECT"},
|
||||
{LIB3DS_DL_SPOT_PROJECTOR, "LIB3DS_DL_SPOT_PROJECTOR"},
|
||||
{LIB3DS_DL_SPOT_OVERSHOOT, "LIB3DS_DL_SPOT_OVERSHOOT"},
|
||||
{LIB3DS_DL_RAY_BIAS, "LIB3DS_DL_RAY_BIAS"},
|
||||
{LIB3DS_DL_RAYSHAD, "LIB3DS_DL_RAYSHAD"},
|
||||
{LIB3DS_N_CAMERA, "LIB3DS_N_CAMERA"},
|
||||
{LIB3DS_CAM_SEE_CONE, "LIB3DS_CAM_SEE_CONE"},
|
||||
{LIB3DS_CAM_RANGES, "LIB3DS_CAM_RANGES"},
|
||||
{LIB3DS_OBJ_HIDDEN, "LIB3DS_OBJ_HIDDEN"},
|
||||
{LIB3DS_OBJ_VIS_LOFTER, "LIB3DS_OBJ_VIS_LOFTER"},
|
||||
{LIB3DS_OBJ_DOESNT_CAST, "LIB3DS_OBJ_DOESNT_CAST"},
|
||||
{LIB3DS_OBJ_DONT_RCVSHADOW, "LIB3DS_OBJ_DONT_RCVSHADOW"},
|
||||
{LIB3DS_OBJ_MATTE, "LIB3DS_OBJ_MATTE"},
|
||||
{LIB3DS_OBJ_FAST, "LIB3DS_OBJ_FAST"},
|
||||
{LIB3DS_OBJ_PROCEDURAL, "LIB3DS_OBJ_PROCEDURAL"},
|
||||
{LIB3DS_OBJ_FROZEN, "LIB3DS_OBJ_FROZEN"},
|
||||
{LIB3DS_N_TRI_OBJECT, "LIB3DS_N_TRI_OBJECT"},
|
||||
{LIB3DS_POINT_ARRAY, "LIB3DS_POINT_ARRAY"},
|
||||
{LIB3DS_POINT_FLAG_ARRAY, "LIB3DS_POINT_FLAG_ARRAY"},
|
||||
{LIB3DS_FACE_ARRAY, "LIB3DS_FACE_ARRAY"},
|
||||
{LIB3DS_MSH_MAT_GROUP, "LIB3DS_MSH_MAT_GROUP"},
|
||||
{LIB3DS_SMOOTH_GROUP, "LIB3DS_SMOOTH_GROUP"},
|
||||
{LIB3DS_MSH_BOXMAP, "LIB3DS_MSH_BOXMAP"},
|
||||
{LIB3DS_TEX_VERTS, "LIB3DS_TEX_VERTS"},
|
||||
{LIB3DS_MESH_MATRIX, "LIB3DS_MESH_MATRIX"},
|
||||
{LIB3DS_MESH_COLOR, "LIB3DS_MESH_COLOR"},
|
||||
{LIB3DS_MESH_TEXTURE_INFO, "LIB3DS_MESH_TEXTURE_INFO"},
|
||||
{LIB3DS_KFDATA, "LIB3DS_KFDATA"},
|
||||
{LIB3DS_KFHDR, "LIB3DS_KFHDR"},
|
||||
{LIB3DS_KFSEG, "LIB3DS_KFSEG"},
|
||||
{LIB3DS_KFCURTIME, "LIB3DS_KFCURTIME"},
|
||||
{LIB3DS_AMBIENT_NODE_TAG, "LIB3DS_AMBIENT_NODE_TAG"},
|
||||
{LIB3DS_OBJECT_NODE_TAG, "LIB3DS_OBJECT_NODE_TAG"},
|
||||
{LIB3DS_CAMERA_NODE_TAG, "LIB3DS_CAMERA_NODE_TAG"},
|
||||
{LIB3DS_TARGET_NODE_TAG, "LIB3DS_TARGET_NODE_TAG"},
|
||||
{LIB3DS_LIGHT_NODE_TAG, "LIB3DS_LIGHT_NODE_TAG"},
|
||||
{LIB3DS_L_TARGET_NODE_TAG, "LIB3DS_L_TARGET_NODE_TAG"},
|
||||
{LIB3DS_SPOTLIGHT_NODE_TAG, "LIB3DS_SPOTLIGHT_NODE_TAG"},
|
||||
{LIB3DS_NODE_ID, "LIB3DS_NODE_ID"},
|
||||
{LIB3DS_NODE_HDR, "LIB3DS_NODE_HDR"},
|
||||
{LIB3DS_PIVOT, "LIB3DS_PIVOT"},
|
||||
{LIB3DS_INSTANCE_NAME, "LIB3DS_INSTANCE_NAME"},
|
||||
{LIB3DS_MORPH_SMOOTH, "LIB3DS_MORPH_SMOOTH"},
|
||||
{LIB3DS_BOUNDBOX, "LIB3DS_BOUNDBOX"},
|
||||
{LIB3DS_POS_TRACK_TAG, "LIB3DS_POS_TRACK_TAG"},
|
||||
{LIB3DS_COL_TRACK_TAG, "LIB3DS_COL_TRACK_TAG"},
|
||||
{LIB3DS_ROT_TRACK_TAG, "LIB3DS_ROT_TRACK_TAG"},
|
||||
{LIB3DS_SCL_TRACK_TAG, "LIB3DS_SCL_TRACK_TAG"},
|
||||
{LIB3DS_MORPH_TRACK_TAG, "LIB3DS_MORPH_TRACK_TAG"},
|
||||
{LIB3DS_FOV_TRACK_TAG, "LIB3DS_FOV_TRACK_TAG"},
|
||||
{LIB3DS_ROLL_TRACK_TAG, "LIB3DS_ROLL_TRACK_TAG"},
|
||||
{LIB3DS_HOT_TRACK_TAG, "LIB3DS_HOT_TRACK_TAG"},
|
||||
{LIB3DS_FALL_TRACK_TAG, "LIB3DS_FALL_TRACK_TAG"},
|
||||
{LIB3DS_HIDE_TRACK_TAG, "LIB3DS_HIDE_TRACK_TAG"},
|
||||
{LIB3DS_POLY_2D, "LIB3DS_POLY_2D"},
|
||||
{LIB3DS_SHAPE_OK, "LIB3DS_SHAPE_OK"},
|
||||
{LIB3DS_SHAPE_NOT_OK, "LIB3DS_SHAPE_NOT_OK"},
|
||||
{LIB3DS_SHAPE_HOOK, "LIB3DS_SHAPE_HOOK"},
|
||||
{LIB3DS_PATH_3D, "LIB3DS_PATH_3D"},
|
||||
{LIB3DS_PATH_MATRIX, "LIB3DS_PATH_MATRIX"},
|
||||
{LIB3DS_SHAPE_2D, "LIB3DS_SHAPE_2D"},
|
||||
{LIB3DS_M_SCALE, "LIB3DS_M_SCALE"},
|
||||
{LIB3DS_M_TWIST, "LIB3DS_M_TWIST"},
|
||||
{LIB3DS_M_TEETER, "LIB3DS_M_TEETER"},
|
||||
{LIB3DS_M_FIT, "LIB3DS_M_FIT"},
|
||||
{LIB3DS_M_BEVEL, "LIB3DS_M_BEVEL"},
|
||||
{LIB3DS_XZ_CURVE, "LIB3DS_XZ_CURVE"},
|
||||
{LIB3DS_YZ_CURVE, "LIB3DS_YZ_CURVE"},
|
||||
{LIB3DS_INTERPCT, "LIB3DS_INTERPCT"},
|
||||
{LIB3DS_DEFORM_LIMIT, "LIB3DS_DEFORM_LIMIT"},
|
||||
{LIB3DS_USE_CONTOUR, "LIB3DS_USE_CONTOUR"},
|
||||
{LIB3DS_USE_TWEEN, "LIB3DS_USE_TWEEN"},
|
||||
{LIB3DS_USE_SCALE, "LIB3DS_USE_SCALE"},
|
||||
{LIB3DS_USE_TWIST, "LIB3DS_USE_TWIST"},
|
||||
{LIB3DS_USE_TEETER, "LIB3DS_USE_TEETER"},
|
||||
{LIB3DS_USE_FIT, "LIB3DS_USE_FIT"},
|
||||
{LIB3DS_USE_BEVEL, "LIB3DS_USE_BEVEL"},
|
||||
{LIB3DS_DEFAULT_VIEW, "LIB3DS_DEFAULT_VIEW"},
|
||||
{LIB3DS_VIEW_TOP, "LIB3DS_VIEW_TOP"},
|
||||
{LIB3DS_VIEW_BOTTOM, "LIB3DS_VIEW_BOTTOM"},
|
||||
{LIB3DS_VIEW_LEFT, "LIB3DS_VIEW_LEFT"},
|
||||
{LIB3DS_VIEW_RIGHT, "LIB3DS_VIEW_RIGHT"},
|
||||
{LIB3DS_VIEW_FRONT, "LIB3DS_VIEW_FRONT"},
|
||||
{LIB3DS_VIEW_BACK, "LIB3DS_VIEW_BACK"},
|
||||
{LIB3DS_VIEW_USER, "LIB3DS_VIEW_USER"},
|
||||
{LIB3DS_VIEW_CAMERA, "LIB3DS_VIEW_CAMERA"},
|
||||
{LIB3DS_VIEW_WINDOW, "LIB3DS_VIEW_WINDOW"},
|
||||
{LIB3DS_VIEWPORT_LAYOUT_OLD, "LIB3DS_VIEWPORT_LAYOUT_OLD"},
|
||||
{LIB3DS_VIEWPORT_DATA_OLD, "LIB3DS_VIEWPORT_DATA_OLD"},
|
||||
{LIB3DS_VIEWPORT_LAYOUT, "LIB3DS_VIEWPORT_LAYOUT"},
|
||||
{LIB3DS_VIEWPORT_DATA, "LIB3DS_VIEWPORT_DATA"},
|
||||
{LIB3DS_VIEWPORT_DATA_3, "LIB3DS_VIEWPORT_DATA_3"},
|
||||
{LIB3DS_VIEWPORT_SIZE, "LIB3DS_VIEWPORT_SIZE"},
|
||||
{LIB3DS_NETWORK_VIEW, "LIB3DS_NETWORK_VIEW"},
|
||||
{0,0}
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
62
src/external/lib3ds-1.3.0/lib3ds/chunktable.sed
vendored
62
src/external/lib3ds-1.3.0/lib3ds/chunktable.sed
vendored
@ -1,62 +0,0 @@
|
||||
1 {
|
||||
a\
|
||||
/* -*- c -*- */\
|
||||
#ifndef INCLUDED_LIB3DS_CHUNKTABLE_H\
|
||||
#define INCLUDED_LIB3DS_CHUNKTABLE_H\
|
||||
/*\
|
||||
* The 3D Studio File Format Library\
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>\
|
||||
* All rights reserved.\
|
||||
*\
|
||||
* This program is free software; you can redistribute it and/or modify it\
|
||||
* under the terms of the GNU Lesser General Public License as published by\
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at\
|
||||
* your option) any later version.\
|
||||
*\
|
||||
* This program is distributed in the hope that it will be useful, but\
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public\
|
||||
* License for more details.\
|
||||
*\
|
||||
* You should have received a copy of the GNU Lesser General Public License\
|
||||
* along with this program; if not, write to the Free Software Foundation,\
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\
|
||||
*\
|
||||
* $Id: chunktable.sed,v 1.7 2007/06/14 09:59:10 jeh Exp $\
|
||||
*/\
|
||||
\
|
||||
#ifndef INCLUDED_LIB3DS_CHUNK_H\
|
||||
#include <lib3ds/chunk.h>\
|
||||
#endif\
|
||||
\
|
||||
#ifdef __cplusplus\
|
||||
extern "C" {\
|
||||
#endif\
|
||||
\
|
||||
typedef struct _Lib3dsChunkTable {\
|
||||
Lib3dsDword chunk;\
|
||||
const char* name;\
|
||||
} Lib3dsChunkTable;\
|
||||
\
|
||||
static Lib3dsChunkTable lib3ds_chunk_table[]={
|
||||
}
|
||||
/^ *LIB3DS_/ {
|
||||
s/ *\([0-9A-Z_]*\).*/ {\1, "\1"},/
|
||||
p
|
||||
}
|
||||
$ {
|
||||
i\
|
||||
{0,0}\
|
||||
};\
|
||||
\
|
||||
#ifdef __cplusplus\
|
||||
};\
|
||||
#endif\
|
||||
#endif\
|
||||
|
||||
}
|
||||
d
|
||||
|
||||
|
||||
|
||||
|
||||
62
src/external/lib3ds-1.3.0/lib3ds/ease.c
vendored
62
src/external/lib3ds-1.3.0/lib3ds/ease.c
vendored
@ -1,62 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: ease.c,v 1.6 2007/06/15 09:33:19 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/ease.h>
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup ease Ease
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup ease
|
||||
*/
|
||||
Lib3dsFloat
|
||||
lib3ds_ease(Lib3dsFloat fp, Lib3dsFloat fc, Lib3dsFloat fn,
|
||||
Lib3dsFloat ease_from, Lib3dsFloat ease_to)
|
||||
{
|
||||
Lib3dsDouble s,step;
|
||||
Lib3dsDouble tofrom;
|
||||
Lib3dsDouble a;
|
||||
|
||||
s=step=(Lib3dsFloat)(fc-fp)/(fn-fp);
|
||||
tofrom=ease_to+ease_from;
|
||||
if (tofrom!=0.0) {
|
||||
if (tofrom>1.0) {
|
||||
ease_to=(Lib3dsFloat)(ease_to/tofrom);
|
||||
ease_from=(Lib3dsFloat)(ease_from/tofrom);
|
||||
}
|
||||
a=1.0/(2.0-(ease_to+ease_from));
|
||||
|
||||
if (step<ease_from) s=a/ease_from*step*step;
|
||||
else {
|
||||
if ((1.0-ease_to)<=step) {
|
||||
step=1.0-step;
|
||||
s=1.0-a/ease_to*step*step;
|
||||
}
|
||||
else {
|
||||
s=((2.0*step)-ease_from)*a;
|
||||
}
|
||||
}
|
||||
}
|
||||
return((Lib3dsFloat)s);
|
||||
}
|
||||
41
src/external/lib3ds-1.3.0/lib3ds/ease.h
vendored
41
src/external/lib3ds-1.3.0/lib3ds/ease.h
vendored
@ -1,41 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_EASE_H
|
||||
#define INCLUDED_LIB3DS_EASE_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: ease.h,v 1.6 2007/06/14 09:59:10 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsFloat lib3ds_ease(Lib3dsFloat fp, Lib3dsFloat fc,
|
||||
Lib3dsFloat fn, Lib3dsFloat ease_from, Lib3dsFloat ease_to);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
2028
src/external/lib3ds-1.3.0/lib3ds/file.c
vendored
2028
src/external/lib3ds-1.3.0/lib3ds/file.c
vendored
File diff suppressed because it is too large
Load Diff
106
src/external/lib3ds-1.3.0/lib3ds/file.h
vendored
106
src/external/lib3ds-1.3.0/lib3ds/file.h
vendored
@ -1,106 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_FILE_H
|
||||
#define INCLUDED_LIB3DS_FILE_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: file.h,v 1.24 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_BACKGROUND_H
|
||||
#include <lib3ds/background.h>
|
||||
#endif
|
||||
#ifndef INCLUDED_LIB3DS_ATMOSPHERE_H
|
||||
#include <lib3ds/atmosphere.h>
|
||||
#endif
|
||||
#ifndef INCLUDED_LIB3DS_SHADOW_H
|
||||
#include <lib3ds/shadow.h>
|
||||
#endif
|
||||
#ifndef INCLUDED_LIB3DS_VIEWPORT_H
|
||||
#include <lib3ds/viewport.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* 3DS file structure
|
||||
* \ingroup file
|
||||
*/
|
||||
struct Lib3dsFile {
|
||||
Lib3dsDword mesh_version;
|
||||
Lib3dsWord keyf_revision;
|
||||
char name[12+1];
|
||||
Lib3dsFloat master_scale;
|
||||
Lib3dsVector construction_plane;
|
||||
Lib3dsRgb ambient;
|
||||
Lib3dsShadow shadow;
|
||||
Lib3dsBackground background;
|
||||
Lib3dsAtmosphere atmosphere;
|
||||
Lib3dsViewport viewport;
|
||||
Lib3dsViewport viewport_keyf;
|
||||
Lib3dsIntd frames;
|
||||
Lib3dsIntd segment_from;
|
||||
Lib3dsIntd segment_to;
|
||||
Lib3dsIntd current_frame;
|
||||
Lib3dsMaterial *materials;
|
||||
Lib3dsMesh *meshes;
|
||||
Lib3dsCamera *cameras;
|
||||
Lib3dsLight *lights;
|
||||
Lib3dsNode *nodes;
|
||||
};
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsFile* lib3ds_file_load(const char *filename);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_file_save(Lib3dsFile *file, const char *filename);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsFile* lib3ds_file_new();
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_free(Lib3dsFile *file);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_eval(Lib3dsFile *file, Lib3dsFloat t);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_file_read(Lib3dsFile *file, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_file_write(Lib3dsFile *file, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_insert_material(Lib3dsFile *file, Lib3dsMaterial *material);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_remove_material(Lib3dsFile *file, Lib3dsMaterial *material);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsMaterial* lib3ds_file_material_by_name(Lib3dsFile *file, const char *name);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_dump_materials(Lib3dsFile *file);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_insert_mesh(Lib3dsFile *file, Lib3dsMesh *mesh);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_remove_mesh(Lib3dsFile *file, Lib3dsMesh *mesh);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsMesh* lib3ds_file_mesh_by_name(Lib3dsFile *file, const char *name);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_dump_meshes(Lib3dsFile *file);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_dump_instances(Lib3dsFile *file);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_insert_camera(Lib3dsFile *file, Lib3dsCamera *camera);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_remove_camera(Lib3dsFile *file, Lib3dsCamera *camera);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsCamera* lib3ds_file_camera_by_name(Lib3dsFile *file, const char *name);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_dump_cameras(Lib3dsFile *file);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_insert_light(Lib3dsFile *file, Lib3dsLight *light);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_remove_light(Lib3dsFile *file, Lib3dsLight *light);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsLight* lib3ds_file_light_by_name(Lib3dsFile *file, const char *name);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_dump_lights(Lib3dsFile *file);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsNode* lib3ds_file_node_by_name(Lib3dsFile *file, const char* name, Lib3dsNodeTypes type);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsNode* lib3ds_file_node_by_id(Lib3dsFile *file, Lib3dsWord node_id);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_insert_node(Lib3dsFile *file, Lib3dsNode *node);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_file_remove_node(Lib3dsFile *file, Lib3dsNode *node);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_bounding_box_of_objects(Lib3dsFile *file, Lib3dsBool include_meshes, Lib3dsBool include_cameras, Lib3dsBool include_lights, Lib3dsVector bmin, Lib3dsVector bmax);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_bounding_box_of_nodes(Lib3dsFile *file, Lib3dsBool include_meshes, Lib3dsBool include_cameras, Lib3dsBool include_lights, Lib3dsVector bmin, Lib3dsVector bmax);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_file_dump_nodes(Lib3dsFile *file);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
524
src/external/lib3ds-1.3.0/lib3ds/io.c
vendored
524
src/external/lib3ds-1.3.0/lib3ds/io.c
vendored
@ -1,524 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: io.c,v 1.9 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/io.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup io Binary Input/Output Abstraction Layer
|
||||
*/
|
||||
|
||||
typedef union {
|
||||
Lib3dsDword dword_value;
|
||||
Lib3dsFloat float_value;
|
||||
} Lib3dsDwordFloat;
|
||||
|
||||
|
||||
struct Lib3dsIo {
|
||||
void *self;
|
||||
Lib3dsIoErrorFunc error_func;
|
||||
Lib3dsIoSeekFunc seek_func;
|
||||
Lib3dsIoTellFunc tell_func;
|
||||
Lib3dsIoReadFunc read_func;
|
||||
Lib3dsIoWriteFunc write_func;
|
||||
};
|
||||
|
||||
|
||||
Lib3dsIo*
|
||||
lib3ds_io_new(void *self, Lib3dsIoErrorFunc error_func, Lib3dsIoSeekFunc seek_func,
|
||||
Lib3dsIoTellFunc tell_func, Lib3dsIoReadFunc read_func, Lib3dsIoWriteFunc write_func)
|
||||
{
|
||||
Lib3dsIo *io = calloc(sizeof(Lib3dsIo),1);
|
||||
ASSERT(io);
|
||||
if (!io) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
io->self = self;
|
||||
io->error_func = error_func;
|
||||
io->seek_func = seek_func;
|
||||
io->tell_func = tell_func;
|
||||
io->read_func = read_func;
|
||||
io->write_func = write_func;
|
||||
|
||||
return io;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
lib3ds_io_free(Lib3dsIo *io)
|
||||
{
|
||||
ASSERT(io);
|
||||
if (!io) {
|
||||
return;
|
||||
}
|
||||
free(io);
|
||||
}
|
||||
|
||||
|
||||
Lib3dsBool
|
||||
lib3ds_io_error(Lib3dsIo *io)
|
||||
{
|
||||
ASSERT(io);
|
||||
if (!io || !io->error_func) {
|
||||
return 0;
|
||||
}
|
||||
return (*io->error_func)(io->self);
|
||||
}
|
||||
|
||||
|
||||
long
|
||||
lib3ds_io_seek(Lib3dsIo *io, long offset, Lib3dsIoSeek origin)
|
||||
{
|
||||
ASSERT(io);
|
||||
if (!io || !io->seek_func) {
|
||||
return 0;
|
||||
}
|
||||
return (*io->seek_func)(io->self, offset, origin);
|
||||
}
|
||||
|
||||
|
||||
long
|
||||
lib3ds_io_tell(Lib3dsIo *io)
|
||||
{
|
||||
ASSERT(io);
|
||||
if (!io || !io->tell_func) {
|
||||
return 0;
|
||||
}
|
||||
return (*io->tell_func)(io->self);
|
||||
}
|
||||
|
||||
|
||||
size_t
|
||||
lib3ds_io_read(Lib3dsIo *io, void *buffer, size_t size)
|
||||
{
|
||||
ASSERT(io);
|
||||
if (!io || !io->read_func) {
|
||||
return 0;
|
||||
}
|
||||
return (*io->read_func)(io->self, buffer, size);
|
||||
}
|
||||
|
||||
|
||||
size_t
|
||||
lib3ds_io_write(Lib3dsIo *io, const void *buffer, size_t size)
|
||||
{
|
||||
ASSERT(io);
|
||||
if (!io || !io->write_func) {
|
||||
return 0;
|
||||
}
|
||||
return (*io->write_func)(io->self, buffer, size);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Read a byte from a file stream.
|
||||
*/
|
||||
Lib3dsByte
|
||||
lib3ds_io_read_byte(Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsByte b;
|
||||
|
||||
ASSERT(io);
|
||||
lib3ds_io_read(io, &b, 1);
|
||||
return(b);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Read a word from a file stream in little endian format.
|
||||
*/
|
||||
Lib3dsWord
|
||||
lib3ds_io_read_word(Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsByte b[2];
|
||||
Lib3dsWord w;
|
||||
|
||||
ASSERT(io);
|
||||
lib3ds_io_read(io, b, 2);
|
||||
w=((Lib3dsWord)b[1] << 8) |
|
||||
((Lib3dsWord)b[0]);
|
||||
return(w);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Read a dword from file a stream in little endian format.
|
||||
*/
|
||||
Lib3dsDword
|
||||
lib3ds_io_read_dword(Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsByte b[4];
|
||||
Lib3dsDword d;
|
||||
|
||||
ASSERT(io);
|
||||
lib3ds_io_read(io, b, 4);
|
||||
d=((Lib3dsDword)b[3] << 24) |
|
||||
((Lib3dsDword)b[2] << 16) |
|
||||
((Lib3dsDword)b[1] << 8) |
|
||||
((Lib3dsDword)b[0]);
|
||||
return(d);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Read a signed byte from a file stream.
|
||||
*/
|
||||
Lib3dsIntb
|
||||
lib3ds_io_read_intb(Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsIntb b;
|
||||
|
||||
ASSERT(io);
|
||||
lib3ds_io_read(io, &b, 1);
|
||||
return(b);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Read a signed word from a file stream in little endian format.
|
||||
*/
|
||||
Lib3dsIntw
|
||||
lib3ds_io_read_intw(Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsByte b[2];
|
||||
Lib3dsWord w;
|
||||
|
||||
ASSERT(io);
|
||||
lib3ds_io_read(io, b, 2);
|
||||
w=((Lib3dsWord)b[1] << 8) |
|
||||
((Lib3dsWord)b[0]);
|
||||
return((Lib3dsIntw)w);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Read a signed dword a from file stream in little endian format.
|
||||
*/
|
||||
Lib3dsIntd
|
||||
lib3ds_io_read_intd(Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsByte b[4];
|
||||
Lib3dsDword d;
|
||||
|
||||
ASSERT(io);
|
||||
lib3ds_io_read(io, b, 4);
|
||||
d=((Lib3dsDword)b[3] << 24) |
|
||||
((Lib3dsDword)b[2] << 16) |
|
||||
((Lib3dsDword)b[1] << 8) |
|
||||
((Lib3dsDword)b[0]);
|
||||
return((Lib3dsIntd)d);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Read a float from a file stream in little endian format.
|
||||
*/
|
||||
Lib3dsFloat
|
||||
lib3ds_io_read_float(Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsByte b[4];
|
||||
Lib3dsDwordFloat d;
|
||||
|
||||
ASSERT(io);
|
||||
lib3ds_io_read(io, b, 4);
|
||||
d.dword_value=((Lib3dsDword)b[3] << 24) |
|
||||
((Lib3dsDword)b[2] << 16) |
|
||||
((Lib3dsDword)b[1] << 8) |
|
||||
((Lib3dsDword)b[0]);
|
||||
return d.float_value;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Read a vector from a file stream in little endian format.
|
||||
*
|
||||
* \param io IO input handle.
|
||||
* \param v The vector to store the data.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_read_vector(Lib3dsIo *io, Lib3dsVector v)
|
||||
{
|
||||
ASSERT(io);
|
||||
|
||||
v[0]=lib3ds_io_read_float(io);
|
||||
v[1]=lib3ds_io_read_float(io);
|
||||
v[2]=lib3ds_io_read_float(io);
|
||||
|
||||
return(!lib3ds_io_error(io));
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_read_rgb(Lib3dsIo *io, Lib3dsRgb rgb)
|
||||
{
|
||||
ASSERT(io);
|
||||
|
||||
rgb[0]=lib3ds_io_read_float(io);
|
||||
rgb[1]=lib3ds_io_read_float(io);
|
||||
rgb[2]=lib3ds_io_read_float(io);
|
||||
|
||||
return(!lib3ds_io_error(io));
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Read a zero-terminated string from a file stream.
|
||||
*
|
||||
* \param io IO input handle.
|
||||
* \param s The buffer to store the read string.
|
||||
* \param buflen Buffer length.
|
||||
*
|
||||
* \return True on success, False otherwise.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_read_string(Lib3dsIo *io, char *s, int buflen)
|
||||
{
|
||||
char c;
|
||||
int k=0;
|
||||
|
||||
ASSERT(io);
|
||||
for (;;) {
|
||||
if (lib3ds_io_read(io, &c, 1)!=1) {
|
||||
return LIB3DS_FALSE;
|
||||
}
|
||||
*s++ = c;
|
||||
if (!c) {
|
||||
break;
|
||||
}
|
||||
++k;
|
||||
if (k>=buflen) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return(!lib3ds_io_error(io));
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Writes a byte into a file stream.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_write_byte(Lib3dsIo *io, Lib3dsByte b)
|
||||
{
|
||||
ASSERT(io);
|
||||
if (lib3ds_io_write(io, &b, 1)!=1) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Writes a word into a little endian file stream.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_write_word(Lib3dsIo *io, Lib3dsWord w)
|
||||
{
|
||||
Lib3dsByte b[2];
|
||||
|
||||
ASSERT(io);
|
||||
b[1]=((Lib3dsWord)w & 0xFF00) >> 8;
|
||||
b[0]=((Lib3dsWord)w & 0x00FF);
|
||||
if (lib3ds_io_write(io, b, 2)!=2) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Writes a dword into a little endian file stream.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_write_dword(Lib3dsIo *io, Lib3dsDword d)
|
||||
{
|
||||
Lib3dsByte b[4];
|
||||
|
||||
ASSERT(io);
|
||||
b[3]=(Lib3dsByte)(((Lib3dsDword)d & 0xFF000000) >> 24);
|
||||
b[2]=(Lib3dsByte)(((Lib3dsDword)d & 0x00FF0000) >> 16);
|
||||
b[1]=(Lib3dsByte)(((Lib3dsDword)d & 0x0000FF00) >> 8);
|
||||
b[0]=(Lib3dsByte)(((Lib3dsDword)d & 0x000000FF));
|
||||
if (lib3ds_io_write(io, b, 4)!=4) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Writes a signed byte in a file stream.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_write_intb(Lib3dsIo *io, Lib3dsIntb b)
|
||||
{
|
||||
ASSERT(io);
|
||||
if (lib3ds_io_write(io, &b, 1)!=1) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Writes a signed word into a little endian file stream.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_write_intw(Lib3dsIo *io, Lib3dsIntw w)
|
||||
{
|
||||
Lib3dsByte b[2];
|
||||
|
||||
ASSERT(io);
|
||||
b[1]=((Lib3dsWord)w & 0xFF00) >> 8;
|
||||
b[0]=((Lib3dsWord)w & 0x00FF);
|
||||
if (lib3ds_io_write(io, b, 2)!=2) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Writes a signed dword into a little endian file stream.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_write_intd(Lib3dsIo *io, Lib3dsIntd d)
|
||||
{
|
||||
Lib3dsByte b[4];
|
||||
|
||||
ASSERT(io);
|
||||
b[3]=(Lib3dsByte)(((Lib3dsDword)d & 0xFF000000) >> 24);
|
||||
b[2]=(Lib3dsByte)(((Lib3dsDword)d & 0x00FF0000) >> 16);
|
||||
b[1]=(Lib3dsByte)(((Lib3dsDword)d & 0x0000FF00) >> 8);
|
||||
b[0]=(Lib3dsByte)(((Lib3dsDword)d & 0x000000FF));
|
||||
if (lib3ds_io_write(io, b, 4)!=4) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Writes a float into a little endian file stream.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_write_float(Lib3dsIo *io, Lib3dsFloat l)
|
||||
{
|
||||
Lib3dsByte b[4];
|
||||
Lib3dsDwordFloat d;
|
||||
|
||||
ASSERT(io);
|
||||
d.float_value=l;
|
||||
b[3]=(Lib3dsByte)(((Lib3dsDword)d.dword_value & 0xFF000000) >> 24);
|
||||
b[2]=(Lib3dsByte)(((Lib3dsDword)d.dword_value & 0x00FF0000) >> 16);
|
||||
b[1]=(Lib3dsByte)(((Lib3dsDword)d.dword_value & 0x0000FF00) >> 8);
|
||||
b[0]=(Lib3dsByte)(((Lib3dsDword)d.dword_value & 0x000000FF));
|
||||
if (lib3ds_io_write(io, b, 4)!=4) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Writes a vector into a file stream in little endian format.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_write_vector(Lib3dsIo *io, Lib3dsVector v)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
if (!lib3ds_io_write_float(io, v[i])) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_write_rgb(Lib3dsIo *io, Lib3dsRgb rgb)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
if (!lib3ds_io_write_float(io, rgb[i])) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup io
|
||||
*
|
||||
* Writes a zero-terminated string into a file stream.
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_io_write_string(Lib3dsIo *io, const char *s)
|
||||
{
|
||||
ASSERT(s);
|
||||
ASSERT(io);
|
||||
lib3ds_io_write(io, s, strlen(s)+1);
|
||||
return(!lib3ds_io_error(io));
|
||||
}
|
||||
82
src/external/lib3ds-1.3.0/lib3ds/io.h
vendored
82
src/external/lib3ds-1.3.0/lib3ds/io.h
vendored
@ -1,82 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_IO_H
|
||||
#define INCLUDED_LIB3DS_IO_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: io.h,v 1.6 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum Lib3dsIoSeek {
|
||||
LIB3DS_SEEK_SET =0,
|
||||
LIB3DS_SEEK_CUR =1,
|
||||
LIB3DS_SEEK_END =2
|
||||
} Lib3dsIoSeek;
|
||||
|
||||
typedef Lib3dsBool (*Lib3dsIoErrorFunc)(void *self);
|
||||
typedef long (*Lib3dsIoSeekFunc)(void *self, long offset, Lib3dsIoSeek origin);
|
||||
typedef long (*Lib3dsIoTellFunc)(void *self);
|
||||
typedef size_t (*Lib3dsIoReadFunc)(void *self, void *buffer, size_t size);
|
||||
typedef size_t (*Lib3dsIoWriteFunc)(void *self, const void *buffer, size_t size);
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsIo* lib3ds_io_new(void *self, Lib3dsIoErrorFunc error_func,
|
||||
Lib3dsIoSeekFunc seek_func, Lib3dsIoTellFunc tell_func,
|
||||
Lib3dsIoReadFunc read_func, Lib3dsIoWriteFunc write_func);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_io_free(Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_error(Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI long lib3ds_io_seek(Lib3dsIo *io, long offset, Lib3dsIoSeek origin);
|
||||
LIB3DSEXTERN LIB3DSAPI long lib3ds_io_tell(Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI size_t lib3ds_io_read(Lib3dsIo *io, void *buffer, size_t size);
|
||||
LIB3DSEXTERN LIB3DSAPI size_t lib3ds_io_write(Lib3dsIo *io, const void *buffer, size_t size);
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsByte lib3ds_io_read_byte(Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsWord lib3ds_io_read_word(Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsDword lib3ds_io_read_dword(Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsIntb lib3ds_io_read_intb(Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsIntw lib3ds_io_read_intw(Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsIntd lib3ds_io_read_intd(Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsFloat lib3ds_io_read_float(Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_read_vector(Lib3dsIo *io, Lib3dsVector v);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_read_rgb(Lib3dsIo *io, Lib3dsRgb rgb);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_read_string(Lib3dsIo *io, char *s, int buflen);
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_write_byte(Lib3dsIo *io, Lib3dsByte b);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_write_word(Lib3dsIo *io, Lib3dsWord w);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_write_dword(Lib3dsIo *io, Lib3dsDword d);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_write_intb(Lib3dsIo *io, Lib3dsIntb b);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_write_intw(Lib3dsIo *io, Lib3dsIntw w);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_write_intd(Lib3dsIo *io, Lib3dsIntd d);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_write_float(Lib3dsIo *io, Lib3dsFloat l);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_write_vector(Lib3dsIo *io, Lib3dsVector v);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_write_rgb(Lib3dsIo *io, Lib3dsRgb rgb);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_io_write_string(Lib3dsIo *io, const char *s);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
415
src/external/lib3ds-1.3.0/lib3ds/light.c
vendored
415
src/external/lib3ds-1.3.0/lib3ds/light.c
vendored
@ -1,415 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: light.c,v 1.15 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/light.h>
|
||||
#include <lib3ds/chunk.h>
|
||||
#include <lib3ds/io.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup light Lights
|
||||
*/
|
||||
/*!
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup light
|
||||
*/
|
||||
Lib3dsLight*
|
||||
lib3ds_light_new(const char *name)
|
||||
{
|
||||
Lib3dsLight *light;
|
||||
|
||||
ASSERT(name);
|
||||
ASSERT(strlen(name)<64);
|
||||
|
||||
light=(Lib3dsLight*)calloc(sizeof(Lib3dsLight), 1);
|
||||
if (!light) {
|
||||
return(0);
|
||||
}
|
||||
strcpy(light->name, name);
|
||||
return(light);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup light
|
||||
*/
|
||||
void
|
||||
lib3ds_light_free(Lib3dsLight *light)
|
||||
{
|
||||
memset(light, 0, sizeof(Lib3dsLight));
|
||||
free(light);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup light
|
||||
*/
|
||||
void
|
||||
lib3ds_light_dump(Lib3dsLight *light)
|
||||
{
|
||||
ASSERT(light);
|
||||
printf(" name: %s\n", light->name);
|
||||
printf(" spot_light: %s\n", light->spot_light ? "yes" : "no");
|
||||
printf(" see_cone: %s\n", light->see_cone ? "yes" : "no");
|
||||
printf(" color: (%f, %f, %f)\n",
|
||||
light->color[0], light->color[1], light->color[2]);
|
||||
printf(" position (%f, %f, %f)\n",
|
||||
light->position[0], light->position[1], light->position[2]);
|
||||
printf(" spot (%f, %f, %f)\n",
|
||||
light->spot[0], light->spot[1], light->spot[2]);
|
||||
printf(" roll: %f\n", light->roll);
|
||||
printf(" off: %s\n", light->off ? "yes" : "no");
|
||||
printf(" outer_range: %f\n", light->outer_range);
|
||||
printf(" inner_range: %f\n", light->inner_range);
|
||||
printf(" multiplier: %f\n", light->multiplier);
|
||||
printf(" attenuation: %f\n", light->attenuation);
|
||||
printf(" rectangular_spot: %s\n", light->rectangular_spot ? "yes" : "no");
|
||||
printf(" shadowed: %s\n", light->shadowed ? "yes" : "no");
|
||||
printf(" shadow_bias: %f\n", light->shadow_bias);
|
||||
printf(" shadow_filter: %f\n", light->shadow_filter);
|
||||
printf(" shadow_size: %d\n", light->shadow_size);
|
||||
printf(" spot_aspect: %f\n", light->spot_aspect);
|
||||
printf(" use_projector: %s\n", light->use_projector ? "yes" : "no");
|
||||
printf(" projector: %s\n", light->projector);
|
||||
printf(" spot_overshoot: %d\n", (int)light->spot_overshoot);
|
||||
printf(" ray_shadows: %s\n", light->ray_shadows ? "yes" : "no");
|
||||
printf(" ray_bias: %f\n", light->ray_bias);
|
||||
printf(" hot_spot: %f\n", light->hot_spot);
|
||||
printf(" fall_off: %f\n", light->fall_off);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup light
|
||||
*/
|
||||
static Lib3dsBool
|
||||
spotlight_read(Lib3dsLight *light, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
Lib3dsWord chunk;
|
||||
int i;
|
||||
|
||||
if (!lib3ds_chunk_read_start(&c, LIB3DS_DL_SPOTLIGHT, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
light->spot_light=LIB3DS_TRUE;
|
||||
for (i=0; i<3; ++i) {
|
||||
light->spot[i]=lib3ds_io_read_float(io);
|
||||
}
|
||||
light->hot_spot = lib3ds_io_read_float(io);
|
||||
light->fall_off = lib3ds_io_read_float(io);
|
||||
lib3ds_chunk_read_tell(&c, io);
|
||||
|
||||
while ((chunk=lib3ds_chunk_read_next(&c, io))!=0) {
|
||||
switch (chunk) {
|
||||
case LIB3DS_DL_SPOT_ROLL:
|
||||
{
|
||||
light->roll=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_SHADOWED:
|
||||
{
|
||||
light->shadowed=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_LOCAL_SHADOW2:
|
||||
{
|
||||
light->shadow_bias=lib3ds_io_read_float(io);
|
||||
light->shadow_filter=lib3ds_io_read_float(io);
|
||||
light->shadow_size=lib3ds_io_read_intw(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_SEE_CONE:
|
||||
{
|
||||
light->see_cone=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_SPOT_RECTANGULAR:
|
||||
{
|
||||
light->rectangular_spot=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_SPOT_ASPECT:
|
||||
{
|
||||
light->spot_aspect=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_SPOT_PROJECTOR:
|
||||
{
|
||||
light->use_projector=LIB3DS_TRUE;
|
||||
if (!lib3ds_io_read_string(io, light->projector, 64)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
case LIB3DS_DL_SPOT_OVERSHOOT:
|
||||
{
|
||||
light->spot_overshoot=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_RAY_BIAS:
|
||||
{
|
||||
light->ray_bias=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_RAYSHAD:
|
||||
{
|
||||
light->ray_shadows=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
lib3ds_chunk_unknown(chunk);
|
||||
}
|
||||
}
|
||||
|
||||
lib3ds_chunk_read_end(&c, io);
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup light
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_light_read(Lib3dsLight *light, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
Lib3dsWord chunk;
|
||||
|
||||
if (!lib3ds_chunk_read_start(&c, LIB3DS_N_DIRECT_LIGHT, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
light->position[i]=lib3ds_io_read_float(io);
|
||||
}
|
||||
}
|
||||
lib3ds_chunk_read_tell(&c, io);
|
||||
|
||||
while ((chunk=lib3ds_chunk_read_next(&c, io))!=0) {
|
||||
switch (chunk) {
|
||||
case LIB3DS_COLOR_F:
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
light->color[i]=lib3ds_io_read_float(io);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_OFF:
|
||||
{
|
||||
light->off=LIB3DS_TRUE;
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_OUTER_RANGE:
|
||||
{
|
||||
light->outer_range=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_INNER_RANGE:
|
||||
{
|
||||
light->inner_range=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_MULTIPLIER:
|
||||
{
|
||||
light->multiplier=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_EXCLUDE:
|
||||
{
|
||||
/* FIXME: */
|
||||
lib3ds_chunk_unknown(chunk);
|
||||
}
|
||||
case LIB3DS_DL_ATTENUATE:
|
||||
{
|
||||
light->attenuation=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DL_SPOTLIGHT:
|
||||
{
|
||||
lib3ds_chunk_read_reset(&c, io);
|
||||
if (!spotlight_read(light, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
lib3ds_chunk_unknown(chunk);
|
||||
}
|
||||
}
|
||||
|
||||
lib3ds_chunk_read_end(&c, io);
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup light
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_light_write(Lib3dsLight *light, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
|
||||
c.chunk=LIB3DS_N_DIRECT_LIGHT;
|
||||
if (!lib3ds_chunk_write_start(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
lib3ds_io_write_vector(io, light->position);
|
||||
{ /*---- LIB3DS_COLOR_F ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_COLOR_F;
|
||||
c.size=18;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
lib3ds_io_write_rgb(io, light->color);
|
||||
}
|
||||
if (light->off) { /*---- LIB3DS_DL_OFF ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_OFF;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
}
|
||||
{ /*---- LIB3DS_DL_OUTER_RANGE ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_OUTER_RANGE;
|
||||
c.size=10;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
lib3ds_io_write_float(io, light->outer_range);
|
||||
}
|
||||
{ /*---- LIB3DS_DL_INNER_RANGE ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_INNER_RANGE;
|
||||
c.size=10;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
lib3ds_io_write_float(io, light->inner_range);
|
||||
}
|
||||
{ /*---- LIB3DS_DL_MULTIPLIER ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_MULTIPLIER;
|
||||
c.size=10;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
lib3ds_io_write_float(io, light->multiplier);
|
||||
}
|
||||
if (light->attenuation) { /*---- LIB3DS_DL_ATTENUATE ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_ATTENUATE;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
}
|
||||
|
||||
if (light->spot_light) {
|
||||
Lib3dsChunk c;
|
||||
|
||||
c.chunk=LIB3DS_DL_SPOTLIGHT;
|
||||
if (!lib3ds_chunk_write_start(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
lib3ds_io_write_vector(io, light->spot);
|
||||
lib3ds_io_write_float(io, light->hot_spot);
|
||||
lib3ds_io_write_float(io, light->fall_off);
|
||||
|
||||
{ /*---- LIB3DS_DL_SPOT_ROLL ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_SPOT_ROLL;
|
||||
c.size=10;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
lib3ds_io_write_float(io, light->roll);
|
||||
}
|
||||
if (light->shadowed) { /*---- LIB3DS_DL_SHADOWED ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_SHADOWED;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
}
|
||||
if ((fabs(light->shadow_bias)>LIB3DS_EPSILON) ||
|
||||
(fabs(light->shadow_filter)>LIB3DS_EPSILON) ||
|
||||
(light->shadow_size!=0)) { /*---- LIB3DS_DL_LOCAL_SHADOW2 ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_LOCAL_SHADOW2;
|
||||
c.size=16;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
lib3ds_io_write_float(io, light->shadow_bias);
|
||||
lib3ds_io_write_float(io, light->shadow_filter);
|
||||
lib3ds_io_write_intw(io, light->shadow_size);
|
||||
}
|
||||
if (light->see_cone) { /*---- LIB3DS_DL_SEE_CONE ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_SEE_CONE;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
}
|
||||
if (light->rectangular_spot) { /*---- LIB3DS_DL_SPOT_RECTANGULAR ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_SPOT_RECTANGULAR;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
}
|
||||
if (fabs(light->spot_aspect)>LIB3DS_EPSILON) { /*---- LIB3DS_DL_SPOT_ASPECT ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_SPOT_ASPECT;
|
||||
c.size=10;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
lib3ds_io_write_float(io, light->spot_aspect);
|
||||
}
|
||||
if (light->use_projector) { /*---- LIB3DS_DL_SPOT_PROJECTOR ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_SPOT_PROJECTOR;
|
||||
c.size=10;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
lib3ds_io_write_string(io, light->projector);
|
||||
}
|
||||
if (light->spot_overshoot) { /*---- LIB3DS_DL_SPOT_OVERSHOOT ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_SPOT_OVERSHOOT;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
}
|
||||
if (fabs(light->ray_bias)>LIB3DS_EPSILON) { /*---- LIB3DS_DL_RAY_BIAS ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_RAY_BIAS;
|
||||
c.size=10;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
lib3ds_io_write_float(io, light->ray_bias);
|
||||
}
|
||||
if (light->ray_shadows) { /*---- LIB3DS_DL_RAYSHAD ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_DL_RAYSHAD;
|
||||
c.size=6;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
}
|
||||
if (!lib3ds_chunk_write_end(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
if (!lib3ds_chunk_write_end(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
79
src/external/lib3ds-1.3.0/lib3ds/light.h
vendored
79
src/external/lib3ds-1.3.0/lib3ds/light.h
vendored
@ -1,79 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_LIGHT_H
|
||||
#define INCLUDED_LIB3DS_LIGHT_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: light.h,v 1.13 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Light
|
||||
* \ingroup light
|
||||
*/
|
||||
struct Lib3dsLight {
|
||||
Lib3dsLight *next;
|
||||
char name[64];
|
||||
Lib3dsDword object_flags; /*< @see Lib3dsObjectFlags */
|
||||
Lib3dsBool spot_light;
|
||||
Lib3dsBool see_cone;
|
||||
Lib3dsRgb color;
|
||||
Lib3dsVector position;
|
||||
Lib3dsVector spot;
|
||||
Lib3dsFloat roll;
|
||||
Lib3dsBool off;
|
||||
Lib3dsFloat outer_range;
|
||||
Lib3dsFloat inner_range;
|
||||
Lib3dsFloat multiplier;
|
||||
/*const char** excludes;*/
|
||||
Lib3dsFloat attenuation;
|
||||
Lib3dsBool rectangular_spot;
|
||||
Lib3dsBool shadowed;
|
||||
Lib3dsFloat shadow_bias;
|
||||
Lib3dsFloat shadow_filter;
|
||||
Lib3dsIntw shadow_size;
|
||||
Lib3dsFloat spot_aspect;
|
||||
Lib3dsBool use_projector;
|
||||
char projector[64];
|
||||
Lib3dsIntd spot_overshoot;
|
||||
Lib3dsBool ray_shadows;
|
||||
Lib3dsFloat ray_bias;
|
||||
Lib3dsFloat hot_spot;
|
||||
Lib3dsFloat fall_off;
|
||||
};
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsLight* lib3ds_light_new(const char *name);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_light_free(Lib3dsLight *mesh);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_light_dump(Lib3dsLight *light);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_light_read(Lib3dsLight *light, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_light_write(Lib3dsLight *light, Lib3dsIo *io);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
1089
src/external/lib3ds-1.3.0/lib3ds/material.c
vendored
1089
src/external/lib3ds-1.3.0/lib3ds/material.c
vendored
File diff suppressed because it is too large
Load Diff
170
src/external/lib3ds-1.3.0/lib3ds/material.h
vendored
170
src/external/lib3ds-1.3.0/lib3ds/material.h
vendored
@ -1,170 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_MATERIAL_H
|
||||
#define INCLUDED_LIB3DS_MATERIAL_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: material.h,v 1.18 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \ingroup material
|
||||
*/
|
||||
typedef enum Lib3dsTextureMapFlags {
|
||||
LIB3DS_DECALE =0x0001,
|
||||
LIB3DS_MIRROR =0x0002,
|
||||
LIB3DS_NEGATE =0x0008,
|
||||
LIB3DS_NO_TILE =0x0010,
|
||||
LIB3DS_SUMMED_AREA =0x0020,
|
||||
LIB3DS_ALPHA_SOURCE =0x0040,
|
||||
LIB3DS_TINT =0x0080,
|
||||
LIB3DS_IGNORE_ALPHA =0x0100,
|
||||
LIB3DS_RGB_TINT =0x0200
|
||||
} Lib3dsTextureMapFlags;
|
||||
|
||||
/**
|
||||
* Mateial texture map
|
||||
* \ingroup material
|
||||
*/
|
||||
typedef struct Lib3dsTextureMap {
|
||||
Lib3dsUserData user;
|
||||
char name[64];
|
||||
Lib3dsDword flags;
|
||||
Lib3dsFloat percent;
|
||||
Lib3dsFloat blur;
|
||||
Lib3dsFloat scale[2];
|
||||
Lib3dsFloat offset[2];
|
||||
Lib3dsFloat rotation;
|
||||
Lib3dsRgb tint_1;
|
||||
Lib3dsRgb tint_2;
|
||||
Lib3dsRgb tint_r;
|
||||
Lib3dsRgb tint_g;
|
||||
Lib3dsRgb tint_b;
|
||||
} Lib3dsTextureMap;
|
||||
|
||||
/**
|
||||
* \ingroup material
|
||||
*/
|
||||
typedef enum Lib3dsAutoReflMapFlags {
|
||||
LIB3DS_USE_REFL_MAP =0x0001,
|
||||
LIB3DS_READ_FIRST_FRAME_ONLY =0x0004,
|
||||
LIB3DS_FLAT_MIRROR =0x0008
|
||||
} Lib3dsAutoReflectionMapFlags;
|
||||
|
||||
/**
|
||||
* \ingroup material
|
||||
*/
|
||||
typedef enum Lib3dsAutoReflMapAntiAliasLevel {
|
||||
LIB3DS_ANTI_ALIAS_NONE =0,
|
||||
LIB3DS_ANTI_ALIAS_LOW =1,
|
||||
LIB3DS_ANTI_ALIAS_MEDIUM =2,
|
||||
LIB3DS_ANTI_ALIAS_HIGH =3
|
||||
} Lib3dsAutoReflMapAntiAliasLevel;
|
||||
|
||||
/**
|
||||
* Auto reflection map settings
|
||||
* \ingroup material
|
||||
*/
|
||||
typedef struct Lib3dsAutoReflMap {
|
||||
Lib3dsDword flags;
|
||||
Lib3dsIntd level;
|
||||
Lib3dsIntd size;
|
||||
Lib3dsIntd frame_step;
|
||||
} Lib3dsAutoReflMap;
|
||||
|
||||
/**
|
||||
* \ingroup material
|
||||
*/
|
||||
typedef enum Lib3dsMaterialShading {
|
||||
LIB3DS_WIRE_FRAME =0,
|
||||
LIB3DS_FLAT =1,
|
||||
LIB3DS_GOURAUD =2,
|
||||
LIB3DS_PHONG =3,
|
||||
LIB3DS_METAL =4
|
||||
} Lib3dsMaterialShading;
|
||||
|
||||
/**
|
||||
* Material
|
||||
* \ingroup material
|
||||
*/
|
||||
struct Lib3dsMaterial {
|
||||
Lib3dsUserData user; /*! Arbitrary user data */
|
||||
Lib3dsMaterial *next;
|
||||
char name[64]; /*! Material name */
|
||||
Lib3dsRgba ambient; /*! Material ambient reflectivity */
|
||||
Lib3dsRgba diffuse; /*! Material diffuse reflectivity */
|
||||
Lib3dsRgba specular; /*! Material specular reflectivity */
|
||||
Lib3dsFloat shininess; /*! Material specular exponent */
|
||||
Lib3dsFloat shin_strength;
|
||||
Lib3dsBool use_blur;
|
||||
Lib3dsFloat blur;
|
||||
Lib3dsFloat transparency;
|
||||
Lib3dsFloat falloff;
|
||||
Lib3dsBool additive;
|
||||
Lib3dsFloat self_ilpct;
|
||||
Lib3dsBool use_falloff;
|
||||
Lib3dsBool self_illum;
|
||||
Lib3dsIntw shading;
|
||||
Lib3dsBool soften;
|
||||
Lib3dsBool face_map;
|
||||
Lib3dsBool two_sided; /*! Material visible from back */
|
||||
Lib3dsBool map_decal;
|
||||
Lib3dsBool use_wire;
|
||||
Lib3dsBool use_wire_abs;
|
||||
Lib3dsFloat wire_size;
|
||||
Lib3dsTextureMap texture1_map;
|
||||
Lib3dsTextureMap texture1_mask;
|
||||
Lib3dsTextureMap texture2_map;
|
||||
Lib3dsTextureMap texture2_mask;
|
||||
Lib3dsTextureMap opacity_map;
|
||||
Lib3dsTextureMap opacity_mask;
|
||||
Lib3dsTextureMap bump_map;
|
||||
Lib3dsTextureMap bump_mask;
|
||||
Lib3dsTextureMap specular_map;
|
||||
Lib3dsTextureMap specular_mask;
|
||||
Lib3dsTextureMap shininess_map;
|
||||
Lib3dsTextureMap shininess_mask;
|
||||
Lib3dsTextureMap self_illum_map;
|
||||
Lib3dsTextureMap self_illum_mask;
|
||||
Lib3dsTextureMap reflection_map;
|
||||
Lib3dsTextureMap reflection_mask;
|
||||
Lib3dsAutoReflMap autorefl_map;
|
||||
};
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsMaterial* lib3ds_material_new();
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_material_free(Lib3dsMaterial *material);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_material_dump(Lib3dsMaterial *material);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_material_read(Lib3dsMaterial *material, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_material_write(Lib3dsMaterial *material, Lib3dsIo *io);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
718
src/external/lib3ds-1.3.0/lib3ds/matrix.c
vendored
718
src/external/lib3ds-1.3.0/lib3ds/matrix.c
vendored
@ -1,718 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: matrix.c,v 1.14 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/matrix.h>
|
||||
#include <lib3ds/quat.h>
|
||||
#include <lib3ds/vector.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup matrix Matrix Mathematics
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
* \typedef Lib3dsMatrix
|
||||
* \ingroup matrix
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
* Clear a matrix to all zeros.
|
||||
*
|
||||
* \param m Matrix to be cleared.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_zero(Lib3dsMatrix m)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
for (j=0; j<4; j++) m[i][j]=0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Set a matrix to identity.
|
||||
*
|
||||
* \param m Matrix to be set.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_identity(Lib3dsMatrix m)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
for (j=0; j<4; j++) m[i][j]=0.0;
|
||||
}
|
||||
for (i=0; i<4; i++) m[i][i]=1.0;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Copy a matrix.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_copy(Lib3dsMatrix dest, Lib3dsMatrix src)
|
||||
{
|
||||
memcpy(dest, src, sizeof(Lib3dsMatrix));
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Negate a matrix -- all elements negated.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_neg(Lib3dsMatrix m)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
for (j=0; j<4; j++) {
|
||||
for (i=0; i<4; i++) {
|
||||
m[j][i]=-m[j][i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Set all matrix elements to their absolute value.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_abs(Lib3dsMatrix m)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
for (j=0; j<4; j++) {
|
||||
for (i=0; i<4; i++) {
|
||||
m[j][i]=(Lib3dsFloat)fabs(m[j][i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Transpose a matrix in place.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_transpose(Lib3dsMatrix m)
|
||||
{
|
||||
int i,j;
|
||||
Lib3dsFloat swp;
|
||||
|
||||
for (j=0; j<4; j++) {
|
||||
for (i=j+1; i<4; i++) {
|
||||
swp=m[j][i];
|
||||
m[j][i]=m[i][j];
|
||||
m[i][j]=swp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Add two matrices.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
_lib3ds_matrix_add(Lib3dsMatrix m, Lib3dsMatrix a, Lib3dsMatrix b)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
for (j=0; j<4; j++) {
|
||||
for (i=0; i<4; i++) {
|
||||
m[j][i]=a[j][i]+b[j][i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Subtract two matrices.
|
||||
*
|
||||
* \param m Result.
|
||||
* \param a Addend.
|
||||
* \param b Minuend.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
_lib3ds_matrix_sub(Lib3dsMatrix m, Lib3dsMatrix a, Lib3dsMatrix b)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
for (j=0; j<4; j++) {
|
||||
for (i=0; i<4; i++) {
|
||||
m[j][i]=a[j][i]-b[j][i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Multiplies a matrix by a second one (m = m * n).
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_mult(Lib3dsMatrix m, Lib3dsMatrix n)
|
||||
{
|
||||
Lib3dsMatrix tmp;
|
||||
int i,j,k;
|
||||
Lib3dsFloat ab;
|
||||
|
||||
memcpy(tmp, m, sizeof(Lib3dsMatrix));
|
||||
for (j=0; j<4; j++) {
|
||||
for (i=0; i<4; i++) {
|
||||
ab=0.0f;
|
||||
for (k=0; k<4; k++) ab+=tmp[k][i]*n[j][k];
|
||||
m[j][i]=ab;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Multiply a matrix by a scalar.
|
||||
*
|
||||
* \param m Matrix to be set.
|
||||
* \param k Scalar.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_scalar(Lib3dsMatrix m, Lib3dsFloat k)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
for (j=0; j<4; j++) {
|
||||
for (i=0; i<4; i++) {
|
||||
m[j][i]*=k;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static Lib3dsFloat
|
||||
det2x2(
|
||||
Lib3dsFloat a, Lib3dsFloat b,
|
||||
Lib3dsFloat c, Lib3dsFloat d)
|
||||
{
|
||||
return((a)*(d)-(b)*(c));
|
||||
}
|
||||
|
||||
|
||||
static Lib3dsFloat
|
||||
det3x3(
|
||||
Lib3dsFloat a1, Lib3dsFloat a2, Lib3dsFloat a3,
|
||||
Lib3dsFloat b1, Lib3dsFloat b2, Lib3dsFloat b3,
|
||||
Lib3dsFloat c1, Lib3dsFloat c2, Lib3dsFloat c3)
|
||||
{
|
||||
return(
|
||||
a1*det2x2(b2,b3,c2,c3)-
|
||||
b1*det2x2(a2,a3,c2,c3)+
|
||||
c1*det2x2(a2,a3,b2,b3)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Find determinant of a matrix.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
Lib3dsFloat
|
||||
lib3ds_matrix_det(Lib3dsMatrix m)
|
||||
{
|
||||
Lib3dsFloat a1,a2,a3,a4,b1,b2,b3,b4,c1,c2,c3,c4,d1,d2,d3,d4;
|
||||
|
||||
a1 = m[0][0];
|
||||
b1 = m[1][0];
|
||||
c1 = m[2][0];
|
||||
d1 = m[3][0];
|
||||
a2 = m[0][1];
|
||||
b2 = m[1][1];
|
||||
c2 = m[2][1];
|
||||
d2 = m[3][1];
|
||||
a3 = m[0][2];
|
||||
b3 = m[1][2];
|
||||
c3 = m[2][2];
|
||||
d3 = m[3][2];
|
||||
a4 = m[0][3];
|
||||
b4 = m[1][3];
|
||||
c4 = m[2][3];
|
||||
d4 = m[3][3];
|
||||
return(
|
||||
a1 * det3x3(b2, b3, b4, c2, c3, c4, d2, d3, d4)-
|
||||
b1 * det3x3(a2, a3, a4, c2, c3, c4, d2, d3, d4)+
|
||||
c1 * det3x3(a2, a3, a4, b2, b3, b4, d2, d3, d4)-
|
||||
d1 * det3x3(a2, a3, a4, b2, b3, b4, c2, c3, c4)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Find the adjoint of a matrix.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_adjoint(Lib3dsMatrix m)
|
||||
{
|
||||
Lib3dsFloat a1,a2,a3,a4,b1,b2,b3,b4,c1,c2,c3,c4,d1,d2,d3,d4;
|
||||
|
||||
a1 = m[0][0];
|
||||
b1 = m[1][0];
|
||||
c1 = m[2][0];
|
||||
d1 = m[3][0];
|
||||
a2 = m[0][1];
|
||||
b2 = m[1][1];
|
||||
c2 = m[2][1];
|
||||
d2 = m[3][1];
|
||||
a3 = m[0][2];
|
||||
b3 = m[1][2];
|
||||
c3 = m[2][2];
|
||||
d3 = m[3][2];
|
||||
a4 = m[0][3];
|
||||
b4 = m[1][3];
|
||||
c4 = m[2][3];
|
||||
d4 = m[3][3];
|
||||
m[0][0]= det3x3 (b2, b3, b4, c2, c3, c4, d2, d3, d4);
|
||||
m[0][1]= -det3x3 (a2, a3, a4, c2, c3, c4, d2, d3, d4);
|
||||
m[0][2]= det3x3 (a2, a3, a4, b2, b3, b4, d2, d3, d4);
|
||||
m[0][3]= -det3x3 (a2, a3, a4, b2, b3, b4, c2, c3, c4);
|
||||
m[1][0]= -det3x3 (b1, b3, b4, c1, c3, c4, d1, d3, d4);
|
||||
m[1][1]= det3x3 (a1, a3, a4, c1, c3, c4, d1, d3, d4);
|
||||
m[1][2]= -det3x3 (a1, a3, a4, b1, b3, b4, d1, d3, d4);
|
||||
m[1][3]= det3x3 (a1, a3, a4, b1, b3, b4, c1, c3, c4);
|
||||
m[2][0]= det3x3 (b1, b2, b4, c1, c2, c4, d1, d2, d4);
|
||||
m[2][1]= -det3x3 (a1, a2, a4, c1, c2, c4, d1, d2, d4);
|
||||
m[2][2]= det3x3 (a1, a2, a4, b1, b2, b4, d1, d2, d4);
|
||||
m[2][3]= -det3x3 (a1, a2, a4, b1, b2, b4, c1, c2, c4);
|
||||
m[3][0]= -det3x3 (b1, b2, b3, c1, c2, c3, d1, d2, d3);
|
||||
m[3][1]= det3x3 (a1, a2, a3, c1, c2, c3, d1, d2, d3);
|
||||
m[3][2]= -det3x3 (a1, a2, a3, b1, b2, b3, d1, d2, d3);
|
||||
m[3][3]= det3x3 (a1, a2, a3, b1, b2, b3, c1, c2, c3);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Invert a matrix in place.
|
||||
*
|
||||
* \param m Matrix to invert.
|
||||
*
|
||||
* \return LIB3DS_TRUE on success, LIB3DS_FALSE on failure.
|
||||
* \ingroup matrix
|
||||
*
|
||||
* GGemsII, K.Wu, Fast Matrix Inversion
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_matrix_inv(Lib3dsMatrix m)
|
||||
{
|
||||
int i,j,k;
|
||||
int pvt_i[4], pvt_j[4]; /* Locations of pivot elements */
|
||||
Lib3dsFloat pvt_val; /* Value of current pivot element */
|
||||
Lib3dsFloat hold; /* Temporary storage */
|
||||
Lib3dsFloat determinat;
|
||||
|
||||
determinat = 1.0f;
|
||||
for (k=0; k<4; k++) {
|
||||
/* Locate k'th pivot element */
|
||||
pvt_val=m[k][k]; /* Initialize for search */
|
||||
pvt_i[k]=k;
|
||||
pvt_j[k]=k;
|
||||
for (i=k; i<4; i++) {
|
||||
for (j=k; j<4; j++) {
|
||||
if (fabs(m[i][j]) > fabs(pvt_val)) {
|
||||
pvt_i[k]=i;
|
||||
pvt_j[k]=j;
|
||||
pvt_val=m[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Product of pivots, gives determinant when finished */
|
||||
determinat*=pvt_val;
|
||||
if (fabs(determinat)<LIB3DS_EPSILON) {
|
||||
return(LIB3DS_FALSE); /* Matrix is singular (zero determinant) */
|
||||
}
|
||||
|
||||
/* "Interchange" rows (with sign change stuff) */
|
||||
i=pvt_i[k];
|
||||
if (i!=k) { /* If rows are different */
|
||||
for (j=0; j<4; j++) {
|
||||
hold=-m[k][j];
|
||||
m[k][j]=m[i][j];
|
||||
m[i][j]=hold;
|
||||
}
|
||||
}
|
||||
|
||||
/* "Interchange" columns */
|
||||
j=pvt_j[k];
|
||||
if (j!=k) { /* If columns are different */
|
||||
for (i=0; i<4; i++) {
|
||||
hold=-m[i][k];
|
||||
m[i][k]=m[i][j];
|
||||
m[i][j]=hold;
|
||||
}
|
||||
}
|
||||
|
||||
/* Divide column by minus pivot value */
|
||||
for (i=0; i<4; i++) {
|
||||
if (i!=k) m[i][k]/=( -pvt_val) ;
|
||||
}
|
||||
|
||||
/* Reduce the matrix */
|
||||
for (i=0; i<4; i++) {
|
||||
hold = m[i][k];
|
||||
for (j=0; j<4; j++) {
|
||||
if (i!=k && j!=k) m[i][j]+=hold*m[k][j];
|
||||
}
|
||||
}
|
||||
|
||||
/* Divide row by pivot */
|
||||
for (j=0; j<4; j++) {
|
||||
if (j!=k) m[k][j]/=pvt_val;
|
||||
}
|
||||
|
||||
/* Replace pivot by reciprocal (at last we can touch it). */
|
||||
m[k][k] = 1.0f/pvt_val;
|
||||
}
|
||||
|
||||
/* That was most of the work, one final pass of row/column interchange */
|
||||
/* to finish */
|
||||
for (k=4-2; k>=0; k--) { /* Don't need to work with 1 by 1 corner*/
|
||||
i=pvt_j[k]; /* Rows to swap correspond to pivot COLUMN */
|
||||
if (i!=k) { /* If rows are different */
|
||||
for(j=0; j<4; j++) {
|
||||
hold = m[k][j];
|
||||
m[k][j]=-m[i][j];
|
||||
m[i][j]=hold;
|
||||
}
|
||||
}
|
||||
|
||||
j=pvt_i[k]; /* Columns to swap correspond to pivot ROW */
|
||||
if (j!=k) /* If columns are different */
|
||||
for (i=0; i<4; i++) {
|
||||
hold=m[i][k];
|
||||
m[i][k]=-m[i][j];
|
||||
m[i][j]=hold;
|
||||
}
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Apply a translation to a matrix.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_translate_xyz(Lib3dsMatrix m, Lib3dsFloat x, Lib3dsFloat y, Lib3dsFloat z)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
m[3][i]+= m[0][i]*x + m[1][i]*y + m[2][i]*z;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Apply a translation to a matrix.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_translate(Lib3dsMatrix m, Lib3dsVector t)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
m[3][i]+= m[0][i]*t[0] + m[1][i]*t[1] + m[2][i]*t[2];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Apply scale factors to a matrix.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_scale_xyz(Lib3dsMatrix m, Lib3dsFloat x, Lib3dsFloat y, Lib3dsFloat z)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
m[0][i]*=x;
|
||||
m[1][i]*=y;
|
||||
m[2][i]*=z;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Apply scale factors to a matrix.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_scale(Lib3dsMatrix m, Lib3dsVector s)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
m[0][i]*=s[0];
|
||||
m[1][i]*=s[1];
|
||||
m[2][i]*=s[2];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Apply a rotation about the x axis to a matrix.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_rotate_x(Lib3dsMatrix m, Lib3dsFloat phi)
|
||||
{
|
||||
Lib3dsFloat SinPhi,CosPhi;
|
||||
Lib3dsFloat a1[4],a2[4];
|
||||
|
||||
SinPhi=(Lib3dsFloat)sin(phi);
|
||||
CosPhi=(Lib3dsFloat)cos(phi);
|
||||
memcpy(a1,m[1],4*sizeof(Lib3dsFloat));
|
||||
memcpy(a2,m[2],4*sizeof(Lib3dsFloat));
|
||||
m[1][0]=CosPhi*a1[0]+SinPhi*a2[0];
|
||||
m[1][1]=CosPhi*a1[1]+SinPhi*a2[1];
|
||||
m[1][2]=CosPhi*a1[2]+SinPhi*a2[2];
|
||||
m[1][3]=CosPhi*a1[3]+SinPhi*a2[3];
|
||||
m[2][0]=-SinPhi*a1[0]+CosPhi*a2[0];
|
||||
m[2][1]=-SinPhi*a1[1]+CosPhi*a2[1];
|
||||
m[2][2]=-SinPhi*a1[2]+CosPhi*a2[2];
|
||||
m[2][3]=-SinPhi*a1[3]+CosPhi*a2[3];
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Apply a rotation about the y axis to a matrix.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_rotate_y(Lib3dsMatrix m, Lib3dsFloat phi)
|
||||
{
|
||||
Lib3dsFloat SinPhi,CosPhi;
|
||||
Lib3dsFloat a0[4],a2[4];
|
||||
|
||||
SinPhi=(Lib3dsFloat)sin(phi);
|
||||
CosPhi=(Lib3dsFloat)cos(phi);
|
||||
memcpy(a0,m[0],4*sizeof(Lib3dsFloat));
|
||||
memcpy(a2,m[2],4*sizeof(Lib3dsFloat));
|
||||
m[0][0]=CosPhi*a0[0]-SinPhi*a2[0];
|
||||
m[0][1]=CosPhi*a0[1]-SinPhi*a2[1];
|
||||
m[0][2]=CosPhi*a0[2]-SinPhi*a2[2];
|
||||
m[0][3]=CosPhi*a0[3]-SinPhi*a2[3];
|
||||
m[2][0]=SinPhi*a0[0]+CosPhi*a2[0];
|
||||
m[2][1]=SinPhi*a0[1]+CosPhi*a2[1];
|
||||
m[2][2]=SinPhi*a0[2]+CosPhi*a2[2];
|
||||
m[2][3]=SinPhi*a0[3]+CosPhi*a2[3];
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Apply a rotation about the z axis to a matrix.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_rotate_z(Lib3dsMatrix m, Lib3dsFloat phi)
|
||||
{
|
||||
Lib3dsFloat SinPhi,CosPhi;
|
||||
Lib3dsFloat a0[4],a1[4];
|
||||
|
||||
SinPhi=(Lib3dsFloat)sin(phi);
|
||||
CosPhi=(Lib3dsFloat)cos(phi);
|
||||
memcpy(a0,m[0],4*sizeof(Lib3dsFloat));
|
||||
memcpy(a1,m[1],4*sizeof(Lib3dsFloat));
|
||||
m[0][0]=CosPhi*a0[0]+SinPhi*a1[0];
|
||||
m[0][1]=CosPhi*a0[1]+SinPhi*a1[1];
|
||||
m[0][2]=CosPhi*a0[2]+SinPhi*a1[2];
|
||||
m[0][3]=CosPhi*a0[3]+SinPhi*a1[3];
|
||||
m[1][0]=-SinPhi*a0[0]+CosPhi*a1[0];
|
||||
m[1][1]=-SinPhi*a0[1]+CosPhi*a1[1];
|
||||
m[1][2]=-SinPhi*a0[2]+CosPhi*a1[2];
|
||||
m[1][3]=-SinPhi*a0[3]+CosPhi*a1[3];
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Apply a rotation about an arbitrary axis to a matrix.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_rotate(Lib3dsMatrix m, Lib3dsQuat q)
|
||||
{
|
||||
Lib3dsFloat s,xs,ys,zs,wx,wy,wz,xx,xy,xz,yy,yz,zz,l;
|
||||
Lib3dsMatrix R;
|
||||
|
||||
l=q[0]*q[0] + q[1]*q[1] + q[2]*q[2] + q[3]*q[3];
|
||||
if (fabs(l)<LIB3DS_EPSILON) {
|
||||
s=1.0f;
|
||||
}
|
||||
else {
|
||||
s=2.0f/l;
|
||||
}
|
||||
|
||||
xs = q[0] * s; ys = q[1] * s; zs = q[2] * s;
|
||||
wx = q[3] * xs; wy = q[3] * ys; wz = q[3] * zs;
|
||||
xx = q[0] * xs; xy = q[0] * ys; xz = q[0] * zs;
|
||||
yy = q[1] * ys; yz = q[1] * zs; zz = q[2] * zs;
|
||||
|
||||
R[0][0]=1.0f - (yy +zz);
|
||||
R[1][0]=xy - wz;
|
||||
R[2][0]=xz + wy;
|
||||
R[0][1]=xy + wz;
|
||||
R[1][1]=1.0f - (xx +zz);
|
||||
R[2][1]=yz - wx;
|
||||
R[0][2]=xz - wy;
|
||||
R[1][2]=yz + wx;
|
||||
R[2][2]=1.0f - (xx + yy);
|
||||
R[3][0]=R[3][1]=R[3][2]=R[0][3]=R[1][3]=R[2][3]=0.0f;
|
||||
R[3][3]=1.0f;
|
||||
|
||||
lib3ds_matrix_mult(m,R);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Apply a rotation about an arbitrary axis to a matrix.
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_rotate_axis(Lib3dsMatrix m, Lib3dsVector axis, Lib3dsFloat angle)
|
||||
{
|
||||
Lib3dsQuat q;
|
||||
|
||||
lib3ds_quat_axis_angle(q,axis,angle);
|
||||
lib3ds_matrix_rotate(m,q);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Compute a camera matrix based on position, target and roll.
|
||||
*
|
||||
* Generates a translate/rotate matrix that maps world coordinates
|
||||
* to camera coordinates. Resulting matrix does not include perspective
|
||||
* transform.
|
||||
*
|
||||
* \param matrix Destination matrix.
|
||||
* \param pos Camera position
|
||||
* \param tgt Camera target
|
||||
* \param roll Roll angle
|
||||
*
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_camera(Lib3dsMatrix matrix, Lib3dsVector pos,
|
||||
Lib3dsVector tgt, Lib3dsFloat roll)
|
||||
{
|
||||
Lib3dsMatrix M;
|
||||
Lib3dsVector x, y, z;
|
||||
|
||||
lib3ds_vector_sub(y, tgt, pos);
|
||||
lib3ds_vector_normalize(y);
|
||||
|
||||
if (y[0] != 0. || y[1] != 0) {
|
||||
z[0] = 0;
|
||||
z[1] = 0;
|
||||
z[2] = 1.0;
|
||||
}
|
||||
else { /* Special case: looking straight up or down z axis */
|
||||
z[0] = -1.0;
|
||||
z[1] = 0;
|
||||
z[2] = 0;
|
||||
}
|
||||
|
||||
lib3ds_vector_cross(x, y, z);
|
||||
lib3ds_vector_cross(z, x, y);
|
||||
lib3ds_vector_normalize(x);
|
||||
lib3ds_vector_normalize(z);
|
||||
|
||||
lib3ds_matrix_identity(M);
|
||||
M[0][0] = x[0];
|
||||
M[1][0] = x[1];
|
||||
M[2][0] = x[2];
|
||||
M[0][1] = y[0];
|
||||
M[1][1] = y[1];
|
||||
M[2][1] = y[2];
|
||||
M[0][2] = z[0];
|
||||
M[1][2] = z[1];
|
||||
M[2][2] = z[2];
|
||||
|
||||
lib3ds_matrix_identity(matrix);
|
||||
lib3ds_matrix_rotate_y(matrix, roll);
|
||||
lib3ds_matrix_mult(matrix, M);
|
||||
lib3ds_matrix_translate_xyz(matrix, -pos[0],-pos[1],-pos[2]);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup matrix
|
||||
*/
|
||||
void
|
||||
lib3ds_matrix_dump(Lib3dsMatrix matrix)
|
||||
{
|
||||
int i,j;
|
||||
|
||||
for (i=0; i<4; ++i) {
|
||||
for (j=0; j<4; ++j) {
|
||||
printf("%f ", matrix[j][i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
63
src/external/lib3ds-1.3.0/lib3ds/matrix.h
vendored
63
src/external/lib3ds-1.3.0/lib3ds/matrix.h
vendored
@ -1,63 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_MATRIX_H
|
||||
#define INCLUDED_LIB3DS_MATRIX_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: matrix.h,v 1.8 2007/06/18 06:11:32 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_zero(Lib3dsMatrix m);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_identity(Lib3dsMatrix m);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_copy(Lib3dsMatrix dest, Lib3dsMatrix src);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_neg(Lib3dsMatrix m);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_abs(Lib3dsMatrix m);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_transpose(Lib3dsMatrix m);
|
||||
LIB3DSEXTERN LIB3DSAPI void _lib3ds_matrix_add(Lib3dsMatrix m, Lib3dsMatrix a, Lib3dsMatrix b);
|
||||
LIB3DSEXTERN LIB3DSAPI void _lib3ds_matrix_sub(Lib3dsMatrix m, Lib3dsMatrix a, Lib3dsMatrix b);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_mult(Lib3dsMatrix m, Lib3dsMatrix n);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_scalar(Lib3dsMatrix m, Lib3dsFloat k);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsFloat lib3ds_matrix_det(Lib3dsMatrix m);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_adjoint(Lib3dsMatrix m);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_matrix_inv(Lib3dsMatrix m);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_translate_xyz(Lib3dsMatrix m, Lib3dsFloat x, Lib3dsFloat y, Lib3dsFloat z);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_translate(Lib3dsMatrix m, Lib3dsVector t);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_scale_xyz(Lib3dsMatrix m, Lib3dsFloat x, Lib3dsFloat y, Lib3dsFloat z);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_scale(Lib3dsMatrix m, Lib3dsVector s);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_rotate_x(Lib3dsMatrix m, Lib3dsFloat phi);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_rotate_y(Lib3dsMatrix m, Lib3dsFloat phi);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_rotate_z(Lib3dsMatrix m, Lib3dsFloat phi);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_rotate(Lib3dsMatrix m, Lib3dsQuat q);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_rotate_axis(Lib3dsMatrix m, Lib3dsVector axis, Lib3dsFloat angle);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_camera(Lib3dsMatrix matrix, Lib3dsVector pos, Lib3dsVector tgt, Lib3dsFloat roll);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_matrix_dump(Lib3dsMatrix matrix);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
1056
src/external/lib3ds-1.3.0/lib3ds/mesh.c
vendored
1056
src/external/lib3ds-1.3.0/lib3ds/mesh.c
vendored
File diff suppressed because it is too large
Load Diff
157
src/external/lib3ds-1.3.0/lib3ds/mesh.h
vendored
157
src/external/lib3ds-1.3.0/lib3ds/mesh.h
vendored
@ -1,157 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_MESH_H
|
||||
#define INCLUDED_LIB3DS_MESH_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: mesh.h,v 1.20 2007/06/20 17:04:08 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Triangular mesh point
|
||||
* \ingroup mesh
|
||||
*/
|
||||
typedef struct Lib3dsPoint {
|
||||
Lib3dsVector pos;
|
||||
} Lib3dsPoint;
|
||||
|
||||
/**
|
||||
* Triangular mesh face
|
||||
* \ingroup mesh
|
||||
* \sa Lib3dsFaceFlag
|
||||
*/
|
||||
struct Lib3dsFace {
|
||||
Lib3dsUserData user; /*! Arbitrary user data */
|
||||
char material[64]; /*! Material name */
|
||||
Lib3dsWord points[3]; /*! Indices into mesh points list */
|
||||
Lib3dsWord flags; /*! See Lib3dsFaceFlag, below */
|
||||
Lib3dsDword smoothing; /*! Bitmask; each bit identifies a group */
|
||||
Lib3dsVector normal;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Vertex flags
|
||||
* Meaning of _Lib3dsFace::flags. ABC are points of the current face
|
||||
* (A: is 1st vertex, B is 2nd vertex, C is 3rd vertex)
|
||||
*/
|
||||
typedef enum {
|
||||
LIB3DS_FACE_FLAG_VIS_AC = 0x1, /*!< Bit 0: Edge visibility AC */
|
||||
LIB3DS_FACE_FLAG_VIS_BC = 0x2, /*!< Bit 1: Edge visibility BC */
|
||||
LIB3DS_FACE_FLAG_VIS_AB = 0x4, /*!< Bit 2: Edge visibility AB */
|
||||
LIB3DS_FACE_FLAG_WRAP_U = 0x8, /*!< Bit 3: Face is at tex U wrap seam */
|
||||
LIB3DS_FACE_FLAG_WRAP_V = 0x10, /*!< Bit 4: Face is at tex V wrap seam */
|
||||
LIB3DS_FACE_FLAG_UNK7 = 0x80, /* Bit 5-8: Unused ? */
|
||||
LIB3DS_FACE_FLAG_UNK10 = 0x400, /* Bit 9-10: Random ? */
|
||||
/* Bit 11-12: Unused ? */
|
||||
LIB3DS_FACE_FLAG_SELECT_3 = (1<<13), /*!< Bit 13: Selection of the face in selection 3*/
|
||||
LIB3DS_FACE_FLAG_SELECT_2 = (1<<14), /*!< Bit 14: Selection of the face in selection 2*/
|
||||
LIB3DS_FACE_FLAG_SELECT_1 = (1<<15), /*!< Bit 15: Selection of the face in selection 1*/
|
||||
} Lib3dsFaceFlag;
|
||||
|
||||
/**
|
||||
* Triangular mesh box mapping settings
|
||||
* \ingroup mesh
|
||||
*/
|
||||
struct Lib3dsBoxMap {
|
||||
char front[64];
|
||||
char back[64];
|
||||
char left[64];
|
||||
char right[64];
|
||||
char top[64];
|
||||
char bottom[64];
|
||||
};
|
||||
|
||||
/**
|
||||
* Texture projection type
|
||||
* \ingroup tracks
|
||||
*/
|
||||
typedef enum {
|
||||
LIB3DS_MAP_NONE =0xFFFF,
|
||||
LIB3DS_MAP_PLANAR =0,
|
||||
LIB3DS_MAP_CYLINDRICAL =1,
|
||||
LIB3DS_MAP_SPHERICAL =2
|
||||
} Lib3dsMapType;
|
||||
|
||||
/**
|
||||
* Triangular mesh texture mapping data
|
||||
* \ingroup mesh
|
||||
*/
|
||||
struct Lib3dsMapData {
|
||||
Lib3dsWord maptype;
|
||||
Lib3dsVector pos;
|
||||
Lib3dsMatrix matrix;
|
||||
Lib3dsFloat scale;
|
||||
Lib3dsFloat tile[2];
|
||||
Lib3dsFloat planar_size[2];
|
||||
Lib3dsFloat cylinder_height;
|
||||
};
|
||||
|
||||
/**
|
||||
* Triangular mesh object
|
||||
* \ingroup mesh
|
||||
*/
|
||||
struct Lib3dsMesh {
|
||||
Lib3dsUserData user; /*< Arbitrary user data */
|
||||
Lib3dsMesh *next;
|
||||
char name[64]; /*< Mesh name. Don't use more than 8 characters */
|
||||
Lib3dsDword object_flags; /*< @see Lib3dsObjectFlags */
|
||||
Lib3dsByte color;
|
||||
Lib3dsMatrix matrix; /*< Transformation matrix for mesh data */
|
||||
Lib3dsDword points; /*< Number of points in point list */
|
||||
Lib3dsPoint *pointL; /*< Point list */
|
||||
Lib3dsDword flags; /*< Number of flags in per-point flags list */
|
||||
Lib3dsWord *flagL; /*< Per-point flags list */
|
||||
Lib3dsDword texels; /*< Number of U-V texture coordinates */
|
||||
Lib3dsTexel *texelL; /*< U-V texture coordinates */
|
||||
Lib3dsDword faces; /*< Number of faces in face list */
|
||||
Lib3dsFace *faceL; /*< Face list */
|
||||
Lib3dsBoxMap box_map;
|
||||
Lib3dsMapData map_data;
|
||||
};
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsMesh* lib3ds_mesh_new(const char *name);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_mesh_free(Lib3dsMesh *mesh);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_mesh_new_point_list(Lib3dsMesh *mesh, Lib3dsDword points);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_mesh_free_point_list(Lib3dsMesh *mesh);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_mesh_new_flag_list(Lib3dsMesh *mesh, Lib3dsDword flags);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_mesh_free_flag_list(Lib3dsMesh *mesh);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_mesh_new_texel_list(Lib3dsMesh *mesh, Lib3dsDword texels);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_mesh_free_texel_list(Lib3dsMesh *mesh);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_mesh_new_face_list(Lib3dsMesh *mesh, Lib3dsDword flags);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_mesh_free_face_list(Lib3dsMesh *mesh);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_mesh_bounding_box(Lib3dsMesh *mesh, Lib3dsVector bmin, Lib3dsVector bmax);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_mesh_calculate_normals(Lib3dsMesh *mesh, Lib3dsVector *normalL);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_mesh_dump(Lib3dsMesh *mesh);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_mesh_read(Lib3dsMesh *mesh, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_mesh_write(Lib3dsMesh *mesh, Lib3dsIo *io);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
1088
src/external/lib3ds-1.3.0/lib3ds/node.c
vendored
1088
src/external/lib3ds-1.3.0/lib3ds/node.c
vendored
File diff suppressed because it is too large
Load Diff
188
src/external/lib3ds-1.3.0/lib3ds/node.h
vendored
188
src/external/lib3ds-1.3.0/lib3ds/node.h
vendored
@ -1,188 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_NODE_H
|
||||
#define INCLUDED_LIB3DS_NODE_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: node.h,v 1.12 2007/06/20 17:04:09 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TRACKS_H
|
||||
#include <lib3ds/tracks.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Scene graph ambient color node data
|
||||
* \ingroup node
|
||||
*/
|
||||
typedef struct Lib3dsAmbientData {
|
||||
Lib3dsRgb col;
|
||||
Lib3dsLin3Track col_track;
|
||||
} Lib3dsAmbientData;
|
||||
|
||||
/**
|
||||
* Scene graph object instance node data
|
||||
* \ingroup node
|
||||
*/
|
||||
typedef struct Lib3dsObjectData {
|
||||
Lib3dsVector pivot;
|
||||
char instance[64];
|
||||
Lib3dsVector bbox_min;
|
||||
Lib3dsVector bbox_max;
|
||||
Lib3dsVector pos;
|
||||
Lib3dsLin3Track pos_track;
|
||||
Lib3dsQuat rot;
|
||||
Lib3dsQuatTrack rot_track;
|
||||
Lib3dsVector scl;
|
||||
Lib3dsLin3Track scl_track;
|
||||
Lib3dsFloat morph_smooth;
|
||||
char morph[64];
|
||||
Lib3dsMorphTrack morph_track;
|
||||
Lib3dsBool hide;
|
||||
Lib3dsBoolTrack hide_track;
|
||||
} Lib3dsObjectData;
|
||||
|
||||
/**
|
||||
* Scene graph camera node data
|
||||
* \ingroup node
|
||||
*/
|
||||
typedef struct Lib3dsCameraData {
|
||||
Lib3dsVector pos;
|
||||
Lib3dsLin3Track pos_track;
|
||||
Lib3dsFloat fov;
|
||||
Lib3dsLin1Track fov_track;
|
||||
Lib3dsFloat roll;
|
||||
Lib3dsLin1Track roll_track;
|
||||
} Lib3dsCameraData;
|
||||
|
||||
/**
|
||||
* Scene graph camera target node data
|
||||
* \ingroup node
|
||||
*/
|
||||
typedef struct Lib3dsTargetData {
|
||||
Lib3dsVector pos;
|
||||
Lib3dsLin3Track pos_track;
|
||||
} Lib3dsTargetData;
|
||||
|
||||
/**
|
||||
* Scene graph light node data
|
||||
* \ingroup node
|
||||
*/
|
||||
typedef struct Lib3dsLightData {
|
||||
Lib3dsVector pos;
|
||||
Lib3dsLin3Track pos_track;
|
||||
Lib3dsRgb col;
|
||||
Lib3dsLin3Track col_track;
|
||||
Lib3dsFloat hotspot;
|
||||
Lib3dsLin1Track hotspot_track;
|
||||
Lib3dsFloat falloff;
|
||||
Lib3dsLin1Track falloff_track;
|
||||
Lib3dsFloat roll;
|
||||
Lib3dsLin1Track roll_track;
|
||||
} Lib3dsLightData;
|
||||
|
||||
/**
|
||||
* Scene graph spotlight target node data
|
||||
* \ingroup node
|
||||
*/
|
||||
typedef struct Lib3dsSpotData {
|
||||
Lib3dsVector pos;
|
||||
Lib3dsLin3Track pos_track;
|
||||
} Lib3dsSpotData;
|
||||
|
||||
/**
|
||||
* Scene graph node data union
|
||||
* \ingroup node
|
||||
*/
|
||||
typedef union Lib3dsNodeData {
|
||||
Lib3dsAmbientData ambient;
|
||||
Lib3dsObjectData object;
|
||||
Lib3dsCameraData camera;
|
||||
Lib3dsTargetData target;
|
||||
Lib3dsLightData light;
|
||||
Lib3dsSpotData spot;
|
||||
} Lib3dsNodeData;
|
||||
|
||||
/*!
|
||||
* \ingroup node
|
||||
*/
|
||||
#define LIB3DS_NO_PARENT 65535
|
||||
|
||||
/**
|
||||
* Scene graph node
|
||||
* \ingroup node
|
||||
*/
|
||||
struct Lib3dsNode {
|
||||
Lib3dsUserData user;
|
||||
Lib3dsNode *next;
|
||||
Lib3dsNode *childs;
|
||||
Lib3dsNode *parent;
|
||||
Lib3dsNodeTypes type;
|
||||
Lib3dsWord node_id;
|
||||
char name[64];
|
||||
Lib3dsWord flags1;
|
||||
Lib3dsWord flags2;
|
||||
Lib3dsWord parent_id;
|
||||
Lib3dsMatrix matrix;
|
||||
Lib3dsNodeData data;
|
||||
};
|
||||
|
||||
/**
|
||||
* Node flags #1
|
||||
* \ingroup node
|
||||
*/
|
||||
typedef enum {
|
||||
LIB3DS_HIDDEN = 0x800
|
||||
} Lib3dsNodeFlags1;
|
||||
|
||||
/**
|
||||
* Node flags #2
|
||||
* \ingroup node
|
||||
*/
|
||||
typedef enum {
|
||||
LIB3DS_SHOW_PATH = 0x1,
|
||||
LIB3DS_SMOOTHING = 0x2,
|
||||
LIB3DS_MOTION_BLUR = 0x10,
|
||||
LIB3DS_MORPH_MATERIALS = 0x40
|
||||
} Lib3dsNodeFlags2;
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsNode* lib3ds_node_new_ambient();
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsNode* lib3ds_node_new_object();
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsNode* lib3ds_node_new_camera();
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsNode* lib3ds_node_new_target();
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsNode* lib3ds_node_new_light();
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsNode* lib3ds_node_new_spot();
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_node_free(Lib3dsNode *node);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_node_eval(Lib3dsNode *node, Lib3dsFloat t);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsNode* lib3ds_node_by_name(Lib3dsNode *node, const char* name,
|
||||
Lib3dsNodeTypes type);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsNode* lib3ds_node_by_id(Lib3dsNode *node, Lib3dsWord node_id);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_node_dump(Lib3dsNode *node, Lib3dsIntd level);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_node_read(Lib3dsNode *node, Lib3dsFile *file, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_node_write(Lib3dsNode *node, Lib3dsFile *file, Lib3dsIo *io);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
418
src/external/lib3ds-1.3.0/lib3ds/quat.c
vendored
418
src/external/lib3ds-1.3.0/lib3ds/quat.c
vendored
@ -1,418 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: quat.c,v 1.9 2007/06/20 17:04:09 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/quat.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup quat Quaternion Mathematics
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
* \typedef Lib3dsQuat
|
||||
* \ingroup quat
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
* Clear a quaternion.
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_zero(Lib3dsQuat c)
|
||||
{
|
||||
c[0]=c[1]=c[2]=c[3]=0.0f;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Set a quaternion to Identity
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_identity(Lib3dsQuat c)
|
||||
{
|
||||
c[0]=c[1]=c[2]=0.0f;
|
||||
c[3]=1.0f;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Copy a quaternion.
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_copy(Lib3dsQuat dest, Lib3dsQuat src)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<4; ++i) {
|
||||
dest[i]=src[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Compute a quaternion from axis and angle.
|
||||
*
|
||||
* \param c Computed quaternion
|
||||
* \param axis Rotation axis
|
||||
* \param angle Angle of rotation, radians.
|
||||
*
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_axis_angle(Lib3dsQuat c, Lib3dsVector axis, Lib3dsFloat angle)
|
||||
{
|
||||
Lib3dsDouble omega,s;
|
||||
Lib3dsDouble l;
|
||||
|
||||
l=sqrt(axis[0]*axis[0] + axis[1]*axis[1] + axis[2]*axis[2]);
|
||||
if (l<LIB3DS_EPSILON) {
|
||||
c[0]=c[1]=c[2]=0.0f;
|
||||
c[3]=1.0f;
|
||||
}
|
||||
else {
|
||||
omega=-0.5*angle;
|
||||
s=sin(omega)/l;
|
||||
c[0]=(Lib3dsFloat)s*axis[0];
|
||||
c[1]=(Lib3dsFloat)s*axis[1];
|
||||
c[2]=(Lib3dsFloat)s*axis[2];
|
||||
c[3]=(Lib3dsFloat)cos(omega);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Negate a quaternion
|
||||
*
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_neg(Lib3dsQuat c)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<4; ++i) {
|
||||
c[i]=-c[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Compute the absolute value of a quaternion
|
||||
*
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_abs(Lib3dsQuat c)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<4; ++i) {
|
||||
c[i]=(Lib3dsFloat)fabs(c[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Compute the conjugate of a quaternion
|
||||
*
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_cnj(Lib3dsQuat c)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
c[i]=-c[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Multiply two quaternions.
|
||||
*
|
||||
* \param c Result
|
||||
* \param a,b Inputs
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_mul(Lib3dsQuat c, Lib3dsQuat a, Lib3dsQuat b)
|
||||
{
|
||||
c[0]=a[3]*b[0] + a[0]*b[3] + a[1]*b[2] - a[2]*b[1];
|
||||
c[1]=a[3]*b[1] + a[1]*b[3] + a[2]*b[0] - a[0]*b[2];
|
||||
c[2]=a[3]*b[2] + a[2]*b[3] + a[0]*b[1] - a[1]*b[0];
|
||||
c[3]=a[3]*b[3] - a[0]*b[0] - a[1]*b[1] - a[2]*b[2];
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Multiply a quaternion by a scalar.
|
||||
*
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_scalar(Lib3dsQuat c, Lib3dsFloat k)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<4; ++i) {
|
||||
c[i]*=k;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Normalize a quaternion.
|
||||
*
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_normalize(Lib3dsQuat c)
|
||||
{
|
||||
Lib3dsDouble l,m;
|
||||
|
||||
l=sqrt(c[0]*c[0] + c[1]*c[1] + c[2]*c[2] + c[3]*c[3]);
|
||||
if (fabs(l)<LIB3DS_EPSILON) {
|
||||
c[0]=c[1]=c[2]=0.0f;
|
||||
c[3]=1.0f;
|
||||
}
|
||||
else {
|
||||
int i;
|
||||
m=1.0f/l;
|
||||
for (i=0; i<4; ++i) {
|
||||
c[i]=(Lib3dsFloat)(c[i]*m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Compute the inverse of a quaternion.
|
||||
*
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_inv(Lib3dsQuat c)
|
||||
{
|
||||
Lib3dsDouble l,m;
|
||||
|
||||
l=sqrt(c[0]*c[0] + c[1]*c[1] + c[2]*c[2] + c[3]*c[3]);
|
||||
if (fabs(l)<LIB3DS_EPSILON) {
|
||||
c[0]=c[1]=c[2]=0.0f;
|
||||
c[3]=1.0f;
|
||||
}
|
||||
else {
|
||||
m=1.0f/l;
|
||||
c[0]=(Lib3dsFloat)(-c[0]*m);
|
||||
c[1]=(Lib3dsFloat)(-c[1]*m);
|
||||
c[2]=(Lib3dsFloat)(-c[2]*m);
|
||||
c[3]=(Lib3dsFloat)(c[3]*m);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Compute the dot-product of a quaternion.
|
||||
*
|
||||
* \ingroup quat
|
||||
*/
|
||||
Lib3dsFloat
|
||||
lib3ds_quat_dot(Lib3dsQuat a, Lib3dsQuat b)
|
||||
{
|
||||
return(a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3]);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup quat
|
||||
*/
|
||||
Lib3dsFloat
|
||||
lib3ds_quat_squared(Lib3dsQuat c)
|
||||
{
|
||||
return(c[0]*c[0] + c[1]*c[1] + c[2]*c[2] + c[3]*c[3]);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup quat
|
||||
*/
|
||||
Lib3dsFloat
|
||||
lib3ds_quat_length(Lib3dsQuat c)
|
||||
{
|
||||
return((Lib3dsFloat)sqrt(c[0]*c[0] + c[1]*c[1] + c[2]*c[2] + c[3]*c[3]));
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_ln(Lib3dsQuat c)
|
||||
{
|
||||
Lib3dsDouble om,s,t;
|
||||
|
||||
s=sqrt(c[0]*c[0] + c[1]*c[1] + c[2]*c[2]);
|
||||
om=atan2(s,c[3]);
|
||||
if (fabs(s)<LIB3DS_EPSILON) {
|
||||
t=0.0f;
|
||||
}
|
||||
else {
|
||||
t=om/s;
|
||||
}
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
c[i]=(Lib3dsFloat)(c[i]*t);
|
||||
}
|
||||
c[3]=0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_ln_dif(Lib3dsQuat c, Lib3dsQuat a, Lib3dsQuat b)
|
||||
{
|
||||
Lib3dsQuat invp;
|
||||
|
||||
lib3ds_quat_copy(invp, a);
|
||||
lib3ds_quat_inv(invp);
|
||||
lib3ds_quat_mul(c, invp, b);
|
||||
lib3ds_quat_ln(c);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_exp(Lib3dsQuat c)
|
||||
{
|
||||
Lib3dsDouble om,sinom;
|
||||
|
||||
om=sqrt(c[0]*c[0] + c[1]*c[1] + c[2]*c[2]);
|
||||
if (fabs(om)<LIB3DS_EPSILON) {
|
||||
sinom=1.0f;
|
||||
}
|
||||
else {
|
||||
sinom=sin(om)/om;
|
||||
}
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
c[i]=(Lib3dsFloat)(c[i]*sinom);
|
||||
}
|
||||
c[3]=(Lib3dsFloat)cos(om);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_slerp(Lib3dsQuat c, Lib3dsQuat a, Lib3dsQuat b, Lib3dsFloat t)
|
||||
{
|
||||
Lib3dsDouble l;
|
||||
Lib3dsDouble om,sinom;
|
||||
Lib3dsDouble sp,sq;
|
||||
Lib3dsQuat q;
|
||||
|
||||
l=a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3];
|
||||
if ((1.0+l)>LIB3DS_EPSILON) {
|
||||
if (fabs(l)>1.0f) l/=fabs(l);
|
||||
om=acos(l);
|
||||
sinom=sin(om);
|
||||
if (fabs(sinom)>LIB3DS_EPSILON) {
|
||||
sp=sin((1.0f-t)*om)/sinom;
|
||||
sq=sin(t*om)/sinom;
|
||||
}
|
||||
else {
|
||||
sp=1.0f-t;
|
||||
sq=t;
|
||||
}
|
||||
c[0]=(Lib3dsFloat)(sp*a[0] + sq*b[0]);
|
||||
c[1]=(Lib3dsFloat)(sp*a[1] + sq*b[1]);
|
||||
c[2]=(Lib3dsFloat)(sp*a[2] + sq*b[2]);
|
||||
c[3]=(Lib3dsFloat)(sp*a[3] + sq*b[3]);
|
||||
}
|
||||
else {
|
||||
q[0]=-a[1];
|
||||
q[1]=a[0];
|
||||
q[2]=-a[3];
|
||||
q[3]=a[2];
|
||||
sp=sin((1.0-t)*LIB3DS_HALFPI);
|
||||
sq=sin(t*LIB3DS_HALFPI);
|
||||
c[0]=(Lib3dsFloat)(sp*a[0] + sq*q[0]);
|
||||
c[1]=(Lib3dsFloat)(sp*a[1] + sq*q[1]);
|
||||
c[2]=(Lib3dsFloat)(sp*a[2] + sq*q[2]);
|
||||
c[3]=(Lib3dsFloat)(sp*a[3] + sq*q[3]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_squad(Lib3dsQuat c, Lib3dsQuat a, Lib3dsQuat p, Lib3dsQuat q,
|
||||
Lib3dsQuat b, Lib3dsFloat t)
|
||||
{
|
||||
Lib3dsQuat ab;
|
||||
Lib3dsQuat pq;
|
||||
|
||||
lib3ds_quat_slerp(ab,a,b,t);
|
||||
lib3ds_quat_slerp(pq,p,q,t);
|
||||
lib3ds_quat_slerp(c,ab,pq,2*t*(1-t));
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_tangent(Lib3dsQuat c, Lib3dsQuat p, Lib3dsQuat q, Lib3dsQuat n)
|
||||
{
|
||||
Lib3dsQuat dn,dp,x;
|
||||
int i;
|
||||
|
||||
lib3ds_quat_ln_dif(dn, q, n);
|
||||
lib3ds_quat_ln_dif(dp, q, p);
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
x[i]=-1.0f/4.0f*(dn[i]+dp[i]);
|
||||
}
|
||||
lib3ds_quat_exp(x);
|
||||
lib3ds_quat_mul(c,q,x);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup quat
|
||||
*/
|
||||
void
|
||||
lib3ds_quat_dump(Lib3dsQuat q)
|
||||
{
|
||||
printf("%f %f %f %f\n", q[0], q[1], q[2], q[3]);
|
||||
}
|
||||
|
||||
61
src/external/lib3ds-1.3.0/lib3ds/quat.h
vendored
61
src/external/lib3ds-1.3.0/lib3ds/quat.h
vendored
@ -1,61 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_QUAT_H
|
||||
#define INCLUDED_LIB3DS_QUAT_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: quat.h,v 1.7 2007/06/14 09:59:10 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_zero(Lib3dsQuat c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_identity(Lib3dsQuat c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_copy(Lib3dsQuat dest, Lib3dsQuat src);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_axis_angle(Lib3dsQuat c, Lib3dsVector axis, Lib3dsFloat angle);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_neg(Lib3dsQuat c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_abs(Lib3dsQuat c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_cnj(Lib3dsQuat c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_mul(Lib3dsQuat c, Lib3dsQuat a, Lib3dsQuat b);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_scalar(Lib3dsQuat c, Lib3dsFloat k);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_normalize(Lib3dsQuat c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_inv(Lib3dsQuat c);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsFloat lib3ds_quat_dot(Lib3dsQuat a, Lib3dsQuat b);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsFloat lib3ds_quat_squared(Lib3dsQuat c);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsFloat lib3ds_quat_length(Lib3dsQuat c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_ln(Lib3dsQuat c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_ln_dif(Lib3dsQuat c, Lib3dsQuat a, Lib3dsQuat b);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_exp(Lib3dsQuat c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_slerp(Lib3dsQuat c, Lib3dsQuat a, Lib3dsQuat b, Lib3dsFloat t);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_squad(Lib3dsQuat c, Lib3dsQuat a, Lib3dsQuat p, Lib3dsQuat q,
|
||||
Lib3dsQuat b, Lib3dsFloat t);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_tangent(Lib3dsQuat c, Lib3dsQuat p, Lib3dsQuat q, Lib3dsQuat n);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_dump(Lib3dsQuat q);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
149
src/external/lib3ds-1.3.0/lib3ds/shadow.c
vendored
149
src/external/lib3ds-1.3.0/lib3ds/shadow.c
vendored
@ -1,149 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: shadow.c,v 1.11 2007/06/20 17:04:09 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/shadow.h>
|
||||
#include <lib3ds/chunk.h>
|
||||
#include <lib3ds/io.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup shadow Shadow Map Settings
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup shadow
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_shadow_read(Lib3dsShadow *shadow, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
|
||||
if (!lib3ds_chunk_read(&c, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
|
||||
switch (c.chunk) {
|
||||
case LIB3DS_SHADOW_MAP_SIZE:
|
||||
{
|
||||
shadow->map_size=lib3ds_io_read_intw(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_LO_SHADOW_BIAS:
|
||||
{
|
||||
shadow->lo_bias=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_HI_SHADOW_BIAS:
|
||||
{
|
||||
shadow->hi_bias=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_SHADOW_SAMPLES:
|
||||
{
|
||||
shadow->samples=lib3ds_io_read_intw(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_SHADOW_RANGE:
|
||||
{
|
||||
shadow->range=lib3ds_io_read_intd(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_SHADOW_FILTER:
|
||||
{
|
||||
shadow->filter=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_RAY_BIAS:
|
||||
{
|
||||
shadow->ray_bias=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup shadow
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_shadow_write(Lib3dsShadow *shadow, Lib3dsIo *io)
|
||||
{
|
||||
if (fabs(shadow->lo_bias)>LIB3DS_EPSILON) { /*---- LIB3DS_LO_SHADOW_BIAS ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_LO_SHADOW_BIAS;
|
||||
c.size=10;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_float(io, shadow->lo_bias);
|
||||
}
|
||||
|
||||
if (fabs(shadow->hi_bias)>LIB3DS_EPSILON) { /*---- LIB3DS_HI_SHADOW_BIAS ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_HI_SHADOW_BIAS;
|
||||
c.size=10;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_float(io, shadow->hi_bias);
|
||||
}
|
||||
|
||||
if (shadow->map_size) { /*---- LIB3DS_SHADOW_MAP_SIZE ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_SHADOW_MAP_SIZE;
|
||||
c.size=8;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_intw(io, shadow->map_size);
|
||||
}
|
||||
|
||||
if (shadow->samples) { /*---- LIB3DS_SHADOW_SAMPLES ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_SHADOW_SAMPLES;
|
||||
c.size=8;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_intw(io, shadow->samples);
|
||||
}
|
||||
|
||||
if (shadow->range) { /*---- LIB3DS_SHADOW_RANGE ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_SHADOW_RANGE;
|
||||
c.size=10;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_intd(io, shadow->range);
|
||||
}
|
||||
|
||||
if (fabs(shadow->filter)>LIB3DS_EPSILON) { /*---- LIB3DS_SHADOW_FILTER ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_SHADOW_FILTER;
|
||||
c.size=10;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_float(io, shadow->filter);
|
||||
}
|
||||
if (fabs(shadow->ray_bias)>LIB3DS_EPSILON) { /*---- LIB3DS_RAY_BIAS ----*/
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_RAY_BIAS;
|
||||
c.size=10;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_float(io, shadow->ray_bias);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
59
src/external/lib3ds-1.3.0/lib3ds/shadow.h
vendored
59
src/external/lib3ds-1.3.0/lib3ds/shadow.h
vendored
@ -1,59 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_SHADOW_H
|
||||
#define INCLUDED_LIB3DS_SHADOW_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: shadow.h,v 1.11 2007/06/20 17:04:09 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Shadow map settings
|
||||
* \ingroup shadow
|
||||
*/
|
||||
struct Lib3dsShadow {
|
||||
Lib3dsIntw map_size;
|
||||
Lib3dsFloat lo_bias;
|
||||
Lib3dsFloat hi_bias;
|
||||
Lib3dsIntw samples;
|
||||
Lib3dsIntd range;
|
||||
Lib3dsFloat filter;
|
||||
Lib3dsFloat ray_bias;
|
||||
};
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_shadow_read(Lib3dsShadow *shadow, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_shadow_write(Lib3dsShadow *shadow, Lib3dsIo *io);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
136
src/external/lib3ds-1.3.0/lib3ds/tcb.c
vendored
136
src/external/lib3ds-1.3.0/lib3ds/tcb.c
vendored
@ -1,136 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: tcb.c,v 1.11 2007/06/15 09:33:19 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/tcb.h>
|
||||
#include <lib3ds/io.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup tcb Tension/Continuity/Bias Splines
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup tcb
|
||||
*/
|
||||
void
|
||||
lib3ds_tcb(Lib3dsTcb *p, Lib3dsTcb *pc, Lib3dsTcb *c, Lib3dsTcb *nc, Lib3dsTcb *n,
|
||||
Lib3dsFloat *ksm, Lib3dsFloat *ksp, Lib3dsFloat *kdm, Lib3dsFloat *kdp)
|
||||
{
|
||||
Lib3dsFloat tm,cm,cp,bm,bp,tmcm,tmcp,cc;
|
||||
Lib3dsFloat dt,fp,fn;
|
||||
|
||||
if (!pc) {
|
||||
pc=c;
|
||||
}
|
||||
if (!nc) {
|
||||
nc=c;
|
||||
}
|
||||
|
||||
fp=fn=1.0f;
|
||||
if (p&&n) {
|
||||
dt=0.5f*(Lib3dsFloat)(pc->frame-p->frame+n->frame-nc->frame);
|
||||
fp=((Lib3dsFloat)(pc->frame-p->frame))/dt;
|
||||
fn=((Lib3dsFloat)(n->frame-nc->frame))/dt;
|
||||
cc=(Lib3dsFloat)fabs(c->cont);
|
||||
fp=fp+cc-cc*fp;
|
||||
fn=fn+cc-cc*fn;
|
||||
}
|
||||
|
||||
cm=1.0f-c->cont;
|
||||
tm=0.5f*(1.0f-c->tens);
|
||||
cp=2.0f-cm;
|
||||
bm=1.0f-c->bias;
|
||||
bp=2.0f-bm;
|
||||
tmcm=tm*cm;
|
||||
tmcp=tm*cp;
|
||||
*ksm=tmcm*bp*fp;
|
||||
*ksp=tmcp*bm*fp;
|
||||
*kdm=tmcp*bp*fn;
|
||||
*kdp=tmcm*bm*fn;
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup tcb
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_tcb_read(Lib3dsTcb *tcb, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsWord flags;
|
||||
|
||||
tcb->frame=lib3ds_io_read_intd(io);
|
||||
tcb->flags=flags=lib3ds_io_read_word(io);
|
||||
if (flags&LIB3DS_USE_TENSION) {
|
||||
tcb->tens=lib3ds_io_read_float(io);
|
||||
}
|
||||
if (flags&LIB3DS_USE_CONTINUITY) {
|
||||
tcb->cont=lib3ds_io_read_float(io);
|
||||
}
|
||||
if (flags&LIB3DS_USE_BIAS) {
|
||||
tcb->bias=lib3ds_io_read_float(io);
|
||||
}
|
||||
if (flags&LIB3DS_USE_EASE_TO) {
|
||||
tcb->ease_to=lib3ds_io_read_float(io);
|
||||
}
|
||||
if (flags&LIB3DS_USE_EASE_FROM) {
|
||||
tcb->ease_from=lib3ds_io_read_float(io);
|
||||
}
|
||||
if (lib3ds_io_error(io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup tcb
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_tcb_write(Lib3dsTcb *tcb, Lib3dsIo *io)
|
||||
{
|
||||
lib3ds_io_write_intd(io, tcb->frame);
|
||||
lib3ds_io_write_word(io, tcb->flags);
|
||||
if (tcb->flags&LIB3DS_USE_TENSION) {
|
||||
lib3ds_io_write_float(io, tcb->tens);
|
||||
}
|
||||
if (tcb->flags&LIB3DS_USE_CONTINUITY) {
|
||||
lib3ds_io_write_float(io, tcb->cont);
|
||||
}
|
||||
if (tcb->flags&LIB3DS_USE_BIAS) {
|
||||
lib3ds_io_write_float(io, tcb->bias);
|
||||
}
|
||||
if (tcb->flags&LIB3DS_USE_EASE_TO) {
|
||||
lib3ds_io_write_float(io, tcb->ease_to);
|
||||
}
|
||||
if (tcb->flags&LIB3DS_USE_EASE_FROM) {
|
||||
lib3ds_io_write_float(io, tcb->ease_from);
|
||||
}
|
||||
if (lib3ds_io_error(io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
62
src/external/lib3ds-1.3.0/lib3ds/tcb.h
vendored
62
src/external/lib3ds-1.3.0/lib3ds/tcb.h
vendored
@ -1,62 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_TCB_H
|
||||
#define INCLUDED_LIB3DS_TCB_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: tcb.h,v 1.11 2007/06/20 17:04:09 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum Lib3dsTcbFlags{
|
||||
LIB3DS_USE_TENSION =0x0001,
|
||||
LIB3DS_USE_CONTINUITY =0x0002,
|
||||
LIB3DS_USE_BIAS =0x0004,
|
||||
LIB3DS_USE_EASE_TO =0x0008,
|
||||
LIB3DS_USE_EASE_FROM =0x0010
|
||||
} Lib3dsTcbFlags;
|
||||
|
||||
typedef struct Lib3dsTcb {
|
||||
Lib3dsIntd frame;
|
||||
Lib3dsWord flags;
|
||||
Lib3dsFloat tens;
|
||||
Lib3dsFloat cont;
|
||||
Lib3dsFloat bias;
|
||||
Lib3dsFloat ease_to;
|
||||
Lib3dsFloat ease_from;
|
||||
} Lib3dsTcb;
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_tcb(Lib3dsTcb *p, Lib3dsTcb *pc, Lib3dsTcb *c,
|
||||
Lib3dsTcb *nc, Lib3dsTcb *n, Lib3dsFloat *ksm, Lib3dsFloat *ksp,
|
||||
Lib3dsFloat *kdm, Lib3dsFloat *kdp);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_tcb_read(Lib3dsTcb *tcb, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_tcb_write(Lib3dsTcb *tcb, Lib3dsIo *io);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
1552
src/external/lib3ds-1.3.0/lib3ds/tracks.c
vendored
1552
src/external/lib3ds-1.3.0/lib3ds/tracks.c
vendored
File diff suppressed because it is too large
Load Diff
209
src/external/lib3ds-1.3.0/lib3ds/tracks.h
vendored
209
src/external/lib3ds-1.3.0/lib3ds/tracks.h
vendored
@ -1,209 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_TRACKS_H
|
||||
#define INCLUDED_LIB3DS_TRACKS_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: tracks.h,v 1.11 2007/06/20 17:04:09 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TCB_H
|
||||
#include <lib3ds/tcb.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Track flags
|
||||
* \ingroup tracks
|
||||
*/
|
||||
typedef enum {
|
||||
LIB3DS_REPEAT =0x0001,
|
||||
LIB3DS_SMOOTH =0x0002,
|
||||
LIB3DS_LOCK_X =0x0008,
|
||||
LIB3DS_LOCK_Y =0x0010,
|
||||
LIB3DS_LOCK_Z =0x0020,
|
||||
LIB3DS_UNLINK_X =0x0100,
|
||||
LIB3DS_UNLINK_Y =0x0200,
|
||||
LIB3DS_UNLINK_Z =0x0400
|
||||
} Lib3dsTrackFlags;
|
||||
|
||||
/**
|
||||
* Boolean track key
|
||||
* \ingroup tracks
|
||||
*/
|
||||
struct Lib3dsBoolKey {
|
||||
Lib3dsTcb tcb;
|
||||
Lib3dsBoolKey *next;
|
||||
};
|
||||
|
||||
/**
|
||||
* Boolean track
|
||||
* \ingroup tracks
|
||||
*/
|
||||
struct Lib3dsBoolTrack {
|
||||
Lib3dsDword flags;
|
||||
Lib3dsBoolKey *keyL;
|
||||
};
|
||||
|
||||
/**
|
||||
* Floating-point track key
|
||||
* \ingroup tracks
|
||||
*/
|
||||
struct Lib3dsLin1Key {
|
||||
Lib3dsTcb tcb;
|
||||
Lib3dsLin1Key *next;
|
||||
Lib3dsFloat value;
|
||||
Lib3dsFloat dd;
|
||||
Lib3dsFloat ds;
|
||||
};
|
||||
|
||||
/**
|
||||
* Floating-point track
|
||||
* \ingroup tracks
|
||||
*/
|
||||
struct Lib3dsLin1Track {
|
||||
Lib3dsDword flags;
|
||||
Lib3dsLin1Key *keyL;
|
||||
};
|
||||
|
||||
/**
|
||||
* Vector track key
|
||||
* \ingroup tracks
|
||||
*/
|
||||
struct Lib3dsLin3Key {
|
||||
Lib3dsTcb tcb;
|
||||
Lib3dsLin3Key *next;
|
||||
Lib3dsVector value;
|
||||
Lib3dsVector dd;
|
||||
Lib3dsVector ds;
|
||||
};
|
||||
|
||||
/**
|
||||
* Vector track
|
||||
* \ingroup tracks
|
||||
*/
|
||||
struct Lib3dsLin3Track {
|
||||
Lib3dsDword flags;
|
||||
Lib3dsLin3Key *keyL;
|
||||
};
|
||||
|
||||
/**
|
||||
* Rotation track key
|
||||
* \ingroup tracks
|
||||
*/
|
||||
struct Lib3dsQuatKey {
|
||||
Lib3dsTcb tcb;
|
||||
Lib3dsQuatKey *next;
|
||||
Lib3dsVector axis;
|
||||
Lib3dsFloat angle;
|
||||
Lib3dsQuat q;
|
||||
Lib3dsQuat dd;
|
||||
Lib3dsQuat ds;
|
||||
};
|
||||
|
||||
/**
|
||||
* Rotation track
|
||||
* \ingroup tracks
|
||||
*/
|
||||
struct Lib3dsQuatTrack {
|
||||
Lib3dsDword flags;
|
||||
Lib3dsQuatKey *keyL;
|
||||
};
|
||||
|
||||
/**
|
||||
* Morph track key
|
||||
* \ingroup tracks
|
||||
*/
|
||||
struct Lib3dsMorphKey {
|
||||
Lib3dsTcb tcb;
|
||||
Lib3dsMorphKey *next;
|
||||
char name[64];
|
||||
};
|
||||
|
||||
/**
|
||||
* Morph track
|
||||
* \ingroup tracks
|
||||
*/
|
||||
struct Lib3dsMorphTrack {
|
||||
Lib3dsDword flags;
|
||||
Lib3dsMorphKey *keyL;
|
||||
};
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBoolKey* lib3ds_bool_key_new();
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_bool_key_free(Lib3dsBoolKey* key);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_bool_track_free_keys(Lib3dsBoolTrack *track);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_bool_track_insert(Lib3dsBoolTrack *track, Lib3dsBoolKey* key);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_bool_track_remove(Lib3dsBoolTrack *track, Lib3dsIntd frame);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_bool_track_eval(Lib3dsBoolTrack *track, Lib3dsBool *p, Lib3dsFloat t);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_bool_track_read(Lib3dsBoolTrack *track, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_bool_track_write(Lib3dsBoolTrack *track, Lib3dsIo *io);
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsLin1Key* lib3ds_lin1_key_new();
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin1_key_free(Lib3dsLin1Key* key);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin1_track_free_keys(Lib3dsLin1Track *track);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin1_key_setup(Lib3dsLin1Key *p, Lib3dsLin1Key *cp, Lib3dsLin1Key *c,
|
||||
Lib3dsLin1Key *cn, Lib3dsLin1Key *n);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin1_track_setup(Lib3dsLin1Track *track);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin1_track_insert(Lib3dsLin1Track *track, Lib3dsLin1Key *key);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin1_track_remove(Lib3dsLin1Track *track, Lib3dsIntd frame);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin1_track_eval(Lib3dsLin1Track *track, Lib3dsFloat *p, Lib3dsFloat t);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_lin1_track_read(Lib3dsLin1Track *track, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_lin1_track_write(Lib3dsLin1Track *track, Lib3dsIo *io);
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsLin3Key* lib3ds_lin3_key_new();
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin3_key_free(Lib3dsLin3Key* key);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin3_track_free_keys(Lib3dsLin3Track *track);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin3_key_setup(Lib3dsLin3Key *p, Lib3dsLin3Key *cp, Lib3dsLin3Key *c,
|
||||
Lib3dsLin3Key *cn, Lib3dsLin3Key *n);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin3_track_setup(Lib3dsLin3Track *track);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin3_track_insert(Lib3dsLin3Track *track, Lib3dsLin3Key *key);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin3_track_remove(Lib3dsLin3Track *track, Lib3dsIntd frame);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_lin3_track_eval(Lib3dsLin3Track *track, Lib3dsVector p, Lib3dsFloat t);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_lin3_track_read(Lib3dsLin3Track *track, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_lin3_track_write(Lib3dsLin3Track *track, Lib3dsIo *io);
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsQuatKey* lib3ds_quat_key_new();
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_key_free(Lib3dsQuatKey* key);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_track_free_keys(Lib3dsQuatTrack *track);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_key_setup(Lib3dsQuatKey *p, Lib3dsQuatKey *cp, Lib3dsQuatKey *c,
|
||||
Lib3dsQuatKey *cn, Lib3dsQuatKey *n);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_track_setup(Lib3dsQuatTrack *track);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_track_insert(Lib3dsQuatTrack *track, Lib3dsQuatKey *key);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_track_remove(Lib3dsQuatTrack *track, Lib3dsIntd frame);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_quat_track_eval(Lib3dsQuatTrack *track, Lib3dsQuat p, Lib3dsFloat t);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_quat_track_read(Lib3dsQuatTrack *track, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_quat_track_write(Lib3dsQuatTrack *track, Lib3dsIo *io);
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsMorphKey* lib3ds_morph_key_new();
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_morph_key_free(Lib3dsMorphKey* key);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_morph_track_free_keys(Lib3dsMorphTrack *track);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_morph_track_insert(Lib3dsMorphTrack *track, Lib3dsMorphKey *key);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_morph_track_remove(Lib3dsMorphTrack *track, Lib3dsIntd frame);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_morph_track_eval(Lib3dsMorphTrack *track, char *p, Lib3dsFloat t);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_morph_track_read(Lib3dsMorphTrack *track, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_morph_track_write(Lib3dsMorphTrack *track, Lib3dsIo *io);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
162
src/external/lib3ds-1.3.0/lib3ds/types.h
vendored
162
src/external/lib3ds-1.3.0/lib3ds/types.h
vendored
@ -1,162 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#define INCLUDED_LIB3DS_TYPES_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: types.h,v 1.25 2007/06/21 08:36:41 jeh Exp $
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef LIB3DS_STATIC
|
||||
#define LIB3DSEXTERN
|
||||
#define LIB3DSAPI
|
||||
#else
|
||||
|
||||
#define LIB3DSEXTERN extern
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef LIB3DS_EXPORTS
|
||||
#define LIB3DSAPI __declspec(dllexport)
|
||||
#else
|
||||
#define LIB3DSAPI __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define LIB3DSAPI
|
||||
#endif
|
||||
#endif // LIB3DS_STATIC
|
||||
|
||||
#define LIB3DS_TRUE 1
|
||||
#define LIB3DS_FALSE 0
|
||||
|
||||
#ifdef _MSC_VER
|
||||
typedef __int32 Lib3dsBool;
|
||||
typedef unsigned __int8 Lib3dsByte;
|
||||
typedef unsigned __int16 Lib3dsWord;
|
||||
typedef unsigned __int32 Lib3dsDword;
|
||||
typedef signed __int8 Lib3dsIntb;
|
||||
typedef signed __int16 Lib3dsIntw;
|
||||
typedef signed __int16 Lib3dsIntd;
|
||||
#else
|
||||
#include <stdint.h>
|
||||
typedef int32_t Lib3dsBool;
|
||||
typedef uint8_t Lib3dsByte;
|
||||
typedef uint16_t Lib3dsWord;
|
||||
typedef uint32_t Lib3dsDword;
|
||||
typedef int8_t Lib3dsIntb;
|
||||
typedef int16_t Lib3dsIntw;
|
||||
typedef int32_t Lib3dsIntd;
|
||||
#endif
|
||||
|
||||
typedef float Lib3dsFloat;
|
||||
typedef double Lib3dsDouble;
|
||||
|
||||
typedef float Lib3dsVector[3];
|
||||
typedef float Lib3dsTexel[2];
|
||||
typedef float Lib3dsQuat[4];
|
||||
typedef float Lib3dsMatrix[4][4];
|
||||
typedef float Lib3dsRgb[3];
|
||||
typedef float Lib3dsRgba[4];
|
||||
|
||||
#define LIB3DS_EPSILON (1e-8)
|
||||
#define LIB3DS_PI 3.14159265358979323846
|
||||
#define LIB3DS_TWOPI (2.0*LIB3DS_PI)
|
||||
#define LIB3DS_HALFPI (LIB3DS_PI/2.0)
|
||||
#define LIB3DS_RAD_TO_DEG(x) ((180.0/LIB3DS_PI)*(x))
|
||||
#define LIB3DS_DEG_TO_RAD(x) ((LIB3DS_PI/180.0)*(x))
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _DEBUG
|
||||
#ifndef ASSERT
|
||||
#include <assert.h>
|
||||
#define ASSERT(__expr) assert(__expr)
|
||||
#endif
|
||||
#define LIB3DS_ERROR_LOG \
|
||||
{printf("\t***LIB3DS_ERROR_LOG*** %s : %d\n", __FILE__, __LINE__);}
|
||||
#else
|
||||
#ifndef ASSERT
|
||||
#define ASSERT(__expr)
|
||||
#endif
|
||||
#define LIB3DS_ERROR_LOG
|
||||
#endif
|
||||
|
||||
typedef struct Lib3dsIo Lib3dsIo;
|
||||
typedef struct Lib3dsFile Lib3dsFile;
|
||||
typedef struct Lib3dsBackground Lib3dsBackground;
|
||||
typedef struct Lib3dsAtmosphere Lib3dsAtmosphere;
|
||||
typedef struct Lib3dsShadow Lib3dsShadow;
|
||||
typedef struct Lib3dsViewport Lib3dsViewport;
|
||||
typedef struct Lib3dsMaterial Lib3dsMaterial;
|
||||
typedef struct Lib3dsFace Lib3dsFace;
|
||||
typedef struct Lib3dsBoxMap Lib3dsBoxMap;
|
||||
typedef struct Lib3dsMapData Lib3dsMapData;
|
||||
typedef struct Lib3dsMesh Lib3dsMesh;
|
||||
typedef struct Lib3dsCamera Lib3dsCamera;
|
||||
typedef struct Lib3dsLight Lib3dsLight;
|
||||
typedef struct Lib3dsBoolKey Lib3dsBoolKey;
|
||||
typedef struct Lib3dsBoolTrack Lib3dsBoolTrack;
|
||||
typedef struct Lib3dsLin1Key Lib3dsLin1Key;
|
||||
typedef struct Lib3dsLin1Track Lib3dsLin1Track;
|
||||
typedef struct Lib3dsLin3Key Lib3dsLin3Key;
|
||||
typedef struct Lib3dsLin3Track Lib3dsLin3Track;
|
||||
typedef struct Lib3dsQuatKey Lib3dsQuatKey;
|
||||
typedef struct Lib3dsQuatTrack Lib3dsQuatTrack;
|
||||
typedef struct Lib3dsMorphKey Lib3dsMorphKey;
|
||||
typedef struct Lib3dsMorphTrack Lib3dsMorphTrack;
|
||||
|
||||
typedef enum Lib3dsNodeTypes {
|
||||
LIB3DS_UNKNOWN_NODE =0,
|
||||
LIB3DS_AMBIENT_NODE =1,
|
||||
LIB3DS_OBJECT_NODE =2,
|
||||
LIB3DS_CAMERA_NODE =3,
|
||||
LIB3DS_TARGET_NODE =4,
|
||||
LIB3DS_LIGHT_NODE =5,
|
||||
LIB3DS_SPOT_NODE =6
|
||||
} Lib3dsNodeTypes;
|
||||
|
||||
typedef struct Lib3dsNode Lib3dsNode;
|
||||
|
||||
typedef enum Lib3dsObjectFlags {
|
||||
LIB3DS_OBJECT_HIDDEN =0x01,
|
||||
LIB3DS_OBJECT_VIS_LOFTER =0x02,
|
||||
LIB3DS_OBJECT_DOESNT_CAST =0x04,
|
||||
LIB3DS_OBJECT_MATTE =0x08,
|
||||
LIB3DS_OBJECT_DONT_RCVSHADOW =0x10,
|
||||
LIB3DS_OBJECT_FAST =0x20,
|
||||
LIB3DS_OBJECT_FROZEN =0x40
|
||||
} Lib3dsObjectFlags;
|
||||
|
||||
typedef union Lib3dsUserData {
|
||||
void *p;
|
||||
Lib3dsIntd i;
|
||||
Lib3dsDword d;
|
||||
Lib3dsFloat f;
|
||||
Lib3dsMaterial *material;
|
||||
Lib3dsMesh *mesh;
|
||||
Lib3dsCamera *camera;
|
||||
Lib3dsLight *light;
|
||||
Lib3dsNode *node;
|
||||
} Lib3dsUserData;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
96
src/external/lib3ds-1.3.0/lib3ds/types.txt
vendored
96
src/external/lib3ds-1.3.0/lib3ds/types.txt
vendored
@ -1,96 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: types.txt,v 1.3 2007/06/20 17:04:09 jeh Exp $
|
||||
*/
|
||||
/*!
|
||||
|
||||
\defgroup types General Types
|
||||
|
||||
*/
|
||||
/*!
|
||||
|
||||
\typedef Lib3dsBool
|
||||
\ingroup types
|
||||
Bool Typedef
|
||||
|
||||
*/
|
||||
/*!
|
||||
|
||||
\typedef Lib3dsByte
|
||||
\ingroup types
|
||||
Byte (== 8bit unsigned int) Typedef
|
||||
|
||||
*/
|
||||
/*!
|
||||
|
||||
\typedef Lib3dsWord
|
||||
\ingroup types
|
||||
Word (== 16bit unsigned int) Typedef
|
||||
|
||||
*/
|
||||
/*!
|
||||
|
||||
\typedef Lib3dsDword
|
||||
\ingroup types
|
||||
Double-Word (== 32bit unsigned int) Typedef
|
||||
|
||||
*/
|
||||
/*!
|
||||
|
||||
\typedef Lib3dsIntb
|
||||
\ingroup types
|
||||
Signed Byte (== 8bit signed int) Typedef
|
||||
|
||||
*/
|
||||
/*!
|
||||
|
||||
\typedef Lib3dsIntw
|
||||
\ingroup types
|
||||
Signed Word (== 16bit signed int) Typedef
|
||||
|
||||
*/
|
||||
/*!
|
||||
|
||||
\typedef Lib3dsIntd
|
||||
\ingroup types
|
||||
Signed Double-Word (== 32bit signed int) Typedef
|
||||
|
||||
*/
|
||||
/*!
|
||||
|
||||
\typedef Lib3dsRgb
|
||||
\ingroup types
|
||||
Red, Green, Blue color Typedef
|
||||
|
||||
*/
|
||||
/*!
|
||||
|
||||
\typedef Lib3dsRgba
|
||||
\ingroup types
|
||||
Red, Green, Blue, Alpha color Typedef
|
||||
|
||||
*/
|
||||
/*!
|
||||
|
||||
\typedef Lib3dsTexel
|
||||
\ingroup types
|
||||
UV texture coordinates
|
||||
|
||||
*/
|
||||
376
src/external/lib3ds-1.3.0/lib3ds/vector.c
vendored
376
src/external/lib3ds-1.3.0/lib3ds/vector.c
vendored
@ -1,376 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: vector.c,v 1.12 2007/06/20 17:04:09 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/vector.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup vector Vector Mathematics
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
* \typedef Lib3dsVector
|
||||
* \ingroup vector
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
* Clear a vector to zero.
|
||||
*
|
||||
* \param c Vector to clear.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_zero(Lib3dsVector c)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
c[i]=0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Copy a vector.
|
||||
*
|
||||
* \param dest Destination vector.
|
||||
* \param src Source vector.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_copy(Lib3dsVector dest, Lib3dsVector src)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
dest[i]=src[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Negate a vector.
|
||||
*
|
||||
* \param c Vector to negate.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_neg(Lib3dsVector c)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
c[i]=-c[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Add two vectors.
|
||||
*
|
||||
* \param c Result.
|
||||
* \param a First addend.
|
||||
* \param b Second addend.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_add(Lib3dsVector c, Lib3dsVector a, Lib3dsVector b)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
c[i]=a[i]+b[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Subtract two vectors.
|
||||
*
|
||||
* \param c Result.
|
||||
* \param a Addend.
|
||||
* \param b Minuend.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_sub(Lib3dsVector c, Lib3dsVector a, Lib3dsVector b)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
c[i]=a[i]-b[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Multiply a vector by a scalar.
|
||||
*
|
||||
* \param c Vector to be multiplied.
|
||||
* \param k Scalar.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_scalar(Lib3dsVector c, Lib3dsFloat k)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
c[i]*=k;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Compute cross product.
|
||||
*
|
||||
* \param c Result.
|
||||
* \param a First vector.
|
||||
* \param b Second vector.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_cross(Lib3dsVector c, Lib3dsVector a, Lib3dsVector b)
|
||||
{
|
||||
c[0]=a[1]*b[2] - a[2]*b[1];
|
||||
c[1]=a[2]*b[0] - a[0]*b[2];
|
||||
c[2]=a[0]*b[1] - a[1]*b[0];
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Compute dot product.
|
||||
*
|
||||
* \param a First vector.
|
||||
* \param b Second vector.
|
||||
*
|
||||
* \return Dot product.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
Lib3dsFloat
|
||||
lib3ds_vector_dot(Lib3dsVector a, Lib3dsVector b)
|
||||
{
|
||||
return(a[0]*b[0] + a[1]*b[1] + a[2]*b[2]);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Compute square of vector.
|
||||
*
|
||||
* Computes x*x + y*y + z*z.
|
||||
*
|
||||
* \param c Vector to square.
|
||||
*
|
||||
* \return Square of vector.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
Lib3dsFloat
|
||||
lib3ds_vector_squared(Lib3dsVector c)
|
||||
{
|
||||
return(c[0]*c[0] + c[1]*c[1] + c[2]*c[2]);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Compute length of vector.
|
||||
*
|
||||
* Computes |c| = sqrt(x*x + y*y + z*z)
|
||||
*
|
||||
* \param c Vector to compute.
|
||||
*
|
||||
* \return Length of vector.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
Lib3dsFloat
|
||||
lib3ds_vector_length(Lib3dsVector c)
|
||||
{
|
||||
return((Lib3dsFloat)sqrt(c[0]*c[0] + c[1]*c[1] + c[2]*c[2]));
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Normalize a vector.
|
||||
*
|
||||
* Scales a vector so that its length is 1.0.
|
||||
*
|
||||
* \param c Vector to normalize.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_normalize(Lib3dsVector c)
|
||||
{
|
||||
Lib3dsFloat l,m;
|
||||
|
||||
l=(Lib3dsFloat)sqrt(c[0]*c[0] + c[1]*c[1] + c[2]*c[2]);
|
||||
if (fabs(l)<LIB3DS_EPSILON) {
|
||||
if ((c[0]>=c[1]) && (c[0]>=c[2])) {
|
||||
c[0]=1.0f;
|
||||
c[1]=c[2]=0.0f;
|
||||
}
|
||||
else
|
||||
if (c[1]>=c[2]) {
|
||||
c[1]=1.0f;
|
||||
c[0]=c[2]=0.0f;
|
||||
}
|
||||
else {
|
||||
c[2]=1.0f;
|
||||
c[0]=c[1]=0.0f;
|
||||
}
|
||||
}
|
||||
else {
|
||||
m=1.0f/l;
|
||||
c[0]*=m;
|
||||
c[1]*=m;
|
||||
c[2]*=m;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Compute a vector normal to two line segments.
|
||||
*
|
||||
* Computes the normal vector to the lines b-a and b-c.
|
||||
*
|
||||
* \param n Returned normal vector.
|
||||
* \param a Endpoint of first line.
|
||||
* \param b Base point of both lines.
|
||||
* \param c Endpoint of second line.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_normal(Lib3dsVector n, Lib3dsVector a, Lib3dsVector b, Lib3dsVector c)
|
||||
{
|
||||
Lib3dsVector p,q;
|
||||
|
||||
lib3ds_vector_sub(p,c,b);
|
||||
lib3ds_vector_sub(q,a,b);
|
||||
lib3ds_vector_cross(n,p,q);
|
||||
lib3ds_vector_normalize(n);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Multiply a point by a transformation matrix.
|
||||
*
|
||||
* Applies the given transformation matrix to the given point. With some
|
||||
* transformation matrices, a vector may also be transformed.
|
||||
*
|
||||
* \param c Result.
|
||||
* \param m Transformation matrix.
|
||||
* \param a Input point.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_transform(Lib3dsVector c, Lib3dsMatrix m, Lib3dsVector a)
|
||||
{
|
||||
c[0]= m[0][0]*a[0] + m[1][0]*a[1] + m[2][0]*a[2] + m[3][0];
|
||||
c[1]= m[0][1]*a[0] + m[1][1]*a[1] + m[2][1]*a[2] + m[3][1];
|
||||
c[2]= m[0][2]*a[0] + m[1][2]*a[1] + m[2][2]*a[2] + m[3][2];
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Compute a point on a cubic spline.
|
||||
*
|
||||
* Computes a point on a parametric Bezier spline.
|
||||
*
|
||||
* \param c Result.
|
||||
* \param a First endpoint of the spline.
|
||||
* \param p First tangent vector of the spline.
|
||||
* \param q Second tangent vector of the spline.
|
||||
* \param b Second endpoint of the spline.
|
||||
* \param t Spline parameter [0. 1.]
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_cubic(Lib3dsVector c, Lib3dsVector a, Lib3dsVector p, Lib3dsVector q,
|
||||
Lib3dsVector b, Lib3dsFloat t)
|
||||
{
|
||||
Lib3dsDouble x,y,z,w;
|
||||
|
||||
x=2*t*t*t - 3*t*t + 1;
|
||||
y=-2*t*t*t + 3*t*t;
|
||||
z=t*t*t - 2*t*t + t;
|
||||
w=t*t*t - t*t;
|
||||
c[0]=(Lib3dsFloat)(x*a[0] + y*b[0] + z*p[0] + w*q[0]);
|
||||
c[1]=(Lib3dsFloat)(x*a[1] + y*b[1] + z*p[1] + w*q[1]);
|
||||
c[2]=(Lib3dsFloat)(x*a[2] + y*b[2] + z*p[2] + w*q[2]);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* c[i] = min(c[i], a[i]);
|
||||
*
|
||||
* Computes minimum values of x,y,z independently.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_min(Lib3dsVector c, Lib3dsVector a)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
if (a[i]<c[i]) {
|
||||
c[i] = a[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* c[i] = max(c[i], a[i]);
|
||||
*
|
||||
* Computes maximum values of x,y,z independently.
|
||||
*
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_max(Lib3dsVector c, Lib3dsVector a)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i<3; ++i) {
|
||||
if (a[i]>c[i]) {
|
||||
c[i] = a[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup vector
|
||||
*/
|
||||
void
|
||||
lib3ds_vector_dump(Lib3dsVector c)
|
||||
{
|
||||
fprintf(stderr, "%f %f %f\n", c[0], c[1], c[2]);
|
||||
}
|
||||
|
||||
58
src/external/lib3ds-1.3.0/lib3ds/vector.h
vendored
58
src/external/lib3ds-1.3.0/lib3ds/vector.h
vendored
@ -1,58 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_VECTOR_H
|
||||
#define INCLUDED_LIB3DS_VECTOR_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: vector.h,v 1.7 2007/06/14 09:59:10 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_zero(Lib3dsVector c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_copy(Lib3dsVector dest, Lib3dsVector src);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_neg(Lib3dsVector c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_add(Lib3dsVector c, Lib3dsVector a, Lib3dsVector b);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_sub(Lib3dsVector c, Lib3dsVector a, Lib3dsVector b);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_scalar(Lib3dsVector c, Lib3dsFloat k);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_cross(Lib3dsVector c, Lib3dsVector a, Lib3dsVector b);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsFloat lib3ds_vector_dot(Lib3dsVector a, Lib3dsVector b);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsFloat lib3ds_vector_squared(Lib3dsVector c);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsFloat lib3ds_vector_length(Lib3dsVector c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_normalize(Lib3dsVector c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_normal(Lib3dsVector n, Lib3dsVector a,
|
||||
Lib3dsVector b, Lib3dsVector c);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_transform(Lib3dsVector c, Lib3dsMatrix m, Lib3dsVector a);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_cubic(Lib3dsVector c, Lib3dsVector a, Lib3dsVector p,
|
||||
Lib3dsVector q, Lib3dsVector b, Lib3dsFloat t);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_min(Lib3dsVector c, Lib3dsVector a);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_max(Lib3dsVector c, Lib3dsVector a);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_vector_dump(Lib3dsVector c);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
413
src/external/lib3ds-1.3.0/lib3ds/viewport.c
vendored
413
src/external/lib3ds-1.3.0/lib3ds/viewport.c
vendored
@ -1,413 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: viewport.c,v 1.11 2007/06/20 17:04:09 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/viewport.h>
|
||||
#include <lib3ds/chunk.h>
|
||||
#include <lib3ds/io.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup viewport Viewport and default view settings
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup viewport
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_viewport_read(Lib3dsViewport *viewport, Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
Lib3dsWord chunk;
|
||||
|
||||
if (!lib3ds_chunk_read_start(&c, 0, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
|
||||
switch (c.chunk) {
|
||||
case LIB3DS_VIEWPORT_LAYOUT:
|
||||
{
|
||||
int cur=0;
|
||||
viewport->layout.style=lib3ds_io_read_word(io);
|
||||
viewport->layout.active=lib3ds_io_read_intw(io);
|
||||
lib3ds_io_read_intw(io);
|
||||
viewport->layout.swap=lib3ds_io_read_intw(io);
|
||||
lib3ds_io_read_intw(io);
|
||||
viewport->layout.swap_prior=lib3ds_io_read_intw(io);
|
||||
viewport->layout.swap_view=lib3ds_io_read_intw(io);
|
||||
lib3ds_chunk_read_tell(&c, io);
|
||||
while ((chunk=lib3ds_chunk_read_next(&c, io))!=0) {
|
||||
switch (chunk) {
|
||||
case LIB3DS_VIEWPORT_SIZE:
|
||||
{
|
||||
viewport->layout.position[0]=lib3ds_io_read_word(io);
|
||||
viewport->layout.position[1]=lib3ds_io_read_word(io);
|
||||
viewport->layout.size[0]=lib3ds_io_read_word(io);
|
||||
viewport->layout.size[1]=lib3ds_io_read_word(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEWPORT_DATA_3:
|
||||
{
|
||||
lib3ds_viewport_set_views(viewport,cur+1);
|
||||
lib3ds_io_read_intw(io);
|
||||
viewport->layout.viewL[cur].axis_lock=lib3ds_io_read_word(io);
|
||||
viewport->layout.viewL[cur].position[0]=lib3ds_io_read_intw(io);
|
||||
viewport->layout.viewL[cur].position[1]=lib3ds_io_read_intw(io);
|
||||
viewport->layout.viewL[cur].size[0]=lib3ds_io_read_intw(io);
|
||||
viewport->layout.viewL[cur].size[1]=lib3ds_io_read_intw(io);
|
||||
viewport->layout.viewL[cur].type=lib3ds_io_read_word(io);
|
||||
viewport->layout.viewL[cur].zoom=lib3ds_io_read_float(io);
|
||||
lib3ds_io_read_vector(io, viewport->layout.viewL[cur].center);
|
||||
viewport->layout.viewL[cur].horiz_angle=lib3ds_io_read_float(io);
|
||||
viewport->layout.viewL[cur].vert_angle=lib3ds_io_read_float(io);
|
||||
lib3ds_io_read(io, viewport->layout.viewL[cur].camera, 11);
|
||||
++cur;
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEWPORT_DATA:
|
||||
/* 3DS R2 & R3 chunk
|
||||
unsupported */
|
||||
break;
|
||||
default:
|
||||
lib3ds_chunk_unknown(chunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LIB3DS_DEFAULT_VIEW:
|
||||
{
|
||||
memset(&viewport->default_view,0,sizeof(Lib3dsDefaultView));
|
||||
while ((chunk=lib3ds_chunk_read_next(&c, io))!=0) {
|
||||
switch (chunk) {
|
||||
case LIB3DS_VIEW_TOP:
|
||||
{
|
||||
viewport->default_view.type=LIB3DS_VIEW_TYPE_TOP;
|
||||
lib3ds_io_read_vector(io, viewport->default_view.position);
|
||||
viewport->default_view.width=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_BOTTOM:
|
||||
{
|
||||
viewport->default_view.type=LIB3DS_VIEW_TYPE_BOTTOM;
|
||||
lib3ds_io_read_vector(io, viewport->default_view.position);
|
||||
viewport->default_view.width=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_LEFT:
|
||||
{
|
||||
viewport->default_view.type=LIB3DS_VIEW_TYPE_LEFT;
|
||||
lib3ds_io_read_vector(io, viewport->default_view.position);
|
||||
viewport->default_view.width=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_RIGHT:
|
||||
{
|
||||
viewport->default_view.type=LIB3DS_VIEW_TYPE_RIGHT;
|
||||
lib3ds_io_read_vector(io, viewport->default_view.position);
|
||||
viewport->default_view.width=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_FRONT:
|
||||
{
|
||||
viewport->default_view.type=LIB3DS_VIEW_TYPE_FRONT;
|
||||
lib3ds_io_read_vector(io, viewport->default_view.position);
|
||||
viewport->default_view.width=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_BACK:
|
||||
{
|
||||
viewport->default_view.type=LIB3DS_VIEW_TYPE_BACK;
|
||||
lib3ds_io_read_vector(io, viewport->default_view.position);
|
||||
viewport->default_view.width=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_USER:
|
||||
{
|
||||
viewport->default_view.type=LIB3DS_VIEW_TYPE_USER;
|
||||
lib3ds_io_read_vector(io, viewport->default_view.position);
|
||||
viewport->default_view.width=lib3ds_io_read_float(io);
|
||||
viewport->default_view.horiz_angle=lib3ds_io_read_float(io);
|
||||
viewport->default_view.vert_angle=lib3ds_io_read_float(io);
|
||||
viewport->default_view.roll_angle=lib3ds_io_read_float(io);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_CAMERA:
|
||||
{
|
||||
viewport->default_view.type=LIB3DS_VIEW_TYPE_CAMERA;
|
||||
lib3ds_io_read(io, viewport->default_view.camera, 11);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
lib3ds_chunk_unknown(chunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
lib3ds_chunk_read_end(&c, io);
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup viewport
|
||||
*/
|
||||
void
|
||||
lib3ds_viewport_set_views(Lib3dsViewport *viewport, Lib3dsDword views)
|
||||
{
|
||||
ASSERT(viewport);
|
||||
if (viewport->layout.views) {
|
||||
if (views) {
|
||||
viewport->layout.views=views;
|
||||
viewport->layout.viewL=(Lib3dsView*)realloc(viewport->layout.viewL, sizeof(Lib3dsView)*views);
|
||||
}
|
||||
else {
|
||||
free(viewport->layout.viewL);
|
||||
viewport->layout.views=0;
|
||||
viewport->layout.viewL=0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (views) {
|
||||
viewport->layout.views=views;
|
||||
viewport->layout.viewL=(Lib3dsView*)calloc(sizeof(Lib3dsView),views);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* \ingroup viewport
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_viewport_write(Lib3dsViewport *viewport, Lib3dsIo *io)
|
||||
{
|
||||
if (viewport->layout.views) {
|
||||
Lib3dsChunk c;
|
||||
unsigned i;
|
||||
|
||||
c.chunk=LIB3DS_VIEWPORT_LAYOUT;
|
||||
if (!lib3ds_chunk_write_start(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
|
||||
lib3ds_io_write_word(io, viewport->layout.style);
|
||||
lib3ds_io_write_intw(io, viewport->layout.active);
|
||||
lib3ds_io_write_intw(io, 0);
|
||||
lib3ds_io_write_intw(io, viewport->layout.swap);
|
||||
lib3ds_io_write_intw(io, 0);
|
||||
lib3ds_io_write_intw(io, viewport->layout.swap_prior);
|
||||
lib3ds_io_write_intw(io, viewport->layout.swap_view);
|
||||
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_VIEWPORT_SIZE;
|
||||
c.size=14;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_intw(io, viewport->layout.position[0]);
|
||||
lib3ds_io_write_intw(io, viewport->layout.position[1]);
|
||||
lib3ds_io_write_intw(io, viewport->layout.size[0]);
|
||||
lib3ds_io_write_intw(io, viewport->layout.size[1]);
|
||||
}
|
||||
|
||||
for (i=0; i<viewport->layout.views; ++i) {
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_VIEWPORT_DATA_3;
|
||||
c.size=55;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
|
||||
lib3ds_io_write_intw(io, 0);
|
||||
lib3ds_io_write_word(io, viewport->layout.viewL[i].axis_lock);
|
||||
lib3ds_io_write_intw(io, viewport->layout.viewL[i].position[0]);
|
||||
lib3ds_io_write_intw(io, viewport->layout.viewL[i].position[1]);
|
||||
lib3ds_io_write_intw(io, viewport->layout.viewL[i].size[0]);
|
||||
lib3ds_io_write_intw(io, viewport->layout.viewL[i].size[1]);
|
||||
lib3ds_io_write_word(io, viewport->layout.viewL[i].type);
|
||||
lib3ds_io_write_float(io, viewport->layout.viewL[i].zoom);
|
||||
lib3ds_io_write_vector(io, viewport->layout.viewL[i].center);
|
||||
lib3ds_io_write_float(io, viewport->layout.viewL[i].horiz_angle);
|
||||
lib3ds_io_write_float(io, viewport->layout.viewL[i].vert_angle);
|
||||
lib3ds_io_write(io, viewport->layout.viewL[i].camera,11);
|
||||
}
|
||||
|
||||
if (!lib3ds_chunk_write_end(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
if (viewport->default_view.type) {
|
||||
Lib3dsChunk c;
|
||||
|
||||
c.chunk=LIB3DS_DEFAULT_VIEW;
|
||||
if (!lib3ds_chunk_write_start(&c,io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
|
||||
switch (viewport->default_view.type) {
|
||||
case LIB3DS_VIEW_TYPE_TOP:
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_VIEW_TOP;
|
||||
c.size=22;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_vector(io, viewport->default_view.position);
|
||||
lib3ds_io_write_float(io, viewport->default_view.width);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_TYPE_BOTTOM:
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_VIEW_BOTTOM;
|
||||
c.size=22;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_vector(io, viewport->default_view.position);
|
||||
lib3ds_io_write_float(io, viewport->default_view.width);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_TYPE_LEFT:
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_VIEW_LEFT;
|
||||
c.size=22;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_vector(io, viewport->default_view.position);
|
||||
lib3ds_io_write_float(io, viewport->default_view.width);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_TYPE_RIGHT:
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_VIEW_RIGHT;
|
||||
c.size=22;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_vector(io, viewport->default_view.position);
|
||||
lib3ds_io_write_float(io, viewport->default_view.width);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_TYPE_FRONT:
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_VIEW_FRONT;
|
||||
c.size=22;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_vector(io, viewport->default_view.position);
|
||||
lib3ds_io_write_float(io, viewport->default_view.width);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_TYPE_BACK:
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_VIEW_BACK;
|
||||
c.size=22;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_vector(io, viewport->default_view.position);
|
||||
lib3ds_io_write_float(io, viewport->default_view.width);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_TYPE_USER:
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_VIEW_USER;
|
||||
c.size=34;
|
||||
lib3ds_chunk_write(&c,io);
|
||||
lib3ds_io_write_vector(io, viewport->default_view.position);
|
||||
lib3ds_io_write_float(io, viewport->default_view.width);
|
||||
lib3ds_io_write_float(io, viewport->default_view.horiz_angle);
|
||||
lib3ds_io_write_float(io, viewport->default_view.vert_angle);
|
||||
lib3ds_io_write_float(io, viewport->default_view.roll_angle);
|
||||
}
|
||||
break;
|
||||
case LIB3DS_VIEW_TYPE_CAMERA:
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
c.chunk=LIB3DS_VIEW_CAMERA;
|
||||
c.size=17;
|
||||
lib3ds_chunk_write(&c, io);
|
||||
lib3ds_io_write(io, viewport->default_view.camera, 11);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!lib3ds_chunk_write_end(&c, io)) {
|
||||
return(LIB3DS_FALSE);
|
||||
}
|
||||
}
|
||||
return(LIB3DS_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* Dump viewport.
|
||||
*
|
||||
* \param vp The viewport to be dumped.
|
||||
*
|
||||
* \ingroup node
|
||||
*/
|
||||
void
|
||||
lib3ds_viewport_dump(Lib3dsViewport *vp)
|
||||
{
|
||||
Lib3dsView *view;
|
||||
unsigned i;
|
||||
ASSERT(vp);
|
||||
|
||||
printf(" viewport:\n");
|
||||
printf(" layout:\n");
|
||||
printf(" style: %d\n", vp->layout.style);
|
||||
printf(" active: %d\n", vp->layout.active);
|
||||
printf(" swap: %d\n", vp->layout.swap);
|
||||
printf(" swap_prior: %d\n", vp->layout.swap_prior);
|
||||
printf(" position: %d,%d\n",
|
||||
vp->layout.position[0], vp->layout.position[1]);
|
||||
printf(" size: %d,%d\n", vp->layout.size[0], vp->layout.size[1]);
|
||||
printf(" views: %ld\n", vp->layout.views);
|
||||
if (vp->layout.views > 0 && vp->layout.viewL != NULL) {
|
||||
for(i=0, view=vp->layout.viewL; i < vp->layout.views; ++i, ++view) {
|
||||
printf(" view %d:\n", i);
|
||||
printf(" type: %d\n", view->type);
|
||||
printf(" axis_lock: %d\n", view->axis_lock);
|
||||
printf(" position: (%d,%d)\n",
|
||||
view->position[0], view->position[1]);
|
||||
printf(" size: (%d,%d)\n", view->size[0], view->size[1]);
|
||||
printf(" zoom: %g\n", view->zoom);
|
||||
printf(" center: (%g,%g,%g)\n",
|
||||
view->center[0], view->center[1], view->center[2]);
|
||||
printf(" horiz_angle: %g\n", view->horiz_angle);
|
||||
printf(" vert_angle: %g\n", view->vert_angle);
|
||||
printf(" camera: %s\n", view->camera);
|
||||
}
|
||||
}
|
||||
|
||||
printf(" default_view:\n");
|
||||
printf(" type: %d\n", vp->default_view.type);
|
||||
printf(" position: (%g,%g,%g)\n",
|
||||
vp->default_view.position[0],
|
||||
vp->default_view.position[1],
|
||||
vp->default_view.position[2]);
|
||||
printf(" width: %g\n", vp->default_view.width);
|
||||
printf(" horiz_angle: %g\n", vp->default_view.horiz_angle);
|
||||
printf(" vert_angle: %g\n", vp->default_view.vert_angle);
|
||||
printf(" roll_angle: %g\n", vp->default_view.roll_angle);
|
||||
printf(" camera: %s\n", vp->default_view.camera);
|
||||
}
|
||||
|
||||
137
src/external/lib3ds-1.3.0/lib3ds/viewport.h
vendored
137
src/external/lib3ds-1.3.0/lib3ds/viewport.h
vendored
@ -1,137 +0,0 @@
|
||||
/* -*- c -*- */
|
||||
#ifndef INCLUDED_LIB3DS_VIEWPORT_H
|
||||
#define INCLUDED_LIB3DS_VIEWPORT_H
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: viewport.h,v 1.8 2007/06/20 17:04:09 jeh Exp $
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_LIB3DS_TYPES_H
|
||||
#include <lib3ds/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Layout view types
|
||||
* \ingroup viewport
|
||||
*/
|
||||
typedef enum Lib3dsViewType {
|
||||
LIB3DS_VIEW_TYPE_NOT_USED =0,
|
||||
LIB3DS_VIEW_TYPE_TOP =1,
|
||||
LIB3DS_VIEW_TYPE_BOTTOM =2,
|
||||
LIB3DS_VIEW_TYPE_LEFT =3,
|
||||
LIB3DS_VIEW_TYPE_RIGHT =4,
|
||||
LIB3DS_VIEW_TYPE_FRONT =5,
|
||||
LIB3DS_VIEW_TYPE_BACK =6,
|
||||
LIB3DS_VIEW_TYPE_USER =7,
|
||||
LIB3DS_VIEW_TYPE_SPOTLIGHT =18,
|
||||
LIB3DS_VIEW_TYPE_CAMERA =65535
|
||||
} Lib3dsViewType;
|
||||
|
||||
/**
|
||||
* Layout view settings
|
||||
* \ingroup viewport
|
||||
*/
|
||||
typedef struct Lib3dsView {
|
||||
Lib3dsWord type;
|
||||
Lib3dsWord axis_lock;
|
||||
Lib3dsIntw position[2];
|
||||
Lib3dsIntw size[2];
|
||||
Lib3dsFloat zoom;
|
||||
Lib3dsVector center;
|
||||
Lib3dsFloat horiz_angle;
|
||||
Lib3dsFloat vert_angle;
|
||||
char camera[11];
|
||||
} Lib3dsView;
|
||||
|
||||
/**
|
||||
* Layout styles
|
||||
* \ingroup viewport
|
||||
*/
|
||||
typedef enum Lib3dsLayoutStyle {
|
||||
LIB3DS_LAYOUT_SINGLE =0,
|
||||
LIB3DS_LAYOUT_TWO_PANE_VERT_SPLIT =1,
|
||||
LIB3DS_LAYOUT_TWO_PANE_HORIZ_SPLIT =2,
|
||||
LIB3DS_LAYOUT_FOUR_PANE =3,
|
||||
LIB3DS_LAYOUT_THREE_PANE_LEFT_SPLIT =4,
|
||||
LIB3DS_LAYOUT_THREE_PANE_BOTTOM_SPLIT =5,
|
||||
LIB3DS_LAYOUT_THREE_PANE_RIGHT_SPLIT =6,
|
||||
LIB3DS_LAYOUT_THREE_PANE_TOP_SPLIT =7,
|
||||
LIB3DS_LAYOUT_THREE_PANE_VERT_SPLIT =8,
|
||||
LIB3DS_LAYOUT_THREE_PANE_HORIZ_SPLIT =9,
|
||||
LIB3DS_LAYOUT_FOUR_PANE_LEFT_SPLIT =10,
|
||||
LIB3DS_LAYOUT_FOUR_PANE_RIGHT_SPLIT =11
|
||||
} Lib3dsLayoutStyle;
|
||||
|
||||
/**
|
||||
* Viewport layout settings
|
||||
* \ingroup viewport
|
||||
*/
|
||||
typedef struct Lib3dsLayout {
|
||||
Lib3dsWord style;
|
||||
Lib3dsIntw active;
|
||||
Lib3dsIntw swap;
|
||||
Lib3dsIntw swap_prior;
|
||||
Lib3dsIntw swap_view;
|
||||
Lib3dsWord position[2];
|
||||
Lib3dsWord size[2];
|
||||
Lib3dsDword views;
|
||||
Lib3dsView *viewL;
|
||||
} Lib3dsLayout;
|
||||
|
||||
/**
|
||||
* Default view settings
|
||||
* \ingroup viewport
|
||||
*/
|
||||
typedef struct Lib3dsDefaultView {
|
||||
Lib3dsWord type;
|
||||
Lib3dsVector position;
|
||||
Lib3dsFloat width;
|
||||
Lib3dsFloat horiz_angle;
|
||||
Lib3dsFloat vert_angle;
|
||||
Lib3dsFloat roll_angle;
|
||||
char camera[64];
|
||||
} Lib3dsDefaultView;
|
||||
|
||||
/**
|
||||
* Viewport and default view settings
|
||||
* \ingroup viewport
|
||||
*/
|
||||
struct Lib3dsViewport {
|
||||
Lib3dsLayout layout;
|
||||
Lib3dsDefaultView default_view;
|
||||
};
|
||||
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_viewport_read(Lib3dsViewport *viewport, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_viewport_set_views(Lib3dsViewport *viewport, Lib3dsDword views);
|
||||
LIB3DSEXTERN LIB3DSAPI Lib3dsBool lib3ds_viewport_write(Lib3dsViewport *viewport, Lib3dsIo *io);
|
||||
LIB3DSEXTERN LIB3DSAPI void lib3ds_viewport_dump(Lib3dsViewport *viewport);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
6909
src/external/lib3ds-1.3.0/ltmain.sh
vendored
6909
src/external/lib3ds-1.3.0/ltmain.sh
vendored
File diff suppressed because it is too large
Load Diff
367
src/external/lib3ds-1.3.0/missing
vendored
367
src/external/lib3ds-1.3.0/missing
vendored
@ -1,367 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2006-05-10.23
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case $1 in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $1 in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
180
src/external/lib3ds-1.3.0/msvc8/3dsdump.vcproj
vendored
180
src/external/lib3ds-1.3.0/msvc8/3dsdump.vcproj
vendored
@ -1,180 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="3dsdump"
|
||||
ProjectGUID="{583C3AA7-9150-4BBD-A7F9-49E5C2D39D53}"
|
||||
RootNamespace="3dsdump"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="debug"
|
||||
IntermediateDirectory="tmp/3dsdump/debug"
|
||||
ConfigurationType="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
DisableLanguageExtensions="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="release"
|
||||
IntermediateDirectory="tmp/3dsdump/release"
|
||||
ConfigurationType="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;"
|
||||
RuntimeLibrary="2"
|
||||
DisableLanguageExtensions="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="..\tools\3dsdump.c"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
182
src/external/lib3ds-1.3.0/msvc8/3dsplay.vcproj
vendored
182
src/external/lib3ds-1.3.0/msvc8/3dsplay.vcproj
vendored
@ -1,182 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="3dsplay"
|
||||
ProjectGUID="{79DF8E20-21D9-47C2-8558-1F982A60264B}"
|
||||
RootNamespace="3dsplay"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="debug"
|
||||
IntermediateDirectory="tmp/3dsplay/debug"
|
||||
ConfigurationType="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
DisableLanguageExtensions="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="release"
|
||||
IntermediateDirectory="tmp/3dsplay/release"
|
||||
ConfigurationType="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;"
|
||||
RuntimeLibrary="2"
|
||||
DisableLanguageExtensions="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="0"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="..\examples\3dsplay.c"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
41
src/external/lib3ds-1.3.0/msvc8/lib3ds.rc
vendored
41
src/external/lib3ds-1.3.0/msvc8/lib3ds.rc
vendored
@ -1,41 +0,0 @@
|
||||
#include "winres.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,3,0,0
|
||||
PRODUCTVERSION 1,3,0,0
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "FileDescription", "lib3ds Dynamic Link Library"
|
||||
VALUE "FileVersion", "1.3.0"
|
||||
VALUE "InternalName", "lib3ds"
|
||||
VALUE "LegalCopyright", "Copyright (C) 1996-2007 by Jan Eric Kyprianidis"
|
||||
VALUE "OriginalFilename", "lib3ds.dll"
|
||||
VALUE "ProductName", "lib3ds Dynamic Link Library"
|
||||
VALUE "ProductVersion", "1.3.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
|
||||
38
src/external/lib3ds-1.3.0/msvc8/lib3ds.sln
vendored
38
src/external/lib3ds-1.3.0/msvc8/lib3ds.sln
vendored
@ -1,38 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib3ds", "lib3ds.vcproj", "{9CF2B398-9087-4D33-90EB-0320F42C78F4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "3dsdump", "3dsdump.vcproj", "{583C3AA7-9150-4BBD-A7F9-49E5C2D39D53}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{9CF2B398-9087-4D33-90EB-0320F42C78F4} = {9CF2B398-9087-4D33-90EB-0320F42C78F4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "3dsplay", "3dsplay.vcproj", "{79DF8E20-21D9-47C2-8558-1F982A60264B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{9CF2B398-9087-4D33-90EB-0320F42C78F4} = {9CF2B398-9087-4D33-90EB-0320F42C78F4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{9CF2B398-9087-4D33-90EB-0320F42C78F4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9CF2B398-9087-4D33-90EB-0320F42C78F4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9CF2B398-9087-4D33-90EB-0320F42C78F4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9CF2B398-9087-4D33-90EB-0320F42C78F4}.Release|Win32.Build.0 = Release|Win32
|
||||
{583C3AA7-9150-4BBD-A7F9-49E5C2D39D53}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{583C3AA7-9150-4BBD-A7F9-49E5C2D39D53}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{583C3AA7-9150-4BBD-A7F9-49E5C2D39D53}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{583C3AA7-9150-4BBD-A7F9-49E5C2D39D53}.Release|Win32.Build.0 = Release|Win32
|
||||
{79DF8E20-21D9-47C2-8558-1F982A60264B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{79DF8E20-21D9-47C2-8558-1F982A60264B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{79DF8E20-21D9-47C2-8558-1F982A60264B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{79DF8E20-21D9-47C2-8558-1F982A60264B}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
342
src/external/lib3ds-1.3.0/msvc8/lib3ds.vcproj
vendored
342
src/external/lib3ds-1.3.0/msvc8/lib3ds.vcproj
vendored
@ -1,342 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="lib3ds"
|
||||
ProjectGUID="{9CF2B398-9087-4D33-90EB-0320F42C78F4}"
|
||||
RootNamespace="lib3ds"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="debug"
|
||||
IntermediateDirectory="tmp/lib3ds/debug"
|
||||
ConfigurationType="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIB3DS_EXPORTS;"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
DisableLanguageExtensions="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="1"
|
||||
DisableSpecificWarnings="4996"
|
||||
ErrorReporting="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)\$(ProjectName)-1_3d.dll"
|
||||
Version="1.3"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="release"
|
||||
IntermediateDirectory="tmp/lib3ds/release"
|
||||
ConfigurationType="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=".."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIB3DS_EXPORTS;"
|
||||
RuntimeLibrary="2"
|
||||
DisableLanguageExtensions="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="1"
|
||||
DisableSpecificWarnings="4996"
|
||||
ErrorReporting="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)\$(ProjectName)-1_3.dll"
|
||||
Version="1.3"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="..\lib3ds\atmosphere.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\atmosphere.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\background.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\background.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\camera.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\camera.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\chunk.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\chunk.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\chunktable.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\ease.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\ease.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\file.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\file.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\io.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\io.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\lib3ds.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\light.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\light.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\material.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\material.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\matrix.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\matrix.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\mesh.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\mesh.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\node.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\node.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\quat.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\quat.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\shadow.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\shadow.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\tcb.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\tcb.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\tracks.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\tracks.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\types.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\vector.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\vector.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\viewport.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib3ds\viewport.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
51
src/external/lib3ds-1.3.0/tools/3dsdump.1
vendored
51
src/external/lib3ds-1.3.0/tools/3dsdump.1
vendored
@ -1,51 +0,0 @@
|
||||
.TH 3dsdump 1 "16 Jun 2001" Version 1.3.0
|
||||
.SH NAME
|
||||
3dsdump - Displays information about the internal structure of a 3DS file.
|
||||
.SH SYNOPSIS
|
||||
.B 3dsdump
|
||||
[options] filename [options]
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fI3dsdump\fP is a tool that is used to display information about
|
||||
the internal structure of a 3DS file.
|
||||
.
|
||||
.SH OPTIONS
|
||||
.l
|
||||
\fI3dsdump\fP accepts the following options:
|
||||
.TP 8
|
||||
.B \-h/\-\-help
|
||||
This help
|
||||
.TP 8
|
||||
.B \-m/\-\-materials
|
||||
Dump materials
|
||||
.TP 8
|
||||
.B \-t/\-\-trimeshes
|
||||
Dump meshes
|
||||
.TP 8
|
||||
.B \-i/\-\-instance
|
||||
Dump mesh instances
|
||||
.TP 8
|
||||
.B \-c/\-\-cameras
|
||||
Dump cameras
|
||||
.TP 8
|
||||
.B \-l/\-\-lights
|
||||
Dump lights
|
||||
.TP 8
|
||||
.B \-n/\-\-nodes
|
||||
Dump node hierarchy
|
||||
.SH COPYRIGHT
|
||||
.PP
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or (at
|
||||
your option) any later version.
|
||||
.PP
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
.PP
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
51
src/external/lib3ds-1.3.0/tools/3dsdump.1.in
vendored
51
src/external/lib3ds-1.3.0/tools/3dsdump.1.in
vendored
@ -1,51 +0,0 @@
|
||||
.TH 3dsdump 1 "16 Jun 2001" Version @LIB3DS_VERSION@
|
||||
.SH NAME
|
||||
3dsdump - Displays information about the internal structure of a 3DS file.
|
||||
.SH SYNOPSIS
|
||||
.B 3dsdump
|
||||
[options] filename [options]
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fI3dsdump\fP is a tool that is used to display information about
|
||||
the internal structure of a 3DS file.
|
||||
.
|
||||
.SH OPTIONS
|
||||
.l
|
||||
\fI3dsdump\fP accepts the following options:
|
||||
.TP 8
|
||||
.B \-h/\-\-help
|
||||
This help
|
||||
.TP 8
|
||||
.B \-m/\-\-materials
|
||||
Dump materials
|
||||
.TP 8
|
||||
.B \-t/\-\-trimeshes
|
||||
Dump meshes
|
||||
.TP 8
|
||||
.B \-i/\-\-instance
|
||||
Dump mesh instances
|
||||
.TP 8
|
||||
.B \-c/\-\-cameras
|
||||
Dump cameras
|
||||
.TP 8
|
||||
.B \-l/\-\-lights
|
||||
Dump lights
|
||||
.TP 8
|
||||
.B \-n/\-\-nodes
|
||||
Dump node hierarchy
|
||||
.SH COPYRIGHT
|
||||
.PP
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or (at
|
||||
your option) any later version.
|
||||
.PP
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
.PP
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
217
src/external/lib3ds-1.3.0/tools/3dsdump.c
vendored
217
src/external/lib3ds-1.3.0/tools/3dsdump.c
vendored
@ -1,217 +0,0 @@
|
||||
/*
|
||||
* The 3D Studio File Format Library
|
||||
* Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Id: 3dsdump.c,v 1.4 2007/06/14 11:29:39 jeh Exp $
|
||||
*/
|
||||
#include <lib3ds/file.h>
|
||||
#include <lib3ds/chunk.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/*!
|
||||
\example 3dsdump.c
|
||||
|
||||
Displays imformation about the content of a <i>3DS</i> file.
|
||||
|
||||
\code
|
||||
Syntax: 3dsdump [options] filename [options]
|
||||
|
||||
Options:
|
||||
-h/--help This help
|
||||
-s/--structure Dump structure of file
|
||||
-u/--unknown Report unknown chunks
|
||||
-m/--materials Dump materials
|
||||
-t/--trimeshes Dump meshes
|
||||
-i/--instance Dump mesh instances
|
||||
-c/--cameras Dump cameras
|
||||
-l/--lights Dump lights
|
||||
-n/--nodes Dump node hierarchy
|
||||
-w/--write filename Write new 3ds file to disk
|
||||
\endcode
|
||||
*/
|
||||
|
||||
|
||||
static void
|
||||
help()
|
||||
{
|
||||
fprintf(stderr,
|
||||
"The 3D Studio File Format Library - 3dsdump\n"
|
||||
"Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>\n"
|
||||
"All rights reserved.\n"
|
||||
"\n"
|
||||
"Syntax: 3dsdump [options] filename [options]\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -h/--help This help\n"
|
||||
" -s/--structure Dump structure of file\n"
|
||||
" -u/--unknown Report unknown chunks\n"
|
||||
" -m/--materials Dump materials\n"
|
||||
" -t/--trimeshes Dump meshes\n"
|
||||
" -i/--instance Dump mesh instances\n"
|
||||
" -c/--cameras Dump cameras\n"
|
||||
" -l/--lights Dump lights\n"
|
||||
" -n/--nodes Dump node hierarchy\n"
|
||||
" -w/--write filename Write new 3ds file to disk\n"
|
||||
"\n"
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
typedef enum _Flags {
|
||||
LIB3DSDUMP_STRUCTURE =0x0001,
|
||||
LIB3DSDUMP_UNKNOWN =0x0002,
|
||||
LIB3DSDUMP_MATERIALS =0x0004,
|
||||
LIB3DSDUMP_TRIMESHES =0x0008,
|
||||
LIB3DSDUMP_INSTANCES =0x0010,
|
||||
LIB3DSDUMP_CAMERAS =0x0020,
|
||||
LIB3DSDUMP_LIGHTS =0x0040,
|
||||
LIB3DSDUMP_NODES =0x0080,
|
||||
LIB3DSDUMP_WRITE_3DS =0x0100
|
||||
} Flags;
|
||||
|
||||
static const char* filename=0;
|
||||
static const char* output=0;
|
||||
static Lib3dsDword flags=0;
|
||||
|
||||
|
||||
static void
|
||||
parse_args(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=1; i<argc; ++i) {
|
||||
if (argv[i][0]=='-') {
|
||||
if ((strcmp(argv[i],"-h")==0) || (strcmp(argv[i],"--help")==0)) {
|
||||
help();
|
||||
}
|
||||
else
|
||||
if ((strcmp(argv[i],"-s")==0) || (strcmp(argv[i],"--structure")==0)) {
|
||||
flags|=LIB3DSDUMP_STRUCTURE;
|
||||
}
|
||||
else
|
||||
if ((strcmp(argv[i],"-u")==0) || (strcmp(argv[i],"--unknown")==0)) {
|
||||
flags|=LIB3DSDUMP_UNKNOWN;
|
||||
}
|
||||
else
|
||||
if ((strcmp(argv[i],"-m")==0) || (strcmp(argv[i],"--material")==0)) {
|
||||
flags|=LIB3DSDUMP_MATERIALS;
|
||||
}
|
||||
else
|
||||
if ((strcmp(argv[i],"-t")==0) || (strcmp(argv[i],"--trimesh")==0)) {
|
||||
flags|=LIB3DSDUMP_TRIMESHES;
|
||||
}
|
||||
else
|
||||
if ((strcmp(argv[i],"-i")==0) || (strcmp(argv[i],"--instance")==0)) {
|
||||
flags|=LIB3DSDUMP_INSTANCES;
|
||||
}
|
||||
else
|
||||
if ((strcmp(argv[i],"-c")==0) || (strcmp(argv[i],"--camera")==0)) {
|
||||
flags|=LIB3DSDUMP_CAMERAS;
|
||||
}
|
||||
else
|
||||
if ((strcmp(argv[i],"-l")==0) || (strcmp(argv[i],"--light")==0)) {
|
||||
flags|=LIB3DSDUMP_LIGHTS;
|
||||
}
|
||||
else
|
||||
if ((strcmp(argv[i],"-n")==0) || (strcmp(argv[i],"--nodes")==0)) {
|
||||
flags|=LIB3DSDUMP_NODES;
|
||||
}
|
||||
else
|
||||
if ((strcmp(argv[i],"-w")==0) || (strcmp(argv[i],"--write")==0)) {
|
||||
flags|=LIB3DSDUMP_WRITE_3DS;
|
||||
++i;
|
||||
if (i>=argc) {
|
||||
help();
|
||||
}
|
||||
output=argv[i];
|
||||
}
|
||||
else {
|
||||
help();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (filename) {
|
||||
help();
|
||||
}
|
||||
filename=argv[i];
|
||||
}
|
||||
}
|
||||
if (!filename) {
|
||||
help();
|
||||
}
|
||||
if (!flags) {
|
||||
flags=0xFFFFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
Lib3dsFile *f=0;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
lib3ds_chunk_enable_dump(flags&LIB3DSDUMP_STRUCTURE, flags&LIB3DSDUMP_UNKNOWN);
|
||||
f=lib3ds_file_load(filename);
|
||||
if (!f) {
|
||||
fprintf(stderr, "***ERROR***\nLoading file %s failed\n", filename);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (flags&LIB3DSDUMP_MATERIALS) {
|
||||
printf("Dumping materials:\n");
|
||||
lib3ds_file_dump_materials(f);
|
||||
printf("\n");
|
||||
}
|
||||
if (flags&LIB3DSDUMP_TRIMESHES) {
|
||||
printf("Dumping meshes:\n");
|
||||
lib3ds_file_dump_meshes(f);
|
||||
printf("\n");
|
||||
}
|
||||
if (flags&LIB3DSDUMP_INSTANCES) {
|
||||
printf("Dumping instances:\n");
|
||||
lib3ds_file_dump_instances(f);
|
||||
printf("\n");
|
||||
}
|
||||
if (flags&LIB3DSDUMP_CAMERAS) {
|
||||
printf("Dumping cameras:\n");
|
||||
lib3ds_file_dump_cameras(f);
|
||||
printf("\n");
|
||||
}
|
||||
if (flags&LIB3DSDUMP_LIGHTS) {
|
||||
printf("Dumping lights:\n");
|
||||
lib3ds_file_dump_lights(f);
|
||||
printf("\n");
|
||||
}
|
||||
if (flags&LIB3DSDUMP_NODES) {
|
||||
printf("Dumping node hierarchy:\n");
|
||||
lib3ds_file_dump_nodes(f);
|
||||
printf("\n");
|
||||
}
|
||||
if (output && (flags&LIB3DSDUMP_WRITE_3DS)) {
|
||||
if (!lib3ds_file_save(f, output)) {
|
||||
printf("***ERROR**** Writing %s\n", output);
|
||||
}
|
||||
}
|
||||
|
||||
lib3ds_file_free(f);
|
||||
return(0);
|
||||
}
|
||||
41
src/external/lib3ds-1.3.0/tools/Makefile.am
vendored
41
src/external/lib3ds-1.3.0/tools/Makefile.am
vendored
@ -1,41 +0,0 @@
|
||||
#
|
||||
# The 3D Studio File Format Library
|
||||
# Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
# License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.5 2007/06/14 09:59:10 jeh Exp $
|
||||
#
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)
|
||||
|
||||
bin_PROGRAMS = \
|
||||
3dsdump
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/lib3ds/lib3ds.la
|
||||
|
||||
MANPAGES = \
|
||||
3dsdump.1
|
||||
|
||||
man_MANS = $(MANPAGES)
|
||||
EXTRA_DIST = $(MANPAGES)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
546
src/external/lib3ds-1.3.0/tools/Makefile.in
vendored
546
src/external/lib3ds-1.3.0/tools/Makefile.in
vendored
@ -1,546 +0,0 @@
|
||||
# Makefile.in generated by automake 1.10 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = 3dsdump$(EXEEXT)
|
||||
subdir = tools
|
||||
DIST_COMMON = $(srcdir)/3dsdump.1.in $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = 3dsdump.1
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
3dsdump_SOURCES = 3dsdump.c
|
||||
3dsdump_OBJECTS = 3dsdump.$(OBJEXT)
|
||||
3dsdump_LDADD = $(LDADD)
|
||||
3dsdump_DEPENDENCIES = $(top_builddir)/lib3ds/lib3ds.la
|
||||
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = 3dsdump.c
|
||||
DIST_SOURCES = 3dsdump.c
|
||||
man1dir = $(mandir)/man1
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIB3DS_MAJOR_VERSION = @LIB3DS_MAJOR_VERSION@
|
||||
LIB3DS_MICRO_VERSION = @LIB3DS_MICRO_VERSION@
|
||||
LIB3DS_MINOR_VERSION = @LIB3DS_MINOR_VERSION@
|
||||
LIB3DS_VERSION = @LIB3DS_VERSION@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/lib3ds/lib3ds.la
|
||||
|
||||
MANPAGES = \
|
||||
3dsdump.1
|
||||
|
||||
man_MANS = $(MANPAGES)
|
||||
EXTRA_DIST = $(MANPAGES)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tools/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
3dsdump.1: $(top_builddir)/config.status $(srcdir)/3dsdump.1.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
3dsdump$(EXEEXT): $(3dsdump_OBJECTS) $(3dsdump_DEPENDENCIES)
|
||||
@rm -f 3dsdump$(EXEEXT)
|
||||
$(LINK) $(3dsdump_OBJECTS) $(3dsdump_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/3dsdump.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-man1: $(man1_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
1*) ;; \
|
||||
*) ext='1' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
|
||||
done
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
1*) ;; \
|
||||
*) ext='1' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS) $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man: install-man1
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic clean-libtool ctags distclean distclean-compile \
|
||||
distclean-generic distclean-libtool distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-binPROGRAMS install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-man1 install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-binPROGRAMS uninstall-man \
|
||||
uninstall-man1
|
||||
|
||||
#
|
||||
# The 3D Studio File Format Library
|
||||
# Copyright (C) 1996-2007 by Jan Eric Kyprianidis <www.kyprianidis.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
# License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.5 2007/06/14 09:59:10 jeh Exp $
|
||||
#
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
21
src/external/lib3ds.cmake
vendored
21
src/external/lib3ds.cmake
vendored
@ -3,18 +3,25 @@
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
|
||||
option(ALLOW_BUNDLED_LIB3DS "Allow use of bundled lib3ds source" ON)
|
||||
option(ALLOW_SYSTEM_LIB3DS "Allow use of system-provided lib3ds" ON)
|
||||
option(MESHLAB_ALLOW_DOWNLOAD_SOURCE_LIB3DS "Allow download and use of lib3ds source" ON)
|
||||
option(MESHLAB_ALLOW_SYSTEM_LIB3DS "Allow use of system-provided lib3ds" ON)
|
||||
|
||||
find_package(Lib3ds)
|
||||
set(LIB3DS_DIR ${CMAKE_CURRENT_LIST_DIR}/lib3ds-1.3.0)
|
||||
|
||||
if(ALLOW_SYSTEM_LIB3DS AND TARGET Lib3ds::Lib3ds)
|
||||
if(MESHLAB_ALLOW_SYSTEM_LIB3DS AND TARGET Lib3ds::Lib3ds)
|
||||
message(STATUS "- lib3ds - using system-provided library")
|
||||
add_library(external-lib3ds INTERFACE)
|
||||
target_link_libraries(external-lib3ds INTERFACE Lib3ds::Lib3ds)
|
||||
elseif(ALLOW_BUNDLED_LIB3DS AND EXISTS "${LIB3DS_DIR}/lib3ds/types.h")
|
||||
message(STATUS "- lib3ds - using bundled source")
|
||||
elseif(MESHLAB_ALLOW_DOWNLOAD_SOURCE_LIB3DS)
|
||||
set(LIB3DS_VER 1.3.0)
|
||||
set(LIB3DS_DIR ${MESHLAB_EXTERNAL_DOWNLOAD_DIR}/lib3ds-${LIB3DS_VER})
|
||||
|
||||
if (NOT EXISTS "${LIB3DS_DIR}/lib3ds/types.h")
|
||||
set(LIB3DS_LINK https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/lib3ds/lib3ds-${LIB3DS_VER}.zip)
|
||||
download_and_unzip(${LIB3DS_LINK} ${MESHLAB_EXTERNAL_DOWNLOAD_DIR} "Lib3DS")
|
||||
endif()
|
||||
|
||||
message(STATUS "- lib3ds - using downloaded source")
|
||||
add_library(
|
||||
external-lib3ds STATIC
|
||||
"${LIB3DS_DIR}/lib3ds/atmosphere.c"
|
||||
@ -55,8 +62,8 @@ elseif(ALLOW_BUNDLED_LIB3DS AND EXISTS "${LIB3DS_DIR}/lib3ds/types.h")
|
||||
"${LIB3DS_DIR}/lib3ds/vector.h"
|
||||
"${LIB3DS_DIR}/lib3ds/viewport.c"
|
||||
"${LIB3DS_DIR}/lib3ds/viewport.h")
|
||||
|
||||
target_include_directories(external-lib3ds SYSTEM PUBLIC "${LIB3DS_DIR}")
|
||||
target_compile_definitions(external-lib3ds PUBLIC LIB3DS_STATIC)
|
||||
set_property(TARGET external-lib3ds PROPERTY FOLDER External)
|
||||
target_link_libraries(external-lib3ds PRIVATE external-disable-warnings)
|
||||
endif()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user