Revision: 56631
http://sourceforge.net/p/brlcad/code/56631
Author: n_reed
Date: 2013-08-06 17:37:32 +0000 (Tue, 06 Aug 2013)
Log Message:
-----------
use javadoc style in comments
Modified Paths:
--------------
brlcad/trunk/include/brep.h
Modified: brlcad/trunk/include/brep.h
===================================================================
--- brlcad/trunk/include/brep.h 2013-08-06 16:28:29 UTC (rev 56630)
+++ brlcad/trunk/include/brep.h 2013-08-06 17:37:32 UTC (rev 56631)
@@ -80,7 +80,7 @@
/** tighten BREP grazing tolerance to 0.000017453(0.001 degrees) was using
RT_DOT_TOL at 0.001 (0.05 degrees) **/
#define BREP_GRAZING_DOT_TOL 0.000017453
-/* Use vector operations? For debugging */
+/** Use vector operations? For debugging */
#define DO_VECTOR 1
#ifndef BREP_EXPORT
@@ -172,13 +172,10 @@
}
/**
- * Description:
- * Intersect two 2d Rays
- * Parameters:
- * v - [in] other ray to intersect with
- * isect - [out] point of intersection
- * Returns:
- * true if single point of intersection is found
+ * Intersect two 2d Rays
+ * @param v [in] other ray to intersect with
+ * @param isect [out] point of intersection
+ * @return true if single point of intersection is found
*/
bool IntersectRay(const ON_Ray& v, ON_2dPoint& isect) const
{
@@ -201,22 +198,24 @@
BREP_EXPORT bool ON_NearZero(double x, double tolerance = ON_ZERO_TOLERANCE);
-/* Maximum per-surface BVH depth */
+/** Maximum per-surface BVH depth */
#define BREP_MAX_FT_DEPTH 8
#define BREP_MAX_LN_DEPTH 20
#define SIGN(x) ((x) >= 0 ? 1 : -1)
-/* Surface flatness parameter, Abert says between 0.8-0.9 */
+/** Surface flatness parameter, Abert says between 0.8-0.9 */
#define BREP_SURFACE_FLATNESS 0.85
#define BREP_SURFACE_STRAIGHTNESS 0.75
-/* Max newton iterations when finding closest point */
+/** Max newton iterations when finding closest point */
#define BREP_MAX_FCP_ITERATIONS 50
-/* Root finding epsilon */
+/** Root finding epsilon */
#define BREP_FCP_ROOT_EPSILON 1e-5
-/* trim curve point sampling count for isLinear() check and possibly growing
bounding box*/
+/** trim curve point sampling count for isLinear() check and possibly
+ * growing bounding box
+ */
#define BREP_BB_CRV_PNT_CNT 10
#define BREP_CURVE_FLATNESS 0.95
-/* subdivision size factors */
+/** subdivision size factors */
#define BREP_SURF_SUB_FACTOR 1
#define BREP_TRIM_SUB_FACTOR 1
@@ -290,12 +289,14 @@
/**
* Get 2 points defining bounding box:
*
+ * @verbatim
* *----------------max
* | |
* v | |
* | |
* min----------------*
* u
+ * @endverbatim
*/
void GetBBox(fastf_t* min, fastf_t* max) const;
@@ -894,33 +895,34 @@
~BVNode();
- /* List of all children of a given node */
+ /** List of all children of a given node */
typedef std::vector<BVNode<BV>*> ChildList;
ChildList m_children;
- /* Curve Tree associated with the parent Surface Tree */
+ /** Curve Tree associated with the parent Surface Tree */
CurveTree* m_ctree;
- /* Bounding Box */
+ /** Bounding Box */
BV m_node;
- /* Test if this node is a leaf node in the hierarchy */
+ /** Test if this node is a leaf node in the hierarchy */
bool isLeaf();
- /* Return all leaves below this node that are leaf nodes */
+ /** Return all leaves below this node that are leaf nodes */
void getLeaves(std::list<BVNode<BV>*>& out_leaves);
- /* Functions to add and remove child nodes from this node. */
+ /** Functions to add and remove child nodes from this node. */
void addChild(const BV& child);
void addChild(BVNode<BV>* child);
void removeChild(const BV& child);
void removeChild(BVNode<BV>* child);
- /* Report the depth of this node in the hierarchy */
+ /** Report the depth of this node in the hierarchy */
int depth();
- /* Get 2 points defining a bounding box
+ /** Get 2 points defining a bounding box
*
+ * @verbatim
* _ max _
* _ - + - _
* * _ + _ *
@@ -932,20 +934,21 @@
* * _ | _ *
* - _ | _ -
* min
+ * @endverbatim
*/
void GetBBox(float* min, float* max);
void GetBBox(double* min, double* max);
- /* Surface Information */
+ /** Surface Information */
const ON_BrepFace* m_face;
ON_Interval m_u;
ON_Interval m_v;
- /* Trimming Flags */
+ /** Trimming Flags */
bool m_checkTrim;
bool m_trimmed;
- /* Point used for closeness testing - usually based on evaluation
+ /** Point used for closeness testing - usually based on evaluation
* of the curve/surface at the center of the parametric domain
*/
ON_3dPoint m_estimate;
@@ -953,14 +956,14 @@
/* Normal at the m_estimate point */
ON_3dVector m_normal;
- /* Test whether a ray intersects the 3D bounding volume of the
+ /** Test whether a ray intersects the 3D bounding volume of the
* node - if so, and node is not a leaf node, query children. If
* leaf node, and intersects, add to list.
*/
bool intersectedBy(ON_Ray& ray, double* tnear = 0, double* tfar = 0);
bool intersectsHierarchy(ON_Ray& ray, std::list<BVNode<ON_BoundingBox>*>&
results);
- /* Report if a given uv point is within the uv boundaries defined
+ /** Report if a given uv point is within the uv boundaries defined
* by a node.
*/
bool containsUV(const ON_2dPoint& uv);
@@ -1741,56 +1744,54 @@
*/
class BREP_EXPORT Subsurface;
-/* The ON_PX_EVENT class is used to report point-point, point-curve
+/** The ON_PX_EVENT class is used to report point-point, point-curve
* and point-surface intersection events.
*/
class ON_CLASS BREP_EXPORT ON_PX_EVENT
{
public:
- /* Default construction sets everything to zero. */
+ /** Default construction sets everything to zero. */
ON_PX_EVENT();
- /*
- Description:
- Compares point intersection events and sorts them in the
- canonical order.
- Returns:
- @untitled table
- -1 this < other
- 0 this == other
- +1 this > other
- Remarks:
- ON_PX_EVENT::Compare is used to sort intersection events into canonical
- order.
- */
+ /**
+ * Compares point intersection events and sorts them in the
+ * canonical order.
+ *
+ * @retval -1 this < other
+ * @retval 0 this == other
+ * @retval +1 this > other
+ *
+ * @remarks ON_PX_EVENT::Compare is used to sort intersection
+ * events into canonical order.
+ */
static
int Compare(const ON_PX_EVENT* a, const ON_PX_EVENT* b);
- /*
- Description:
- Check point intersection event values to make sure they are valid.
- Parameters:
- text_log - [in] If not null and an error is found, then a description
- of the error is printed to text_log.
- intersection_tolerance - [in]
- 0.0 or value used in intersection calculation.
- pointA - [in]
- NULL or pointA passed to intersection calculation.
- pointB - [in]
- NULL or pointB passed to intersection calculation.
- curveB - [in]
- NULL or curveB passed to intersection calculation.
- curveB_domain - [in]
- NULL or curveB domain used in intersection calculation.
- surfaceB - [in]
- NULL or surfaceB passed to intersection calculation.
- surfaceB_domain0 - [in]
- NULL or surfaceB "u" domain used in intersection calculation.
- surfaceB_domain1 - [in]
- NULL or surfaceB "v" domain used in intersection calculation.
- Returns:
- True if event is valid.
- */
+ /**
+ * Check point intersection event values to make sure they are
+ * valid.
+ *
+ * @param text_log [in] If not null and an error is found, then
+ * a description of the error is printed to text_log.
+ * @param intersection_tolerance [in] 0.0 or value used in
+ * intersection calculation.
+ * @param pointA [in] NULL or pointA passed to intersection
+ * calculation.
+ * @param pointB [in] NULL or pointB passed to intersection
+ * calculation.
+ * @param curveB [in] NULL or curveB passed to intersection
+ * calculation.
+ * @param curveB_domain [in] NULL or curveB domain used in
+ * intersection calculation.
+ * @param surfaceB [in] NULL or surfaceB passed to intersection
+ * calculation.
+ * @param surfaceB_domain0 [in] NULL or surfaceB "u" domain used
+ * in intersection calculation.
+ * @param surfaceB_domain1 [in] NULL or surfaceB "v" domain used
+ * in intersection calculation.
+ *
+ * @return True if event is valid.
+ */
bool IsValid(ON_TextLog* text_log,
double intersection_tolerance,
const class ON_3dPoint* pointA,
@@ -1805,45 +1806,37 @@
enum TYPE {
no_px_event = 0,
- ppx_point = 1, /* point-point intersection */
- pcx_point = 2, /* point-curve intersection */
- psx_point = 3 /* point-surface intersection */
+ ppx_point = 1, /**< point-point intersection */
+ pcx_point = 2, /**< point-curve intersection */
+ psx_point = 3 /**< point-surface intersection */
};
TYPE m_type;
- ON_3dPoint m_A; /* Point A in 3D space */
- ON_3dPoint m_B; /* Point B in 3D space */
+ ON_3dPoint m_A; /**< Point A in 3D space */
+ ON_3dPoint m_B; /**< Point B in 3D space */
- ON_2dPoint m_b; /* Point B in 2D space for the curve/surface
+ ON_2dPoint m_b; /**< Point B in 2D space for the curve/surface
* For a curve, m_b[1] == 0
* For a point, m_b[0] == m_b[1] == 0
*/
- ON_3dPoint m_Mid; /* The mid-point of Point A and Point B */
- double m_radius; /* To trace the uncertainty area */
+ ON_3dPoint m_Mid; /**< The mid-point of Point A and Point B */
+ double m_radius; /**< To trace the uncertainty area */
};
/**
* An overload of ON_Intersect for point-point intersection.
+ * Intersect pointA with pointB.
*
- * Description:
- * Intersect pointA with pointB.
+ * @param pointA [in]
+ * @param pointB [in]
+ * @param x [out] Intersection events are appended to this array.
+ * @param tolerance [in] If the input intersection_tolerance <= 0.0,
+ * then 0.001 is used.
*
- * Parameters:
- * pointA - [in]
- *
- * pointB - [in]
- *
- * x - [out]
- * Intersection events are appended to this array.
- *
- * tolerance - [in]
- * If the input intersection_tolerance <= 0.0, then 0.001 is used.
- *
- * Returns:
- * True for an intersection. False for no intersection.
+ * @return True for an intersection. False for no intersection.
*/
extern BREP_EXPORT bool
ON_Intersect(const ON_3dPoint& pointA,
@@ -1853,29 +1846,17 @@
/**
* An overload of ON_Intersect for point-curve intersection.
+ * Intersect pointA with curveB.
*
- * Description:
- * Intersect pointA with curveB.
+ * @param pointA [in]
+ * @param pointB [in]
+ * @param x [out] Intersection events are appended to this array.
+ * @param tolerance [in] If the input intersection_tolerance <= 0.0,
+ * then 0.001 is used.
+ * @param curveB_domain [in] optional restriction on curveB t domain
+ * @param treeB [in] optional curve tree for curveB, to avoid re-computation
*
- * Parameters:
- * pointA - [in]
- *
- * curveB - [in]
- *
- * x - [out]
- * Intersection events are appended to this array.
- *
- * tolerance - [in]
- * If the input intersection_tolerance <= 0.0, then 0.001 is used.
- *
- * curveB_domain - [in]
- * optional restriction on curveB t domain
- *
- * treeB - [in]
- * optional curve tree for curveB, to avoid re-computation
- *
- * Returns:
- * True for an intersection. False for no intersection.
+ * @return True for an intersection. False for no intersection.
*/
extern BREP_EXPORT bool
ON_Intersect(const ON_3dPoint& pointA,
@@ -1887,32 +1868,21 @@
/**
* An overload of ON_Intersect for point-surface intersection.
+ * Intersect pointA with surfaceB.
*
- * Description:
- * Intersect pointA with surfaceB.
+ * @param pointA [in]
+ * @param surfaceB [in]
+ * @param x [out] Intersection events are appended to this array.
+ * @param tolerance [in] If the input intersection_tolerance <= 0.0,
+ * then 0.001 is used.
+ * @param surfaceB_udomain [in] optional restriction on surfaceB u
+ * domain
+ * @param surfaceB_vdomain [in] optional restriction on surfaceB v
+ * domain
+ * @param treeB [in] optional surface tree for surfaceB, to avoid
+ * re-computation
*
- * Parameters:
- * pointA - [in]
- *
- * surfaceB - [in]
- *
- * x - [out]
- * Intersection events are appended to this array.
- *
- * tolerance - [in]
- * If the input intersection_tolerance <= 0.0, then 0.001 is used.
- *
- * surfaceB_udomain - [in]
- * optional restriction on surfaceB u domain
- *
- * surfaceB_vdomain - [in]
- * optional restriction on surfaceB v domain
- *
- * treeB - [in]
- * optional surface tree for surfaceB, to avoid re-computation
- *
- * Returns:
- * True for an intersection. False for no intersection.
+ * @return True for an intersection. False for no intersection.
*/
extern BREP_EXPORT bool
ON_Intersect(const ON_3dPoint& pointA,
@@ -1925,41 +1895,30 @@
/**
* An overload of ON_Intersect for curve-curve intersection.
+ * Intersect curveA with curveB.
*
- * Description:
- * Intersect curveA with curveB.
- *
* Parameters:
- * curveA - [in]
+ * @param curveA [in]
+ * @param curveB [in]
+ * @param x [out] Intersection events are appended to this array.
+ * @param intersection_tolerance [in] If the distance from a point
+ * on curveA to curveB is <= intersection tolerance, then the
+ * point will be part of an intersection event. If the input
+ * intersection_tolerance <= 0.0, then 0.001 is used.
+ * @param overlap_tolerance [in] If t1 and t2 are parameters of
+ * curveA's intersection events and the distance from curveA(t)
+ * to curveB is <= overlap_tolerance for every t1 <= t <= t2,
+ * then the event will be returened as an overlap event. If the
+ * input overlap_tolerance <= 0.0, then
+ * intersection_tolerance * 2.0 is used.
+ * @param curveA_domain [in] optional restriction on curveA domain
+ * @param curveB_domain [in] optional restriction on curveB domain
+ * @param treeA [in] optional curve tree for curveA, to avoid re
+ * computation
+ * @param treeB [in] optional curve tree for curveB, to avoid re
+ * computation
*
- * curveB - [in]
- *
- * x - [out] Intersection events are appended to this array.
- *
- * intersection_tolerance - [in] If the distance from a point
- * on curveA to curveB is <= intersection tolerance,
- * then the point will be part of an intersection event.
- * If the input intersection_tolerance <= 0.0, then 0.001 is used.
- *
- * overlap_tolerance - [in] If t1 and t2 are parameters of
- * curveA's intersection events and the distance from curveA(t) to
- * curveB is <= overlap_tolerance for every t1 <= t <= t2,
- * then the event will be returened as an overlap event.
- * If the input overlap_tolerance <= 0.0, then
- * intersection_tolerance*2.0 is used.
- *
- * curveA_domain - [in] optional restriction on curveA domain
- *
- * curveB_domain - [in] optional restriction on curveB domain
- *
- * treeA - [in]
- * optional curve tree for curveA, to avoid re-computation
- *
- * treeB - [in]
- * optional curve tree for curveB, to avoid re-computation
- *
- * Returns:
- * Number of intersection events appended to x.
+ * @return Number of intersection events appended to x.
*/
extern BREP_EXPORT int
ON_Intersect(const ON_Curve* curveA,
@@ -1974,56 +1933,38 @@
/**
* An overload of ON_Intersect for curve-surface intersection.
+ * Intersect curveA with surfaceB.
*
- * Description:
- * Intersect curveA with surfaceB.
+ * @param curveA [in]
+ * @param surfaceB [in]
+ * @param x [out] Intersection events are appended to this array.
+ * @param intersection_tolerance [in] If the distance from a
+ * point on curveA to the surface is <= intersection tolerance,
+ * then the point will be part of an intersection event, or
+ * there is an intersection event the point leads to. If the
+ * input intersection_tolerance <= 0.0, then 0.001 is used.
+ * @param overlap_tolerance [in] If the input overlap_tolerance
+ * <= 0.0, then 2.0*intersection_tolerance is used. Otherwise,
+ * overlap tolerance must be >= intersection_tolerance. In all
+ * cases, the intersection calculation is performed with an
+ * overlap_tolerance that is >= intersection_tolerance. If t1
+ * and t2 are curve parameters of intersection events and the
+ * distance from curve(t) to the surface is <=
+ * overlap_tolerance for every t1 <= t <= t2, then the event
+ * will be returned as an overlap event.
+ * @param curveA_domain [in] optional restriction on curveA domain
+ * @param surfaceB_udomain [in] optional restriction on surfaceB
+ * u domain
+ * @param surfaceB_vdomain [in] optional restriction on surfaceB
+ * v domain
+ * @param overlap2d [out] return the 2D overlap curves on surfaceB.
+ * overlap2d[i] is the curve for event x[i].
+ * @param treeA [in] optional curve tree for curveA, to avoid
+ * re-computation
+ * @param treeB [in] optional surface tree for surfaceB, to avoid
+ * re-computation
*
- * Parameters:
- * curveA - [in]
- *
- * surfaceB - [in]
- *
- * x - [out] Intersection events are appended to this array.
- *
- * intersection_tolerance - [in]
- * If the distance from a point on curveA to the surface
- * is <= intersection tolerance, then the point will be part
- * of an intersection event, or there is an intersection event
- * the point leads to. If the input intersection_tolerance <= 0.0,
- * then 0.001 is used.
- *
- * overlap_tolerance - [in]
- * If the input overlap_tolerance <= 0.0, then
- * 2.0*intersection_tolerance is used. Otherwise, overlap
- * tolerance must be >= intersection_tolerance.
- * In all cases, the intersection calculation is performed
- * with an overlap_tolerance that is >= intersection_tolerance.
- * If t1 and t2 are curve parameters of intersection events
- * and the distance from curve(t) to the surface
- * is <= overlap_tolerance for every t1 <= t <= t2, then the
- * event will be returned as an overlap event.
- *
- * curveA_domain - [in]
- * optional restriction on curveA domain
- *
- * surfaceB_udomain - [in]
- * optional restriction on surfaceB u domain
- *
- * surfaceB_vdomain - [in]
- * optional restriction on surfaceB v domain
- *
- * overlap2d - [out]
- * return the 2D overlap curves on surfaceB. overlap2d[i] is the
- * curve for event x[i].
- *
- * treeA - [in]
- * optional curve tree for curveA, to avoid re-computation
- *
- * treeB - [in]
- * optional surface tree for surfaceB, to avoid re-computation
- *
- * Returns:
- * Number of intersection events appended to x.
+ * @return Number of intersection events appended to x.
*/
extern BREP_EXPORT int
ON_Intersect(const ON_Curve* curveA,
@@ -2040,54 +1981,35 @@
/**
* An overload of ON_Intersect for surface-surface intersection.
+ * Intersect surfaceA with surfaceB.
*
- * Description:
- * Intersect surfaceA with surfaceB.
+ * @param surfaceA [in]
+ * @param surfaceB [in]
+ * @param x [out] Intersection events are appended to this array.
+ * @param intersection_tolerance [in] If the input
+ * intersection_tolerance <= 0.0, then 0.001 is used.
+ * @param overlap_tolerance [in] If positive, then overlap_tolerance
+ * must be >= intersection_tolerance and is used to test for
+ * overlapping regions. If the input overlap_tolerance <= 0.0,
+ * then 2*intersection_tolerance is used.
+ * @param fitting_tolerance [in] If fitting_tolerance is > 0 and
+ * >= intersection_tolerance, then the intersection curves are
+ * fit to this tolerance. If input fitting_tolerance <= 0.0 or
+ * < intersection_tolerance, then intersection_tolerance is used.
+ * @param surfaceA_udomain [in] optional restriction on surfaceA
+ * u domain
+ * @param surfaceA_vdomain [in] optional restriction on surfaceA
+ * v domain
+ * @param surfaceB_udomain [in] optional restriction on surfaceB
+ * u domain
+ * @param surfaceB_vdomain [in] optional restriction on surfaceB
+ * v domain
+ * @param treeA [in] optional surface tree for surfaceA, to avoid
+ * re-computation
+ * @param treeB [in] optional surface tree for surfaceB, to avoid
+ * re-computation
*
- * Parameters:
- * surfaceA - [in]
- *
- * surfaceB - [in]
- *
- * x - [out]
- * Intersection events are appended to this array.
- *
- * intersection_tolerance - [in]
- * If the input intersection_tolerance <= 0.0, then 0.001 is used.
- *
- * overlap_tolerance - [in]
- * If positive, then overlap_tolerance must be
- * >= intersection_tolerance and is used to test for
- * overlapping regions. If the input
- * overlap_tolerance <= 0.0, then 2*intersection_tolerance
- * is used.
- *
- * fitting_tolerance - [in]
- * If fitting_tolerance is > 0 and >= intersection_tolerance,
- * then the intersection curves are fit to this tolerance.
- * If input fitting_tolerance <= 0.0 or < intersection_tolerance,
- * then intersection_tolerance is used.
- *
- * surfaceA_udomain - [in]
- * optional restriction on surfaceA u domain
- *
- * surfaceA_vdomain - [in]
- * optional restriction on surfaceA v domain
- *
- * surfaceB_udomain - [in]
- * optional restriction on surfaceB u domain
- *
- * surfaceB_vdomain - [in]
- * optional restriction on surfaceB v domain
- *
- * treeA - [in]
- * optional surface tree for surfaceA, to avoid re-computation
- *
- * treeB - [in]
- * optional surface tree for surfaceB, to avoid re-computation
- *
- * Returns:
- * Number of intersection events appended to x.
+ * @return Number of intersection events appended to x.
*/
extern BREP_EXPORT int
ON_Intersect(const ON_Surface* surfA,
@@ -2107,15 +2029,10 @@
/**
* Evaluate NURBS boolean operations.
*
- * Parameters:
- *
- * brepO - [out]
- *
- * brepA - [in]
- *
- * brepB - [in]
- *
- * operation - [in]
+ * @param brepO [out]
+ * @param brepA [in]
+ * @param brepB [in]
+ * @param operation [in]
*/
extern BREP_EXPORT int
ON_Boolean(ON_Brep* brepO, const ON_Brep* brepA, const ON_Brep* brepB, int
operation);
@@ -2124,16 +2041,10 @@
/**
* Get the curve segment between param a and param b
*
- * Parameters:
+ * @param in [in] the curve to split
+ * @param a, b [in] either of them can be the larger one
*
- * in - [in]
- * the curve to split
- *
- * a, b - [in]
- * either of them can be the larger one
- *
- * Returns:
- * the result curve segment. NULL for error.
+ * @return the result curve segment. NULL for error.
*/
extern BREP_EXPORT ON_Curve*
sub_curve(ON_Curve* in, double a, double b);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits