49typedef struct _bounding_volume_placeholder {
72 const ON_BoundingBox &node,
82 const ON_BrepFace &get_face()
const;
88 void getLeaves(std::list<const BBNode *> &out_leaves)
const;
91 void addChild(
BBNode *child);
112 void GetBBox(
float *
min,
float *max)
const;
113 void GetBBox(
double *
min,
double *max)
const;
124 bool isTrimmed(
const ON_2dPoint &uv,
const BRNode **closest,
double &closesttrim,
double within_distance_tol)
const;
129 const std::vector<BBNode *> &get_children()
const;
158 void removeChild(
BBNode *child);
159 bool intersectedBy(
const ON_Ray &ray,
double *tnear = NULL,
double *tfar = NULL)
const;
164 bool containsUV(
const ON_2dPoint &uv)
const;
166 void getTrimsAbove(
const ON_2dPoint &uv, std::list<const BRNode *> &out_leaves)
const;
167 const BBNode *closer(
const ON_3dPoint &pt,
const BBNode *left,
const BBNode *right)
const;
170 Stl() : m_children(), m_trims_above() {}
172 std::vector<BBNode *> m_children;
173 std::list<const BRNode *> m_trims_above;
180 if (
LIKELY(child != NULL)) {
181 m_stl->m_children.push_back(child);
186 BBNode::removeChild(
BBNode *child)
188 std::vector<BBNode *>::iterator i;
189 for (i = m_stl->m_children.begin(); i != m_stl->m_children.end();) {
192 i = m_stl->m_children.erase(i);
200 inline const ON_BrepFace &
206 inline const std::vector<BBNode *> &
209 return m_stl->m_children;
215 return m_stl->m_children.empty();
224 max[0] = (
float)
m_node.m_max.x;
225 max[1] = (float)
m_node.m_max.y;
226 max[2] = (
float)
m_node.m_max.z;
void serialize(Serializer &serializer) const
BBNode(Deserializer &deserieralizer, const CurveTree &ctree)
bool isTrimmed(const ON_2dPoint &uv, const BRNode **closest, double &closesttrim, double within_distance_tol) const
const std::vector< BBNode * > & get_children() const
ON_2dPoint getClosestPointEstimate(const ON_3dPoint &pt, ON_Interval &u, ON_Interval &v) const
const CurveTree *const m_ctree
bool intersectsHierarchy(const ON_Ray &ray, std::list< const BBNode * > &results) const
void addChild(BBNode *child)
BBNode(const CurveTree *ct, const ON_BoundingBox &node, const ON_Interval &u, const ON_Interval &v, bool checkTrim, bool trimmed)
void GetBBox(float *min, float *max) const
void getLeaves(std::list< const BBNode * > &out_leaves) const
BBNode(const ON_BoundingBox &node, const CurveTree *ct=NULL)
ON_2dPoint getClosestPointEstimate(const ON_3dPoint &pt) const
const ON_BrepFace & get_face() const
int getLeavesBoundingPoint(const ON_3dPoint &pt, std::list< const BBNode * > &out) const
Header file for the BRL-CAD common definitions.
brlcad::BBNode BrepBoundingVolume
void int char int int double * min
#define LIKELY(expression)