Compare commits

..
1 Commits
Author SHA1 Message Date
Christopher Sean Morrison b8555311ab Work on prep caching can now proceed on trunck since it's intended for inclusion in the next release, and the branch is merged.
(svn branch delete)

svn:revision:68946
svn:branch:prep-cache
svn:account:brlcad
2016-09-30 18:38:37 +00:00
4868 changed files with 190005 additions and 1123317 deletions
+4
View File
@@ -0,0 +1,4 @@
/bin
/lib
/build
/testing
-18
View File
@@ -852,20 +852,6 @@ Hanji, Param
2016 March
Open Source (GSoC)
Bagavathy, Rakshika
nicknames tandoorichick
2016 October
Open Source (GSoC)
Gao, Tianyue
2016 December
Open Source (GCI)
Rathore, Shubham
nicknames gabbar1947
2017 April
Open Source
SPECIAL THANKS
--------------
@@ -1172,10 +1158,6 @@ nicknames bchepkwny
2015 December
Open Source
Sagarwal
2017 January
Open Source (GCI)
CORPORATE AND ORGANIZATION SUPPORT
----------------------------------
+14 -40
View File
@@ -15,42 +15,6 @@ on-going issues.
Recent Bugs
-----------
* get_regions tcl command doesn't respond well to situations where
child object names in combs have dashes (the "-" character) in
names. It tries to interpret the dash as an argument delimiter.
Looks like this may be only in situations where the "-" is the
lead character and on Windows? Been hard to reproduce...
* dsp does not facetize correctly with zero elevation areas in the
data - need robustness improvements
* dsp primitives specifying data using Windows style file paths
don't work.
* attempting to create a dsp using a binary object caused a crash on
Linux - need to figure out if this was caused by feeding it the wrong
kind of binary object or some other error...
* screengrab on windows does not work
* Recursive submodel predictably goes infinite, need stack-based
db_walk_tree(): mged> in submodel submodel submodel grid test.g
* running rt -s20 -F file.pix ... does not result in an 20x20 image
being written out. it ends up being 512x512.
* running rt -C255/0/0 -o file.pix ... does not result in the
background color getting used. It does work with -F file.pix, going
through libfb instead of libicv.
* ogl display manager and framebuffer are creating windows with
transparent backgrounds (the glClear color is not being drawn) on
Linux. Presumably a driver-related issue, alpha channel, or expose
event issue. Inspecting further, it may be related to environments
where shmget() fails (or is requested via /dev/oglp) and we get
private memory -- looks like private memory is not initialized
(observed on Mac 10.6, Windows, and Ubuntu Linux using 7.26).
* rtedge's overlay mode appears to be generating different results on
Windows and Linux for the m35 steering wheel (rtwizard rendering
mode D.)
@@ -104,6 +68,14 @@ Recent Bugs
* report of g-iges crashing (on Windows) when exporting a 1.2MB BoT
mesh (presumably imported via stl-g). worked for smaller models.
* ogl display manager and framebuffer are creating windows with
transparent backgrounds (the glClear color is not being drawn) on
Linux. Presumably a driver-related issue, alpha channel, or expose
event issue. Inspecting further, it may be related to environments
where shmget() fails (or is requested via /dev/oglp) and we get
private memory -- looks like private memory is not initialized
(observed on Mac 10.6).
* autoview [scale] isn't updating the wireframe when opening a
database, drawing geometry, then running autoview. the status bar
shows the scale change, but the graphics window remains unaffected
@@ -364,10 +336,9 @@ Recent Bugs
* File->Export seems to not work on Windows
* xpush fails to properly create a hierarchy killing existing objects
resulting in dangling references. This may have been fixed by
r69256, but a model that exposes the issue has to be tested to be
sure.
* xpush fails to properly create a hierarchy leaving some as top-level
objects and killing other existing objects resulting in dangling
references.
* mged on Mac OS X will crash on an X11 call if compiled against
system Tcl/Tk (at least on 10.4 linking against 8.4), see TODO
@@ -486,6 +457,9 @@ Recent Bugs
* triangulation of some pipe in toyjeep.g fails (rather reliably) on
some given bend. fails in nmg_triangulate model().
* tgc reports one hit errors though hit point has 0,0,0 direction
implying that maybe the point was supposedly deleted.
* rtedge is not respecting the -c"set" options. needs to give some
indication that they were parsed too since it ignores unrecognized
values apparently.
+103 -220
View File
@@ -2,144 +2,120 @@
BRL-CAD Interface Change Policy
===============================
This policy describes formal rules for changing an interface that
potentially impacts developers or users. The scope is limited to
public interfaces including developer application programming
interfaces (APIs), user application command-line interfaces (CLIs),
and graphical user interfaces (GUIs). The policy aims to balance
developer agility with interface stability.
Included below are details of BRL-CAD public interface changes that
potentially impact external developers and users. Public interfaces
include developer application programming interface (API) calls as
well as user application command-line interface (CLI) and graphical
user interface (GUI) behaviors. Changes are characterized as:
1) those affecting a new interface,
2) being minimally impacting, or
3) requiring adherence to deprecation policy.
This policy is intentionally designed to balance developer agility,
helping accelerate development, with interface stability, helping
preserve application developer and user investments.
All changes to BRL-CAD are expected to conform to this change policy.
Changes MUST either be:
A) MINIMALLY IMPACTING, or
B) FORMALLY DEPRECATED.
NEW INTERFACE
-------------
Changes to interfaces that have been recently introduced are often
subject to further change and should not yet be relied upon by
application developers or users until they stabilize. They are
allowed to change from release to release and are not subject to
change policy restrictions until they have been included in at least
TWO releases without any change.
MINIMALLY IMPACTING
-------------------
Changes deemed "minimally impacting" can be made at any time. For a
change to be considered as such, its effect must be strictly limited.
Most are itemized under MINIMALLY IMPACTING CHANGES. They MUST be:
If a change to an interface has a suitable and completely equivalent
alternative, the change is deemed to be "minimally impacting" and can
be made during any release. Examples of such changes include renaming
an interface, reordering parameters, adding optional parameters,
adding additional parameters for previously implicit behavior, and
removing unused parameters.
A.1) a relatively new interface
Interfaces introduced recently are often subject to rapid
development change. New interfaces are not subject to formal
deprecation rules until they have been included in at least
TWO releases without change.
A.2) an appreciably broken interface
Interfaces that have been unusable for at least TWO releases
may be fixed, changed, or removed without notice. A broken
interface is one that does not perform its intended function
and does not have secondary utility.
A.3) an elementary change
Simple changes that are trivially accommodated without
conditional logic or manual inspection can be made at will.
It includes mechanical changes that can be automatically
updated by a single static regular expression substitution.
Examples include renaming, reordering parameters, adding
optional parameters, eliminating a duplicate equivalent
interface, adding parameters for implicit behavior, and
removing unused parameters.
Generally, the impact can usually be considered minimally impacting if
a static regular expression search-and-replace is all that is needed
to update calling code, and no manual intervention is required.
FORMALLY DEPRECATED
-------------------
DEPRECATION POLICY
------------------
Changes not minimally impacting must follow formal deprecation
process. This defers significant changes to major release points or
requires public notification in advance. Changes are documented in
this file first as DEPRECATED CHANGES then later as OBSOLETED CHANGES.
An interface may be changed:
If a change will intentionally alter, replace, or remove functionality
that has been documented and published in at least TWO releases, it
must first be announced as DEPRECATED. Otherwise, changes to
interfaces that have not been publicly announced or are not publicly
documented for at least two releases may be changed without notice.
B.1) during a major release (e.g. from 7.*.* to 8.*.*)
The general practice is that public interface changes may go from
deprecated to obsolete, whereby previous behavior is removed or
changed, during one of the following events:
Any change may be made without notice. Major version number
releases imply intrinsic incompatibility or interface change.
a) during a major release (e.g. going from 7.*.* to 8.*.*)
B.2) during a minor release (e.g., from 7.26.* to 7.28.*)
b) during a minor release provided the change was publicly announced
as deprecated beforehand AND sufficient deprecation warning was
given via i) TWO minor releases included the deprecation notice,
and ii) at least THREE months (90 days) have passed since the
deprecation was announced
The interface must be publicly deprecated beforehand with
advance notice given in at least TWO minor releases and after
at least 90 days elapsed since initial release announcement.
c) during any release provided there still exists an EQUIVALENT
alternative interface that does not impose an undue burden on users
or developers (see "MINIMALLY IMPACTING")
Public interfaces scheduled for change should be noted in this file
and visibly marked in the source code. This marking may be the
DEPRECATED keyword on function declarations, #warning "DEPRECATED ..."
pre-processor statements, @DEPRECATED source code comments, and
combinations thereof.
Public interfaces scheduled for removal should be visibly marked as
deprecated during compilation with the DEPRECATED keyword on function
declarations, with #warning "DEPRECATED ..." pre-processor statements,
and with @DEPRECATED in source code comments. Where users are not
adversely affected, a run-time DEPRECATION statement may be printed.
Where usage is not adversely affected, a run-time statement may be
displayed (typically "DEPRECATION WARNING: ..."). All call references
and documentation should be updated prior to obsoleting.
Whenever published functionality is finally removed, move its entry
from the DEPRECATED section below to the REMOVED section for the
version in which it was removed. Make sure the entry retains a
reference to the version in which the item was marked as deprecated.
EXAMPLES
--------
Example #1: rt_shootray() removal
Example #1: Say we decided during 7.50.3 development to remove
rt_shootray() from the API without a replacement. That does NOT
qualify as "minimally impacting" because there's no replacement and
rt_shootray() has been published and documented in more than two
releases. We'd annotate the deprecation in the CHANGES file, mark the
function as DEPRECATED in the API header, and post the 7.50.4 release.
The soonest that function could be removed would be in the 7.54.0
release during 7.53 development. It could NOT be removed in 7.54.2
since it's a patch version, prior to the 7.54 release line, nor even
during 7.54.0 if less than 90 days had passed since 7.50.6 was posted.
It's decided during 7.50.3 development to remove the rt_shootray()
function. That does NOT qualify as "minimally impacting" because
there's no equivalent replacement and rt_shootray() has been published
and documented in more than two releases. The function gets listed as
DEPRECATED in the CHANGES file, marked as DEPRECATED in the API
header, and is published via the 7.50.4 release.
The soonest that function could be removed / obsoleted would be in
7.54.0 during 7.53.* development provided more than 90 days had passed
since the intiial announcement. It could NOT be removed in 7.54.2 as
that's a patch version, prior to 7.54, nor during 7.54.0 if less than
90 days had passed since 7.50.6 was posted.
Example #2: bu_log() mod
It's decided during 7.48.1 development to modify bu_log() by adding an
additional optional enum parameter denoting a message type, e.g.,
bu_log(INFO, ...). This change is considered "minimally impacting"
because it can be characterized by a simple regular expression (e.g.,
"s/bu_log\(/bu_log(INFO, /g)" and calling codes are trivially
accommodated. All calls to bu_log() should be updated to the new form
prior to change announcement.
The function could be changed at any time so long as it's documented
under MINIMALLY IMPACTING CHANGES.
Example #2: Say we decide during 7.48.0 development to modify bu_log()
by adding a new additional enum parameter denoting a message type.
This change is considered minimally impacting because it can be
characterized by a simple regular expression (e.g.,
s/bu_log(/bu_log(PRINT, /g). Updates to calling codes are considered
trivial. The change would get documented in the CHANGES file and all
calls that can be updated must be updated at that time.
**********************************************************************
*** DEPRECATED CHANGES ***
**********************************************************************
(reverse chronological order)
**************
* DEPRECATED *
**************
The interfaces announced below are scheduled to significantly change
or be removed. They are categorized by the release in which
deprecation was first announced. If the inteface change involved a
removal or transition, both the original and new interface names are
generally listed for reference.
Items marked with a "'" (single quote) are undocumented and may be
The items listed below are interfaces that are deprecated. They are
categorized by the release in which the change was made. If the
change involved a removal of a command or function, both the original
and new names should be listed for reference. If an item is marked
with a "'" (single quote), that means it was not documented and may be
removed at any time.
7.28
----
include/vmath.h
VCOMB3, VCOMB3N, VJOIN4
Removed as inconsistent and unused API [deprecated 7.28]
MGED commands
?devel, ?lib, aproposdevel, aproposlib, %, animmate, db_glob,
debugbu, debugdir, debuglib, debugmem, debugnmg, expand,
loadtk, match, memprint, preview, regdebug, regdef, rmats, rrt,
savekey, shaded_mode, sync
Removed as part of distillation effort [deprecated 7.28]
7.26
----
@@ -182,6 +158,7 @@ signal analysis tools
Removed as part of distillation effort [deprecated 7.26]
infrared & shapefactor tools
all_sf', if-X, ifdisp, pictx, showterm, firpass, secpass, shapefact
ssamp-bw, ssampview', ssampview.tcl'
Removed as part of distillation effort [deprecated 7.26]
misc tools
fix_polysolids' : obsolete primitive
@@ -376,16 +353,13 @@ include/raytrace.h
struct hit.hit_normal -> RT_HIT_NORMAL [deprecated pre-7.0]
**********************************************************************
*** OBSOLETED CHANGES ***
**********************************************************************
(reverse chronological order)
***********
* REMOVED *
***********
7.28.0
------
libmultispectral, rttherm, ssamp-bw, ssampview, ssampview.tcl
removed, not working in testing [minimally impacting]
Below are the interfaces that have followed deprecation policy or were
deemed minimally impacting and, regardless, are now no longer a part
of BRL-CAD.
7.26.0
------
@@ -628,27 +602,22 @@ include/[library].h (several)
[library]_version -> [library]_version() [private]
**********************************************************************
*** MINIMALLY IMPACTING CHANGES ***
**********************************************************************
(forward chronological order)
***********************************
* MINIMALLY IMPACTING API CHANGES *
***********************************
All minimally impacting changes are listed by release as regular
expressions. Unless noted otherwise, expressions are shown using Perl
syntax (i.e., the '(', ')', and '|' characters pertain to
subexpression captures, escaping with '\' matches literally.
Expressions should apply via:
Included in following are various minimally impacting API changes that
have been identified in chronological order. As expressions are not
extensively tested, use with caution.
perl -0777 -pi -e 'EXPRESSION' FILE
To apply an expression to an entire source tree, the following pattern
may work:
Unless noted otherwise, expressions are shown using Perl syntax and
may need adjustment (particularly quoting of '(', ')', and '|'
characters) for other environments. Most expressions will apply with:
perl -0777 -pi -e 'EXPRESSION' FILE
To apply them to an entire SVN checkout, the following pattern is useful:
find . -type f -not -path "*.svn/*" -regex '.*\(c\|cpp\|cxx\|h\|hpp\)$' -exec perl -0777 -pi -e 'EXPRESSION' {} \;
Expressions are minimally tested, use with caution. Make a backup.
6.0 (sed lines)
---
g/struct structparse/s//struct bu_structparse/g
@@ -1248,89 +1217,3 @@ s/bu_free_array/bu_free_args/g
fixed misleading name [7.26]
s/(#[[:space:]]*include[[:space:]]+["<])bu\/rb\.h/\1bu\/redblack.h/g
clearer header name [7.26]
s/rt_plot_vlblock/bn_plot_vlblock/g
s/rt_vlist_to_uplot/bn_vlist_to_uplot/g
move vlist functions to libbn [7.26]
s/rt_nurb_bezier/nmg_nurb_bezier/g
s/rt_nurb_c_split/nmg_nurb_c_split/g
s/rt_nurb_free_cnurb/nmg_nurb_free_cnurb/g
s/rt_nurb_free_snurb/nmg_nurb_free_snurb/g
s/rt_nurb_intersect/nmg_nurb_intersect/g
s/rt_nurb_new_cnurb/nmg_nurb_new_cnurb/g
s/rt_nurb_new_snurb/nmg_nurb_new_snurb/g
s/rt_nurb_s_eval/nmg_nurb_s_eval/g
s/rt_nurb_s_norm/nmg_nurb_s_norm/g
s/rt_nurb_uv_hit/nmg_nurb_uv_hit/g
s/rt_arc2d_to_cnurb/nmg_arc2d_to_cnurb/g
s/rt_join_cnurbs/nmg_join_cnurbs/g
s/rt_nurb_c_eval/nmg_nurb_c_eval/g
s/rt_nurb_c_print/nmg_nurb_c_print/g
s/rt_nurb_kvgen/nmg_nurb_kvgen/g
s/rt_nurb_kvmerge/nmg_nurb_kvmerge/g
s/rt_nurb_s_print/nmg_nurb_s_print/g
s/rt_nurb_s_refine/nmg_nurb_s_refine/g
s/rt_bez_check/nmg_bez_check/g
s/rt_nurb_back_solve/nmg_nurb_back_solve/g
s/rt_nurb_basis_eval/nmg_nurb_basis_eval/g
s/rt_nurb_c_bound/nmg_nurb_c_bound/g
s/rt_nurb_c_check/nmg_nurb_c_check/g
s/rt_nurb_c_diff/nmg_nurb_c_diff/g
s/rt_nurb_c_refine/nmg_nurb_c_refine/g
s/rt_nurb_c_xsplit/nmg_nurb_c_xsplit/g
s/rt_nurb_calc_oslo/nmg_nurb_calc_oslo/g
s/rt_nurb_cinterp/nmg_nurb_cinterp/g
s/rt_nurb_clean_cnurb/nmg_nurb_clean_cnurb/g
s/rt_nurb_clip_srf/nmg_nurb_clip_srf/g
s/rt_nurb_crv_copy/nmg_nurb_crv_copy/g
s/rt_nurb_crv_flat/nmg_nurb_crv_flat/g
s/rt_nurb_curvature/nmg_nurb_curvature/g
s/rt_nurb_doolittle/nmg_nurb_doolittle/g
s/rt_nurb_eval_crv/nmg_nurb_eval_crv/g
s/rt_nurb_forw_solve/nmg_nurb_forw_solve/g
s/rt_nurb_free_oslo/nmg_nurb_free_oslo/g
s/rt_nurb_gen_knot_vector/nmg_nurb_gen_knot_vector/g
s/rt_nurb_knot_index/nmg_nurb_knot_index/g
s/rt_nurb_kvcheck/nmg_nurb_kvcheck/g
s/rt_nurb_kvcopy/nmg_nurb_kvcopy/g
s/rt_nurb_kvextract/nmg_nurb_kvextract/g
s/rt_nurb_kvknot/nmg_nurb_kvknot/g
s/rt_nurb_kvmult/nmg_nurb_kvmult/g
s/rt_nurb_kvnorm/nmg_nurb_kvnorm/g
s/rt_nurb_map_oslo/nmg_nurb_map_oslo/g
s/rt_nurb_mesh_diff/nmg_nurb_mesh_diff/g
s/rt_nurb_mk_poly/nmg_nurb_mk_poly/g
s/rt_nurb_p_mat/nmg_nurb_p_mat/g
s/rt_nurb_plot_cnurb/nmg_nurb_plot_cnurb/g
s/rt_nurb_plot_snurb/nmg_nurb_plot_snurb/g
s/rt_nurb_poly/nmg_nurb_poly/g
s/rt_nurb_pr_crv/nmg_nurb_pr_crv/g
s/rt_nurb_pr_kv/nmg_nurb_pr_kv/g
s/rt_nurb_pr_mesh/nmg_nurb_pr_mesh/g
s/rt_nurb_pr_oslo/nmg_nurb_pr_oslo/g
s/rt_nurb_print_pt_type/nmg_nurb_print_pt_type/g
s/rt_nurb_project_srf/nmg_nurb_project_srf/g
s/rt_nurb_region_from_srf/nmg_nurb_region_from_srf/g
s/rt_nurb_s_bound/nmg_nurb_s_bound/g
s/rt_nurb_s_check/nmg_nurb_s_check/g
s/rt_nurb_s_diff/nmg_nurb_s_diff/g
s/rt_nurb_s_flat/nmg_nurb_s_flat/g
s/rt_nurb_s_plot/nmg_nurb_s_plot/g
s/rt_nurb_s_split/nmg_nurb_s_split/g
s/rt_nurb_s_xsplit/nmg_nurb_s_xsplit/g
s/rt_nurb_scopy/nmg_nurb_scopy/g
s/rt_nurb_sinterp/nmg_nurb_sinterp/g
s/rt_nurb_solve/nmg_nurb_solve/g
s/rt_nurb_to_poly/nmg_nurb_to_poly/g
rename old nurbs functions intertwined with nmg to use nmg prefix [7.26]
s/RTG.NMG_debug/nmg_debug/g
make nmg debug flag top level, like libbu's [7.26]
s/BU_ASSERT(_[A-Z_]+)\(([^,]+|.*\(.*,.*\)),([^,]+|.*\(.*,.*\)),([^,]+|.*\(.*,.*\))\);/BU_ASSERT(\2\3\4);/g
consolidated BU_ASSERT_PTR, BU_ASSERT_LONG, BU_ASSERT_SIZE_T, BU_ASSERT_SSIZE_T, BU_ASSERT_DOUBLE [7.26]
s/BU_FLSTR/CPP_FILELINE/g
s/vert_root/bn_vert_tree/g
s/create_vert_tree[[:space:]]*\(/bn_vert_tree_create\(/g
s/create_vert_tree_w_norms[[:space:]]*\(/bn_vert_tree_create_w_norms\(/g
s/free_vert_tree[[:space:]]*\(/bn_vert_tree_destroy\(/g
s/Add_vert[[:space:]]*\(([^,]*,)([^,]*,)([^,]*,)([^,]*,)/bn_vert_tree_add\(\4\1\2\3/g
s/Add_vert_and_norm[[:space:]]*\(([^,]*,)([^,]*,)([^,]*,)([^,]*,)([^,]*,)([^,]*,)([^,]*,)/bn_vert_tree_add_w_norm\(\7\1\2\3\4\5\6/g
s/clean_vert_tree[[:space:]]*\(/bn_vert_tree_clean\(/g
+577 -998
View File
File diff suppressed because it is too large Load Diff
+43126 -4388
View File
File diff suppressed because it is too large Load Diff
+8 -3
View File
@@ -285,6 +285,13 @@ libfft: The Fast-Fourier Transform library is a signal processing
library for performing FFTs or inverse FFTs efficiently.
Depends on: libm
libmultispectral: The multispectral optics library is a separate
compilation mode of the optics library where support for additional
bands of energy are added. By providing a defined spectrum of energy,
the raytrace library will produce different signal analyses for a
given set of geometry.
Depends on: librt libbn libbu libtcl
liboptical: The optical library is the basis for BRL-CAD's shaders.
This includes shaders such as the Phong and Cook-Torrence lighting
models, as well as various visual effects such as texturing, marble,
@@ -541,7 +548,7 @@ math for portability and performance reasons. When floating point
comparisons are necessary, use the NEAR_EQUAL and NEAR_ZERO macros
with a specified tolerance or the EQUAL and ZERO macros where a
tolerance is indeterminate (all the macros are available by including
vmath.h). Examples:
bn.h, part of libbn). Examples:
For known tolerances:
@@ -1323,8 +1330,6 @@ Release steps are as follows:
#####################################################################
# 09: Sync RELEASE to STABLE branch:
# Update the NEWS release date for the current release to today's date
# NON-AUTO: Review the log and obtain the last merge revision
# number from comments.
svn log --stop-on-copy https://svn.code.sf.net/p/brlcad/code/brlcad/branches/STABLE | less
+9 -39
View File
@@ -1,6 +1,8 @@
The Installation Guide to BRL-CAD
=================================
Please read this document if you are interested in installing BRL-CAD.
This document covers the basics of installing BRL-CAD from either a
source or binary distribution. Please see the 'Reporting Problems'
section if you run into any trouble installing BRL-CAD.
@@ -544,27 +546,6 @@ first for a system version if BRLCAD_BUNDLED_LIBS is also AUTO.
Aliases: ENABLE_TINYCTHREAD
--- BRLCAD_LZ4 ---
Option for enabling and disabling compilation of the lz4 data
compression library provided with BRL-CAD's source code. Default
is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
testing first for a system version if BRLCAD_BUNDLED_LIBS is also
AUTO.
Aliases: ENABLE_LZ4
--- BRLCAD_FREETYPE ---
Option for enabling and disabling compilation of the FreeType
libraries provided with BRL-CAD's source code. Default is AUTO, responsive to
the toplevel BRLCAD_BUNDLED_LIBS option and testing first for a system
version if BRLCAD_BUNDLED_LIBS is also AUTO.
Aliases: ENABLE_FREETYPE
--- BRLCAD_TERMLIB ---
Option for enabling and disabling compilation of the termlib library
@@ -773,26 +754,15 @@ AUTO.
Aliases: ENABLE_GDIAM
--- BRLCAD_PROJ4 ---
--- BRLCAD_BULLET ---
Option for enabling and disabling compilation of the PROJ.4 geographic
projection library provided with BRL-CAD's source code. Default
is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
testing first for a system version if BRLCAD_BUNDLED_LIBS is also
AUTO.
Option for enabling and disabling compilation of the Bullet Realtime
Physics Simulation Libraries provided with BRL-CAD's source
distribution. Default is AUTO, responsive to the toplevel
BRLCAD_BUNDLED_LIBS option and testing first for a system version
if BRLCAD_BUNDLED_LIBS is also AUTO.
Aliases: ENABLE_PROJ4
--- BRLCAD_GDAL ---
Option for enabling and disabling compilation of the GDAL geographic
library provided with BRL-CAD's source code. Default
is AUTO, responsive to the toplevel BRLCAD_BUNDLED_LIBS option and
testing first for a system version if BRLCAD_BUNDLED_LIBS is also
AUTO.
Aliases: ENABLE_GDAL
Aliases: ENABLE_BULLET
+3 -50
View File
@@ -10,57 +10,9 @@ descriptive text that emphasizes or further describes significant
changes made. See document footer for additional details.
----------------------------------------------------------------------
--- 201X-XX-XX Release 7.28.0 ---
--- 2016-07-XX Release 7.26.2 ---
----------------------------------------------------------------------
* Remove libmultispectral, rttherm, and related code/docs - Cliff Yapp
----------------------------------------------------------------------
--- 2017-09-22 Release 7.26.4 ---
----------------------------------------------------------------------
This is a patch release, primary focused on updates to the build
system logic.
* fixed MGED bindings behavior for c, A, P, and S chars - Bob Parker
* fixed gdiff usage statement - Sean Morrison
* removed anim.txt, sun.txt, tube.txt and movie.txt - Cliff Yapp
----------------------------------------------------------------------
--- 2017-06-10 Release 7.26.2 ---
----------------------------------------------------------------------
Among a variety of bugs fixed, the patch corrects a critical error in
BoT triangle mesh ray tracing. For improved performance, it also
changes the default frame buffer display behavior to fully buffer ray
tracing images instead of displaying them incrementally. A variety of
MGED commands see improvements too with 'ls' now supporting listing
objects by their on-disk size and the 'simulate' command applying
forces on objects (e.g., gravity) with greater ease. Not yet
complete, there is a new interface being developed for resolving
overlaps more efficiently, currently under development and usability
testing with select users. Lastly, a number of dependencies were
upgraded, including Tcl/Tk, in order to patch security vulnerabilities
and address portability issues.
* upgraded Tcl/Tk from 8.5.9 to 8.5.19 - Sean Morrison
* fixed background color setting in MGED - Cliff Yapp
* upgraded libpng to version 1.6.29 - Cliff Yapp
* upgraded zlib to version 1.2.11 - Cliff Yapp
* reduced 'shade_inputs' flipped normal reporting - Sean Morrison
* numerous 'simulate' command enhancements and fixes - Jon Engbert
* fixed rtweight .density file loading on Windows - Cliff Yapp
* fixed dsp handling of invalid uniform binary objects - Sean Morrison
* fixed brlman problem with viewing benchmark man page - Cliff Yapp
* fixed name of dbfind man page (was listed as 'find') - Cliff Yapp
* added -H option to ls for human readable size reporting - Cliff Yapp
* added -S option to ls command for size based sorting - Cliff Yapp
* improved 'loadview' command view script handling - Sean Morrison
* fixed TIE raytracing for zero thickness BoTs - Cliff Yapp
* added Wavefront OBJ File->Open GUI support in Archer - Cliff Yapp
* fixed attr show error printing large attribute values - Cliff Yapp
* fixed rt support for lights created prior to rel 6.0 - Sean Morrison
* fixed infinite loop bug in when using shadow lights - Sean Morrison
* removed man pages: erase_all, export_body, vrmgr, dall - Cliff Yapp
@@ -76,10 +28,11 @@ and address portability issues.
* improved rtwizard window sizing and "RtWizard" titling - Cliff Yapp
* brep command attaches .brep suffix instead of _brep - Sean Morrison
* changed ogl & wgl framebuffer delayed write behavior - Sean Morrison
* upgraded libpng to version 1.6.23 - Cliff Yapp
* upgraded freetype to version 2.6.5 - Cliff Yapp
* upgraded zlib to version 1.2.8 - Cliff Yapp
* fix rtedge foreground/background color options - Jon Engbert
* support rt -C colors specified as 0-255 or 0.0-1.0 - Jon Engbert
* fixed xpush bug leaving stray top-level objects - Nick Reed
----------------------------------------------------------------------
+2 -2
View File
@@ -1,5 +1,5 @@
BRL-CAD
Release 7.28.0
Release 7.26.2
http://brlcad.org/
BRL-CAD is a powerful cross-platform open source combinatorial
@@ -31,7 +31,7 @@ TABLE OF CONTENTS
GETTING STARTED
---------------
----------------
This README file exists only to provide you a brief roadmap to the
contents of the BRL-CAD distribution.
+57 -87
View File
@@ -18,47 +18,10 @@ tasks as they are completed.
THESE TASKS SHOULD HAPPEN BEFORE THE NEXT RELEASE
-------------------------------------------------
THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS
-------------------------------------------------------
* move the rt_*_timer timing facilities to libbu and rework to allow
contexts, allowing for more than one timer to be active. Make sure
the old librt API can be obsoleted cleanly.
* check that dbconcat supports objects created with the bo cmd
* libgcv should add objects to an existing .g if one is specified
as the output target - right now it's overwriting the old file
* consolidate dbconcat, clone, make_name, and any other .g I/O
routines that need to autogenerate names to use the new
bu_vls_incr/bu_vls_simplify functions.
* Explicitly list the CMakeLists.txt files rather than adding
them automatically in the add_subdirectory override, now that
we are listing all files explicitly - preserve the new simplicity
* renamed zlib and libpng when building bundled to avoid conflicting
with system-installed libs. e.g., default to ENABLE_Z_PREFIX=ON
with name z_brlcad (perhaps as a post-compile rename custom command)
and png_brlcad respectively.
* investigate possibility of using simple, compact libs
like miniz and lodepng to replace the complexity of
managing zlib and libpng in src/other. These have been
a source of ongoing annoyance, particularly (but not
exclusively) on OSX.
* f_dbopen in MGED doesn't seem to be reporting failure
if a non-.g file is fed to opendb. That doesn't seem
right... shouldn't the open process completely fail
if the file isn't a valid .g?
* add regression test for BoT ray tracing
* add regression test for directional light sources
* update astyle
* bundle primary rays in rt front end into postage stamps, shoot via
rt_shootrays(), modify to pass all rays down through the spatial
partitioning simultaneously
@@ -79,12 +42,13 @@ THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS
they want v2 (default) or previous v1 output format via a
command-line switch. see http://brlcad.svn.sf.net/viewvc/brlcad/brlcad/trunk/conv/g-vrml.c?view=diff&pathrev=22798&r1=16900&r2=16901
* try to come up with a way we can report the number of times
the configuration step has been run and changed something
without triggering almost a full rebuild. Maybe have the
bits that need to report it pull from a file in bu_brlcad_data?
* reinstate 'stat' and search -size, see r67636 through r67646
* make sure TIE can raytrace all of the various BoT modes
THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS
-------------------------------------------------------
* turn on Bullet code (simulate command) unconditionally
* metaball in command input needs sanity checks and better
validation.
@@ -114,26 +78,6 @@ THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS
THESE ARE UNSCHEDULED BACKLOG TASKS
-----------------------------------
* mater command does not validate its arguments - fix that. Also
properly document using "." to skip specifying something - not in
the man page currently.
* bullet integration - need to expose restitution as an
object parameter so we can configure behavior:
http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?p=&f=&t=3248
* afl on libged/mged/rt/...
* moodycamel as libbu queue/list/ptbl implementation
* reinstate 'stat' and search -size, see r67636 through r67646
* update dem-g to not use full paths for dsp primitive data locations -
should default to embedding the data in the .g file as a binary object,
with an option for a relative path if the user explicitly requests
it. Full paths make for non-portable .g files and should only exist
if the user explicitly manipulates the dsp to create such a path.
* define geometry URL and VFS behavior
* change _mged_ command prefix to a simple '.' prefix to hide/protect
@@ -204,23 +148,34 @@ THESE ARE UNSCHEDULED BACKLOG TASKS
* Need to rethink libbu hash API - ideally should be much simpler and
expose much less to the user.
* The current libbu mime API needs to be retired in favor of something
more powerful. It was a mistake to use enums generated from the
mime types - they are static, cannot be enriched at runtime (say,
by icv plugins) and the separation of the context from the type
itself (image/png -> BU_MIME_IMAGE and BU_MIME_IMAGE_PNG for example)
is both cumbersome and unnecessary. Instead, grab a subset of the
capabilities of libmagic (https://github.com/file/file) and define
a new libbu mime/data-typing subsystem that is runtime populated by
a default set of pseudo-libmagic style file definitions (may want
to adjust their format slightly, to require a mime type for each
entry, and we need an way to define entries where we don't (yet)
know how to inspect the file contents to identify them...)
* consider whether the file introspection capabilities of libmagic
(https://github.com/file/file) should be hooked into the libbu
mime type system to support more robust file type identification
beyond that offered by file extension + context. In principle
we want the most powerful capability we can get, but there are
some not-entirely-trivial design issues involved.
This approach will let us define the types that are of interest to
BRL-CAD, while also letting plugins "educate" the system to support
processing of formats the base system (and the "standard" mime type
lists) know nothing about.
- Do we want to use file introspection to replace the "context"
mechanism we're currently using to disambiguate file extensions?
- Is it practical to define enough "magic" for the file types we
will be interested in? (the current "cad" entry just has a
few autodesk formats - would need considerable expansion.)
- How should we return the "human readable" string libmagic provides,
particularly in the context of bu_path_component - the mime type
is currently returned as a string.
- libmagic is capable of greater fidelity than the basic file
extension based mime types - should we define custom mime types
to allow that refinement? e.g. MIME_MODEL_STEP if we don't know
what step version, and MIME_MODEL_STEP_AP203 if libmagic ids the
file as a particular version? There are many situations where
this capability could be very useful, but we would have to
rethink how we are currently defining our mime types. Ideally
we would want to generate specific mimes from the magic definition
files, but we would have to make sure all the magic files we
use for BRL-CAD provide mimes for all entires.
* investigate merging functionality from the sig tools into libicv
and removing the tools themselves. Also, need some documentation
@@ -282,10 +237,14 @@ THESE ARE UNSCHEDULED BACKLOG TASKS
parallel. This would be a way to easily parallelize existing code
without needing to create wrapper functions for bu_parallel().
* Now that we have >3.0 CMake required, look into replacing our custom
time stamping code in favor of using the CMake time stamp mechanism.
Also get rid of the fallback in src/libgcv/plugins/CMakeLists.txt
(and any others that have crept in over the years...)
* Post 7.26.0 release, need to look at migrating CMake logic off of
the OLD behavior for policy 0026 (using LOCATION property.) Now
that Debian stable is using CMake >=3.0 we should be OK to require
the more modern CMake. Another TODO once we require the newer CMake
is retiring our custom time stamping code in favor of using
the CMake time stamp mechanism. Also get rid of the fallback in
src/libgcv/plugins/CMakeLists.txt (and any others that have crept
in over the years...)
* convert usages of Tcl_InitHashTable() and friends to libbu
containers (see src/conv/enf-g.c for example usage)
@@ -854,6 +813,12 @@ THESE ARE UNSCHEDULED BACKLOG TASKS
* clean up new rt -l8 heat graph lighting model so that it works in
parallel and with no "splotches"
* make rt_prep_timer() take or return a context that gets subsequently
passed to rt_get_timer() calls for returning the elapsed time. this
will allow multiple overlapping timers instead of just one global
timers. move the timing facilities to libbu as part of the process
so API can be obsoleted cleanly.
* separation of stderr from stdout within libbu, particularly for
MGED, so that there is a clean separation of result output from
diagnostic output. this is a fairly separate idea from having log
@@ -1157,6 +1122,11 @@ THESE ARE UNSCHEDULED BACKLOG TASKS
combinations of these primitives, provided their continuity at the
ends ensures continuity all along "seams" - something to consider.
* look into embedding both rgb[3] and complex[n] data types in a union
to allow unification of libmultispectral and liboptical APIs to a
single more general liboptical. Need to be careful about
performance and maintainability concerns.
* we need to define a libbu api for option handling that supports more
features than getopt:
@@ -1867,7 +1837,10 @@ pl-dm (possibly X11 specific)
pp-fb (TERMLIB)
remrt (remrt dir commented out for WIN32 in src/CMakeLists.txt)
rtsrv (remrt dir commented out for WIN32 in src/CMakeLists.txt)
rttherm (rttherm dir commented out for WIN32 in src/CMakeLists.txt)
scriptsort (lex)
ssamp-bw (rttherm dir commented out for WIN32 in src/CMakeLists.txt)
ssampview (rttherm dir commented out for WIN32 in src/CMakeLists.txt)
ttcp (not ported)
The MGED points support doesn't appear as an executable, but it is
@@ -2102,9 +2075,6 @@ being rtgl specific.
Provide a generic mechanism in MGED run loop to hook in features like
point cloud rendering, instead of hard-coding it.
* consider utilizing something like moodycamel::ConcurrentQueue for
handling ray dispatch: https://github.com/cameron314/concurrentqueue
LIBPC
-----
+1 -1
View File
@@ -206,7 +206,7 @@ main(int argc, char *argv[])
stat(argv[1], &sf2);
if (sf1.st_size != sf2.st_size) {
bu_exit(FILE_ERROR, "Different file sizes found: %s(%d) and %s(%d). Cannot perform pixcmp.\n", argv[0], (int)sf1.st_size, argv[1], (int)sf2.st_size);
bu_exit(FILE_ERROR, "Different file sizes found: %s(%d) and %s(%d). Cannot perform pixcmp.\n", argv[0], sf1.st_size, argv[1], sf2.st_size);
}
if (!print_bytes) {
Vendored
+4 -16
View File
@@ -10,9 +10,9 @@ while [ "$1" != "" ]
do
case $1
in
--enable-all) options="$options -DBRLCAD_BUNDLED_LIBS=BUNDLED";
--enable-all) options="$options -DBRLCAD_BUNDLED_LIBS=ON";
shift;;
--disable-all) options="$options -DBRLCAD_BUNDLED_LIBS=SYSTEM";
--disable-all) options="$options -DBRLCAD_BUNDLED_LIBS=OFF";
shift;;
--enable-opengl) options="$options -DBRLCAD_ENABLE_OPENGL=ON";
shift;;
@@ -130,14 +130,6 @@ do
shift;;
--disable-tinycthread) options="$options -DBRLCAD_TINYCTHREAD=SYSTEM";
shift;;
--enable-lz4) options="$options -DBRLCAD_LZ4=BUNDLED";
shift;;
--disable-lz4) options="$options -DBRLCAD_LZ4=SYSTEM";
shift;;
--enable-freetype) options="$options -DBRLCAD_FREETYPE=BUNDLED";
shift;;
--disable-freetype) options="$options -DBRLCAD_FREETYPE=SYSTEM";
shift;;
--enable-termlib) options="$options -DBRLCAD_TERMLIB=BUNDLED";
shift;;
--disable-termlib) options="$options -DBRLCAD_TERMLIB=SYSTEM";
@@ -218,13 +210,9 @@ do
shift;;
--disable-gdiam) options="$options -DBRLCAD_GDIAM=SYSTEM";
shift;;
--enable-proj4) options="$options -DBRLCAD_PROJ4=BUNDLED";
--enable-bullet) options="$options -DBRLCAD_BULLET=BUNDLED";
shift;;
--disable-proj4) options="$options -DBRLCAD_PROJ4=SYSTEM";
shift;;
--enable-gdal) options="$options -DBRLCAD_GDAL=BUNDLED";
shift;;
--disable-gdal) options="$options -DBRLCAD_GDAL=SYSTEM";
--disable-bullet) options="$options -DBRLCAD_BULLET=SYSTEM";
shift;;
--prefix=*) inputstr=$1;
options="$options -DCMAKE_INSTALL_PREFIX=${inputstr#--prefix=}";
+1 -3
View File
@@ -93,12 +93,10 @@ if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
BRLCAD_ADDDATA(terra.dsp db)
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
CMAKEFILES(
aet.rt
cornell.rt
cube.rt
db.php
include/ctype.inc
include/debug.inc
include
)
# Local Variables:
-13
View File
@@ -1,13 +0,0 @@
#!/bin/sh
rt -M -p50 -W \
$*\
aet.g\
'diagram.r' \
<<EOF
viewsize 3.58095758486442e+00;
orientation 4.58468551319667e-01 5.46381543126676e-01 5.36927647047512e-01 4.50535790606452e-01;
eye_pt 2.16300884070308e+00 6.60866025843505e-01 3.68751836397137e-01;
start 0; clean;
end;
EOF
+58 -70
View File
@@ -11,81 +11,77 @@ set(NIST_SAMPLE_3DM_MODELS
NIST_MBE_PMI_7-10.3dm
)
function(ADD_NIST_STEP_TARGET step_model folder)
# Base output file name on input file
macro(ADD_NIST_STEP_TARGET step_model folder)
string(REGEX REPLACE "([0-9a-z]*).stp" "\\1" step_model_root "${step_model}")
# Define a relative output path - the quirks of CMake require this...
set(output_file ${DATA_DIR}/db/${step_model_root}.g)
# One log file per target
set(output_file ${bin_root}/${DATA_DIR}/db/${step_model_root}.g)
set(log_file ${CMAKE_CURRENT_BINARY_DIR}/${step_model_root}.log)
# Define the target
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}
COMMAND step-g -O ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file} ${CMAKE_CURRENT_SOURCE_DIR}/${step_model} > ${log_file} 2>&1
OUTPUT ${output_file}
COMMAND step-g -O ${output_file} ${CMAKE_CURRENT_SOURCE_DIR}/${step_model} > ${log_file} 2>&1
DEPENDS step-g ${CMAKE_CURRENT_SOURCE_DIR}/${step_model}
)
add_custom_target(${step_model_root}.g ALL DEPENDS ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file})
# Assign a target folder for tools like Visual Studio
)
add_custom_target(${step_model_root}.g ALL DEPENDS ${output_file})
set_target_properties(${step_model_root}.g PROPERTIES FOLDER "${folder}")
# If we're installing geometry, set up the install rule
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
install(FILES ${CMAKE_CURRENT_BUILD_DIR_INSTALL}/${output_file} DESTINATION ${DATA_DIR}/db)
if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL "." AND CMAKE_CONFIGURATION_FILES)
string(REPLACE "${CMAKE_CFG_INTDIR}" "\${BUILD_TYPE}" output_file "${output_file}")
endif(NOT "${CMAKE_CFG_INTDIR}" STREQUAL "." AND CMAKE_CONFIGURATION_FILES)
install(FILES ${output_file} DESTINATION ${DATA_DIR}/db)
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
# Cleanup
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file};${log_file}")
set(BUILT_MODELS "${BUILT_MODELS};${output_file}")
set(LOG_FILES "${LOG_FILES};${log_file}")
DISTCLEAN(${log_file})
endmacro(ADD_NIST_STEP_TARGET step_model folder)
endfunction(ADD_NIST_STEP_TARGET step_model folder)
# Get our root path
if(CMAKE_CONFIGURATION_TYPES)
set(bin_root "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
else(CMAKE_CONFIGURATION_TYPES)
set(bin_root "${CMAKE_BINARY_DIR}")
endif(CMAKE_CONFIGURATION_TYPES)
function(ADD_NIST_3DM_TARGET rhino_model folder)
# The general pattern of the BRL-CAD build is to use CMAKE_CFG_INTDIR when
# multi-configuration builds complicate the location of binaries. In this
# case, however, we are using a generated script with a different mechanism
# for handling this situation, and we need to update the executable paths
# accordingly if they are configuration dependent.
if(CMAKE_CONFIGURATION_TYPES)
string(REPLACE "${CMAKE_CFG_INTDIR}" "\${BUILD_TYPE}" rbin_root "${bin_root}")
else(CMAKE_CONFIGURATION_TYPES)
set(rbin_root "${bin_root}")
endif(CMAKE_CONFIGURATION_TYPES)
# Base output file name on input file
# Use the CMake executable to figure out if we need an extension
get_filename_component(EXE_EXT "${CMAKE_COMMAND}" EXT)
macro(ADD_NIST_3DM_TARGET rhino_model folder)
set(CMD_EXEC ${rbin_root}/${BIN_DIR}/3dm-g${EXE_EXT})
string(REGEX REPLACE "([0-9a-z]*).3dm" "\\1" rhino_model_root "${rhino_model}")
# Define a relative output path - the quirks of CMake require this...
set(output_file ${DATA_DIR}/db/${rhino_model_root}.g)
# Because we won't know the output directory in the script reliably until run time,
# we append CURRENT_BUILD_DIR as a string to the arguments - it is the script's
# responsibility to handle it correctly at run time.
set(CMD_ARGS "-o" "CURRENT_BUILD_DIR/${output_file}" "${CMAKE_CURRENT_SOURCE_DIR}/${rhino_model}")
# One log file per target - we capture both stdout and stderror here
set(output_file ${rbin_root}/${DATA_DIR}/db/${rhino_model_root}.g)
set(log_file ${CMAKE_CURRENT_BINARY_DIR}/${rhino_model_root}.log)
# Use the model name for the script as well, since the output file is specific to this input
set(script_file "${CMAKE_CURRENT_BINARY_DIR}/${rhino_model_root}.cmake")
# We know enough - write the script
generate_cmd_script(3dm-g "${script_file}" OLOG "${log_file}" ELOG "${log_file}" CARGS "${CMD_ARGS}")
# Define the target
set(STDOUT_LOG "${log_file}")
set(STDERR_LOG "${log_file}")
set(CMD_ARGS "-o \"${output_file}\" \"${CMAKE_CURRENT_SOURCE_DIR}/${rhino_model}\"")
configure_file(${BRLCAD_CMAKE_DIR}/builddir_cmd.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/3dm-g.cmake @ONLY)
set(output_file ${bin_root}/${DATA_DIR}/db/${rhino_model_root}.g)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file}
COMMAND ${CMAKE_COMMAND} -P "${script_file}"
OUTPUT ${output_file}
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/3dm-g.cmake
DEPENDS 3dm-g ${CMAKE_CURRENT_SOURCE_DIR}/${rhino_model}
)
add_custom_target(${rhino_model_root}.g ALL DEPENDS ${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file})
# Assign a target folder for tools like Visual Studio
)
add_custom_target(${rhino_model_root}.g ALL DEPENDS ${output_file})
set_target_properties(${rhino_model_root}.g PROPERTIES FOLDER "${folder}")
# If we're installing geometry, set up the install rule
if(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
install(FILES ${CMAKE_CURRENT_BUILD_DIR_INSTALL}/${output_file} DESTINATION ${DATA_DIR}/db)
if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL "." AND CMAKE_CONFIGURATION_FILES)
string(REPLACE "${CMAKE_CFG_INTDIR}" "\${BUILD_TYPE}" output_file "${output_file}")
endif(NOT "${CMAKE_CFG_INTDIR}" STREQUAL "." AND CMAKE_CONFIGURATION_FILES)
install(FILES ${output_file} DESTINATION ${DATA_DIR}/db)
endif(BRLCAD_INSTALL_EXAMPLE_GEOMETRY)
# Cleanup
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BUILD_DIR_SCRIPT}/${output_file};${log_file}")
endfunction(ADD_NIST_3DM_TARGET rhino_model folder)
set(BUILT_MODELS "${BUILT_MODELS};${output_file}")
set(LOG_FILES "${LOG_FILES};${log_file}")
DISTCLEAN(${log_file})
endmacro(ADD_NIST_3DM_TARGET rhino_model folder)
foreach(step_input ${NIST_SAMPLE_STEP_MODELS})
@@ -99,21 +95,13 @@ endforeach(rhino_input ${NIST_SAMPLE_3DM_MODELS})
CMAKEFILES(${NIST_SAMPLE_3DM_MODELS})
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${BUILT_MODELS}")
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${LOG_FILES}")
CMAKEFILES(
README
pdf/1.pdf
pdf/2.pdf
pdf/3.pdf
pdf/4.pdf
pdf/5.pdf
pdf/6.pdf
pdf/7-10_assem.pdf
pdf/7.pdf
pdf/8.pdf
pdf/9.pdf
pdf/10.pdf
pdf/11.pdf
)
pdf
)
# Local Variables:
# tab-width: 8
-26
View File
@@ -1887,19 +1887,6 @@ eprint = {}
timestamp = {2010.02.23}
}
@INPROCEEDINGS{Yapp11,
author = {Yapp, Clifford},
title = {A CMake-Based Cross Platform Build System for Tcl/Tk},
booktitle = {18'th Annual Tcl Association Tcl/Tk Conference Proceedings},
pages = {135-143},
year = {2011},
month = {October},
isbn = {978-0-578-09801-2},
note = {Presented at the 18th Tcl/Tk Conference in Manassas, VA on October 24-28, 2011},
owner = {morrison},
timestamp = {2016.11.27}
}
@TECHREPORT{Yapp12,
author = {Yapp, Clifford},
title = {Generating Coils in BRL-CAD},
@@ -2046,19 +2033,6 @@ eprint = {}
timestamp = {2015.12.01}
}
@TECHREPORT{Yapp17,
author = {Yapp, Clifford},
title = {Converting Geometry from Creo Parametric to BRL-CAD},
institution = {United States Army, Army Research Laboratory, Survivability/Lethality Analysis Directorate},
year = {2017},
month = {June},
number = {ARL-SR-0376},
address = {Army Research Laboratory, Aberdeen Proving Ground, MD 21005-5068},
note = {Approved for Public Release, distribution unlimited. Available online: http://www.arl.army.mil/arlreports/2017/ARL-SR-0376.pdf},
owner = {morrison},
timestamp = {2017.06.28}
}
@comment{jabref-meta: selector_journal:}
@comment{jabref-meta: selector_author:}
+6 -14
View File
@@ -1,23 +1,13 @@
if(BRLCAD_EXTRADOCS)
verbose_add_subdirectory(doc docbook)
else(BRLCAD_EXTRADOCS)
include(${CMAKE_CURRENT_SOURCE_DIR}/docbook_files.cmake)
CMAKEFILES_IN_DIR(docbook_files docbook)
CMAKEFILES(docbook)
endif(BRLCAD_EXTRADOCS)
verbose_add_subdirectory(doc html)
verbose_add_subdirectory(doc legal)
CMAKEFILES(
parsers/bison_to_lemon.txt
parsers/flex_to_re2c.txt
parsers/templates/CMakeLists.txt
parsers/templates/main.c
parsers/templates/main.h
parsers/templates/parser.lemon
parsers/templates/scanner.perplex
parsers/writing_perplex_lemon_parsers.txt
)
CMAKEFILES(parsers)
set(documentation_DATA
IDEAS
@@ -32,6 +22,7 @@ set(documentation_DATA
README.Windows
TODO.BREP
TODO.shaded_displays
anim.txt
archer_ack.txt
benchmark.tr
brep.txt
@@ -215,10 +206,13 @@ set(documentation_mged_old_DATA
mged/wm-prims.ps
mged/wm-tube.ps
mk.tr
movie.txt
old-mged.tr
pkg.tr
regions.txt
rounding.txt
sun.txt
tube.txt
tool_categories.txt
ecosystem.dot
)
@@ -232,9 +226,7 @@ CMAKEFILES(
STARTERS
STRATEGY
csv_to_comgeom.txt
docbook_files.cmake
implicit_constraints.txt
lcov.txt
pad_file.xml.in
trunk_hierarchy.org
)
+2 -1
View File
@@ -86,7 +86,8 @@ testing tool for TCP implementers via Network Working Group RFC 2398.
This product does not yet exist but is a long term goal. It's
basically several of the core libraries form BRL-CAD's geometry
modeling kernel including the present libbu, libbn, librt, libwdb,
liboptical, and the ray-trace interface application back-end.
liboptical, libmultispectral, and the ray-trace interface application
back-end.
This modeling kernel provides fundamental geometric representation,
ray-trace analysis, and geometric processing capabilities via a
-17
View File
@@ -42,20 +42,3 @@ compiled as libpng.so). If this happens, it likely indicates a problem
with the CMake build logic and should be reported as a bug - you may also
need to install a shared version of the library. Another possibility
would be to add -mipure-text to the linker flags.
OpenIndiana
-----------
To build with gcc and CMake on OpenIndiana, you need to install the
following packages:
pkg install pkg:/developer/gcc-7
pkg install pkg:/developer/build/cmake
pkg install pkg:/developer/versioning/subversion
pkg install pkg:/system/header
pkg install pkg:/developer/lexer/flex
(Note that gcc-7 building doesn't work as of 2017-08-23 - the above
install list is a starting point, but the repo currently doesn't
build and isn't close to building. It may be an older gcc would
have better luck...)
+3 -9
View File
@@ -43,15 +43,9 @@ BRL-CAD on Windows will generate over 800 of them) and a large list of
targets will appear. To build everything look for a target named
ALL_BUILD. Start compiling that target.
Once compilation is successfully complete, you can find the compiled
executables in a 'bin' directory in your build directory. For
example, mged.exe would be in brlcad-svn-trunk\.build\Debug\bin if
brlcad-svn-trunk\.build is the build directory specified to CMake and
CMAKE_BUILD_TYPE was set to Debug.
You may want to produce an NSIS installer. If so, locate a target
named PACKAGE and run it. The end result should be an .exe file
capable of installing BRL-CAD.
Once compilation is successfully complete, you may want to produce an
NSIS installer. If so, locate a target named PACKAGE and run it. The
end result should be an .exe file capable of installing BRL-CAD.
MINGW (WORK IN PROGRESS - THIS DOES NOT YET WORK!!!)
-----
+145
View File
@@ -0,0 +1,145 @@
Date: Fri, 30 Oct 87 3:58:14 EST
From: Phil Dykstra <phil@BRL.ARPA>
Subject: Re: Animation querry.
I have been meaning to put a few notes together about animation in
BRL-CAD for some time now. Your message presses the point so here's
a really quick basic overview. Note that animation control is
still very early and experimental. Don't be surprised if much of
it changes in the future.
------
The earliest form of animation was just changing the viewpoint.
So that RT could ray trace the "current" MGED view, a -M flag was
added which tells RT to read the viewing matrix from stdin.
This matrix is written on six lines in the form:
viewsize
xpos ypos zpos
[4x4 rotation matrix, 4 elements per line]
Such data can be saved along with an RT shell script by the "saveview"
command in MGED. To get just this data (i.e. without the shell script),
the "savekey" command can be used. Thus one can save a string of
viewpoint keyframes via "savekey." ["Times" can also be added to
the keyframes for the purposes of some interpolation programs.]
Several tools were written (not in the distribution) which generate
sequences of such views, interpolate a set a keyframes, etc.
The "rmats" command was added to allow a file of these views to be
read in to MGED so you could watch the keyframes go by. Feeding the
same data to RT (via the -M flag) computes an image for each view.
The views either go to the frame buffer, or if an output filename
is given, they go into files with frame number suffixes.
Animation previews are typically made via low resolution ray traces,
composited into one large image via "pixtile," and viewed on a frame
buffer via "fbanim" (preferably one with hardware pan and zoom).
Later we wished to articulate the models themselves, so a command
script language was created for RT. These are also fed to RT
via the -M flag. RT figures out whether it is given the old form
above or a real script. An animation description script contains
transformation matrices to be applied to the model tree. A simple
one might look like:
start 42;
clean;
anim frob/nitz matrix rmul
1 0 0 1
0 1 0 2
0 0 1 0
0 0 0 0;
end;
etc.
start - says to start frame number 42.
clean - make RT clean up after itself (this may not be needed any more...).
anim - says to apply an matrix animation to the arc connecting frob to
nitz. The type of matrix operation is a right multiply (choices
include right or left multiply, replace, or reroot (i.e. world
coordinates)).
end - tells it to go ahead and shoot this frame.
Eventually there will be things besides "matrix" animations to allow
material properties etc. to be animated.
Various outboard tools generate motions, merge animation scripts
together, allow the previewing/editing of motions, etc. For the
most part these tools are sufficiently ad hoc and experimental
that we aren't giving any of them away yet. Next year some time....
-------
I didn't explain any of it in much detail, but hopefully it
gives you an overview. One of these days we will write some
more about it - like when we start including some motion tools.
==============================
Date: Fri, 30 Oct 87 16:42:14 EST
From: Phil Dykstra <phil@BRL.ARPA>
Subject: Re: Animation querry.
Here's a bit more about the matrix operations available in RT
animation scripts.
-----
RT Matrix Animation Operations:
==============================
In BRL-CAD, matrices are handled in their usual mathematical form
(the transpose of the Newman and Sproull "computer graphics form").
That is, a matrix looks like this:
r1 r2 r3 dx
r4 r5 r6 dy
r7 r8 r9 dz
0 0 0 1/s
Points are *column* vectors, so a point is transformed by:
newpoint = Matrix * oldpoint;
Thus the world coordinate system is on the "left" end of a stack of
matrix operations; the local coordinate system being that of the point
on the extreme right.
In walking a model tree (such as "prep'ing" the model for ray tracing),
each arc crossed from root to leaf normally gets its matrix multiplied on
the right side of the current matrix stack[1]. Rigid body articulations
of a model can then be described by changing or adding matrices at the
appropriate points in this stack.
The matrix animation operations currently recognized by RT are:
rstack replace the entire stack up to this point
rarc replace the matrix on the specified arc
rboth replace the entire stack and the arc matrix
rmul arc = arc * Matrix
lmul arc = Matrix * arc
The path specifying where in the model tree the operation is to
be applied can either be an absolute path, e.g.
/body/left/arm/hand
which would affect the arc between the left arm of body and the hand
(note that hand need not be a leaf), or it can be a "wildcard", e.g.
arm/hand
would mean the arc between arm and hand anywhere in the model tree, i.e.
it is not restricted to the left one as above. Finally a wildcard like
arm
means the arc before any node called arm.
-------------------------
[1] It is interesting to note that our "right multiply" operation
corresponds exactly to the SGI Iris multmatrix() command. The later
pre-multiplies the matrix stack, but the matrix stack post-multiplies
any points being transformed! In fact, if one looks at the Iris at the
geometry engine level, one finds that it works with matrices in the
usual mathematical form - the gl2 library transposes them in and out of
N&S form.
+1 -2
View File
@@ -47,11 +47,10 @@ add_subdirectory(articles)
add_subdirectory(books)
add_subdirectory(lessons)
add_subdirectory(presentations)
add_subdirectory(resources)
add_subdirectory(specifications)
add_subdirectory(system)
CMAKEFILES(README fop.xconf.in log4j.properties)
CMAKEFILES(README fop.xconf.in log4j.properties resources)
CMAKEFILES(README.DB_authors_notes)
CMAKEFILES(css/brlcad.css)
+10
View File
@@ -3881,6 +3881,11 @@
<link xlink:href="../../man1/en/rtshot.php">Rt shot</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../man1/en/rttherm.php">Rt therm</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../man1/en/rtwalk.php">Rt Walk</link>
@@ -3926,6 +3931,11 @@
<link xlink:href="../../man1/en/showtherm.php">Show Therm </link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../man1/en/ssamp-bw.php">Ssamp Bw</link>
</para>
</listitem>
<listitem>
<para>
<link xlink:href="../../man1/en/stl-g.php">Stl g</link>
+4
View File
@@ -138,6 +138,10 @@ eccetera.</para>
(fb), che gestisce l'apertura di una finestra di framebuffer sulla quale
effettuare il raytracing.</para>
<para>- <emphasis role="bold">libmultispectral</emphasis><emphasis role="bold">and liboptical</emphasis> &#xFFFD;
sono le librerie per lo shading ed il texturing utilizzate dal
raytracing.</para>
<para>- <emphasis role="bold">libpkg</emphasis> &#xFFFD; &#xFFFD; una libreria che inplementa il
meccanismo per il richiamo di una procedura remota (rpc). Questa libreria &#xFFFD;
un predecessore del sistema attuale rpc. Al contrario del tipico servizio
@@ -122,7 +122,7 @@
</listitem>
<listitem>
<para>
liboptical - the shader and texturing library for the raytracer.
libmultispectral and liboptical - the shader and texturing libraries for the raytracer.
</para>
</listitem>
<listitem>
-69
View File
@@ -1,69 +0,0 @@
set(dr_ignore_files
CMakeLists.txt
README
brlcad/brlcad-article-fo-stylesheet.xsl.in
brlcad/brlcad-article-xhtml-stylesheet.xsl.in
brlcad/brlcad-book-fo-stylesheet.xsl.in
brlcad/brlcad-book-xhtml-stylesheet.xsl.in
brlcad/brlcad-common.xsl.in
brlcad/brlcad-fo-stylesheet.xsl.in
brlcad/brlcad-fonts.xsl.in
brlcad/brlcad-gendata.xsl
brlcad/brlcad-lesson-fo-stylesheet.xsl.in
brlcad/brlcad-lesson-xhtml-stylesheet.xsl.in
brlcad/brlcad-man-fo-stylesheet.xsl.in
brlcad/brlcad-man-stylesheet.xsl.in
brlcad/brlcad-man-xhtml-stylesheet.xsl.in
brlcad/brlcad-presentation-fo-stylesheet.xsl.in
brlcad/brlcad-presentation-xhtml-stylesheet.xsl.in
brlcad/brlcad-specification-fo-stylesheet.xsl.in
brlcad/brlcad-specification-xhtml-stylesheet.xsl.in
brlcad/brlcad-xhtml-header-navigation.xsl
brlcad/brlcad-xhtml-stylesheet.xsl.in
brlcad/center-table-print.xsl
brlcad/images/brlcad-logo-669966.svg
brlcad/images/brlcad-logo-6699cc.svg
brlcad/images/brlcad-logo-blue.svg
brlcad/images/brlcad-logo-cc6666.svg
brlcad/images/brlcad-logo-cc9966.svg
brlcad/images/brlcad-logo-green.svg
brlcad/images/brlcad-logo-limegreen.svg
brlcad/images/brlcad-logo-red.svg
brlcad/images/logo-vm-gears.png
brlcad/images/logo-vm-gears.svg
brlcad/presentation.xsl.in
brlcad/tutorial-cover-template.xsl.in
brlcad/tutorial-template.xsl.in
brlcad/wordpress.xsl.in
other/README.schema
other/docbook-5.0.tar.bz2
other/docbook5xi.rnc
other/docbookxi.nvdl
other/expand.cmake
other/fonts/README
other/fonts/dejavu-lgc-fonts.tar.bz2
other/fonts/dejavu_COPYING.txt
other/fonts/stix-fonts.tar.bz2
other/fonts/stix_COPYING.txt
other/fonts/y14.5.tar.bz2
other/fonts/y14.5_COPYING.txt
other/offo/README.offo
other/offo/licenses.txt
other/offo/offo-2.0.tar.bz2
other/standard/README.svg
other/standard/README.xsl
other/standard/docbook-xsl-ns.tar.bz2
other/standard/met-fonts.xsl
other/standard/w3_svg_dtd.tar.bz2
)
CMAKEFILES(${dr_ignore_files})
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+2
View File
@@ -219,6 +219,7 @@ set(man1_EN
rtregis.xml
rtscale.xml
rtshot.xml
rttherm.xml
rtwalk.xml
rtweight.xml
rtwizard.xml
@@ -228,6 +229,7 @@ set(man1_EN
shapefact.xml
showshot.xml
showtherm.xml
ssamp-bw.xml
stl-g.xml
sun-pix.xml
tabinterp.xml
+165
View File
@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- lifted from troff+man by doclifter -->
<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='rttherm1'>
<refmeta>
<refentrytitle>RTTHERM
</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
<refmiscinfo class='manual'>BRL-CAD</refmiscinfo>
</refmeta>
<refnamediv>
<refname>rttherm</refname>
<refpurpose>raytrace a hyper-spectral thermal image of an mged model</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id='synopsis'>
<cmdsynopsis>
<command>rttherm</command>
<arg choice='opt' rep='repeat'><replaceable>options</replaceable></arg>
<arg choice='plain'>-o <replaceable>output.ssamp</replaceable></arg>
<arg choice='plain'><replaceable>model.g</replaceable></arg>
<arg choice='plain' rep='repeat'><replaceable>objects</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 xml:id='description'><title>DESCRIPTION</title>
<para><citerefentry><refentrytitle>rttherm</refentrytitle><manvolnum>1</manvolnum></citerefentry>
is a member of the RTUIF family of programs,
and implements the same options as
<citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
with the exception that the
<option>-F</option>
(framebuffer)
option is currently not implemented and reserved for future use.
<citerefentry><refentrytitle>rttherm</refentrytitle><manvolnum>1</manvolnum></citerefentry>
creates a hyper-spectral ray-trace into
the output file
specified with the
<option>-o</option>
option.
It also writes a second file (using bn_table_write) with
the suffix ".spect" which describes
the spectral sampling pattern used when creating the output file.</para>
</refsect1>
<refsect1 xml:id='specifying_temperatures'><title>SPECIFYING TEMPERATURES</title>
<para>Temperatures are always specified in degrees Kelvin ("Kelvins").</para>
<para>The background (ambient) temperature may be set from the command
line with the
<option>-c set bg_temp=degK</option>
command, or in the animation script with the command</para>
<literallayout remap='.nf'>
set bg_temp=293.0
</literallayout> <!-- .fi -->
<para>which is the default. (20 degrees C is 293 degrees Kelvin).</para>
<para>The spectral sampling density may be set from the command line
with the
<option>-c set spectrum=nsamp/lo_nm/hi_nm</option>
option, or in the animation script with the command</para>
<literallayout remap='.nf'>
set spectrum=nsamp/lo_nm/hi_nm
</literallayout> <!-- .fi -->
<para>The default setting is 100/380/12000,
which takes 100 samples equally spaced from 380nm (low end of the optical
band) to 12microns (upper end of the "Far-IR" band).</para>
<para><citerefentry><refentrytitle>rttherm</refentrytitle><manvolnum>1</manvolnum></citerefentry>
is built using
<citerefentry><refentrytitle>libmultispectral</refentrytitle><manvolnum>3</manvolnum></citerefentry>
rather than
<citerefentry><refentrytitle>liboptical</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
which provides a similar set of shaders.
Most notable is the "temp" shader,
which applies a two-dimensional temperature map to a region
in exactly the same way as the "texture" and "bwtexture" shaders apply
colors to the surface.</para>
<para>The temperature of a region may be modified by the
rt animation script which is read by
<citerefentry><refentrytitle>rttherm</refentrytitle><manvolnum>1</manvolnum></citerefentry>
when the
<option>-M</option>
flag is specified.
The syntax of the anim command is:</para>
<literallayout remap='.nf'>
anim path temp ## ;
</literallayout> <!-- .fi -->
<para>where
"anim" is a keyword,
"path" is the path specification for the affected combination(s),
"temp" is a keyword ("temperature" is also accepted), and
## is the new temperature for the combination(s) in Kelvins.</para>
<para>The Tcl interface to the database supports adjusting region temperatures.
The syntax of the anim command is:</para>
<literallayout remap='.nf'>
db put|adjust combname temp ##
</literallayout> <!-- .fi -->
<para>where
"db" is the name of the Tcl database object for the desired
database (typically "db" or ".inmem"),
"put" and "adjust" are keywords,
"combname" is the name of the combination,
"temp" is a keyword,
and
## is the new temperature for the combination in Kelvins.
Note that the BRL-CAD v4 database has no place for
storing region temperatures on disk,
so this command won't have any effect on v4 databases.</para>
</refsect1>
<refsect1 xml:id='post_processing'><title>POST PROCESSING</title>
<para><citerefentry><refentrytitle>ssampview</refentrytitle><manvolnum>1</manvolnum></citerefentry>
is a GUI tool for viewing
the multi-spectral output files created by
<citerefentry><refentrytitle>rttherm</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
In the works is a post-processing tool which will
extract a spectral window into a conventional
8-bit/pixel
<citerefentry><refentrytitle>bw</refentrytitle><manvolnum>5</manvolnum></citerefentry>
file, probably in two steps:
(1) extracting a representative power value per pixel
into a
<citerefentry><refentrytitle>dbw</refentrytitle><manvolnum>5</manvolnum></citerefentry>
(double-precision .bw file),
and then (2) using
<citerefentry><refentrytitle>cv</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to perform a direct conversion, or using
<citerefentry><refentrytitle>dpix-pix</refentrytitle><manvolnum>1</manvolnum></citerefentry>
or similar tool to perform scaling and/or auto-ranging.</para>
</refsect1>
<refsect1 xml:id='see_also'><title>SEE ALSO</title>
<para><citerefentry><refentrytitle>brlcad</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>mged</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>rt</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>librt</refentrytitle><manvolnum>3</manvolnum></citerefentry></para>
</refsect1>
<refsect1 xml:id='author'><title>AUTHOR</title>
<para>BRL-CAD Team</para>
</refsect1>
<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
<para>This software is Copyright (c) 1999-2016 United States Government as
represented by the U.S. Army Research Laboratory.</para>
</refsect1>
<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
<para>Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;.</para>
</refsect1>
</refentry>
+119
View File
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- lifted from troff+man by doclifter -->
<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='ssampbw1'>
<refmeta>
<refentrytitle>SSAMP-BW
</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
<refmiscinfo class='manual'>BRL-CAD</refmiscinfo>
</refmeta>
<refnamediv>
<refname>ssamp-bw</refname>
<refpurpose>convert spectral sample data into a monochrome image</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id='synopsis'>
<cmdsynopsis>
<command>ssamp-bw</command>
<arg choice='opt'>-v </arg>
<arg choice='opt'>-s <replaceable>squarefilesize</replaceable></arg>
<arg choice='opt'>-w <replaceable>file_width</replaceable></arg>
<arg choice='opt'>-n <replaceable>file_height</replaceable></arg>
<arg choice='opt'>-l <replaceable>lower_wavelen</replaceable></arg>
<arg choice='opt'>-u <replaceable>upper_wavelen</replaceable></arg>
<arg choice='opt'>-m <replaceable>minval</replaceable></arg>
<arg choice='opt'>-M <replaceable>maxval</replaceable></arg>
<arg choice='plain'><replaceable>file.ssamp</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 xml:id='description'><title>DESCRIPTION</title>
<para><citerefentry><refentrytitle>ssamp-bw</refentrytitle><manvolnum>1</manvolnum></citerefentry>
reads a
<citerefentry><refentrytitle>ssamp</refentrytitle><manvolnum>5</manvolnum></citerefentry>
format file of spectral samples for the named file,
and produces a monochrome image in
<citerefentry><refentrytitle>bw</refentrytitle><manvolnum>5</manvolnum></citerefentry>
format.
The spectral definition is read from a second file named
file.ssamp.spect</para>
<para>Using the
<option>-l</option>
and
<option>-u</option>
parameters, a filter is constructed to select the energy collected
over a portion of the spectrum.
This filter is convolved with each pixel of the two-dimensional input
file and the power levels are summed into a two-dimensional array of
scalor results.</para>
<para>The scalor array is scanned to compute the maximum and minimum
power levels encountered in this image.
These are used to drive an "automatic gain control" algorithm
which maximizes the use of the limited 0..255 intensity output range.
Using the
<option>-m</option>
and
<option>-M</option>
options, either the minimum or maximum values (or both) may
be over-ridden from the command line.
This is particularly useful when processing a series of
<emphasis remap='I'>ssamp</emphasis>
files
(e.g. for an animation sequence)
and you don't want the gain control settings changing
from frame to frame.</para>
<para>The
<option>-v</option>
option sets "verbose" mode,
causing the spectral sampling definition and the filter kernel to be
printed on standard error.</para>
</refsect1>
<refsect1 xml:id='example'><title>EXAMPLE</title>
<para> ssamp-bw -s512 -M0.3 -l3000 -u5000 moss.ssamp | bw-fb -s512</para>
<para>This converts the energy received in the 3-5 micron ("mid-IR") band
into a monochrome image,
clamping any power greater than 0.3 to a value of 255 in the output,
and displays this monochrome image on the current framebuffer.</para>
</refsect1>
<refsect1 xml:id='see_also'><title>SEE ALSO</title>
<para><citerefentry><refentrytitle>rttherm</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>bw-fb</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>dpix-pix</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>pix</refentrytitle><manvolnum>5</manvolnum></citerefentry></para>
</refsect1>
<refsect1 xml:id='diagnostics'><title>DIAGNOSTICS</title>
<para>If the
<emphasis remap='I'>pix</emphasis>
file is shorter than expected,
or the size parameters are given incorrectly,
an error is printed.</para>
<para>If the spectral range specified for the filter is outside the
spectral range sampled in the input file, the program aborts with an error.</para>
</refsect1>
<refsect1 xml:id='author'><title>AUTHOR</title>
<para>BRL-CAD Team</para>
</refsect1>
<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
<para>This software is Copyright (c) 2000-2016 by the United States
Government as represented by U.S. Army Research Laboratory.</para>
</refsect1>
<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
<para>Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;.</para>
</refsect1>
</refentry>
+11 -11
View File
@@ -81,7 +81,7 @@
a schema file to store information, and newer schemas are also available in an XML form in addition to EXPRESS.)
</para>
<para>
A number of <link xlink:href="https://en.wikipedia.org/wiki/List_of_STEP_%28ISO_10303%29_parts#AIC_-_Application_interpreted_constructs">other</link> low level parts and higher level Application Interpreted Constructs (AICs) form the foundation
A number of <link xlink:href="http://www.steptools.com/support/stdev_docs/express/step_irs/">other</link> low level parts and higher level Application Interpreted Constructs (AICs) form the foundation
on which the more complete "high level" parts are defined. This separation is performed mainly to allow
maximal sharing and compatibility between different high level parts that need the same lower level foundations.
</para>
@@ -104,23 +104,23 @@
<tbody>
<row>
<entry>AP203</entry>
<entry><link xlink:href="https://www.iso.org/standard/20597.html">Configuration controlled 3D designs of mechanical parts and assemblies</link></entry>
<entry>Most recent version is 10303-203:1994 with additions and corrections as follows: the original document was subsequently revised by one amendment <link xlink:href="https://www.iso.org/standard/34177.html">10303-203:1994/Amd 1:2000 </link> and three corrections: <link xlink:href="https://www.iso.org/standard/26904.html">10303-203:1994/Cor 1:1996 </link>, <link xlink:href="https://www.iso.org/standard/30943.html">10303-203:1994/Cor 2:1998 </link>, and <link xlink:href="https://www.iso.org/standard/40190.html">10303-203:1994/Cor 3:2004 </link>. <link xlink:href="https://www.iso.org/standard/39522.html">10303-203:2005</link> is considered a revision to this standard.</entry>
<entry><link xlink:href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=20597">Configuration controlled 3D designs of mechanical parts and assemblies</link></entry>
<entry>Most recent version is 10303-203:1994 with additions and corrections as follows. The original document was subsequently revised by one amendment<link xlink:href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=34177">10303-203:1994/Amd 1:2000 </link> and three corrections: <link xlink:href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=26904">10303-203:1994/Cor 1:1996 </link>, <link xlink:href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=30943">10303-203:1994/Cor 2:1998 </link>, and <link xlink:href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=40190">10303-203:1994/Cor 3:2004 </link> </entry>
</row>
<row>
<entry>AP203e2</entry>
<entry> <link xlink:href="https://www.iso.org/standard/44305.html">Configuration controlled 3D designs of mechanical parts and assemblies</link></entry>
<entry>Most recent version is 10303-203:2011. Revises <link xlink:href="https://www.iso.org/standard/39522.html">10303-203:2005</link>, which is listed as a modular version that is harmonized with ISO 10303-214. <link xlink:href="https://www.iso.org/standard/57620.html">10303-242:2014</link> is considered a revision to this standard.</entry>
<entry> <link xlink:href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=44305">Configuration controlled 3D designs of mechanical parts and assemblies</link></entry>
<entry>Most recent version is 10303-203:2011. Revises <link xlink:href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=39522">10303-203:2005</link>, which is listed as a modular version that is harmonized with ISO 10303-2014.</entry>
</row>
<row>
<entry>AP214</entry>
<entry> <link xlink:href="https://www.iso.org/standard/43669.html">Core data for automotive mechanical design processes</link></entry>
<entry>Most recent version is 10303-214:2010 (a.k.a AP214e3). Two earlier versions exist: <link xlink:href="https://www.iso.org/standard/38727.html">10303-214:2003</link> and <link xlink:href="https://www.iso.org/standard/23643.html">10303-214:2001</link>. <link xlink:href="https://www.iso.org/standard/57620.html">10303-242:2014</link> is considered a revision to this standard.</entry>
<entry> <link xlink:href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=43669">Core data for automotive mechanical design processes</link></entry>
<entry>Most recent version is 10303-214:2010. Two earlier versions exist: <link xlink:href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=38727">10303-214:2003</link> and <link xlink:href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=23643">10303-214:2001</link></entry>
</row>
<row>
<entry>AP242</entry>
<entry><link xlink:href="https://www.iso.org/standard/57620.html">Managed model-based 3D engineering</link></entry>
<entry>Most recent version is 10303-242:2014. This standard is intended to consolidate and replace AP203e2 and AP214. One correction has been published: <link xlink:href="https://www.iso.org/standard/72059.html">10303-242:2014/Cor 1:2016</link>.</entry>
<entry><link xlink:href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=57620">Managed model-based 3D engineering</link></entry>
<entry>Most recent version is 242:2014. This standard is intended to consolidate and replace AP203e2 and AP214.</entry>
</row>
</tbody>
</tgroup>
@@ -148,10 +148,10 @@
The standards define the structure of the schemas, but in general when it comes to the nuts and bolts of implementing a practical importer and exporter more resources are needed. Below are links to some implementation resources:
</para>
<para>
PDES, Inc. Industry consortium <link xlink:href="http://www.oasis-open.org/committees/download.php/11728/recprac8.pdf">Recommended Practices for AP203</link>, April 1998
PDES, Inc. Industry consortium <link xlink:href="http://www.steptools.com/support/stdev_docs/express/ap203/recprac203v8.pdf">Recommended Practices for AP203</link>, April 1998
</para>
<para>
PDM Implementer Forum, <link xlink:href="http://www.cax-if.org/documents/pdmug_release4_3.pdf">Usage Guide for the STEP PDM Schema V1.2 Release 4.3</link>, January 2002.
PDM Implementer Forum, <link xlink:href="http://www.steptools.com/support/stdev_docs/express/pdm/pdmug_release4_3.pdf">Usage Guide for the STEP PDM Schema V1.2 Release 4.3</link>, January 2002.
</para>
<para>
CAx Implementer Forum Recommended Practices: <link xlink:href="https://www.cax-if.org/joint_testing_info.html#recpracs"></link>
+1 -2
View File
@@ -53,7 +53,6 @@ set(mann_EN
cpi.xml
d.xml
db.xml
dbfind.xml
db_glob.xml
dbconcat.xml
dbupgrade.xml
@@ -89,6 +88,7 @@ set(mann_EN
eye_pt.xml
facedef.xml
facetize.xml
find.xml
fracture.xml
g.xml
garbage_collect.xml
@@ -201,7 +201,6 @@ set(mann_EN
shader.xml
shells.xml
showmats.xml
simulate.xml
size.xml
solids.xml
sph-part.xml
+27 -33
View File
@@ -21,49 +21,43 @@
<arg rep="norepeat">options</arg>
</cmdsynopsis>
<variablelist>
<varlistentry><term></term><listitem>
<cmdsynopsis sepchar=" ">
<command>get</command>
<group choice="req" rep="norepeat">
<arg choice="plain">faces</arg>
<arg choice="plain">minEdge</arg>
<arg choice="plain">maxEdge</arg>
<arg choice="plain">orientation</arg>
<arg choice="plain">type</arg>
<arg choice="plain">vertices</arg>
</group>
<arg choice="req" rep="norepeat">input_bot</arg>
</cmdsynopsis>
</listitem></varlistentry>
<varlistentry><term></term><listitem>
<cmdsynopsis sepchar=" ">
<command>chull</command>
<arg choice="req" rep="norepeat">input_bot</arg>
<arg choice="req" rep="norepeat">output_bot</arg>
</cmdsynopsis>
</listitem></varlistentry>
<varlistentry><term></term><listitem>
<cmdsynopsis sepchar=" ">
<command>solid</command>
<arg choice="req" rep="norepeat">input_bot</arg>
</cmdsynopsis>
</listitem></varlistentry>
<varlistentry><term></term><listitem>
<cmdsynopsis sepchar=" ">
<command>get</command>
<group choice="req" rep="norepeat">
<arg choice="plain">faces</arg>
<arg choice="plain">minEdge</arg>
<arg choice="plain">maxEdge</arg>
<arg choice="plain">orientation</arg>
<arg choice="plain">type</arg>
<arg choice="plain">vertices</arg>
</group>
<arg choice="req" rep="norepeat">input_bot</arg>
</cmdsynopsis>
</listitem></varlistentry>
<varlistentry><term></term><listitem>
<cmdsynopsis sepchar=" ">
<command>chull</command>
<arg choice="req" rep="norepeat">input_bot</arg>
<arg choice="req" rep="norepeat">output_bot</arg>
</cmdsynopsis>
</listitem></varlistentry>
</variablelist>
</refsynopsisdiv>
<refsection xml:id="description"><title>DESCRIPTION</title>
<para>The <command>bot</command> command.</para>
<para>The <command>bot</command> command.</para>
</refsection>
<refsection xml:id="author"><title>AUTHOR</title>
<para>BRL-CAD Team</para>
<para>BRL-CAD Team</para>
</refsection>
<refsection xml:id="bug_reports"><title>BUG REPORTS</title>
<para>
Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
</para>
<para>
Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
</para>
</refsection>
</refentry>
@@ -1,14 +1,14 @@
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="dbfind">
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="find">
<refmeta>
<refentrytitle>DBFIND</refentrytitle>
<refentrytitle>FIND</refentrytitle>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
<refnamediv xml:id="name">
<refname>dbfind</refname>
<refname>find</refname>
<refpurpose>Displays all combinations that have any of the <emphasis>objects</emphasis> specified
as a member.
</refpurpose>
@@ -17,7 +17,7 @@ as a member.
<!-- body begins here -->
<refsynopsisdiv xml:id="synopsis">
<cmdsynopsis sepchar=" ">
<command>dbfind</command>
<command>find</command>
<arg choice="req" rep="norepeat"><replaceable>objects</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -31,13 +31,13 @@ as a member.
<refsection xml:id="examples"><title>EXAMPLES</title>
<para>The example shows the use of the <command>dbfind</command> command to display all combinations that refer to the specified object.
<para>The example shows the use of the <command>find</command> command to display all combinations that refer to the specified object.
</para>
<example><title>Display all combinations that refer to a specified object.</title>
<variablelist>
<varlistentry>
<term><prompt>mged&gt;</prompt> <userinput>dbfind shapea</userinput></term>
<term><prompt>mged&gt;</prompt> <userinput>find shapea</userinput></term>
<listitem>
<para>Lists all combinations that refer to <emphasis>shapea</emphasis>.
</para>
+1 -9
View File
@@ -19,7 +19,7 @@ command. If the object argument is supplied, only those objects are listed.
<refsynopsisdiv xml:id="synopsis">
<cmdsynopsis sepchar=" ">
<command>ls</command>
<arg choice="opt" rep="norepeat">-A -o -a -c -r -s -p -l -q -H -S</arg>
<arg choice="opt" rep="norepeat">-A -o -a -c -r -s -p -l -q</arg>
<arg choice="opt" rep="norepeat"><replaceable>objects</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -60,14 +60,6 @@ command. If the object argument is supplied, only those objects are listed.
length.
</para>
</listitem>
<listitem>
<para>H -- When printing using long format, use human readable sizes for object size.
</para>
</listitem>
<listitem>
<para>S -- Sort using object size rather than object name.
</para>
</listitem>
<listitem>
<para>q -- Suppress informational output messages during database lookup process
</para>
+4 -28
View File
@@ -41,16 +41,11 @@
<para>
Search Inputs are specified using
<link linkend="primitives">PATHS</link> and
matching of objects is done according to a search plan
built using boolean
expressions constructed using the
matching of objects is done according to boolean
expressions formed using the
<link linkend="primitives">PRIMITIVES</link> and
<link linkend="operators">OPERATORS</link>
described below. Note that <link linkend="search_options">OPTIONS</link>
are not used to form search plans - unlike the search plan they are specified
<emphasis remap="I">before</emphasis> the paths and are used to control settings
that apply globally to <command>search</command>'s behavior and reporting during
the execution of the search.
described below.
</para>
</refsection>
@@ -661,6 +656,7 @@
</para>
</example>
<example><title>Name Pattern Matching at Depth &gt;= 3</title>
<para>
@@ -872,26 +868,6 @@
Prints all BoT primitives using "plate" mode, instead of the closed-mesh-requiring "volume" mode.
</para>
</example>
<example><title>Verbose Reporting of Search Information </title>
<para>
<prompt>mged&gt; </prompt><userinput>search -v /all.g ! -type comb</userinput>
<literallayout class="normal">
/u all.g(c)/u platform.r(r)/u platform.s(arb8)
/u all.g(c)/u box.r(r)/u box.s(arb8)
/u all.g(c)/u cone.r(r)/u cone.s(tgc)
/u all.g(c)/u ellipse.r(r)/u ellipse.s(ell)
/u all.g(c)/u tor.r(r)/u tor(tor)
/u all.g(c)/u light.r(r)/u LIGHT(ell)
</literallayout>
</para>
<para>
Report all paths ending in an object that is not a comb using "verbose" output style. The
verbose form of path reporting reports not just the path, but the boolean operator used at
each setp along the path and the primitive type of each object along the path.
</para>
</example>
<example><title>Using <command>search</command> Results</title>
<para>
-208
View File
@@ -1,208 +0,0 @@
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="simulaten">
<refmeta>
<refentrytitle>SIMULATE</refentrytitle>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
<refnamediv xml:id="name">
<refname>simulate</refname>
<refpurpose>
a Bullet-based physics simulator for MGED
</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id="synopsis">
<cmdsynopsis sepchar=" ">
<command>simulate</command>
<arg choice="opt" rep="repeat"><replaceable>options</replaceable></arg>
<arg choice="plain"><replaceable>path</replaceable></arg>
<arg choice="plain"><replaceable>duration</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection xml:id="description"><title>DESCRIPTION</title>
<para>
<command>simulate</command> performs rigid-body physics evaluation.
The Bullet physics engine is used with a collision algorithm that
utilizes the librt ray tracer.
</para>
<para>
The <replaceable>path</replaceable> parameter specifies the path to the
objects within the simulation. All primitives under this path are regarded
as separate physical objects by default. If a combination has the
attribute <literal>simulate::type=region</literal>, all primitives below it
in the hierarchy are regarded as one physical object.
</para>
<para>
The <replaceable>duration</replaceable> parameter specifies the duration
of the physics simulation (each use of the <command>simulate</command>
command operates within a new physics environment).
</para>
<para>
All values are specified in units of meters, kilograms, and seconds.
Note that Bullet is primarily designed for objects of sizes between
approximately 0.05 and 10.0 meters, with a collision tolerance of 0.004
meters; hence, using <command>simulate</command> on a model that is
significantly different from this scale may give worse results.
</para>
</refsection>
<refsection xml:id="simulate_options"><title>OPTIONS</title>
<variablelist remap="TP">
<varlistentry>
<term><emphasis remap="B" role="bold">--debug=<replaceable>MODE</replaceable></emphasis></term>
<listitem>
<para>
Set the debugging mode. Multiple mode flags can be separated
using commas.
<variablelist remap="B">
<varlistentry>
<term><emphasis remap="I">aabb</emphasis></term>
<listitem><para>
Draw Bullet's axis-aligned bounding boxes after
the simulation step. These can usually be regarded as
indicating the "true" position of geometry. Any discrepancies
may indicate that the <command>simulate</command> command is
incorrectly applying the Bullet transformations.
</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="I">contact</emphasis></term>
<listitem><para>
Draw all of Bullet's collision contact points during the
simulation.
</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="I">ray</emphasis></term>
<listitem><para>
Draw all of the rays fired by the internal
collision detection algorithm.
</para></listitem>
</varlistentry>
</variablelist>
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection xml:id="simulate_attributes"><title>OBJECT ATTRIBUTES</title>
<para>
The simulation can be configured by setting certain attributes on objects
within the specified path.
</para>
<variablelist remap="TP">
<varlistentry>
<term><emphasis remap="B" role="bold">simulate::type=<replaceable>TYPE</replaceable></emphasis></term>
<listitem>
<para>
Specify the type of the associated object.
<variablelist remap="B">
<varlistentry>
<term><emphasis remap="I">region</emphasis></term>
<listitem><para>
Regard all solids under this combination as belonging to
one rigid body.
</para></listitem>
</varlistentry>
</variablelist>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">simulate::mass=<replaceable>SCALAR</replaceable></emphasis></term>
<listitem>
<para>
Specify the mass of the associated object. Objects with a mass of
<literal>0.0</literal> are immobile.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">simulate::linear_velocity=&lt;<replaceable>x</replaceable>, <replaceable>y</replaceable>, <replaceable>z</replaceable>&gt;</emphasis></term>
<listitem>
<para>
Specify the linear velocity of the associated object as a vector.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">simulate::angular_velocity=&lt;<replaceable>x</replaceable>, <replaceable>y</replaceable>, <replaceable>z</replaceable>&gt;</emphasis></term>
<listitem>
<para>
Specify the angular velocity of the associated object as a vector.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">simulate::gravity=&lt;<replaceable>x</replaceable>, <replaceable>y</replaceable>, <replaceable>z</replaceable>&gt;</emphasis></term>
<listitem>
<para>
Specify the acceleration due to gravity as a vector. This
attribute can only be applied to the topmost object under
<replaceable>path</replaceable>. The default gravity vector
is <literal>&lt;0.0, 0.0, -9.80665&gt;</literal>, specifying an
accleration of -9.8 mm/s/s along the z-axis.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap="B" role="bold">simulate::grid_radius=x</emphasis></term>
<listitem>
<para>
Specify the number of rays along the radii of the circular grids of
rays fired during collision detection. This attribute can only be
applied to the topmost object under <replaceable>path</replaceable>.
The default value is <literal>10</literal>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection xml:id="author"><title>AUTHOR</title>
<para>BRL-CAD Team</para>
</refsection>
<refsection xml:id="copyright"><title>COPYRIGHT</title>
<para>
This software is Copyright (c) 2017 United States Government as
represented by the U.S. Army Research Laboratory.
</para>
</refsection>
<refsection xml:id="bug_reports"><title>BUG REPORTS</title>
<para>
Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
</para>
</refsection>
</refentry>
<!-- vim: set shiftwidth=2 : -->
File diff suppressed because it is too large Load Diff
+3 -4
View File
@@ -336,11 +336,10 @@ ADD_DOC(relnotes_5_summary_HTML html/ReleaseNotes/Rel5.0/Summary)
ADD_DOC(ReleaseNotes/Rel6.0/index.html html/ReleaseNotes/Rel6.0)
add_subdirectory(manuals/mged/animmate)
set(html_ignore_files
ReleaseNotes/Rel6.0/index.html
manuals/shaders/camo.html
ReleaseNotes/Rel6.0
manuals/mged/animmate
manuals/shaders
manuals/small-eagleCAD.ico
)
CMAKEFILES(${html_ignore_files})
+1
View File
@@ -80,6 +80,7 @@ BRL-CAD<font size="-1">(tm)</font> Unleashed
<ol>
<li><H2>rt</h2>
<li><H2>remrt</h2>
<li><H2>rttherm</h2>
<li><H2><a HREF="shaders/index.html">Shaders and Material Properties</a></h2>
<li><H2>Animation</h2>
<ol>
@@ -1,78 +0,0 @@
set(anim_ignore_files
CMakeLists.txt
anim_cascade.html
anim_doc.html
anim_fly.html
anim_hardtrack.html
anim_keyread.html
anim_lookat.html
anim_man_pages.html
anim_offset.html
anim_orient.html
anim_script.html
anim_sort.html
anim_time.html
anim_track.html
anim_turn.html
anim_tut.html
animate.html
ceditor.gif
chan_mult.html
chan_permute.html
combine_doc.html
cscripts.gif
curve_doc.html
end_tut.html
etime.gif
fbanim.html
left.tcl
left_wheels.txt
mmenu.gif
object_tut.html
oscript.gif
oscript_doc.html
pixtile.html
prep_tut.html
right.tcl
right_wheels.txt
rt.html
rt_tut.html
scriptsort.html
show_doc.html
sscripts.gif
tabinterp.html
table_doc.html
tabsub.html
tank_path.txt
teditor.gif
track.txt
track_tut.html
tscript.gif
tscript_doc.html
tut.html
tut1.png
tut2.png
tut4.gif
tut5.gif
tut6.png
tut7.png
tut8.png
vcdwidget.gif
vceditor.gif
vcurve_doc.html
vdraw.html
view_tut.html
viewget.html
vscript_doc.html
)
CMAKEFILES(${anim_ignore_files})
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
-12
View File
@@ -194,8 +194,6 @@
<FONT SIZE=2><P></FONT><A HREF="#garbage_collect"><FONT SIZE=2>garbage_collect</FONT></A></TD>
<TD WIDTH="20%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#gui"><FONT SIZE=2>gui</FONT></A></TD>
<TD WIDTH="20%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#heal"><FONT SIZE=2>heal</FONT></A></TD>
<TD WIDTH="22%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#help"><FONT SIZE=2>help</FONT></A></TD>
<TD WIDTH="21%" VALIGN="MIDDLE">
@@ -1716,16 +1714,6 @@ foo.r_xpand/R
</TR>
</TABLE>
<FONT SIZE=2><P><HR ALIGN="RIGHT"></P>
</FONT><B><DL>
<DT><A NAME="heal"></A>heal</B> [<I>command</I>]</DT>
<DD><P>The &quot;heal&quot; command takes in the bot as input along with the tolerances. As of now, it takes the tolerance only for zippering. </P>
<P>The healing essentially comprises only of zippering now, but more features will be added later on. The algorithm cannot support non-manifold meshes (those containing singular vertices or edges). The bots need not be oriented, the algorithm takes care of that. </P></DD>
<FONT SIZE=4><DT>Examples:</DT>
</FONT><TT><DD>mged&gt;</TT> <B>heal samplebot.s 47.3</DD>
</DL>
<FONT SIZE=2><P><HR ALIGN="RIGHT"></P>
</FONT><B><DL>
<DT><A NAME="help"></A>help</B> [<I>command</I>]</DT>
-34
View File
@@ -1,34 +0,0 @@
Notes on using gcov/lcov with BRL-CAD
Build with the BRLCAD_ENABLE_CAPTURE option set to ON
If using only gcov, you need to cd to the directory where the object files were
built and specify the object file(s) in question fully, e.g. (from the build
directory):
$ cd src/libbu/CMakeFiles/libbu.dir/
$ gcov b64.c.o vls.c.o
File '/brlcad/src/libbu/b64.c'
Lines executed:88.10% of 126
/brlcad/src/libbu/b64.c:creating 'b64.c.gcov'
File '/brlcad/src/libbu/vls.c'
Lines executed:74.66% of 363
/brlcad/src/libbu/vls.c:creating 'vls.c.gcov'
When running lcov (from the build directory, assuming the
build directory itself is <source_dir>/build):
find . -name '*.gcda' -print0 | xargs -0 rm
make -j3 check
lcov --capture --directory . --output-file coverage.info
lcov -r coverage.info \*\/build\/\* > coverage-2.info
lcov -r coverage-2.info \*\/other\/\* > coverage-3.info
lcov -r coverage-3.info \/usr\/\* > coverage-4.info
lcov -r coverage-4.info \*\/misc\/\* > coverage-5.info
lcov -r coverage-5.info \*\/tests\/\* > coverage_cad.info
rm coverage-*.info
genhtml coverage_cad.info --output-directory lcov-output
+29
View File
@@ -0,0 +1,29 @@
DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
General Discussion about how to Make Animations using the BRL-CAD Package
There are several distinct aspects to producing an animation:
1) The creative insight.
2) Specification of the geometry.
3) Specification of the material properties, colors, textures.
4) Specification of the model motion and articulation (choreography),
plus specification of the camera motion and lighting details
(cinematography).
5) Previewing the animation sequence using wireframe tools.
6) Computation ("rendering") of the final sequence in very low
resolution, suitable for frame-buffer animation previews (see
fbanim(1)).
7) Computation ("rendering") of the final ray-traced images, storing
them in .pix files.
8) Viewing selected frames, to review them for quality.
9) Recording of the final images either on videotape or 16mm movie
film.
+27
View File
@@ -0,0 +1,27 @@
Some notes on using BRL-CAD on Sun Workstations (Release 3.0):
As of Release 3.0 MGED is much improved on the Suns. It now opens
its own window which can be resized, iconified, etc., like other
windows under SunTools.
While a generic replacement for knobs and buttons was not completed,
the function keys F1-F7 help somewhat. Pressing these keys attaches
certain "knob" functions to the mouse X or Y motions:
F# Function Mouse
1 Zoom y
2 Z Slew y
3 X Slew x
4 Y Slew y
5 X Rotate x
6 Y Rotate y
7 Z Rotate y
These keys can be used as "chords", e.g. pressing F3 and F4 together
will give you X and Y translates on the mouse.
Frame buffer support has also been greatly enhanced, but the released
version does not yet open its own window for display. Rather, it
covers the window a frame buffer command was invoked from with the
display. Panning and Zooming are now supported, as is shared memory.
"/dev/sunp" can be used to get private memory.
+3
View File
@@ -24,6 +24,7 @@ rtscale
rtshot
rtsil
rtsrv
rttherm
rtwalk
rtweight
rtwizard (GUI)
@@ -149,6 +150,7 @@ pix-yuv
png-bw
png-pix
rle-pix
ssamp-bw
sun-pix
u-a
u-bw
@@ -290,6 +292,7 @@ random
script-tab
scriptsort
smod
ssampview (GUI)
syn
tabinterp
tabsub
+20
View File
@@ -721,6 +721,7 @@
****** [[file:../doc/docbook/system/man1/en/png-bw.xml][png-bw.xml]]
****** [[file:../doc/docbook/system/man1/en/wdb_example.xml][wdb_example.xml]]
****** [[file:../doc/docbook/system/man1/en/bw-rle.xml][bw-rle.xml]]
****** [[file:../doc/docbook/system/man1/en/rttherm.xml][rttherm.xml]]
****** [[file:../doc/docbook/system/man1/en/pix-ppm.xml][pix-ppm.xml]]
****** [[file:../doc/docbook/system/man1/en/pixblend.xml][pixblend.xml]]
****** [[file:../doc/docbook/system/man1/en/fbed.xml][fbed.xml]]
@@ -905,6 +906,7 @@
****** [[file:../doc/docbook/system/man1/en/bwhisteq.xml][bwhisteq.xml]]
****** [[file:../doc/docbook/system/man1/en/fbanim.xml][fbanim.xml]]
****** [[file:../doc/docbook/system/man1/en/fb-bw.xml][fb-bw.xml]]
****** [[file:../doc/docbook/system/man1/en/ssamp-bw.xml][ssamp-bw.xml]]
****** [[file:../doc/docbook/system/man1/en/rt.xml][rt.xml]]
****** [[file:../doc/docbook/system/man1/en/hex.xml][hex.xml]]
****** [[file:../doc/docbook/system/man1/en/sun-pix.xml][sun-pix.xml]]
@@ -1794,6 +1796,9 @@
*** [[file:../src/anim/anim_sort.c][anim_sort.c]]
*** [[file:../src/anim/anim_track.c][anim_track.c]]
*** [[file:../src/anim/anim_turn.c][anim_turn.c]]
** [[file:../src/libmultispectral][libmultispectral]]
*** [[file:../src/libmultispectral/sh_temp.c][sh_temp.c]]
*** [[file:../src/libmultispectral/CMakeLists.txt][CMakeLists.txt]]
** [[file:../src/brlman][brlman]]
*** [[file:../src/brlman/brlman.sh.in][brlman.sh.in]]
*** [[file:../src/brlman/brlman.bat][brlman.bat]]
@@ -4362,6 +4367,7 @@
*** [[file:../src/mged/edsol.c][edsol.c]]
*** [[file:../src/mged/rtif.c][rtif.c]]
*** [[file:../src/mged/muves.c][muves.c]]
*** [[file:../src/mged/mged.bat][mged.bat]]
*** [[file:../src/mged/clone.c][clone.c]]
*** [[file:../src/mged/columns.c][columns.c]]
*** [[file:../src/mged/doevent.c][doevent.c]]
@@ -4633,6 +4639,16 @@
*** [[file:../src/sig/i-f.c][i-f.c]]
*** [[file:../src/sig/dauto2.c][dauto2.c]]
*** [[file:../src/sig/ddisp.c][ddisp.c]]
** [[file:../src/rttherm][rttherm]]
*** [[file:../src/rttherm/ssampview.c][ssampview.c]]
*** [[file:../src/rttherm/spectrum.c][spectrum.c]]
*** [[file:../src/rttherm/ssampview.tcl][ssampview.tcl]]
*** [[file:../src/rttherm/test.sh][test.sh]]
*** [[file:../src/rttherm/std_day_1km.dat][std_day_1km.dat]]
*** [[file:../src/rttherm/ssamp-bw.c][ssamp-bw.c]]
*** [[file:../src/rttherm/CMakeLists.txt][CMakeLists.txt]]
*** [[file:../src/rttherm/viewtherm.c][viewtherm.c]]
*** [[file:../src/rttherm/pixtest.c][pixtest.c]]
** [[file:../src/libwdb][libwdb]]
*** [[file:../src/libwdb/mater.c][mater.c]]
*** [[file:../src/libwdb/datum.c][datum.c]]
@@ -12960,9 +12976,11 @@
*** [[file:../misc/profont/readme.txt][readme.txt]]
*** [[file:../misc/profont/LICENSE][LICENSE]]
** [[file:../misc/nsis][nsis]]
*** [[file:../misc/nsis/brlcad.nsi][brlcad.nsi]]
*** [[file:../misc/nsis/side.bmp][side.bmp]]
*** [[file:../misc/nsis/archer.ico][archer.ico]]
*** [[file:../misc/nsis/brlcad.ico][brlcad.ico]]
*** [[file:../misc/nsis/updateVersion.tcl][updateVersion.tcl]]
*** [[file:../misc/nsis/uninstall.ico][uninstall.ico]]
*** [[file:../misc/nsis/header.bmp][header.bmp]]
** [[file:../misc/jove.emacs][jove.emacs]]
@@ -13671,6 +13689,7 @@
*** [[file:../misc/doxygen/libfft.dox][libfft.dox]]
*** [[file:../misc/doxygen/libtclcad.dox][libtclcad.dox]]
*** [[file:../misc/doxygen/libtermio.dox][libtermio.dox]]
*** [[file:../misc/doxygen/libmultispectral.dox][libmultispectral.dox]]
*** [[file:../misc/doxygen/libanalyze.dox][libanalyze.dox]]
*** [[file:../misc/doxygen/images][images]]
**** [[file:../misc/doxygen/images/README.txt][README.txt]]
@@ -13910,6 +13929,7 @@
** [[file:../misc/pkgconfig][pkgconfig]]
*** [[file:../misc/pkgconfig/libgm.pc.in][libgm.pc.in]]
*** [[file:../misc/pkgconfig/libicv.pc.in][libicv.pc.in]]
*** [[file:../misc/pkgconfig/libmultispectral.pc.in][libmultispectral.pc.in]]
*** [[file:../misc/pkgconfig/librt.pc.in][librt.pc.in]]
*** [[file:../misc/pkgconfig/libfft.pc.in][libfft.pc.in]]
*** [[file:../misc/pkgconfig/libpkg.pc.in][libpkg.pc.in]]
+158
View File
@@ -0,0 +1,158 @@
DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
Specific details about producing an animation of a gun tube,
using the BRL-CAD Package and various IBD simulation codes.
As things presently stand, the central part of this linkage is a program
called TUBE.C that takes two input files describing the motion of the
scene, and generates an MGED database containing a separate tree
(Directed Acyclic Graph [DAG]) for each frame. The name of combination
at the top of the tree is the letter "g" (for group) followed by the
frame number, so that the first frame of the animation is tree "g0", the
second frame is tree "g1", etc.
The current X displacement data for the gun tube center of mass points
is presently contained in the array dxtab[] compiled into the program.
The input file "pos.dat" contains the projectile position data. On each
input line, the time (in milliseconds) is listed first, followed by the
X displacement of the base of the projectile, offset from the projectile
starting position. The time values listed in this file do not have to
correspond to the time values listed for the articulation; the proper
time will be chosen by the program. If the file "tank.out" contains the
output from a normal run of IBHVG2, the file "pos.dat" can be created by
running this Shell script:
cat tank.out |
sed -n '/ TIME TRAV/,/ PROJECTILE EXIT/p' |
grep -v "[A-Z]" |
cut -c2-132 |
grep -v "^[ ]*$" |
awk '{printf "%10.2f %10.2f\n", $1, $2 }' > pos.dat
The mass displacement file is presented to the TUBE program on standard
input, where each time step has the following format: First a line with
the word "TIME" followed by a floating point number, in milliseconds.
Then, one input line for each of ``nmass'' (e.g., 12) mass points, in
ascending order of mass point number, starting with one, with one
integer and three floating point numbers on each line: the mass number,
the X, Y, and Z deviations (currently expected in inches, where +X is
towards the muzzle, +Y is in the vertical direction, and +Z is to the
right of the muzzle). There must be exactly one blank line after the
last mass point data line and before the next "TIME" line. Note that
mass point 1 corresponds to "m1" on the diagram, and mass point 12 is
"m12" on the diagram. The position of a two additional points (0 and
13) are guessed within the program, with mass point 0 being the outer
edge of the breach block, and mass point 13 being the muzzle end, but
these two points are not specified in the input file. E.g.,
TIME 0.02
1 0.01 0.00035 0.00000075
2 0.01 0.00040 0.00000900
(etc.)
12 1.01 0.0784 3.129
TIME 0.04
(etc.)
Therefore, assuming the mass displacement file is in "mass.dat",
and that the "pos.dat" file exists in the same directory,
and that the model for the projectile is in the file "projectile.g"
with main (top) combination named "ke",
the TUBE program is run as follows:
tube < mass.dat > anim.g
cat projectile.g >> anim.g
This MGED database can be examined with MGED. To see the first
frame, say:
mged anim.g
then respond to the "attach" question appropriately for the type of
graphics device being used, and then enter the command
B g0
This will display the geometry configuration for frame zero.
The "B" command in MGED stands for "Blast screen clear, then display
named object(s)". To view frame 42, enter the command
B g42
and so on. The MGED control dials can be used to translate, rotate,
and zoom the current viewpoint. When a desirable viewpoint has been
selected, it can saved in a file called "view1.sh" with the command
saveview view1.sh
This file is actually a Shell script that will render that one frame for
you, using RT, and store it in a file. However, in this case, a text
editor is used to extract just the viewsize, eye point, and homogeneous
transform matrix (20 numbers in all) and store them in another file, say
"view1.mat".
To preview the whole animation in wireframe format, assuming that there
are 300 frames running 0 to 299, this Shell script (called, say,
"preview.sh") is used:
rm -f temp.sh
cat << END > temp.sh
mged anim.g
attach ir (for SGI 3-D, or "sgi" for SGI 4-D)
B g0
rmats view1.mat
END
for frame in `loop 0 299`
do
echo "B g${frame}" >> temp.sh
done
sh temp.sh
rm -f temp.sh
Assuming that this animation sequence and viewpoint are satisfactory,
and that the desired "graph paper" background file is stored in a
128x128 .pix file called "movie128bw.pix" in the current directory,
the animation can be rendered the Shell script given below (called, say,
"render.sh"):
for frame in `loop 0 299`
do
rt -s512 -M -o out.pix.${frame} \
anim.g g${frame} < view1.mat >>& render.log
done
The "-s512" parameter specifies that the desired image is to be square,
and 512x512 pixels in size. This is typically the desired resolution
for videotape. The "-M" parameter specifies that the view matrix is to
be obtained from stdin. The "-o out.pix.${frame}" says that the output
picture is to be stored in a file called "out.pix.123" where "123"
represents the current frame number. (The backslash at the end of the
line continues the command to the next line). Specifying "anim.g"
names the input MGED database, and "g${frame}" specifies the treetop
appropriate for the current frame.
Because this procedure is likely to take a significant amount of time,
the shell script should be submitted as a batch job. On the minicomputers,
the MDQS command
batch render.sh
should be used. On both of the UNICOS Cray systems, the NQS command
qsub render.sh
should be used.
To view one of these files, the Shell environment variable FB_FILE
should be set to indicate the appropriate framebuffer on the network
to use, and the program "pix-fb" is used to transfer the picture to
the framebuffer. For more details on the variable FB_FILE, consult
the brlcad(1) manual page; for more details on the program "pix-fb",
consult the pix-fb(1) manual page; for more details on the framebuffer
library, consult libfb(3) manual page. This can be done on BRL-IBD
with these commands:
man brlcad
man pix-fb
man libfb
+3 -7
View File
@@ -22,7 +22,6 @@ set(public_hdrs
common.h
cursor.h
ged.h
pinttypes.h
pstdint.h
raytrace.h
rtserver.h
@@ -42,6 +41,7 @@ set(public_hdrs
photonmap.h
pc.h
pkg.h
spectrum.h
vmath.h
wdb.h
)
@@ -57,6 +57,7 @@ endif(WIN32)
# headers used by multiple packages but still considered private.
# public headers should NOT include these headers.
set(noinst_HEADERS
brlcad_ident.h
brlcad_version.h
)
CMAKEFILES(${noinst_HEADERS})
@@ -79,12 +80,7 @@ CMAKEFILES(${noinst_HEADERS})
#endif(inc_error)
set(include_misc
brlcad_ident.h.in
conf/BrlcadConfig.tmpl
conf/MAJOR
conf/MINOR
conf/PATCH
conf/make.vbs
conf
config_win.h.in
)
CMAKEFILES(${include_misc})
-3
View File
@@ -212,9 +212,6 @@ analyze_find_subtracted(struct bu_ptbl *results, struct rt_wdb *wdbp,
const char *pbrep, struct rt_gen_worker_vars *pbrep_rtvars,
const char *curr_comb, struct bu_ptbl *candidates, void *curr_union_data, int ncpus);
ANALYZE_EXPORT void
analyze_heal_bot(struct rt_bot_internal *bot, double zipper_tol);
__END_DECLS
-1
View File
@@ -55,7 +55,6 @@
#include "bg/polygon.h"
#include "bg/tri_ray.h"
#include "bg/tri_tri.h"
#include "bg/trimesh.h"
#endif /* BG_H */
+1 -4
View File
@@ -1,19 +1,16 @@
set(bg_headers
chull.h
defines.h
chull.h
obr.h
polygon.h
tri_ray.h
tri_tri.h
trimesh.h
)
install(FILES ${bg_headers} DESTINATION ${INCLUDE_DIR}/brlcad/bg)
CMAKEFILES(${bg_headers})
CMAKEFILES(pointgen.h)
# Local Variables:
# tab-width: 8
# mode: cmake
-64
View File
@@ -1,64 +0,0 @@
/* P O I N T G E N . H
* BRL-CAD
*
* Copyright (c) 2004-2016 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library 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 file; see the file named COPYING for more
* information.
*/
/*----------------------------------------------------------------------*/
/* @file pointgen.h */
/** @addtogroup pointgen */
/** @{ */
/**
* @brief Routines for the generation of pseudo-random and quasi-random
* points.
*/
#ifndef BG_POINTGEN_H
#define BG_POINTGEN_H
#include "common.h"
#include "vmath.h"
#include "bg/defines.h"
__BEGIN_DECLS
/**
* @brief
* Generate points on a sphere per Marsaglia (1972).
*
* The return code is the number of points generated.
*
* The user is responsible for selecting the numerical generator used to
* supply pseudo or quasi-random numbers to bg_sph_sample - different
* types of inputs may be needed depending on the application.
*/
BG_EXPORT extern size_t bg_sph_sample(point_t *pnts, size_t cnt, const point_t center, const fastf_t radius, bn_numgen n);
__END_DECLS
#endif /* BG_POINTGEN_H */
/** @} */
/*
* Local Variables:
* mode: C
* tab-width: 8
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
*/
-56
View File
@@ -1,56 +0,0 @@
/* T R I M E S H . H
* BRL-CAD
*
* Copyright (c) 2004-2016 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library 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 file; see the file named COPYING for more
* information.
*/
/*----------------------------------------------------------------------*/
/* @file trimesh.h */
/** @addtogroup trimesh */
/** @{ */
/**
* @brief
* Algorithms related to 3D meshes built from triangles.
*/
#ifndef BG_TRIMESH_H
#define BG_TRIMESH_H
#include "common.h"
#include "vmath.h"
#include "bg/defines.h"
__BEGIN_DECLS
BG_EXPORT extern int bg_trimesh_closed_fan(size_t vcnt, size_t fcnt, fastf_t *v, int *f);
BG_EXPORT extern int bg_trimesh_orientable(size_t vcnt, size_t fcnt, fastf_t *v, int *f);
BG_EXPORT extern int bg_trimesh_solid(size_t vcnt, size_t fcnt, fastf_t *v, int *f, int **bedges);
__END_DECLS
#endif /* BG_TRIMESH_H */
/** @} */
/*
* Local Variables:
* mode: C
* tab-width: 8
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
*/
-2
View File
@@ -32,8 +32,6 @@ install(FILES ${bn_headers} DESTINATION ${INCLUDE_DIR}/brlcad/bn)
CMAKEFILES(${bn_headers})
CMAKEFILES(numgen.h)
# Local Variables:
# tab-width: 8
# mode: cmake
-141
View File
@@ -1,141 +0,0 @@
/* N U M G E N . H
* BRL-CAD
*
* Copyright (c) 2016 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library 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 file; see the file named COPYING for more
* information.
*/
/*----------------------------------------------------------------------*/
/** @addtogroup bn_rand
*
* @brief
* Routines for generating series of pseudo-random or quasi-random numbers.
*
* @code
* @endcode
*/
/** @{ */
/** @file numgen.h */
#ifndef BN_NUMGEN_H
#define BN_NUMGEN_H
#include "common.h"
#include "bn/defines.h"
__BEGIN_DECLS
/* Most of the following are API design possibilities only - not yet active */
#if 0
/**
* The following container holds all state associated with a particular
* number generator. The details of that state are specific to the
* type of selected generator and are not public, but the container allows
* libbn to avoid using globals to maintain state - instead, each "generator"
* instance has its own state.
*/
typedef struct bn_num_s *bn_numgen;
/**
* The available number generators in libbn.
*/
typedef enum {
BN_NUMGEN_PRAND_TABLE = 0,
BN_NUMGEN_PRAND_MT1337,
BN_NUMGEN_QRAND_SOBOL,
BN_NUMGEN_QRAND_SCRAMBLED_SOBOL,
BN_NUMGEN_QRAND_HALTON,
BN_NUMGEN_NRAND_BOX_MULLER,
BN_NUMGEN_NRAND_RATIO_OF_UNIFORMS,
BN_NUMGEN_NULL
} bn_numgen_t;
/**
* Create an instance of the number generator with the type
* and seed specified by the user. By default, a generator will
* return numbers between 0 and 1 - to adjust the range, use
* bn_numgen_setrange */
BN_EXPORT bn_numgen bn_numgen_create(bn_numgen_t type, int dim, double seed);
/** Returns the type of a bn_numgen instance */
BN_EXPORT bn_numgen_t bn_numgen_type(bn_numgen n);
/**
* Set the range of the numbers to be returned. Return 1 if range
* is valid for the generator, and zero if it is unsupported. */
BN_EXPORT int bn_numgen_setrange(bn_numgen ngen, double lb, double ub);
/**
* Some generators only support a finite number of unique returns before
* repeating. By default, bn_numgen generators are periodic - they will start
* over at the beginning.
*
* If this function is called with flag == 0, the generator will refuse to
* repeat itself and not assign any numbers once it reaches its periodic limit.
* If flag is set to 1, it will restore a generator to its default behavior.
*
* If passed -1 in the flag var, the return code will report the existing
* periodic flag state but will not change it in the generator.
*/
BN_EXPORT int bn_numgen_periodic(bn_numgen ngen, int flag);
/**
* Destroy the specified bn_numgen instance */
BN_EXPORT void bn_numgen_destroy(bn_numgen n);
/**
* Get the next cnt numbers in the generator's sequence. See the documentation
* for each individual generator for the particulars of what output will be
* returned in the array. The user is responsible for allocating an array
* large enough to hold the requested output.
*
* When in non-periodic mode, an exhausted generator will report zero numbers
* assigned to output arrays and will not alter the array contents.
*
* Return codes: >= 0 number of numbers assigned.
* < 0 error.
*/
BN_EXPORT int bn_numgen_next_ints(int *l, size_t cnt, bn_numgen ngen);
BN_EXPORT int bn_numgen_next_ulongs(unsigned long *l, size_t cnt, bn_numgen ngen);
BN_EXPORT int bn_numgen_next_fastf_t(fastf_t *l, size_t cnt, bn_numgen ngen);
BN_EXPORT int bn_numgen_next_doubles(double *l, size_t cnt, bn_numgen ngen);
#endif
/**
* @brief
* Generate points on a unit sphere per Marsaglia (1972):
* https://projecteuclid.org/euclid.aoms/1177692644
*
* The user is responsible for selecting the numerical generator used to
* supply pseudo or quasi-random numbers to bg_sph_sample - different
* types of inputs may be needed depending on the application.
*/
BN_EXPORT extern void bn_sph_pnts(point_t *pnts, size_t cnt, bn_numgen n);
__END_DECLS
#endif /* BN_RAND_H */
/** @} */
/*
* Local Variables:
* mode: C
* tab-width: 8
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
*/
+1 -1
View File
@@ -145,7 +145,7 @@ BN_EXPORT extern void quat_sberp(quat_t qout,
* smallest rotation from q2 (of the two versions of q1 which
* produce the same orientation).
*
* Note that smallest euclidean distance implies smallest great
* Note that smallest euclidian distance implies smallest great
* circle distance as well (since surface is convex).
*/
BN_EXPORT extern void quat_make_nearest(quat_t q1,
-12
View File
@@ -51,7 +51,6 @@
#include "common.h"
#include "bn/defines.h"
#include "vmath.h"
__BEGIN_DECLS
@@ -141,17 +140,6 @@ BN_EXPORT extern const float bn_sin_table[BN_SINTABSIZE];
*/
BN_EXPORT extern void bn_mathtab_constant(void);
/**
* @brief
* Generate a sample point on a sphere per Marsaglia (1972).
*
* Note that bn_sph_sample and its internal routines do not initialize the
* randmt seed - the user should call bn_randmt_seed in their code if a
* variable seed is required.
*/
BN_EXPORT extern void bn_rand_sph_sample(point_t sample, const point_t center, const fastf_t radius);
__END_DECLS
#endif /* BN_RAND_H */
+24 -22
View File
@@ -19,7 +19,7 @@
*/
/*----------------------------------------------------------------------*/
/** @addtogroup bn_vert_tree
/** @addtogroup bn_vtree
*
* @brief
* Vertex tree support
@@ -47,7 +47,7 @@ __BEGIN_DECLS
* packaging structure
* holds all the required info for a single vertex tree
*/
struct bn_vert_tree {
struct vert_root {
uint32_t magic;
int tree_type; /**< @brief vertices or vertices with normals */
union vert_tree *the_tree; /**< @brief the actual vertex tree */
@@ -56,10 +56,12 @@ struct bn_vert_tree {
size_t max_vert; /**< @brief the current maximum capacity of the array */
};
#define BN_VERT_TREE_TYPE_VERTS 1
#define BN_VERT_TREE_TYPE_VERTS_AND_NORMS 2
#define TREE_TYPE_VERTS 1
#define TREE_TYPE_VERTS_AND_NORMS 2
#define BN_CK_VERT_TREE(_p) BU_CKMAG(_p, BN_VERT_TREE_MAGIC, "vert_tree")
#define VERT_BLOCK 512 /**< @brief number of vertices to malloc per call when building the array */
#define BN_CK_VERT_TREE(_p) BU_CKMAG(_p, VERT_TREE_MAGIC, "vert_tree")
/**
@@ -68,7 +70,7 @@ struct bn_vert_tree {
*
* Possible refinements include specifying an initial size
*/
BN_EXPORT extern struct bn_vert_tree *bn_vert_tree_create(void);
BN_EXPORT extern struct vert_root *create_vert_tree(void);
/**
*@brief
@@ -76,13 +78,13 @@ BN_EXPORT extern struct bn_vert_tree *bn_vert_tree_create(void);
*
* Possible refinements include specifying an initial size
*/
BN_EXPORT extern struct bn_vert_tree *bn_vert_tree_create_w_norms(void);
BN_EXPORT extern struct vert_root *create_vert_tree_w_norms(void);
/**
*@brief
* Routine to free a vertex tree and all associated dynamic memory
*/
BN_EXPORT extern void bn_vert_tree_destroy(struct bn_vert_tree *tree);
BN_EXPORT extern void free_vert_tree(struct vert_root *tree_root);
/**
*@brief
@@ -90,11 +92,11 @@ BN_EXPORT extern void bn_vert_tree_destroy(struct bn_vert_tree *tree);
* The array is re-alloc'd if needed.
* Returns index into the array of vertices where this vertex is stored
*/
BN_EXPORT extern size_t bn_vert_tree_add(struct bn_vert_tree *tree,
double x,
double y,
double z,
fastf_t local_tol_sq);
BN_EXPORT extern size_t Add_vert(double x,
double y,
double z,
struct vert_root *tree_root,
fastf_t local_tol_sq);
/**
*@brief
@@ -102,21 +104,21 @@ BN_EXPORT extern size_t bn_vert_tree_add(struct bn_vert_tree *tree,
* The array is re-alloc'd if needed.
* Returns index into the array of vertices where this vertex and normal is stored
*/
BN_EXPORT extern size_t bn_vert_tree_add_w_norm(struct bn_vert_tree *tree,
double x,
double y,
double z,
double nx,
double ny,
double nz,
fastf_t local_tol_sq);
BN_EXPORT extern size_t Add_vert_and_norm(double x,
double y,
double z,
double nx,
double ny,
double nz,
struct vert_root *tree_root,
fastf_t local_tol_sq);
/**
*@brief
* Routine to free the binary search tree and reset the current number of vertices.
* The vertex array is left untouched, for re-use later.
*/
BN_EXPORT extern void bn_vert_tree_clean(struct bn_vert_tree *tree);
BN_EXPORT extern void clean_vert_tree(struct vert_root *tree_root);
__END_DECLS
+28 -69
View File
@@ -22,7 +22,6 @@
#define BN_VLIST_H
#include "common.h"
#include <stdio.h> /* for FILE */
#include "vmath.h"
#include "bu/magic.h"
#include "bu/list.h"
@@ -75,24 +74,23 @@ struct bn_vlist {
/* should these be enum? -Erik */
/* Values for cmd[] */
#define BN_VLIST_LINE_MOVE 0 /**< @brief specify new line */
#define BN_VLIST_LINE_DRAW 1 /**< @brief subsequent line vertex */
#define BN_VLIST_POLY_START 2 /**< @brief pt[] has surface normal */
#define BN_VLIST_POLY_MOVE 3 /**< @brief move to first poly vertex */
#define BN_VLIST_POLY_DRAW 4 /**< @brief subsequent poly vertex */
#define BN_VLIST_POLY_END 5 /**< @brief last vert (repeats 1st), draw poly */
#define BN_VLIST_POLY_VERTNORM 6 /**< @brief per-vertex normal, for interpolation */
#define BN_VLIST_TRI_START 7 /**< @brief pt[] has surface normal */
#define BN_VLIST_TRI_MOVE 8 /**< @brief move to first triangle vertex */
#define BN_VLIST_TRI_DRAW 9 /**< @brief subsequent triangle vertex */
#define BN_VLIST_TRI_END 10 /**< @brief last vert (repeats 1st), draw poly */
#define BN_VLIST_TRI_VERTNORM 11 /**< @brief per-vertex normal, for interpolation */
#define BN_VLIST_POINT_DRAW 12 /**< @brief Draw a single point */
#define BN_VLIST_POINT_SIZE 13 /**< @brief specify point pixel size */
#define BN_VLIST_LINE_WIDTH 14 /**< @brief specify line pixel width */
#define BN_VLIST_DISPLAY_MAT 15 /**< @brief specify the model matrix */
#define BN_VLIST_MODEL_MAT 16 /**< @brief specify the display matrix */
#define BN_VLIST_CMD_MAX 16 /**< @brief Max command number */
#define BN_VLIST_LINE_MOVE 0
#define BN_VLIST_LINE_DRAW 1
#define BN_VLIST_POLY_START 2 /**< @brief pt[] has surface normal */
#define BN_VLIST_POLY_MOVE 3 /**< @brief move to first poly vertex */
#define BN_VLIST_POLY_DRAW 4 /**< @brief subsequent poly vertex */
#define BN_VLIST_POLY_END 5 /**< @brief last vert (repeats 1st), draw poly */
#define BN_VLIST_POLY_VERTNORM 6 /**< @brief per-vertex normal, for interpolation */
#define BN_VLIST_TRI_START 7 /**< @brief pt[] has surface normal */
#define BN_VLIST_TRI_MOVE 8 /**< @brief move to first triangle vertex */
#define BN_VLIST_TRI_DRAW 9 /**< @brief subsequent triangle vertex */
#define BN_VLIST_TRI_END 10 /**< @brief last vert (repeats 1st), draw poly */
#define BN_VLIST_TRI_VERTNORM 11 /**< @brief per-vertex normal, for interpolation */
#define BN_VLIST_POINT_DRAW 12 /**< @brief Draw a single point */
#define BN_VLIST_POINT_SIZE 13 /**< @brief specify point pixel size */
#define BN_VLIST_LINE_WIDTH 14 /**< @brief specify line pixel width */
#define BN_VLIST_CMD_MAX 14 /**< @brief Max command number */
/**
* Applications that are going to use BN_ADD_VLIST and BN_GET_VLIST
* are required to execute this macro once, on their _free_hd:
@@ -129,31 +127,6 @@ struct bn_vlist {
_vp->cmd[_vp->nused++] = (draw); \
}
/** Change the transformation matrix to display */
#define BN_VLIST_SET_DISP_MAT(_free_hd, _dest_hd, _ref_pt) { \
struct bn_vlist *_vp; \
BU_CK_LIST_HEAD(_dest_hd); \
_vp = BU_LIST_LAST(bn_vlist, (_dest_hd)); \
if (BU_LIST_IS_HEAD(_vp, (_dest_hd)) || _vp->nused >= BN_VLIST_CHUNK) { \
BN_GET_VLIST(_free_hd, _vp); \
BU_LIST_INSERT((_dest_hd), &(_vp->l)); \
} \
VMOVE(_vp->pt[_vp->nused], (_ref_pt)); \
_vp->cmd[_vp->nused++] = BN_VLIST_DISPLAY_MAT; \
}
/** Change the transformation matrix to model */
#define BN_VLIST_SET_MODEL_MAT(_free_hd, _dest_hd) { \
struct bn_vlist *_vp; \
BU_CK_LIST_HEAD(_dest_hd); \
_vp = BU_LIST_LAST(bn_vlist, (_dest_hd)); \
if (BU_LIST_IS_HEAD(_vp, (_dest_hd)) || _vp->nused >= BN_VLIST_CHUNK) { \
BN_GET_VLIST(_free_hd, _vp); \
BU_LIST_INSERT((_dest_hd), &(_vp->l)); \
} \
_vp->cmd[_vp->nused++] = BN_VLIST_MODEL_MAT; \
}
/** Set a point size to apply to the vlist elements that follow. */
#define BN_VLIST_SET_POINT_SIZE(_free_hd, _dest_hd, _size) { \
struct bn_vlist *_vp; \
@@ -265,8 +238,8 @@ BN_EXPORT extern int bn_ck_vlist(const struct bu_list *vhead);
* densely packed than the source.
*/
BN_EXPORT extern void bn_vlist_copy(struct bu_list *vlists,
struct bu_list *dest,
const struct bu_list *src);
struct bu_list *dest,
const struct bu_list *src);
/**
@@ -277,8 +250,8 @@ BN_EXPORT extern void bn_vlist_copy(struct bu_list *vlists,
* length are available conveniently.
*/
BN_EXPORT extern void bn_vlist_export(struct bu_vls *vls,
struct bu_list *hp,
const char *name);
struct bu_list *hp,
const char *name);
/**
@@ -286,39 +259,25 @@ BN_EXPORT extern void bn_vlist_export(struct bu_vls *vls,
* vls_vlist() and received from another machine, into a vlist chain.
*/
BN_EXPORT extern void bn_vlist_import(struct bu_list *vlists,
struct bu_list *hp,
struct bu_vls *namevls,
const unsigned char *buf);
struct bu_list *hp,
struct bu_vls *namevls,
const unsigned char *buf);
BN_EXPORT extern void bn_vlist_cleanup(struct bu_list *hd);
BN_EXPORT extern struct bn_vlblock *bn_vlblock_init(struct bu_list *free_vlist_hd, /* where to get/put free vlists */
int max_ent);
int max_ent);
BN_EXPORT extern void bn_vlblock_free(struct bn_vlblock *vbp);
BN_EXPORT extern struct bu_list *bn_vlblock_find(struct bn_vlblock *vbp,
int r,
int g,
int b);
int r,
int g,
int b);
BN_EXPORT void bn_vlist_rpp(struct bu_list *vlists, struct bu_list *hd, const point_t minn, const point_t maxx);
/**
* Output a bn_vlblock object in extended UNIX-plot format, including
* color.
*/
BN_EXPORT extern void bn_plot_vlblock(FILE *fp,
const struct bn_vlblock *vbp);
/**
* Output a vlist as an extended 3-D floating point UNIX-Plot file.
* You provide the file. Uses libplot3 routines to create the
* UNIX-Plot output.
*/
BN_EXPORT extern void bn_vlist_to_uplot(FILE *fp,
const struct bu_list *vhead);
/** @} */
+12 -12
View File
@@ -215,23 +215,23 @@ extern "C++" {
inline void
BBNode::GetBBox(float *min, float *max) const
{
min[0] = (float)m_node.m_min.x;
min[1] = (float)m_node.m_min.y;
min[2] = (float)m_node.m_min.z;
max[0] = (float)m_node.m_max.x;
max[1] = (float)m_node.m_max.y;
max[2] = (float)m_node.m_max.z;
min[0] = m_node.m_min[0];
min[1] = m_node.m_min[1];
min[2] = m_node.m_min[2];
max[0] = m_node.m_max[0];
max[1] = m_node.m_max[1];
max[2] = m_node.m_max[2];
}
inline void
BBNode::GetBBox(double *min, double *max) const
{
min[0] = m_node.m_min.x;
min[1] = m_node.m_min.y;
min[2] = m_node.m_min.z;
max[0] = m_node.m_max.x;
max[1] = m_node.m_max.y;
max[2] = m_node.m_max.z;
min[0] = m_node.m_min[0];
min[1] = m_node.m_min[1];
min[2] = m_node.m_min[2];
max[0] = m_node.m_max[0];
max[1] = m_node.m_max[1];
max[2] = m_node.m_max[2];
}
+8 -7
View File
@@ -17,8 +17,7 @@
* License along with this file; see the file named COPYING for more
* information.
*/
/** @{ */
/** @file brep/brnode.h */
/** @addtogroup brep_brnode
*
* @brief
@@ -29,21 +28,23 @@
#define BREP_BRNODE_H
#include "common.h"
#ifdef __cplusplus
extern "C++" {
/* @cond */
# include <vector>
# include <list>
#include <vector>
#include <list>
/* @endcond */
}
#endif
#include "brep.h"
/** @{ */
/** @file brep/brnode.h */
#ifdef __cplusplus
__BEGIN_DECLS
#ifdef __cplusplus
extern "C++" {
namespace brlcad {
+8 -12
View File
@@ -17,33 +17,29 @@
* License along with this file; see the file named COPYING for more
* information.
*/
/** @{ */
/** @file brep/curvetree.h */
/** @addtogroup brep_curvetree
*
* @brief
* Curve Tree.
*
*/
#ifndef BREP_CURVETREE_H
#define BREP_CURVETREE_H
#include "common.h"
#ifdef __cplusplus
extern "C++" {
# include <map>
}
#endif
#include "brep.h"
/** @{ */
/** @file brep/curvetree.h */
#ifdef __cplusplus
__BEGIN_DECLS
#ifdef __cplusplus
extern "C++" {
#include <map>
namespace brlcad {
@@ -108,13 +104,13 @@ extern "C++" {
mutable std::map<const BRNode *, std::size_t> *m_sortedX_indices;
};
} /* namespace brlcad */
} /* namespace brlcad */
} /* extern C++ */
__END_DECLS
#endif /* __cplusplus */
#endif
/** @} */
+7 -10
View File
@@ -17,27 +17,22 @@
* License along with this file; see the file named COPYING for more
* information.
*/
/** @{ */
/** @file brep/util.h */
/** @addtogroup brep_util
*
* @brief
* These are utility routines for libbrep, used throughout the library.
*
*/
#ifndef BREP_UTIL_H
#define BREP_UTIL_H
#include "common.h"
#include "bnetwork.h" /* Needed for ntohl and htonl */
/** @{ */
/** @file brep/util.h */
#ifdef __cplusplus
extern "C++" {
# include <cstring>
}
#endif
#include "brep.h"
@@ -47,11 +42,12 @@ extern "C++" {
#include "bu/malloc.h"
#include "bu/parse.h"
#include <arpa/inet.h>
__BEGIN_DECLS
#ifdef __cplusplus
extern "C++" {
#include <cstring>
BREP_EXPORT bool ON_NearZero(double x, double tolerance = ON_ZERO_TOLERANCE);
@@ -337,11 +333,12 @@ extern "C++" {
}
};
} /* extern C++ */
__END_DECLS
#endif /* __cplusplus */
#endif /* __cplusplus */
/** @} */
@@ -46,22 +46,22 @@
/**
* Compilation date, updated every time a build pass occurs.
*/
static const char *BRLCAD_DATE = @BRLCAD_COMPILE_DATE@;
static const char *BRLCAD_DATE = BRLCAD_COMPILE_DATE;
/**
* Compilation host, updated every time a build pass occurs.
*/
static const char *BRLCAD_HOST = "@BRLCAD_COMPILE_HOST@";
static const char *BRLCAD_HOST = BRLCAD_COMPILE_HOST;
/**
* Compilation user, updated every time a build pass occurs.
*/
static const char *BRLCAD_USER = "@BRLCAD_COMPILE_USER@";
static const char *BRLCAD_USER = BRLCAD_COMPILE_USER;
/**
* Compilation count, updated every time a build pass occurs.
*/
static const int BRLCAD_COUNT = @BRLCAD_COMPILE_COUNT@;
static const int BRLCAD_COUNT = BRLCAD_COMPILE_COUNT;
/**
-2
View File
@@ -8,12 +8,10 @@ set(bu_headers
defines.h
endian.h
env.h
exit.h
file.h
getopt.h
hash.h
hist.h
hook.h
list.h
log.h
magic.h
-2
View File
@@ -23,8 +23,6 @@
#include "common.h"
#include <limits.h> /* for CHAR_BIT */
#include "bu/defines.h"
#include "bu/magic.h"
#include "bu/list.h"
+3 -2
View File
@@ -24,6 +24,7 @@
#include "common.h"
#include <stddef.h> /* for size_t */
#include <limits.h> /* for CHAR_MAX */
#include "bu/defines.h"
@@ -153,12 +154,12 @@ __BEGIN_DECLS
/**
* provide for 64-bit network/host conversions using ntohl()
*/
#if !defined(HAVE_NTOHLL) && !defined(ntohll)
#ifndef HAVE_NTOHLL
# define ntohll(_val) ((bu_byteorder() == BU_LITTLE_ENDIAN) ? \
((((uint64_t)ntohl((_val))) << 32) + ntohl((_val) >> 32)) : \
(_val)) /* sorry pdp-endian */
#endif
#if !defined(HAVE_HTONLL) && !defined(htonll)
#ifndef HAVE_HTONLL
# define htonll(_val) ntohll(_val)
#endif
+83 -14
View File
@@ -120,22 +120,15 @@
/**
* shorthand declaration of a function that doesn't return
*/
#ifdef HAVE_NORETURN_ATTRIBUTE
#if defined(HAVE_NORETURN_ATTRIBUTE) && defined(HAVE_ANALYZER_NORETURN_ATTRIBUTE)
/* clang static analyzer is needing an additional flag set */
# define _BU_ATTR_NORETURN __attribute__((__noreturn__)) __attribute__((analyzer_noreturn))
#elif defined(HAVE_NORETURN_ATTRIBUTE)
# define _BU_ATTR_NORETURN __attribute__((__noreturn__))
#else
# define _BU_ATTR_NORETURN
#endif
/* For the moment, we need to specially flag some functions
* for clang. It's not clear if we will always need to do
* this, but for now this suppresses a lot of noise in the
* reports */
#ifdef HAVE_ANALYZER_NORETURN_ATTRIBUTE
# define _BU_ATTR_ANALYZE_NORETURN __attribute__((analyzer_noreturn))
#else
# define _BU_ATTR_ANALYZE_NORETURN
#endif
/**
* shorthand declaration of a function that should always be inline
*/
@@ -148,9 +141,9 @@
/**
* If we're compiling strict, turn off "format string vs arguments"
* checks. As long as we are using C89, the proper printf support
* for size_t is not available in the standard and we will get
* warnings about using extensions.
* checks - BRL-CAD customizes the arguments to some of these
* function types (adding bu_vls support) and that is a problem with
* strict checking.
*/
#if defined(STRICT_FLAGS)
# undef _BU_ATTR_PRINTF12
@@ -177,6 +170,19 @@
* Quick and easy macros to generate an informative error message and
* abort execution if the specified condition does not hold true.
*
* @def BU_ASSERT_PTR(eqn)
* Quick and easy macros to generate an informative error message and
* abort execution if the specified condition does not hold true.
*
* @def BU_ASSERT_LONG(eqn)
* Quick and easy macros to generate an informative error message and
* abort execution if the specified condition does not hold true.
*
* @def BU_ASSERT_DOUBLE(eqn)
* Quick and easy macros to generate an informative error message and
* abort execution if the specified condition does not hold true.
*
* Example: BU_ASSERT_LONG(j+7, <, 42);
*/
#ifdef NO_BOMBING_MACROS
# define BU_ASSERT(_equation) (void)(_equation)
@@ -189,6 +195,69 @@
}
#endif
#ifdef NO_BOMBING_MACROS
# define BU_ASSERT_PTR(_lhs, _relation, _rhs) (void)(_lhs); (void)(_rhs)
#else
# define BU_ASSERT_PTR(_lhs, _relation, _rhs) \
if (UNLIKELY(!((_lhs) _relation (_rhs)))) { \
bu_log("BU_ASSERT_PTR(" #_lhs #_relation #_rhs ") failed, lhs=%p, rhs=%p, file %s, line %d\n", \
(void *)(_lhs), (void *)(_rhs), \
__FILE__, __LINE__); \
bu_bomb("BU_ASSERT_PTR failure\n"); \
}
#endif
#ifdef NO_BOMBING_MACROS
# define BU_ASSERT_LONG(_lhs, _relation, _rhs) (void)(_lhs); (void)(_rhs)
#else
# define BU_ASSERT_LONG(_lhs, _relation, _rhs) \
if (UNLIKELY(!((_lhs) _relation (_rhs)))) { \
bu_log("BU_ASSERT_LONG(" #_lhs #_relation #_rhs ") failed, lhs=%ld, rhs=%ld, file %s, line %d\n", \
(long)(_lhs), (long)(_rhs), \
__FILE__, __LINE__); \
bu_bomb("BU_ASSERT_LONG failure\n"); \
}
#endif
#ifdef NO_BOMBING_MACROS
# define BU_ASSERT_SIZE_T(_lhs, _relation, _rhs) (void)(_lhs); (void)(_rhs)
#else
# define BU_ASSERT_SIZE_T(_lhs, _relation, _rhs) \
if (UNLIKELY(!((_lhs) _relation (_rhs)))) { \
bu_log("BU_ASSERT_SIZE_T(" #_lhs #_relation #_rhs ") failed, lhs=%zd, rhs=%zd, file %s, line %d\n", \
(size_t)(_lhs), (size_t)(_rhs), \
__FILE__, __LINE__); \
bu_bomb("BU_ASSERT_SIZE_T failure\n"); \
}
#endif
#ifdef NO_BOMBING_MACROS
# define BU_ASSERT_SSIZE_T(_lhs, _relation, _rhs) (void)(_lhs); (void)(_rhs)
#else
# define BU_ASSERT_SSIZE_T(_lhs, _relation, _rhs) \
if (UNLIKELY(!((_lhs) _relation (_rhs)))) { \
bu_log("BU_ASSERT_SSIZE_T(" #_lhs #_relation #_rhs ") failed, lhs=%zd, rhs=%zd, file %s, line %d\n", \
(ssize_t)(_lhs), (ssize_t)(_rhs), \
__FILE__, __LINE__); \
bu_bomb("BU_ASSERT_SSIZE_T failure\n"); \
}
#endif
#ifdef NO_BOMBING_MACROS
# define BU_ASSERT_DOUBLE(_lhs, _relation, _rhs) (void)(_lhs); (void)(_rhs)
#else
# define BU_ASSERT_DOUBLE(_lhs, _relation, _rhs) \
if (UNLIKELY(!((_lhs) _relation (_rhs)))) { \
bu_log("BU_ASSERT_DOUBLE(" #_lhs #_relation #_rhs ") failed, lhs=%lf, rhs=%lf, file %s, line %d\n", \
(double)(_lhs), (double)(_rhs), \
__FILE__, __LINE__); \
bu_bomb("BU_ASSERT_DOUBLE failure\n"); \
}
#endif
/**
* fastf_t - Intended to be the fastest floating point data type on
-150
View File
@@ -1,150 +0,0 @@
/* E X I T . H
* BRL-CAD
*
* Copyright (c) 2004-2016 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library 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 file; see the file named COPYING for more
* information.
*/
#ifndef BU_EXIT_H
#define BU_EXIT_H
#include "common.h"
#include <stdio.h> /* for FILE */
#include "bu/defines.h"
#include "bu/hook.h"
__BEGIN_DECLS
/** @{ */
/** @file bu/exit.h */
/**
* this routine provides a trace of the call stack to the caller,
* generally called either directly, via a signal handler, or through
* bu_bomb() with the appropriate bu_debug flags set.
*
* the routine waits indefinitely (in a spin loop) until a signal
* (SIGINT) is received, at which point execution continues, or until
* some other signal is received that terminates the application.
*
* the stack backtrace will be written to the provided 'fp' file
* pointer. it's the caller's responsibility to open and close
* that pointer if necessary. If 'fp' is NULL, stdout will be used.
*
* returns truthfully if a backtrace was attempted.
*/
BU_EXPORT extern int bu_backtrace(FILE *fp);
/**
* Adds a hook to the list of bu_bomb hooks. The top (newest) one of these
* will be called with its associated client data and a string to be
* processed. Typically, these hook functions will display the output
* (possibly in an X window) or record it.
*
* NOTE: The hook functions are all non-PARALLEL.
*/
BU_EXPORT extern void bu_bomb_add_hook(bu_hook_t func, void *clientdata);
/**
* Abort the running process.
*
* The bu_bomb routine is called on a fatal error, generally where no
* recovery is possible. Error handlers may, however, be registered
* with BU_SETJUMP(). This routine intentionally limits calls to
* other functions and intentionally uses no stack variables. Just in
* case the application is out of memory, bu_bomb deallocates a small
* buffer of memory.
*
* Before termination, it optionally performs the following operations
* in the order listed:
*
* 1. Outputs str to standard error
*
* 2. Calls any callback functions set in the global bu_bomb_hook_list
* variable with str passed as an argument.
*
* 3. Jumps to any user specified error handler registered with the
* BU_SETJUMP() facility.
*
* 4. Outputs str to the terminal device in case standard error is
* redirected.
*
* 5. Aborts abnormally (via abort) if BU_DEBUG_COREDUMP is defined.
*
* 6. Exits with exit(12).
*
* Only produce a core-dump when that debugging bit is set. Note that
* this function is meant to be a last resort semi-graceful abort.
*
* This routine should never return unless there is a BU_SETJUMP()
* handler registered.
*/
BU_EXPORT extern void bu_bomb(const char *str) _BU_ATTR_ANALYZE_NORETURN _BU_ATTR_NORETURN;
/**
* Semi-graceful termination of the application that doesn't cause a
* stack trace, exiting with the specified status after printing the
* given message. It's okay for this routine to use the stack,
* contrary to bu_bomb's behavior since it should be called for
* expected termination situations.
*
* This routine should generally not be called within a library. Use
* bu_bomb or (better) cascade the error back up to the application.
*
* This routine should never return.
*/
BU_EXPORT extern void bu_exit(int status, const char *fmt, ...) _BU_ATTR_ANALYZE_NORETURN _BU_ATTR_NORETURN _BU_ATTR_PRINTF23;
/**
* @brief
* Generate a crash report file, including a call stack backtrace and
* other system details.
*/
/**
* this routine writes out details of the currently running process to
* the specified file, including an informational header about the
* execution environment, stack trace details, kernel and hardware
* information, and current version information.
*
* returns truthfully if the crash report was written.
*
* due to various reasons, this routine is NOT thread-safe.
*/
BU_EXPORT extern int bu_crashreport(const char *filename);
/** @} */
__END_DECLS
#endif /* BU_EXIT_H */
/*
* Local Variables:
* mode: C
* tab-width: 8
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
*/
+15 -14
View File
@@ -44,7 +44,7 @@ __BEGIN_DECLS
/* Use typedefs to hide the details of the hash entry and table structures */
typedef struct bu_hash_entry bu_hash_entry;
typedef struct bu_hash_tbl bu_hash_tbl;
typedef struct bu_hash_tbl bu_hash_tbl;
/**
@@ -91,12 +91,12 @@ BU_EXPORT extern void *bu_hash_get(const bu_hash_tbl *t, const uint8_t *key, siz
* in the table is NULL - i.e. the return will be the same as if the key/value
* pair had actually been added. The only use case where this property is observable
* is when a user iterates over the whole contents of a hash table - in that
* situation a key, NULL entry might be expected, but will not be present.
* situation a key,NULL entry might be expected, but will not be present.
*
* @param[in] t - The hash table to look in
* @param[in] key - the key to look for
* @param[in] key_len - the length of the key in bytes
* @param[in] val - the value to be associated with key
* @param[in] val - the value to be associated with key
*
* @return
* 1 if a new entry is created, 0 if an existing value was updated, -1 on error.
@@ -126,7 +126,7 @@ BU_EXPORT extern void bu_hash_rm(bu_hash_tbl *t, const uint8_t *key, size_t key_
struct bu_hash_entry *e = bu_hash_next(t, NULL);
while (e) {
bu_log("Value: %p\n", bu_hash_value(e, NULL));
e = bu_hash_next(t, e);
e = bu_hash_next(t, e);
}
}
@endcode
@@ -168,6 +168,7 @@ BU_EXPORT extern int bu_hash_key(bu_hash_entry *e, uint8_t **key, size_t *key_le
BU_EXPORT extern void *bu_hash_value(bu_hash_entry *e, void *nval);
/* Deprecated API */
#if 1
struct bu_hash_entry {
@@ -221,23 +222,23 @@ typedef struct bu_hash_record bu_hash_record_t;
#define BU_HASH_RECORD_INIT_ZERO { BU_HASH_RECORD_MAGIC, NULL, 0, NULL }
#define BU_HASH_RECORD_IS_INITIALIZED(_h) (((struct bu_hash_record *)(_h) != BU_HASH_RECORD_NULL) && LIKELY((_h)->magic == BU_HASH_RECORD_MAGIC))
DEPRECATED BU_EXPORT extern struct bu_hash_entry *bu_hash_tbl_find(const struct bu_hash_tbl *hsh_tbl,
const uint8_t *key,
int key_len,
struct bu_hash_entry **prev,
unsigned long *idx);
const uint8_t *key,
int key_len,
struct bu_hash_entry **prev,
unsigned long *idx);
DEPRECATED BU_EXPORT extern void bu_set_hash_value(struct bu_hash_entry *hsh_entry,
void *value);
void *value);
DEPRECATED BU_EXPORT extern void *bu_get_hash_value(const struct bu_hash_entry *hsh_entry);
DEPRECATED BU_EXPORT extern uint8_t *bu_get_hash_key(const struct bu_hash_entry *hsh_entry);
DEPRECATED BU_EXPORT extern struct bu_hash_entry *bu_hash_tbl_add(struct bu_hash_tbl *hsh_tbl,
const uint8_t *key,
int key_len,
int *new_entry);
const uint8_t *key,
int key_len,
int *new_entry);
DEPRECATED BU_EXPORT extern void bu_hash_tbl_print(const struct bu_hash_tbl *hsh_tbl,
const char *str);
const char *str);
DEPRECATED BU_EXPORT extern void bu_hash_tbl_free(struct bu_hash_tbl *hsh_tbl);
DEPRECATED BU_EXPORT extern struct bu_hash_entry *bu_hash_tbl_first(const struct bu_hash_tbl *hsh_tbl,
struct bu_hash_record *rec);
struct bu_hash_record *rec);
DEPRECATED BU_EXPORT extern struct bu_hash_entry *bu_hash_tbl_next(struct bu_hash_record *rec);
DEPRECATED BU_EXPORT extern struct bu_hash_entry *bu_hash_tbl_traverse(struct bu_hash_tbl *hsh_tbl, int (*func)(struct bu_hash_entry *, void *), void *func_arg);
#endif
-109
View File
@@ -1,109 +0,0 @@
/* H O O K . H
* BRL-CAD
*
* Copyright (c) 2004-2016 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library 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 file; see the file named COPYING for more
* information.
*/
#ifndef BU_HOOK_H
#define BU_HOOK_H
#include "common.h"
#include "bu/defines.h"
#include "bu/list.h"
__BEGIN_DECLS
/** @addtogroup bu_log
*
* These are hook routines for keeping track of callback functions.
*
*/
/** @{ */
/** @file bu/log.h */
/** log indentation hook */
typedef int (*bu_hook_t)(void *, void *);
struct bu_hook_list {
struct bu_list l; /**< linked list */
bu_hook_t hookfunc; /**< function to call */
void *clientdata; /**< data for caller */
};
typedef struct bu_hook_list bu_hook_list_t;
#define BU_HOOK_LIST_NULL ((struct bu_hook_list *) 0)
/**
* assert the integrity of a non-head node bu_hook_list struct.
*/
#define BU_CK_HOOK_LIST(_hl) BU_CKMAG(_hl, BU_HOOK_LIST_MAGIC, "bu_hook_list")
/**
* initialize a bu_hook_list struct without allocating any memory.
* this macro is not suitable for initialization of a list head node.
*/
#define BU_HOOK_LIST_INIT(_hl) { \
BU_LIST_INIT_MAGIC(&(_hl)->l, BU_HOOK_LIST_MAGIC); \
(_hl)->hookfunc = (_hl)->clientdata = NULL; \
}
/**
* macro suitable for declaration statement initialization of a
* bu_hook_list struct. does not allocate memory. not suitable for
* initialization of a list head node.
*/
#define BU_HOOK_LIST_INIT_ZERO { {BU_HOOK_LIST_MAGIC, BU_LIST_NULL, BU_LIST_NULL}, NULL, NULL }
/**
* returns truthfully whether a non-head node bu_hook_list has been
* initialized via BU_HOOK_LIST_INIT() or BU_HOOK_LIST_INIT_ZERO.
*/
#define BU_HOOK_LIST_IS_INITIALIZED(_p) (((struct bu_hook_list *)(_p) != BU_HOOK_LIST_NULL) && LIKELY((_p)->l.magic == BU_HOOK_LIST_MAGIC))
/** @brief BRL-CAD support library's hook utility. */
BU_EXPORT extern void bu_hook_list_init(struct bu_hook_list *hlp);
BU_EXPORT extern void bu_hook_add(struct bu_hook_list *hlp,
bu_hook_t func,
void *clientdata);
BU_EXPORT extern void bu_hook_delete(struct bu_hook_list *hlp,
bu_hook_t func,
void *clientdata);
BU_EXPORT extern void bu_hook_call(struct bu_hook_list *hlp,
void *buf);
BU_EXPORT extern void bu_hook_save_all(struct bu_hook_list *hlp,
struct bu_hook_list *save_hlp);
BU_EXPORT extern void bu_hook_delete_all(struct bu_hook_list *hlp);
BU_EXPORT extern void bu_hook_restore_all(struct bu_hook_list *hlp,
struct bu_hook_list *restore_hlp);
/** @} */
__END_DECLS
#endif /* BU_HOOK_H */
/*
* Local Variables:
* mode: C
* tab-width: 8
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
*/
+109 -121
View File
@@ -28,18 +28,6 @@
__BEGIN_DECLS
/* TODO: Plan for replacement of bu_list with a more memory coherent
* vector/array storage, ideally lockfree and threadsafe but not
* strictly necessary. Some options to consider and benchmark:
*
* http://libcds.sourceforge.net
* https://code.google.com/archive/p/ccl/
* http://sglib.sourceforge.net
* tbb::concurrent_vector
* std::vector et. al
* https://github.com/xant/libhl
*/
/*----------------------------------------------------------------------*/
/** @addtogroup bu_list
*
@@ -63,8 +51,8 @@ __BEGIN_DECLS
* Where a macro expects an argument "p", it should be a pointer to a
* user-provided structure.
*
* Where a macro expects an argument "headp", it should be a pointer
* to a "struct bu_list" located in the list head, e.g., &(head.l).
* Where a macro expects an argument "hp", it should be a pointer to a
* "struct bu_list" located in the list head, e.g., &(head.l).
*
* Where a macro expects an argument "old", "new", or "cur", it should
* be a pointer to the "struct bu_list" located either in a
@@ -157,18 +145,18 @@ typedef struct bu_list bu_list_t;
* initializes a bu_list struct as a circular list without allocating
* any memory. call BU_LIST_MAGIC_SET() to change the list type.
*/
#define BU_LIST_INIT(_headp) { \
BU_ASSERT((void *)(_headp) != (void *)NULL); \
(_headp)->forw = (_headp)->back = (_headp); \
(_headp)->magic = BU_LIST_HEAD_MAGIC; /* used by circ. macros */ }
#define BU_LIST_INIT(_hp) { \
BU_ASSERT((void *)(_hp) != (void *)NULL); \
(_hp)->forw = (_hp)->back = (_hp); \
(_hp)->magic = BU_LIST_HEAD_MAGIC; /* used by circ. macros */ }
/**
* initializes a bu_list struct node with a particular non-head node
* magic number without allocating any memory.
*/
#define BU_LIST_INIT_MAGIC(_headp, _magic) { \
BU_LIST_INIT((_headp)); \
BU_LIST_MAGIC_SET((_headp), (_magic)); \
#define BU_LIST_INIT_MAGIC(_hp, _magic) { \
BU_LIST_INIT((_hp)); \
BU_LIST_MAGIC_SET((_hp), (_magic)); \
}
/**
@@ -185,7 +173,7 @@ typedef struct bu_list bu_list_t;
* zero-allocated will not return true as their forward/backward
* pointers reference nothing.
*/
#define BU_LIST_IS_INITIALIZED(_headp) (((struct bu_list *)(_headp) != BU_LIST_NULL) && LIKELY((_headp)->forw != BU_LIST_NULL))
#define BU_LIST_IS_INITIALIZED(_hp) (((struct bu_list *)(_hp) != BU_LIST_NULL) && LIKELY((_hp)->forw != BU_LIST_NULL))
/**
@@ -252,161 +240,161 @@ typedef struct bu_list bu_list_t;
/**
* The Stack Discipline
*
* BU_LIST_PUSH places p at the tail of headp. BU_LIST_POP sets p to
* last element in headp's list (else NULL) and, if p is non-null,
* BU_LIST_PUSH places p at the tail of hp. BU_LIST_POP sets p to
* last element in hp's list (else NULL) and, if p is non-null,
* dequeues it.
*/
#define BU_LIST_PUSH(headp, p) \
BU_LIST_APPEND(headp, (struct bu_list *)(p))
#define BU_LIST_PUSH(hp, p) \
BU_LIST_APPEND(hp, (struct bu_list *)(p))
#define BU_LIST_POP(structure, headp, p) \
#define BU_LIST_POP(structure, hp, p) \
{ \
if (BU_LIST_NON_EMPTY(headp)) { \
(p) = ((struct structure *)((headp)->forw)); \
if (BU_LIST_NON_EMPTY(hp)) { \
(p) = ((struct structure *)((hp)->forw)); \
BU_LIST_DEQUEUE((struct bu_list *)(p)); \
} else { \
(p) = (struct structure *) 0; \
} \
}
#define BU_LIST_POP_T(headp, type) \
(type *)bu_list_pop(headp)
#define BU_LIST_POP_T(hp, type) \
(type *)bu_list_pop(hp)
/**
* "Bulk transfer" all elements from the list headed by src_headp onto
* the list headed by dest_headp, without examining every element in the
* list. src_headp is left with a valid but empty list.
* "Bulk transfer" all elements from the list headed by src_hd onto
* the list headed by dest_hd, without examining every element in the
* list. src_hd is left with a valid but empty list.
*
* BU_LIST_INSERT_LIST places src_headp elements at head of dest_headp list,
* BU_LIST_APPEND_LIST places src_headp elements at end of dest_headp list.
* BU_LIST_INSERT_LIST places src_hd elements at head of dest_hd list,
* BU_LIST_APPEND_LIST places src_hd elements at end of dest_hd list.
*/
#define BU_LIST_INSERT_LIST(dest_headp, src_headp) \
if (LIKELY(BU_LIST_NON_EMPTY(src_headp))) { \
struct bu_list *_first = (src_headp)->forw; \
struct bu_list *_last = (src_headp)->back; \
(dest_headp)->forw->back = _last; \
_last->forw = (dest_headp)->forw; \
(dest_headp)->forw = _first; \
_first->back = (dest_headp); \
(src_headp)->forw = (src_headp)->back = (src_headp); \
#define BU_LIST_INSERT_LIST(dest_hp, src_hp) \
if (LIKELY(BU_LIST_NON_EMPTY(src_hp))) { \
struct bu_list *_first = (src_hp)->forw; \
struct bu_list *_last = (src_hp)->back; \
(dest_hp)->forw->back = _last; \
_last->forw = (dest_hp)->forw; \
(dest_hp)->forw = _first; \
_first->back = (dest_hp); \
(src_hp)->forw = (src_hp)->back = (src_hp); \
}
#define BU_LIST_APPEND_LIST(dest_headp, src_headp) \
if (LIKELY(BU_LIST_NON_EMPTY(src_headp))) {\
struct bu_list *_first = (src_headp)->forw; \
struct bu_list *_last = (src_headp)->back; \
_first->back = (dest_headp)->back; \
(dest_headp)->back->forw = _first; \
(dest_headp)->back = _last; \
_last->forw = (dest_headp); \
(src_headp)->forw = (src_headp)->back = (src_headp); \
#define BU_LIST_APPEND_LIST(dest_hp, src_hp) \
if (LIKELY(BU_LIST_NON_EMPTY(src_hp))) {\
struct bu_list *_first = (src_hp)->forw; \
struct bu_list *_last = (src_hp)->back; \
_first->back = (dest_hp)->back; \
(dest_hp)->back->forw = _first; \
(dest_hp)->back = _last; \
_last->forw = (dest_hp); \
(src_hp)->forw = (src_hp)->back = (src_hp); \
}
/**
* Test if a doubly linked list is empty, given head pointer
*/
#define BU_LIST_IS_EMPTY(headp) ((headp)->forw == (headp))
#define BU_LIST_NON_EMPTY(headp) ((headp)->forw != (headp))
#define BU_LIST_NON_EMPTY_P(p, structure, headp) \
(((p)=(struct structure *)((headp)->forw)) != (struct structure *)(headp))
#define BU_LIST_IS_CLEAR(headp) ((headp)->magic == 0 && \
(headp)->forw == BU_LIST_NULL && \
(headp)->back == BU_LIST_NULL)
#define BU_LIST_IS_EMPTY(hp) ((hp)->forw == (hp))
#define BU_LIST_NON_EMPTY(hp) ((hp)->forw != (hp))
#define BU_LIST_NON_EMPTY_P(p, structure, hp) \
(((p)=(struct structure *)((hp)->forw)) != (struct structure *)(hp))
#define BU_LIST_IS_CLEAR(hp) ((hp)->magic == 0 && \
(hp)->forw == BU_LIST_NULL && \
(hp)->back == BU_LIST_NULL)
/* Return re-cast pointer to first element on list.
* No checking is performed to see if list is empty.
*/
#define BU_LIST_LAST(structure, headp) \
((struct structure *)((headp)->back))
#define BU_LIST_BACK(structure, headp) \
((struct structure *)((headp)->back))
#define BU_LIST_PREV(structure, headp) \
((struct structure *)((headp)->back))
#define BU_LIST_FIRST(structure, headp) \
((struct structure *)((headp)->forw))
#define BU_LIST_FORW(structure, headp) \
((struct structure *)((headp)->forw))
#define BU_LIST_NEXT(structure, headp) \
((struct structure *)((headp)->forw))
#define BU_LIST_LAST(structure, hp) \
((struct structure *)((hp)->back))
#define BU_LIST_BACK(structure, hp) \
((struct structure *)((hp)->back))
#define BU_LIST_PREV(structure, hp) \
((struct structure *)((hp)->back))
#define BU_LIST_FIRST(structure, hp) \
((struct structure *)((hp)->forw))
#define BU_LIST_FORW(structure, hp) \
((struct structure *)((hp)->forw))
#define BU_LIST_NEXT(structure, hp) \
((struct structure *)((hp)->forw))
/**
* Boolean test to see if current list element is the head
*/
#define BU_LIST_IS_HEAD(p, headp) \
(((struct bu_list *)(p)) == (struct bu_list *)(headp))
#define BU_LIST_NOT_HEAD(p, headp) \
(!BU_LIST_IS_HEAD(p, headp))
#define BU_LIST_IS_HEAD(p, hp) \
(((struct bu_list *)(p)) == (struct bu_list *)(hp))
#define BU_LIST_NOT_HEAD(p, hp) \
(!BU_LIST_IS_HEAD(p, hp))
/**
* Boolean test to see if previous list element is the head
*/
#define BU_LIST_PREV_IS_HEAD(p, headp)\
(((struct bu_list *)(p))->back == (struct bu_list *)(headp))
#define BU_LIST_PREV_NOT_HEAD(p, headp)\
(!BU_LIST_PREV_IS_HEAD(p, headp))
#define BU_LIST_PREV_IS_HEAD(p, hp)\
(((struct bu_list *)(p))->back == (struct bu_list *)(hp))
#define BU_LIST_PREV_NOT_HEAD(p, hp)\
(!BU_LIST_PREV_IS_HEAD(p, hp))
/**
* Boolean test to see if the next list element is the head
*/
#define BU_LIST_NEXT_IS_HEAD(p, headp) \
(((struct bu_list *)(p))->forw == (struct bu_list *)(headp))
#define BU_LIST_NEXT_NOT_HEAD(p, headp) \
(!BU_LIST_NEXT_IS_HEAD(p, headp))
#define BU_LIST_NEXT_IS_HEAD(p, hp) \
(((struct bu_list *)(p))->forw == (struct bu_list *)(hp))
#define BU_LIST_NEXT_NOT_HEAD(p, hp) \
(!BU_LIST_NEXT_IS_HEAD(p, hp))
#define BU_LIST_EACH(headp, p, type) \
for ((p)=(type *)BU_LIST_FIRST(bu_list, headp); \
(p) && BU_LIST_NOT_HEAD(p, headp); \
#define BU_LIST_EACH(hp, p, type) \
for ((p)=(type *)BU_LIST_FIRST(bu_list, hp); \
(p) && BU_LIST_NOT_HEAD(p, hp); \
(p)=(type *)BU_LIST_PNEXT(bu_list, p)) \
#define BU_LIST_REVEACH(headp, p, type) \
for ((p)=(type *)BU_LIST_LAST(bu_list, headp); \
(p) && BU_LIST_NOT_HEAD(p, headp); \
#define BU_LIST_REVEACH(hp, p, type) \
for ((p)=(type *)BU_LIST_LAST(bu_list, hp); \
(p) && BU_LIST_NOT_HEAD(p, hp); \
(p)=(type *)BU_LIST_PREV(bu_list, ((struct bu_list *)(p)))) \
#define BU_LIST_TAIL(headp, start, p, type) \
#define BU_LIST_TAIL(hp, start, p, type) \
for ((p)=(type *)start; \
(p) && BU_LIST_NOT_HEAD(p, headp); \
(p) && BU_LIST_NOT_HEAD(p, hp); \
(p)=(type *)BU_LIST_PNEXT(bu_list, (p)))
/**
* Intended as innards for a for loop to visit all nodes on list, e.g.:
*
* for (BU_LIST_FOR(p, structure, headp)) {
* for (BU_LIST_FOR(p, structure, hp)) {
* work_on(p);
* }
*/
#define BU_LIST_FOR(p, structure, headp) \
(p)=BU_LIST_FIRST(structure, headp); \
(p) && BU_LIST_NOT_HEAD(p, headp); \
#define BU_LIST_FOR(p, structure, hp) \
(p)=BU_LIST_FIRST(structure, hp); \
(p) && BU_LIST_NOT_HEAD(p, hp); \
(p)=BU_LIST_PNEXT(structure, p)
#define BU_LIST_FOR_BACKWARDS(p, structure, headp) \
(p)=BU_LIST_LAST(structure, headp); \
(p) && BU_LIST_NOT_HEAD(p, headp); \
#define BU_LIST_FOR_BACKWARDS(p, structure, hp) \
(p)=BU_LIST_LAST(structure, hp); \
(p) && BU_LIST_NOT_HEAD(p, hp); \
(p)=BU_LIST_PLAST(structure, p)
/**
* Process all the list members except headp and the actual head. Useful
* Process all the list members except hp and the actual head. Useful
* when starting somewhere besides the head.
*/
#define BU_LIST_FOR_CIRC(p, structure, headp) \
(p)=BU_LIST_PNEXT_CIRC(structure, headp); \
(p) && BU_LIST_NOT_HEAD(p, headp); \
#define BU_LIST_FOR_CIRC(p, structure, hp) \
(p)=BU_LIST_PNEXT_CIRC(structure, hp); \
(p) && BU_LIST_NOT_HEAD(p, hp); \
(p)=BU_LIST_PNEXT_CIRC(structure, p)
/**
* Intended as innards for a for loop to visit elements of two lists
* in tandem, e.g.:
*
* for (BU_LIST_FOR2(p1, p2, structure, headp1, headp2)) {
* for (BU_LIST_FOR2(p1, p2, structure, hp1, hp2)) {
* process(p1, p2);
* }
*/
#define BU_LIST_FOR2(p1, p2, structure, headp1, headp2) \
(p1)=BU_LIST_FIRST(structure, headp1), \
(p2)=BU_LIST_FIRST(structure, headp2); \
(p1) && BU_LIST_NOT_HEAD((struct bu_list *)(p1), (headp1)) && \
(p2) && BU_LIST_NOT_HEAD((struct bu_list *)(p2), (headp2)); \
#define BU_LIST_FOR2(p1, p2, structure, hp1, hp2) \
(p1)=BU_LIST_FIRST(structure, hp1), \
(p2)=BU_LIST_FIRST(structure, hp2); \
(p1) && BU_LIST_NOT_HEAD((struct bu_list *)(p1), (hp1)) && \
(p2) && BU_LIST_NOT_HEAD((struct bu_list *)(p2), (hp2)); \
(p1)=BU_LIST_NEXT(structure, (struct bu_list *)(p1)), \
(p2)=BU_LIST_NEXT(structure, (struct bu_list *)(p2))
@@ -415,19 +403,19 @@ typedef struct bu_list bu_list_t;
* element. Useful mostly for a loop that will dequeue every list
* element, e.g.:
*
* while (BU_LIST_WHILE(p, structure, headp)) {
* while (BU_LIST_WHILE(p, structure, hp)) {
*@n BU_LIST_DEQUEUE(&(p->l));
*@n free((char *)p);
*@n }
*/
#define BU_LIST_WHILE(p, structure, headp) \
(((p)=(struct structure *)((headp)->forw)) != (struct structure *)(headp))
#define BU_LIST_WHILE(p, structure, hp) \
(((p)=(struct structure *)((hp)->forw)) != (struct structure *)(hp))
/**
* Return the magic number of the first (or last) item on a list
*/
#define BU_LIST_FIRST_MAGIC(headp) ((headp)->forw->magic)
#define BU_LIST_LAST_MAGIC(headp) ((headp)->back->magic)
#define BU_LIST_FIRST_MAGIC(hp) ((hp)->forw->magic)
#define BU_LIST_LAST_MAGIC(hp) ((hp)->back->magic)
/**
* Return pointer to next (or previous) element, which may be the head
@@ -491,17 +479,17 @@ BU_EXPORT extern struct bu_list *bu_list_new(void);
/**
* Returns the results of BU_LIST_POP
*/
BU_EXPORT extern struct bu_list *bu_list_pop(struct bu_list *headp);
BU_EXPORT extern struct bu_list *bu_list_pop(struct bu_list *hp);
/**
* Returns the number of elements on a bu_list brand linked list.
*/
BU_EXPORT extern int bu_list_len(const struct bu_list *headp);
BU_EXPORT extern int bu_list_len(const struct bu_list *hd);
/**
* Reverses the order of elements in a bu_list linked list.
*/
BU_EXPORT extern void bu_list_reverse(struct bu_list *headp);
BU_EXPORT extern void bu_list_reverse(struct bu_list *hd);
/**
* Given a list of structures allocated with bu_malloc() or
@@ -509,7 +497,7 @@ BU_EXPORT extern void bu_list_reverse(struct bu_list *headp);
* structures. This routine can only be used when the structures have
* no interior pointers.
*/
BU_EXPORT extern void bu_list_free(struct bu_list *headp);
BU_EXPORT extern void bu_list_free(struct bu_list *hd);
/**
* Simple parallel-safe routine for appending a data structure to the
@@ -537,14 +525,14 @@ BU_EXPORT extern struct bu_list *bu_list_parallel_dequeue(struct bu_list *headp)
/**
* Generic bu_list doubly-linked list checker.
*/
BU_EXPORT extern void bu_ck_list(const struct bu_list *headp,
BU_EXPORT extern void bu_ck_list(const struct bu_list *hd,
const char *str);
/**
* bu_list doubly-linked list checker which checks the magic number for
* all elements in the linked list
*/
BU_EXPORT extern void bu_ck_list_magic(const struct bu_list *headp,
BU_EXPORT extern void bu_ck_list_magic(const struct bu_list *hd,
const char *str,
const uint32_t magic);
+154 -4
View File
@@ -29,10 +29,7 @@
#include "bu/defines.h"
#include "bu/magic.h"
#include "bu/parse.h"
#include "bu/hook.h"
#include "bu/exit.h" /* XXX not used here, not intended to be kept included here */
#include "bu/list.h"
__BEGIN_DECLS
@@ -77,6 +74,143 @@ __BEGIN_DECLS
/** @{ */
/** @file bu/log.h */
/** @brief Extract a backtrace of the current call stack. */
/**
* this routine provides a trace of the call stack to the caller,
* generally called either directly, via a signal handler, or through
* bu_bomb() with the appropriate bu_debug flags set.
*
* the routine waits indefinitely (in a spin loop) until a signal
* (SIGINT) is received, at which point execution continues, or until
* some other signal is received that terminates the application.
*
* the stack backtrace will be written to the provided 'fp' file
* pointer. it's the caller's responsibility to open and close
* that pointer if necessary. If 'fp' is NULL, stdout will be used.
*
* returns truthfully if a backtrace was attempted.
*/
BU_EXPORT extern int bu_backtrace(FILE *fp);
/** log indentation hook */
typedef int (*bu_hook_t)(void *, void *);
struct bu_hook_list {
struct bu_list l; /**< linked list */
bu_hook_t hookfunc; /**< function to call */
void *clientdata; /**< data for caller */
};
typedef struct bu_hook_list bu_hook_list_t;
#define BU_HOOK_LIST_NULL ((struct bu_hook_list *) 0)
/**
* assert the integrity of a non-head node bu_hook_list struct.
*/
#define BU_CK_HOOK_LIST(_hl) BU_CKMAG(_hl, BU_HOOK_LIST_MAGIC, "bu_hook_list")
/**
* initialize a bu_hook_list struct without allocating any memory.
* this macro is not suitable for initialization of a list head node.
*/
#define BU_HOOK_LIST_INIT(_hl) { \
BU_LIST_INIT_MAGIC(&(_hl)->l, BU_HOOK_LIST_MAGIC); \
(_hl)->hookfunc = (_hl)->clientdata = NULL; \
}
/**
* macro suitable for declaration statement initialization of a
* bu_hook_list struct. does not allocate memory. not suitable for
* initialization of a list head node.
*/
#define BU_HOOK_LIST_INIT_ZERO { {BU_HOOK_LIST_MAGIC, BU_LIST_NULL, BU_LIST_NULL}, NULL, NULL }
/**
* returns truthfully whether a non-head node bu_hook_list has been
* initialized via BU_HOOK_LIST_INIT() or BU_HOOK_LIST_INIT_ZERO.
*/
#define BU_HOOK_LIST_IS_INITIALIZED(_p) (((struct bu_hook_list *)(_p) != BU_HOOK_LIST_NULL) && LIKELY((_p)->l.magic == BU_HOOK_LIST_MAGIC))
/** @brief Main functions for exiting/bombing. */
/**
* Adds a hook to the list of bu_bomb hooks. The top (newest) one of these
* will be called with its associated client data and a string to be
* processed. Typically, these hook functions will display the output
* (possibly in an X window) or record it.
*
* NOTE: The hook functions are all non-PARALLEL.
*/
BU_EXPORT extern void bu_bomb_add_hook(bu_hook_t func, void *clientdata);
/**
* Abort the running process.
*
* The bu_bomb routine is called on a fatal error, generally where no
* recovery is possible. Error handlers may, however, be registered
* with BU_SETJUMP(). This routine intentionally limits calls to
* other functions and intentionally uses no stack variables. Just in
* case the application is out of memory, bu_bomb deallocates a small
* buffer of memory.
*
* Before termination, it optionally performs the following operations
* in the order listed:
*
* 1. Outputs str to standard error
*
* 2. Calls any callback functions set in the global bu_bomb_hook_list
* variable with str passed as an argument.
*
* 3. Jumps to any user specified error handler registered with the
* BU_SETJUMP() facility.
*
* 4. Outputs str to the terminal device in case standard error is
* redirected.
*
* 5. Aborts abnormally (via abort()) if BU_DEBUG_COREDUMP is defined.
*
* 6. Exits with exit(12).
*
* Only produce a core-dump when that debugging bit is set. Note that
* this function is meant to be a last resort semi-graceful abort.
*
* This routine should never return unless there is a BU_SETJUMP()
* handler registered.
*/
BU_EXPORT extern void bu_bomb(const char *str) _BU_ATTR_NORETURN;
/**
* Semi-graceful termination of the application that doesn't cause a
* stack trace, exiting with the specified status after printing the
* given message. It's okay for this routine to use the stack,
* contrary to bu_bomb's behavior since it should be called for
* expected termination situations.
*
* This routine should generally not be called within a library. Use
* bu_bomb or (better) cascade the error back up to the application.
*
* This routine should never return.
*/
BU_EXPORT extern void bu_exit(int status, const char *fmt, ...) _BU_ATTR_NORETURN _BU_ATTR_PRINTF23;
/**
* @brief
* Generate a crash report file, including a call stack backtrace and
* other system details.
*/
/**
* this routine writes out details of the currently running process to
* the specified file, including an informational header about the
* execution environment, stack trace details, kernel and hardware
* information, and current version information.
*
* returns truthfully if the crash report was written.
*
* due to various reasons, this routine is NOT thread-safe.
*/
BU_EXPORT extern int bu_crashreport(const char *filename);
/**
* @brief
* fgets replacement function that also handles CR as an EOL marker
@@ -97,6 +231,22 @@ BU_EXPORT extern char *bu_fgets(char *s, int size, FILE *stream);
BU_EXPORT extern void bu_setlinebuf(FILE *fp);
/** @brief BRL-CAD support library's hook utility. */
BU_EXPORT extern void bu_hook_list_init(struct bu_hook_list *hlp);
BU_EXPORT extern void bu_hook_add(struct bu_hook_list *hlp,
bu_hook_t func,
void *clientdata);
BU_EXPORT extern void bu_hook_delete(struct bu_hook_list *hlp,
bu_hook_t func,
void *clientdata);
BU_EXPORT extern void bu_hook_call(struct bu_hook_list *hlp,
void *buf);
BU_EXPORT extern void bu_hook_save_all(struct bu_hook_list *hlp,
struct bu_hook_list *save_hlp);
BU_EXPORT extern void bu_hook_delete_all(struct bu_hook_list *hlp);
BU_EXPORT extern void bu_hook_restore_all(struct bu_hook_list *hlp,
struct bu_hook_list *restore_hlp);
/** @brief parallel safe version of fprintf for logging */
/**
+24 -26
View File
@@ -70,7 +70,7 @@ __BEGIN_DECLS
#define BU_RB_NODE_MAGIC 0x72626e6f /**< rbno */
#define BU_RB_PKG_MAGIC 0x7262706b /**< rbpk */
#define BU_RB_TREE_MAGIC 0x72627472 /**< rbtr */
#define BU_VLB_MAGIC 0x5f564c42 /**< _VLB */
#define BU_VLB_MAGIC 0x5f564c42 /**< _VLB */
#define BU_VLS_MAGIC 0x89333bbb /**< ?3;? */
/* libbn */
@@ -82,7 +82,6 @@ __BEGIN_DECLS
#define BN_TABLE_MAGIC 0x53706374 /**< Spct */
#define BN_TOL_MAGIC 0x98c734bb /**< ??4? */
#define BN_UNIF_MAGIC 0x00be7460 /**< ??t` => 12481632 */
#define BN_VERT_TREE_MAGIC 0x56455254 /**< VERT */
#define BN_VLBLOCK_MAGIC 0x981bd112 /**< ???? */
#define BN_VLIST_MAGIC 0x98237474 /**< ?\#tt */
@@ -122,8 +121,8 @@ __BEGIN_DECLS
#define RT_TGC_INTERNAL_MAGIC 0xaabbdd87 /**< ???? */
#define RT_TOR_INTERNAL_MAGIC 0x9bffed87 /**< ???? */
#define RT_VOL_INTERNAL_MAGIC 0x987ba1d0 /**< ?{?? */
#define RT_PNTS_INTERNAL_MAGIC 0x706e7473 /**< pnts */
#define RT_ANNOT_INTERNAL_MAGIC 0x616e6e6f /**< anno */
#define RT_PNTS_INTERNAL_MAGIC 0x706e7473 /**< pnts */
#define RT_ANNOTATION_INTERNAL_MAGIC 0x616e6e6f /**< anno */
#define RT_HRT_INTERNAL_MAGIC 0x6872743f /**< hrt? */
/* n-manifold geometry */
@@ -190,18 +189,18 @@ __BEGIN_DECLS
/* fb */
#define FB_MAGIC 0xfbfb00fb /**< ???? */
#define FB_WGL_MAGIC 0x574f4642 /**< WOFB */
#define FB_OGL_MAGIC 0x584f4642 /**< XOFB */
#define FB_X24_MAGIC 0x58324642 /**< X2FB */
#define FB_TK_MAGIC 0x544b4642 /**< TKFB */
#define FB_QT_MAGIC 0x51544642 /**< QTFB */
#define FB_DEBUG_MAGIC 0x44424642 /**< DBFB */
#define FB_DISK_MAGIC 0x44494642 /**< STFB */
#define FB_STK_MAGIC 0x53544642 /**< STFB */
#define FB_MEMORY_MAGIC 0x4d454642 /**< MEFB */
#define FB_REMOTE_MAGIC 0x524d4642 /**< MEFB */
#define FB_NULL_MAGIC 0x4e554642 /**< NUFB */
#define FB_OSGL_MAGIC 0x4f474642 /**< OGFB */
#define FB_WGL_MAGIC 0x574f4642 /**< WOFB */
#define FB_OGL_MAGIC 0x584f4642 /**< XOFB */
#define FB_X24_MAGIC 0x58324642 /**< X2FB */
#define FB_TK_MAGIC 0x544b4642 /**< TKFB */
#define FB_QT_MAGIC 0x51544642 /**< QTFB */
#define FB_DEBUG_MAGIC 0x44424642 /**< DBFB */
#define FB_DISK_MAGIC 0x44494642 /**< STFB */
#define FB_STK_MAGIC 0x53544642 /**< STFB */
#define FB_MEMORY_MAGIC 0x4d454642 /**< MEFB */
#define FB_REMOTE_MAGIC 0x524d4642 /**< MEFB */
#define FB_NULL_MAGIC 0x4e554642 /**< NUFB */
#define FB_OSGL_MAGIC 0x4f474642 /**< OGFB */
/* misc */
@@ -210,7 +209,6 @@ __BEGIN_DECLS
#define CURVE_CARC_MAGIC 0x63617263 /**< carc */
#define CURVE_LSEG_MAGIC 0x6c736567 /**< lseg */
#define CURVE_NURB_MAGIC 0x6e757262 /**< nurb */
#define ANN_TSEG_MAGIC 0x74736567 /**< tseg */
#define DB5_RAW_INTERNAL_MAGIC 0x64357269 /**< d5ri */
#define DBI_MAGIC 0x57204381 /**< W C? */
#define DB_FULL_PATH_MAGIC 0x64626670 /**< dbfp */
@@ -222,10 +220,11 @@ __BEGIN_DECLS
#define PT_MAGIC 0x87687681 /**< ?hv? */
#define RESOURCE_MAGIC 0x83651835 /**< ?e?5 */
#define RTI_MAGIC 0x99101658 /**< ???X */
#define VERT_TREE_MAGIC 0x56455254 /**< VERT */
#define WDB_METABALLPT_MAGIC 0x6d627074 /**< mbpt */
#define WDB_PIPESEG_MAGIC 0x9723ffef /**< ?\#?? */
#define WMEMBER_MAGIC 0x43128912 /**< C??? */
#define ICV_IMAGE_MAGIC 0x6269666d /**< bifm */
#define ICV_IMAGE_MAGIC 0x6269666d /**< bifm */
/** @brief Routines involved with handling "magic numbers" used to identify various in-memory data structures. */
@@ -236,20 +235,19 @@ __BEGIN_DECLS
#ifdef NO_BOMBING_MACROS
# define BU_CKMAG(_ptr, _magic, _str) (void)(_ptr)
#else
# define BU_CKMAG(_ptr, _magic, _str) do { \
if (UNLIKELY(((const uintptr_t)(_ptr) == 0) || ((const uintptr_t)(_ptr) & (sizeof((const uintptr_t)(_ptr))-1)) || *((const uint32_t *)(_ptr)) != (uint32_t)(_magic))) { \
bu_badmagic((const uint32_t *)(_ptr), (uint32_t)(_magic), _str, __FILE__, __LINE__); \
# define BU_CKMAG(_ptr, _magic, _str) { \
const uintptr_t _ptrval = (const uintptr_t)(_ptr); \
if (UNLIKELY((_ptrval == 0) || (_ptrval & (sizeof(_ptrval)-1)) || *((const uint32_t *)(_ptr)) != (uint32_t)(_magic))) { \
bu_badmagic((const uint32_t *)(_ptr), (uint32_t)_magic, _str, __FILE__, __LINE__); \
} \
} while (0)
}
#endif
/**
* This function is called when there is something wrong with a
* pointer. It's primarily a support routine for BU_CKMAG macro, but
* may be used elsewhere. This function never returns.
* Support routine for BU_CKMAG macro.
*/
BU_EXPORT extern void bu_badmagic(const uint32_t *ptr, uint32_t magic, const char *str, const char *file, int line) _BU_ATTR_ANALYZE_NORETURN _BU_ATTR_NORETURN;
BU_EXPORT extern void bu_badmagic(const uint32_t *ptr, uint32_t magic, const char *str, const char *file, int line) _BU_ATTR_NORETURN;
/** @brief Routines involved with handling "magic numbers" used to identify various in-memory data structures. */
+2 -3
View File
@@ -45,9 +45,8 @@ __BEGIN_DECLS
/** @{ */
/** @file bu/malloc.h */
BU_EXPORT extern size_t bu_n_malloc;
BU_EXPORT extern size_t bu_n_realloc;
BU_EXPORT extern size_t bu_n_free;
BU_EXPORT extern long bu_n_malloc;
BU_EXPORT extern long bu_n_realloc;
/**
* This routine only returns on successful allocation. We promise
+8 -12
View File
@@ -249,14 +249,11 @@ BU_EXPORT extern int bu_str_isprint(const char *cp);
* Returns truthfully if a given input string represents an
* "affirmative string".
*
* Input values that are case-insensitively NULL, empty (i.e., ""
* after disregarding whitespace), "n", "no", "false", "off",
* "(null)", or are 0-valued return as false. Any other input value
* returns true.
*
* Strings strongly indicating true such as "y", "yes", "true", "on",
* or are 1-valued will return as 1, other non-empty strings still
* return as true but may be greater than 1.
* Input values that are case-insensitively NULL, empty, "n", "no",
* "false", "off", "(null)", or are 0-valued return as false. Any
* other input value return true. Strings strongly indicating true
* such as "y", "yes", "true", "on", or are 1-valued will return as 1,
* other strings still return as true but may be greater than 1.
*/
BU_EXPORT extern int bu_str_true(const char *str);
@@ -264,10 +261,9 @@ BU_EXPORT extern int bu_str_true(const char *str);
* Returns truthfully if a given input string represents a
* "negative string".
*
* Input values that are case-insensitively NULL, empty (i.e., ""
* after disregarding whitespace), "n", "no", "false", "off",
* "(null)", or are 0-valued return as true. Any other input value
* returns as false.
* Input values that are case-insensitively NULL, empty, "n", "no",
* "false", "off", "(null)", or are 0-valued return as true. Any
* other input value returns as false.
*/
BU_EXPORT extern int bu_str_false(const char *str);
-33
View File
@@ -25,7 +25,6 @@
#include "bu/defines.h"
#include "bu/parse.h"
#include "bu/vls.h"
__BEGIN_DECLS
@@ -90,38 +89,6 @@ BU_EXPORT extern void bu_mm_cvt(const struct bu_structparse *sdp,
const char *value,
void *data);
/* Values for bu_humanize_number's flags parameter. */
#define BU_HN_DECIMAL 0x01
#define BU_HN_NOSPACE 0x02
#define BU_HN_B 0x04
#define BU_HN_DIVISOR_1000 0x08
#define BU_HN_IEC_PREFIXES 0x10
/* Values for bu_humanize_number's scale parameter. */
#define BU_HN_GETSCALE 0x10
#define BU_HN_AUTOSCALE 0x20
/**
* Convert digital sizes to human readable form. Based off the
* BSD function humanize_number(3).
* Upon success, the humanize_number function returns the number of characters
* that would have been stored in buf (excluding the terminating NUL) if buf
* was large enough, or -1 upon failure. Even upon failure, the contents of
* buf may be modified. If BU_HN_GETSCALE is specified, the prefix index
* number will be returned instead.
*/
BU_EXPORT extern int bu_humanize_number(char *buf, size_t len,
int64_t quotient, const char *suffix, int scale, int flags);
/*
* Converts the number given in 'str', which may be given in a humanized
* form (as described in BSD's humanize_number(3), but with some limitations),
* to an int64_t without units.
* In case of success, 0 is returned and *size holds the value.
* Otherwise, -1 is returned and *size is untouched.
*/
BU_EXPORT extern int bu_dehumanize_number(const char *str, int64_t *size);
__END_DECLS
/** @} */
+1 -12
View File
@@ -28,15 +28,6 @@
#include "bu/defines.h"
/*----------------------------------------------------------------------*/
/** @addtogroup bu_uuid
*
* @brief
* Routines to generate and work with universally unique identifiers.
*/
/** @{ */
/** @file bu/uuid.h */
#ifdef HAVE_STATIC_ARRAYS
# define STATIC_ARRAY(x) static (x)
@@ -54,7 +45,7 @@ __BEGIN_DECLS
* entropy). Providing a byte array and namespace will create a (SHA1-based)
* version 5 UUID suitable for repeatable identifier hashing.
*/
BU_EXPORT int
int
bu_uuid_create(uint8_t uuid[STATIC_ARRAY(16)], size_t nbytes, const uint8_t *bytes, const uint8_t namespace_uuid[STATIC_ARRAY(16)]);
/**
@@ -105,8 +96,6 @@ bu_uuid_decode(const char *cp, uint8_t uuid[STATIC_ARRAY(16)]);
__END_DECLS
/** @} */
#endif /* BU_UUID_H */
/*
-194
View File
@@ -461,200 +461,6 @@ BU_EXPORT extern const char *bu_vls_encode(struct bu_vls *vp, const char *str);
*/
BU_EXPORT extern const char *bu_vls_decode(struct bu_vls *vp, const char *str);
/**
@brief
Automatic string generation routines.
There are many situations where a calling program, given an input string,
needs to produce automatically derived output strings that satisfy some
criteria (incremented, special characters removed, etc.) The functions
below perform this type of work.
*/
/**
* A problem frequently encountered when working with strings in BRL-CAD
* is the presence of special characters, characters active in the scripting
* language being applied, or other problematic contents that interfere with
* processing or readability of strings. This function takes a vls as an
* input and simplifies it as follows:
*
* 1) Reduce characters present to alpha-numeric characters and those
* characters supplied to the routine in the "keep" string. Substitute
* is performed as follows:
*
* * Skip any character in the "keep" string
*
* * Replace diacritic characters(code >= 192) from the extended ASCII set
* with a specific mapping from the standard ASCII set. See discussion at:
* http://stackoverflow.com/questions/14094621/ for more about this.
*
* * Replace any non-keep characters that aren't replaced by other
* approaches with the '_' underscore character
*
* 2) Collapses duplicate characters in the "de_dup" string.
*
* 3) Remove leading and trailing characters in the "trim' string.
*
* Returns 0 if string was not altered, 1 otherwise.
*/
BU_EXPORT extern int bu_vls_simplify(struct bu_vls *vp, const char *keep, const char *de_dup, const char *trim);
/**
* callback type for bu_vls_incr()
*/
typedef int (*bu_vls_uniq_t)(struct bu_vls *v, void *data);
/**
A problem frequently encountered when generating names is generating names
that are in some sense structured but avoid colliding. For example, given a
geometry object named:
@verbatim
engine_part.s
@endverbatim
an application wanting to make multiple copies of engine_part.s
automatically might want to produce a list of names such as:
@verbatim
engine_part.s-1, engine_part.s-2, engine_part.s-3, ...
@endverbatim
However, it is equally plausible that the desired pattern might be:
@verbatim
engine_part_0010.s, engine_part_0020.s, engine_part_0030.s, ...
@endverbatim
This function implements an engine for generating the "next" name in a
sequence, given an initial name supplied by the caller and (optionally)
information to identify the incrementor in the string and the incrementing
behavior desired. bu_vls_incr does not track any "state" for individual
strings - all information is contained either in the current state of the
input string itself or the incrementation specifier (more details on the
latter can be found below.)
@param[in,out] name Contains the "seed" string for the name generation. Upon return the old string is cleared and the new one resides in name
@param[in] regex_str Optional - user supplied regular expression for locating the incrementer substring.
@param[in] incr_spec Optional - string of colon separated parameters defining function behavior.
\section bu_vls_incr_regexp Incrementer Substring Identification
bu_vls_incr uses regular expressions to identify the numerical part of a
supplied string. By default, if no regular expression is supplied by the
caller, bu_vls_incr will use a numerical sequence at the end of the string
(more precisely, it will use the last sequence of numbers if and only if
there are no non-numerical characters between that sequence and the end of
the string.) If no appropriate match is found, the incrementer will be
appended to the end of the string.
When no pre-existing number is found to start the sequence, the default behavior
is to treat the existing string as the "0"-th item in the sequence. In such cases
bu_vls_incr will thus return one, not zero, as the first incremented name in the
sequence.
If the caller wishes to be more sophisticated about where incrementers are
found in strings, they may supply their own regular expression that uses
parenthesis bounded matchers to identify numerical identifiers. For example,
the regular expression:
@verbatim
([-_:]*[0-9]+[-_:]*)[^0-9]*$
@endverbatim
will instruct bu_vls_incr to define not just the last number but the last
number and any immediately surrounding separator characters as the subset of
the string to process. Combined with a custom incrementation specifier,
this option allows calling programs to exercise broad flexibility in how
they process strings.
\section bu_vls_incr_inc Specifying Incrementor Behavior
The caller may optionally specify incrementation behavior with an incrementer
specification string, which has the following form: "minwidth:init:max:step[:left_sepchar:right_sepchar]"
The table below explains the individual elements.
<table>
<tr><th colspan="2">"minwidth:init:max:step[:left_sepchar:right_sepchar]"</th></tr>
<tr><td>minwidth</td> <td>specifies the minimum number of digits used when printing the incrementer substring</td>
<tr><td>init</td> <td>specifies the initial minimum value to use when returning an incremented string. Overrides the string-based value if that value is less than the init value.</td>
<tr><td>max</td> <td>specifies the maximum value of the incrementer - if the step takes the value past this number, the counter "rolls over" to the init value.</td>
<tr><td>step</td> <td>value by which the incrementor value is increased</td>
<tr><td>left_sepchar</td> <td>optional - specify a character to insert to the left of the numerical substring</td>
<tr><td>right_sepchar</td><td>optional - specify a character to insert to the right of the numerical substring</td>
</table>
In the case of minwidth, init, max, and step a '0' always indicates
unspecified (i.e. "default") behavior. So, an incrementer specified as
0:0:0:0 would behave as follows:
minwidth: width found in string, or standard printf handling if nothing useful is found. For example, engine_part-001.s would by default be incremented to engine_part-002.s, preserving the prefix zeros.
init: from initial name string, or 0 if not found
max: LONG_MAX
step: 1
The last two separator chars are optional - they are useful if the caller
wants to guarantee a separation between the active incremented substring and
its surroundings. For example, the following would prefix the incrementer
output with an underscore and add a suffix with a dash:
@verbatim
0:0:0:0:_:-
@endverbatim
\section bu_vls_incr_ex Examples
So, we return to our engine_part.s example cases. To generate the initial pattern:
@verbatim
engine_part.s-1, engine_part.s-2, engine_part.s-3, ...
@endverbatim
the code is actually quite simple:
@code
int i = 0;
const char *estr = "engine_part.s"
struct bu_vls name = BU_VLS_INIT_ZERO;
bu_vls_sprintf(&name, "%s", estr);
while (i < 10) {
(void)bu_vls_incr(&name, NULL, "0:0:0:0:-", NULL, NULL);
bu_log("%s\n", bu_vls_addr(&name));
}
bu_vls_free(&name);
@endcode
The second case gets a bit more interesting, since there is no number
present in the original string, we want the number *before* the .s suffix,
we're incrementing by more than 1, we want four numerical digits in the
string, and we want an underscore prefix spacer before the number:
@verbatim
engine_part_0010.s, engine_part_0020.s, engine_part_0030.s, ...
@endverbatim
To set this up correctly we take advantage of the bu_path_component function
and construct an initial "seed" string with a zero incrementer where we
need it:
@code
int i = 0;
const char *estr = "engine_part.s"
struct bu_vls name = BU_VLS_INIT_ZERO;
bu_vls_sprintf(&name, "%s0.%s", bu_path_component(estr,BU_PATH_EXTLESS),bu_path_component(estr,BU_PATH_EXT));
while (i < 10) {
(void)bu_vls_incr(&name, NULL, "4:10:0:10:_", NULL, NULL);
bu_log("%s\n", bu_vls_addr(&name));
}
bu_vls_free(&name);
@endcode
*/
BU_EXPORT extern int bu_vls_incr(struct bu_vls *name, const char *regex_str, const char *incr_spec, bu_vls_uniq_t uniq_test, void *data);
__END_DECLS
/** @} */
+2 -4
View File
@@ -41,11 +41,9 @@
*/
#if defined(BRLCADBUILD) && defined(HAVE_CONFIG_H)
# if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
# include "brlcad_config.h"
# /* Put this after brlcad_config.h, since some of the tests
in here require defines from brlcad_config.h */
# if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(CMAKE_HEADERS)
# include "config_win.h"
# include "brlcad_config.h"
# else
# include "brlcad_config.h"
# endif /* _WIN32 */
+39
View File
@@ -0,0 +1,39 @@
# update COUNT
find_file(countFile COUNT ${CMAKE_CURRENT_SOURCE_DIR})
if(countFile)
file(READ COUNT buildCounter)
else(countFile)
set(buildCounter 0)
endif(countFile)
math(EXPR buildCounter "${buildCounter} + 1")
file(WRITE COUNT ${buildCounter})
# update DATE
execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE currentDate OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE currentTime OUTPUT_STRIP_TRAILING_WHITESPACE)
file(WRITE DATE "\"${currentDate} ${currentTime}\"")
# update HOST
file(WRITE HOST "\"$ENV{COMPUTERNAME}\"")
# update PATH
set(programPath "\"$ENV{ProgramFiles}\\BRL-CAD\"")
string(REPLACE "\\" "\\\\" programPathForC ${programPath})
file(WRITE PATH ${programPathForC})
# update USER
file(WRITE USER "\"$ENV{USERNAME}\"")
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+1 -1
View File
@@ -1 +1 @@
27
26
+1 -1
View File
@@ -1 +1 @@
0
1
-4
View File
@@ -162,10 +162,6 @@
#define sys_nerr _sys_nerr
#define getcwd _getcwd
#if !defined(HAVE_STRTOLL) && defined(HAVE__STRTOI64)
# define strtoll _strtoi64
#endif
/* set up stat */
#if defined(SIZEOF_VOID_P) && SIZEOF_VOID_P == 8
# define stat _stati64
+1 -1
View File
@@ -275,7 +275,7 @@ struct bview_client_data {
int draw_solid_lines_only;
int wireframe_color_override;
int wireframe_color[3];
fastf_t transparency;
int transparency;
int dmode;
int hiddenLine;
void *freesolid;
+5 -21
View File
@@ -27,16 +27,12 @@
#define GCV_API_H
#include "common.h"
#include "vmath.h"
#include "bu/avs.h"
#include "bu/opt.h"
#include "bu/mime.h"
#include "bn/tol.h"
#include "rt/defines.h"
#include "rt/tol.h"
#include "gcv/defines.h"
#include "bu/opt.h"
#include "raytrace.h"
__BEGIN_DECLS
@@ -136,21 +132,9 @@ struct gcv_filter {
/* operation type */
const enum gcv_filter_type filter_type;
/* If we have a definite type this converter is known to handle, call
* it out here.
* MIME_MODEL_UNKNOWN if 'filter_type' is GCV_FILTER_FILTER or
* if the plugin is a multi-format I/O plugin */
/* MIME_MODEL_UNKNOWN if 'filter_type' is GCV_FILTER_FILTER */
const bu_mime_model_t mime_type;
/* For plugins supporting multiple file types, call this to
* process them.
*
* Return 1 if the input data can be processed by this filter.
* (for example: is the file readable by this plugin? Return
* 1 if yes, 0 if no. Later we should incorporate some notion
* of quality of support into this return value...) */
int (* const data_supported)(const char *data);
/**
* PRIVATE
*
@@ -199,7 +183,7 @@ struct gcv_plugin {
*/
GCV_EXPORT const struct bu_ptbl *gcv_list_filters(void);
GCV_EXPORT const struct gcv_plugin *gcv_plugin_info(void);
GCV_EXPORT const struct gcv_plugin *gcv_plugin_info();
/**
* Perform a filtering operation on a gcv_context.
+2 -3
View File
@@ -31,8 +31,7 @@
#include "gcv/defines.h"
#include "rt/geom.h"
#include "rt/tree.h"
#include "raytrace.h"
__BEGIN_DECLS
@@ -48,7 +47,7 @@ struct rt_bot_internal *gcv_facetize(struct db_i *db, const struct db_full_path
* Topological test for determining whether the given BoT satisfies
* the conditions for solidity.
*
* Equivalent to gcv_bot_is_closed_fan() && gcv_bot_is_orientable()
* Equivalent to bot_is_closed_fan() && bot_is_orientable()
*/
GCV_EXPORT extern int gcv_bot_is_solid(const struct rt_bot_internal *bot);
+3 -5
View File
@@ -29,7 +29,6 @@
#define GED_DEFINES_H
#include "common.h"
#include "bio.h"
#include "bu/hash.h"
#include "bu/list.h"
#include "bu/vls.h"
@@ -224,10 +223,9 @@ struct ged {
/* FOR LIBGED INTERNAL USE */
struct ged_cmd *cmds;
int (*add)(struct ged *gedp, const struct ged_cmd *cmd);
int (*del)(struct ged *gedp, const char *name);
int (*run)(struct ged *gedp, int ac, char *av[]);
int (*add)(const struct ged_cmd *cmd);
int (*del)(const char *name);
int (*run)(int ac, char *av[]);
void *ged_interp; /* Temporary - do not rely on when designing new functionality */
/* Interface to LIBDM */
-10
View File
@@ -214,11 +214,6 @@ GED_EXPORT extern int ged_get_comb(struct ged *gedp, int argc, const char *argv[
*/
GED_EXPORT extern int ged_group(struct ged *gedp, int argc, const char *argv[]);
/**
* Heal command to heal the defects in bots
*/
GED_EXPORT extern int ged_heal(struct ged *gedp, int argc, const char *argv[]);
/**
* Set the "hidden" flag for the specified objects so they do not
* appear in an "ls" command output
@@ -480,11 +475,6 @@ GED_EXPORT extern int ged_cpi(struct ged *gedp, int argc, const char *argv[]);
*/
GED_EXPORT extern int ged_delete_pipept(struct ged *gedp, int argc, const char *argv[]);
/**
* DSP utility command
*/
GED_EXPORT extern int ged_dsp(struct ged *gedp, int argc, const char *argv[]);
/**
* Arb specific edits.
*/
+2 -2059
View File
File diff suppressed because it is too large Load Diff
+15
View File
@@ -39,6 +39,21 @@ __BEGIN_DECLS
#include "optical/shadework.h"
#include "optical/shadefuncs.h"
/* for libmultispectral */
/* FIXME: these should not need to be declared for libmultispectral.
* breaks encapsulation/modularity of shaders if we have to list them
* in more than one place. maybe give multispectral arrays their own
* suffix so as not to conflict.
*/
OPTICAL_EXPORT extern struct mfuncs camo_mfuncs[];
OPTICAL_EXPORT extern struct mfuncs light_mfuncs[];
OPTICAL_EXPORT extern struct mfuncs stk_mfuncs[];
OPTICAL_EXPORT extern struct mfuncs phg_mfuncs[];
OPTICAL_EXPORT extern struct mfuncs noise_mfuncs[];
OPTICAL_EXPORT extern struct bn_table *spectrum;
/**
* this function sets the provided mfuncs head pointer to the list of
* available shaders. the provided mfuncs head pointer should point
+4
View File
@@ -52,7 +52,11 @@ __BEGIN_DECLS
/* for liboptical */
OPTICAL_EXPORT extern double AmbientIntensity;
#ifdef RT_MULTISPECTRAL
OPTICAL_EXPORT extern struct bn_tabdata *background;
#else
OPTICAL_EXPORT extern vect_t background;
#endif
/* defined in sh_text.c */
OPTICAL_EXPORT extern struct region env_region; /* environment map region */
+4
View File
@@ -61,7 +61,11 @@ struct light_specific {
int lt_exaim; /**< @brief !0 if explicit aim in lt_target */
fastf_t lt_obscure; /**< @brief percentage obscuration of light */
/* Internal fields */
#ifdef RT_MULTISPECTRAL
struct bn_tabdata *lt_spectrum; /**< @brief Units? mw*sr ? */
#else
vect_t lt_color; /**< @brief RGB, as 0..1 */
#endif
fastf_t lt_radius; /**< @brief approximate radius of spherical light */
fastf_t lt_cosangle; /**< @brief cos of lt_angle */
vect_t lt_pos; /**< @brief location in space of light */
+9
View File
@@ -43,11 +43,20 @@ struct shadework {
fastf_t sw_extinction; /**< @brief extinction coeff, mm^-1 */
fastf_t sw_refrac_index;
fastf_t sw_temperature;
#ifdef RT_MULTISPECTRAL
struct bn_tabdata *msw_color;
struct bn_tabdata *msw_basecolor;
#else
fastf_t sw_color[3]; /**< @brief shaded color */
fastf_t sw_basecolor[3]; /**< @brief base color */
#endif
struct hit sw_hit; /**< @brief ray hit (dist, point, normal) */
struct uvcoord sw_uv;
#ifdef RT_MULTISPECTRAL
struct bn_tabdata * msw_intensity[SW_NLIGHTS];
#else
fastf_t sw_intensity[3*SW_NLIGHTS]; /**< @brief light intensities */
#endif
fastf_t sw_tolight[3*SW_NLIGHTS]; /**< @brief light directions */
struct light_specific *sw_visible[SW_NLIGHTS]; /**< @brief visibility flags/ptrs */
fastf_t sw_lightfract[SW_NLIGHTS];/**< @brief % light visible */
-299
View File
@@ -1,299 +0,0 @@
/* ISO C9x compliant inttypes.h for Microsoft Visual Studio
* Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
*
* Copyright (c) 2006-2013 Alexander Chemeris
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the product nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef _MSC_VER
#ifndef _MSC_INTTYPES_H_
#define _MSC_INTTYPES_H_
/* 7.8 Format conversion of integer types */
typedef struct {
intmax_t quot;
intmax_t rem;
} imaxdiv_t;
/* 7.8.1 Macros for format specifiers */
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) /* [ See footnote 185 at page 198 */
// The fprintf macros for signed integers are:
#define PRId8 "d"
#define PRIi8 "i"
#define PRIdLEAST8 "d"
#define PRIiLEAST8 "i"
#define PRIdFAST8 "d"
#define PRIiFAST8 "i"
#define PRId16 "hd"
#define PRIi16 "hi"
#define PRIdLEAST16 "hd"
#define PRIiLEAST16 "hi"
#define PRIdFAST16 "hd"
#define PRIiFAST16 "hi"
#define PRId32 "I32d"
#define PRIi32 "I32i"
#define PRIdLEAST32 "I32d"
#define PRIiLEAST32 "I32i"
#define PRIdFAST32 "I32d"
#define PRIiFAST32 "I32i"
#define PRId64 "I64d"
#define PRIi64 "I64i"
#define PRIdLEAST64 "I64d"
#define PRIiLEAST64 "I64i"
#define PRIdFAST64 "I64d"
#define PRIiFAST64 "I64i"
#define PRIdMAX "I64d"
#define PRIiMAX "I64i"
#define PRIdPTR "Id"
#define PRIiPTR "Ii"
/* The fprintf macros for unsigned integers are: */
#define PRIo8 "o"
#define PRIu8 "u"
#define PRIx8 "x"
#define PRIX8 "X"
#define PRIoLEAST8 "o"
#define PRIuLEAST8 "u"
#define PRIxLEAST8 "x"
#define PRIXLEAST8 "X"
#define PRIoFAST8 "o"
#define PRIuFAST8 "u"
#define PRIxFAST8 "x"
#define PRIXFAST8 "X"
#define PRIo16 "ho"
#define PRIu16 "hu"
#define PRIx16 "hx"
#define PRIX16 "hX"
#define PRIoLEAST16 "ho"
#define PRIuLEAST16 "hu"
#define PRIxLEAST16 "hx"
#define PRIXLEAST16 "hX"
#define PRIoFAST16 "ho"
#define PRIuFAST16 "hu"
#define PRIxFAST16 "hx"
#define PRIXFAST16 "hX"
#define PRIo32 "I32o"
#define PRIu32 "I32u"
#define PRIx32 "I32x"
#define PRIX32 "I32X"
#define PRIoLEAST32 "I32o"
#define PRIuLEAST32 "I32u"
#define PRIxLEAST32 "I32x"
#define PRIXLEAST32 "I32X"
#define PRIoFAST32 "I32o"
#define PRIuFAST32 "I32u"
#define PRIxFAST32 "I32x"
#define PRIXFAST32 "I32X"
#define PRIo64 "I64o"
#define PRIu64 "I64u"
#define PRIx64 "I64x"
#define PRIX64 "I64X"
#define PRIoLEAST64 "I64o"
#define PRIuLEAST64 "I64u"
#define PRIxLEAST64 "I64x"
#define PRIXLEAST64 "I64X"
#define PRIoFAST64 "I64o"
#define PRIuFAST64 "I64u"
#define PRIxFAST64 "I64x"
#define PRIXFAST64 "I64X"
#define PRIoMAX "I64o"
#define PRIuMAX "I64u"
#define PRIxMAX "I64x"
#define PRIXMAX "I64X"
#define PRIoPTR "Io"
#define PRIuPTR "Iu"
#define PRIxPTR "Ix"
#define PRIXPTR "IX"
/* The fscanf macros for signed integers are: */
#define SCNd8 "d"
#define SCNi8 "i"
#define SCNdLEAST8 "d"
#define SCNiLEAST8 "i"
#define SCNdFAST8 "d"
#define SCNiFAST8 "i"
#define SCNd16 "hd"
#define SCNi16 "hi"
#define SCNdLEAST16 "hd"
#define SCNiLEAST16 "hi"
#define SCNdFAST16 "hd"
#define SCNiFAST16 "hi"
#define SCNd32 "ld"
#define SCNi32 "li"
#define SCNdLEAST32 "ld"
#define SCNiLEAST32 "li"
#define SCNdFAST32 "ld"
#define SCNiFAST32 "li"
#define SCNd64 "I64d"
#define SCNi64 "I64i"
#define SCNdLEAST64 "I64d"
#define SCNiLEAST64 "I64i"
#define SCNdFAST64 "I64d"
#define SCNiFAST64 "I64i"
#define SCNdMAX "I64d"
#define SCNiMAX "I64i"
#ifdef _WIN64
# define SCNdPTR "I64d"
# define SCNiPTR "I64i"
#else
# define SCNdPTR "ld"
# define SCNiPTR "li"
#endif
/* The fscanf macros for unsigned integers are: */
#define SCNo8 "o"
#define SCNu8 "u"
#define SCNx8 "x"
#define SCNX8 "X"
#define SCNoLEAST8 "o"
#define SCNuLEAST8 "u"
#define SCNxLEAST8 "x"
#define SCNXLEAST8 "X"
#define SCNoFAST8 "o"
#define SCNuFAST8 "u"
#define SCNxFAST8 "x"
#define SCNXFAST8 "X"
#define SCNo16 "ho"
#define SCNu16 "hu"
#define SCNx16 "hx"
#define SCNX16 "hX"
#define SCNoLEAST16 "ho"
#define SCNuLEAST16 "hu"
#define SCNxLEAST16 "hx"
#define SCNXLEAST16 "hX"
#define SCNoFAST16 "ho"
#define SCNuFAST16 "hu"
#define SCNxFAST16 "hx"
#define SCNXFAST16 "hX"
#define SCNo32 "lo"
#define SCNu32 "lu"
#define SCNx32 "lx"
#define SCNX32 "lX"
#define SCNoLEAST32 "lo"
#define SCNuLEAST32 "lu"
#define SCNxLEAST32 "lx"
#define SCNXLEAST32 "lX"
#define SCNoFAST32 "lo"
#define SCNuFAST32 "lu"
#define SCNxFAST32 "lx"
#define SCNXFAST32 "lX"
#define SCNo64 "I64o"
#define SCNu64 "I64u"
#define SCNx64 "I64x"
#define SCNX64 "I64X"
#define SCNoLEAST64 "I64o"
#define SCNuLEAST64 "I64u"
#define SCNxLEAST64 "I64x"
#define SCNXLEAST64 "I64X"
#define SCNoFAST64 "I64o"
#define SCNuFAST64 "I64u"
#define SCNxFAST64 "I64x"
#define SCNXFAST64 "I64X"
#define SCNoMAX "I64o"
#define SCNuMAX "I64u"
#define SCNxMAX "I64x"
#define SCNXMAX "I64X"
#ifdef _WIN64
# define SCNoPTR "I64o"
# define SCNuPTR "I64u"
# define SCNxPTR "I64x"
# define SCNXPTR "I64X"
#else
# define SCNoPTR "lo"
# define SCNuPTR "lu"
# define SCNxPTR "lx"
# define SCNXPTR "lX"
#endif
#endif /* __STDC_FORMAT_MACROS */
/* 7.8.2 Functions for greatest-width integer types */
/* 7.8.2.1 The imaxabs function */
#define imaxabs _abs64
/* 7.8.2.2 The imaxdiv function */
/* This is modified version of div() function from Microsoft's div.c found
in %MSVC.NET%\crt\src\div.c */
#ifdef STATIC_IMAXDIV
static
#else
_inline
#endif
imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
{
imaxdiv_t result;
result.quot = numer / denom;
result.rem = numer % denom;
if (numer < 0 && result.rem > 0) {
/* did division wrong; must fix up */
++result.quot;
result.rem -= denom;
}
return result;
}
/* 7.8.2.3 The strtoimax and strtoumax functions */
#define strtoimax _strtoi64
#define strtoumax _strtoui64
/* 7.8.2.4 The wcstoimax and wcstoumax functions */
#define wcstoimax _wcstoi64
#define wcstoumax _wcstoui64
#endif /* _MSC_INTTYPES_H_ */
#endif /* _MSC_VER */
-1
View File
@@ -802,4 +802,3 @@ int main () {
}
#endif
+1 -1
View File
@@ -148,13 +148,13 @@ __BEGIN_DECLS
#include "./rt/primitives/pipe.h"
#include "./rt/primitives/metaball.h"
#include "./rt/primitives/rpc.h"
#include "./rt/primitives/ars.h"
#include "./rt/primitives/pg.h"
#include "./rt/primitives/hf.h"
#include "./rt/primitives/dsp.h"
#include "./rt/primitives/ell.h"
#include "./rt/primitives/tgc.h"
#include "./rt/primitives/sketch.h"
#include "./rt/primitives/annot.h"
#include "./rt/primitives/bot.h"
#include "./rt/primitives/brep.h"
#include "./rt/primitives/tor.h"
+1
View File
@@ -33,6 +33,7 @@ set(rt_headers
mem.h
nmg.h
nongeom.h
nurb.h
op.h
overlap.h
pattern.h
-1
View File
@@ -29,7 +29,6 @@
#include "common.h"
#include "vmath.h"
#include "bu/vls.h"
#include "bn/poly.h"
__BEGIN_DECLS

Some files were not shown because too many files have changed in this diff Show More