CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
SiBBlock.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24
25#ifndef _SpBBlock_h_Included_
26#define _SpBBlock_h_Included_
27
28#include "TD_PackPush.h"
29
30#include "Ge/GeBoundBlock3d.h"
31
40{
41 protected:
46 protected:
47 void setWcsBasis(bool bNormalIval = true)
52 if (bNormalIval)
53 m_ivals[0] = m_ivals[1] = m_ivals[2].set(0.0, 1.0);
55 }
57 {
58 setWcsBasis(false);
59 m_ivals[0].set(ab.minPoint().x, ab.maxPoint().x);
60 m_ivals[1].set(ab.minPoint().y, ab.maxPoint().y);
61 m_ivals[2].set(ab.minPoint().z, ab.maxPoint().z);
62 }
64 {
65 if (bb.isBox())
67 else
68 {
69 bb.get(m_origin, m_basis[0], m_basis[1], m_basis[2]);
70 m_ivals[0].set(0.0, m_basis[0].normalizeGetLength());
71 m_ivals[1].set(0.0, m_basis[1].normalizeGetLength());
72 m_ivals[2].set(0.0, m_basis[2].normalizeGetLength());
74 }
75 }
76 void setUnclassified(const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, const OdGeVector3d &zAxis)
77 { m_origin = origin; m_basis[0] = xAxis; m_basis[1] = yAxis; m_basis[2] = zAxis;
78 m_ivals[0].set(0.0, m_basis[0].normalizeGetLength());
79 m_ivals[1].set(0.0, m_basis[1].normalizeGetLength());
80 m_ivals[2].set(0.0, m_basis[2].normalizeGetLength());
81 classify();
82 }
83 void classify();
85 {
86 m_type = (OdZero(m_basis[0].dotProduct(m_basis[1])) && OdZero(m_basis[0].dotProduct(m_basis[2])) &&
88 }
90 OdGeVector3d &xNorm, OdGeVector3d &yNorm, OdGeVector3d &zNorm) const
91 {
92 minPoint = OdGePoint3d::kOrigin + m_basis[0] * m_ivals[0].x + m_basis[1] * m_ivals[1].x + m_basis[2] * m_ivals[2].x;
93 maxPoint = OdGePoint3d::kOrigin + m_basis[0] * m_ivals[0].y + m_basis[1] * m_ivals[1].y + m_basis[2] * m_ivals[2].y;
94 xNorm = m_basis[1].crossProduct(m_basis[2]);
95 yNorm = m_basis[2].crossProduct(m_basis[0]);
96 zNorm = m_basis[0].crossProduct(m_basis[1]);
97 }
98 bool intersectPoint(const OdGePoint3d &pt, const OdGeVector3d &planeNormal, double planeDist, double tol) const
99 {
100 return planeNormal.x * (pt.x - m_origin.x) + planeNormal.y * (pt.y - m_origin.y) + planeNormal.z * (pt.z - m_origin.z) + planeDist >= -tol;
101 }
102 bool intersectPlane(const OdGePoint3d &minPt, const OdGePoint3d &maxPt, const OdGeVector3d &planeNormal, double planeDist, double tol) const
103 {
104 const OdGePoint3d pt((planeNormal[0] > 0.0) ? maxPt.x : minPt.x,
105 (planeNormal[1] > 0.0) ? maxPt.y : minPt.y,
106 (planeNormal[2] > 0.0) ? maxPt.z : minPt.z);
107 return planeNormal.x * (pt.x - m_origin.x) + planeNormal.y * (pt.y - m_origin.y) + planeNormal.z * (pt.z - m_origin.z) + planeDist >= -tol;
108 }
109 bool intersectPlaneBk(const OdGeVector3d &planeNormal, double planeDist, double tol) const
110 {
111 const OdGePoint3d pt = m_origin + m_basis[0] * ((planeNormal.dotProduct(m_basis[0]) > 0.0) ? m_ivals[0].y : m_ivals[0].x) +
112 m_basis[1] * ((planeNormal.dotProduct(m_basis[1]) > 0.0) ? m_ivals[1].y : m_ivals[1].x) +
113 m_basis[2] * ((planeNormal.dotProduct(m_basis[2]) > 0.0) ? m_ivals[2].y : m_ivals[2].x);
114 return planeNormal.x * pt.x + planeNormal.y * pt.y + planeNormal.z * pt.z + planeDist >= -tol;
115 }
116 public:
121
129
137
146
156 OdSiBoundBlock3d(const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, const OdGeVector3d &zAxis)
157 { setUnclassified(origin, xAxis, yAxis, zAxis); }
158
164 void set(const OdGeExtents3d &ab) { setGeExtents(ab); }
165
171 void set(const OdGeBoundBlock3d &bb) { setGeBoundBlock(bb); }
172
179 void set(const OdGePoint3d &p1, const OdGePoint3d &p2) { setGeExtents(OdGeExtents3d(p1, p2)); }
180
189 void set(const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, const OdGeVector3d &zAxis)
190 { setUnclassified(origin, xAxis, yAxis, zAxis); }
191
200 void get(OdGePoint3d &origin, OdGeVector3d &xAxis, OdGeVector3d &yAxis, OdGeVector3d &zAxis) const
201 {
202 origin = m_origin + m_basis[0] * m_ivals[0].x + m_basis[1] * m_ivals[1].x + m_basis[2] * m_ivals[2].x;
203 xAxis = m_basis[0] * (m_ivals[0].y - m_ivals[0].x);
204 yAxis = m_basis[1] * (m_ivals[1].y - m_ivals[1].x);
205 zAxis = m_basis[2] * (m_ivals[2].y - m_ivals[2].x);
206 }
207
214 {
215 m_origin.transformBy(tm);
216 m_basis[0].transformBy(tm);
217 m_basis[1].transformBy(tm);
218 m_basis[2].transformBy(tm);
219 // Normalize basis
220 const double xScale = m_basis[0].normalizeGetLength();
221 const double yScale = m_basis[1].normalizeGetLength();
222 const double zScale = m_basis[2].normalizeGetLength();
223 m_ivals[0] *= xScale; m_ivals[1] *= yScale; m_ivals[2] *= zScale;
224 // Classify
225 classify();
226 }
227
237 bool isDisjoint(const OdGeExtents3d &exts, const OdGeTol &tolerance = OdGeContext::gTol) const;
238
248 bool contains(const OdGeExtents3d &exts, const OdGeTol &tolerance = OdGeContext::gTol) const;
249
259 bool contains(const OdGePoint3d &pt, const OdGeTol &tolerance = OdGeContext::gTol) const;
260
267 OdGePoint3d minPoint() const;
268
275 OdGePoint3d maxPoint() const;
276
283 void getMinMaxPoints(OdGePoint3d &p1, OdGePoint3d &p2) const { p1 = minPoint(); p2 = maxPoint(); }
284
290 void extents(OdGeExtents3d &exts) const { exts.set(minPoint(), maxPoint()); }
291
292 bool isBox() const { return m_type == BasisType::kWcs; }
293 bool isOrtho() const { return m_type <= BasisType::kOrtho; }
294};
295
297{
298 enum { kXAlign = (1 << 0), kYAlign = (1 << 1), kZAlign = (1 << 2), kXOrtho = (1 << 3), kYOrtho = (1 << 4), kZOrtho = (1 << 5) };
299#define CheckFlags(flags) ((classFlags & (flags)) == (flags))
300 OdUInt16 classFlags = 0;
301 // #CORE-20086 : Old calculations doesn't include real extents in vector, so we could cause large offsets potentially.
302 //if (OdEqual(m_basis[0].x, 1.0)) SETBIT_1(classFlags, kXAlign); if (OdEqual(m_basis[1].y, 1.0)) SETBIT_1(classFlags, kYAlign); if (OdEqual(m_basis[2].z, 1.0)) SETBIT_1(classFlags, kZAlign);
303 //if (GETBIT(classFlags, kXAlign) || OdEqual(fabs(m_basis[0].x), 1.0) || OdEqual(fabs(m_basis[0].y), 1.0) || OdEqual(fabs(m_basis[0].z), 1.0)) SETBIT_1(classFlags, kXOrtho);
304 //if (GETBIT(classFlags, kYAlign) || OdEqual(fabs(m_basis[1].x), 1.0) || OdEqual(fabs(m_basis[1].y), 1.0) || OdEqual(fabs(m_basis[1].z), 1.0)) SETBIT_1(classFlags, kYOrtho);
305 //if (GETBIT(classFlags, kZAlign) || OdEqual(fabs(m_basis[2].x), 1.0) || OdEqual(fabs(m_basis[2].y), 1.0) || OdEqual(fabs(m_basis[2].z), 1.0)) SETBIT_1(classFlags, kZOrtho);
306 const OdGeVector3d cpBasisX = m_basis[0] * (fabs(m_origin.x) + odmax(fabs(m_ivals[0].x), fabs(m_ivals[0].y))),
307 cpBasisY = m_basis[1] * (fabs(m_origin.y) + odmax(fabs(m_ivals[1].x), fabs(m_ivals[1].y))),
308 cpBasisZ = m_basis[2] * (fabs(m_origin.z) + odmax(fabs(m_ivals[2].x), fabs(m_ivals[2].y)));
309 enum { kXZeroX = (1 << 6), kXZeroY = (1 << 7), kXZeroZ = (1 << 8), kYZeroX = (1 << 9), kYZeroY = (1 << 10), kYZeroZ = (1 << 11), kZZeroX = (1 << 12), kZZeroY = (1 << 13), kZZeroZ = (1 << 14) };
310 if (OdZero(cpBasisX.x)) SETBIT_1(classFlags, kXZeroX); if (OdZero(cpBasisX.y)) SETBIT_1(classFlags, kXZeroY); if (OdZero(cpBasisX.z)) SETBIT_1(classFlags, kXZeroZ);
311 if (OdZero(cpBasisY.x)) SETBIT_1(classFlags, kYZeroX); if (OdZero(cpBasisY.y)) SETBIT_1(classFlags, kYZeroY); if (OdZero(cpBasisY.z)) SETBIT_1(classFlags, kYZeroZ);
312 if (OdZero(cpBasisZ.x)) SETBIT_1(classFlags, kZZeroX); if (OdZero(cpBasisZ.y)) SETBIT_1(classFlags, kZZeroY); if (OdZero(cpBasisZ.z)) SETBIT_1(classFlags, kZZeroZ);
313 if (cpBasisX.x > 0.0 && CheckFlags(kXZeroY | kXZeroZ)) SETBIT_1(classFlags, kXAlign);
314 if (cpBasisY.y > 0.0 && CheckFlags(kYZeroX | kYZeroZ)) SETBIT_1(classFlags, kYAlign);
315 if (cpBasisZ.z > 0.0 && CheckFlags(kZZeroX | kZZeroY)) SETBIT_1(classFlags, kZAlign);
316 if (GETBIT(classFlags, kXAlign) || CheckFlags(kXZeroY | kXZeroZ) || CheckFlags(kXZeroX | kXZeroZ) || CheckFlags(kXZeroX | kXZeroY)) SETBIT_1(classFlags, kXOrtho);
317 if (GETBIT(classFlags, kYAlign) || CheckFlags(kYZeroY | kYZeroZ) || CheckFlags(kYZeroX | kYZeroZ) || CheckFlags(kYZeroX | kYZeroY)) SETBIT_1(classFlags, kYOrtho);
318 if (GETBIT(classFlags, kZAlign) || CheckFlags(kZZeroY | kZZeroZ) || CheckFlags(kZZeroX | kZZeroZ) || CheckFlags(kZZeroX | kZZeroY)) SETBIT_1(classFlags, kZOrtho);
319 // Apply type
320 if (CheckFlags(kXAlign | kYAlign | kZAlign))
321 {
322 m_ivals[0].x += m_origin.x; m_ivals[0].y += m_origin.x;
323 m_ivals[1].x += m_origin.y; m_ivals[1].y += m_origin.y;
324 m_ivals[2].x += m_origin.z; m_ivals[2].y += m_origin.z;
326 }
327 else if (CheckFlags(kXOrtho | kYOrtho | kZOrtho))
328 {
329 const OdGePoint3d ptMin = OdGePoint3d::kOrigin + m_basis[0] * m_ivals[0].x + m_basis[1] * m_ivals[1].x + m_basis[2] * m_ivals[2].x;
330 const OdGePoint3d ptMax = OdGePoint3d::kOrigin + m_basis[0] * m_ivals[0].y + m_basis[1] * m_ivals[1].y + m_basis[2] * m_ivals[2].y;
331 const OdGePoint3d origin = m_origin;
332 setWcsBasis(false);
333 m_ivals[0].set(origin.x + odmin(ptMin.x, ptMax.x), origin.x + odmax(ptMin.x, ptMax.x));
334 m_ivals[1].set(origin.y + odmin(ptMin.y, ptMax.y), origin.y + odmax(ptMin.y, ptMax.y));
335 m_ivals[2].set(origin.z + odmin(ptMin.z, ptMax.z), origin.z + odmax(ptMin.z, ptMax.z));
336 }
337 else
339#undef CheckFlags
340}
341
342inline bool OdSiBoundBlock3d::isDisjoint(const OdGeExtents3d &exts, const OdGeTol &tolerance) const
343{ const double tol = tolerance.equalPoint();
344 if (isBox())
345 return (exts.minPoint().x - tol) > m_ivals[0].y || (exts.minPoint().y - tol) > m_ivals[1].y ||
346 (exts.minPoint().z - tol) > m_ivals[2].y || m_ivals[0].x > (exts.maxPoint().x + tol) ||
347 m_ivals[1].x > (exts.maxPoint().y + tol) || m_ivals[2].x > (exts.maxPoint().z + tol);
348 else
349 {
350 if (isOrtho())
351 {
352 if (!intersectPlane(exts.minPoint(), exts.maxPoint(), m_basis[0], -m_ivals[0].x, tol)) // Left
353 return true;
354 if (!intersectPlane(exts.minPoint(), exts.maxPoint(), -m_basis[0], m_ivals[0].y, tol)) // Right
355 return true;
356 if (!intersectPlane(exts.minPoint(), exts.maxPoint(), m_basis[1], -m_ivals[1].x, tol)) // Top
357 return true;
358 if (!intersectPlane(exts.minPoint(), exts.maxPoint(), -m_basis[1], m_ivals[1].y, tol)) // Bottom
359 return true;
360 if (!intersectPlane(exts.minPoint(), exts.maxPoint(), m_basis[2], -m_ivals[2].x, tol)) // Front
361 return true;
362 if (!intersectPlane(exts.minPoint(), exts.maxPoint(), -m_basis[2], m_ivals[2].y, tol)) // Back
363 return true;
364 }
365 else
366 { OdGePoint3d minPoint, maxPoint; OdGeVector3d xNorm, yNorm, zNorm;
367 getInternalArbitraryBasis(minPoint, maxPoint, xNorm, yNorm, zNorm);
368 if (!intersectPlane(exts.minPoint(), exts.maxPoint(), xNorm, -(xNorm.dotProduct(minPoint.asVector())), tol)) // Left
369 return true;
370 if (!intersectPlane(exts.minPoint(), exts.maxPoint(), -xNorm, (xNorm.dotProduct(maxPoint.asVector())), tol)) // Right
371 return true;
372 if (!intersectPlane(exts.minPoint(), exts.maxPoint(), yNorm, -(yNorm.dotProduct(minPoint.asVector())), tol)) // Top
373 return true;
374 if (!intersectPlane(exts.minPoint(), exts.maxPoint(), -yNorm, (yNorm.dotProduct(maxPoint.asVector())), tol)) // Bottom
375 return true;
376 if (!intersectPlane(exts.minPoint(), exts.maxPoint(), zNorm, -(zNorm.dotProduct(minPoint.asVector())), tol)) // Front
377 return true;
378 if (!intersectPlane(exts.minPoint(), exts.maxPoint(), -zNorm, (zNorm.dotProduct(maxPoint.asVector())), tol)) // Back
379 return true;
380 }
381 // If passed for OBB, run same test for AABB. If we have at least one separating axis - objects is disjoint.
382 if (!intersectPlaneBk(OdGeVector3d::kXAxis, -exts.minPoint().x, tol)) // Left
383 return true;
384 if (!intersectPlaneBk(-OdGeVector3d::kXAxis, exts.maxPoint().x, tol)) // Right
385 return true;
386 if (!intersectPlaneBk(OdGeVector3d::kYAxis, -exts.minPoint().y, tol)) // Top
387 return true;
388 if (!intersectPlaneBk(-OdGeVector3d::kYAxis, exts.maxPoint().y, tol)) // Bottom
389 return true;
390 if (!intersectPlaneBk(OdGeVector3d::kZAxis, -exts.minPoint().z, tol)) // Front
391 return true;
392 if (!intersectPlaneBk(-OdGeVector3d::kZAxis, exts.maxPoint().z, tol)) // Back
393 return true;
394 return false;
395 }
396}
397
398inline bool OdSiBoundBlock3d::contains(const OdGeExtents3d &exts, const OdGeTol &tolerance) const
399{ const double tol = tolerance.equalPoint();
400 if (isBox())
401 return ((exts.minPoint().x + tol) >= m_ivals[0].x && (exts.minPoint().y + tol) >= m_ivals[1].x &&
402 (exts.minPoint().z + tol) >= m_ivals[2].x && m_ivals[0].y >= (exts.maxPoint().x - tol) &&
403 m_ivals[1].y >= (exts.maxPoint().y - tol) && m_ivals[2].y >= (exts.maxPoint().z - tol));
404 else if (isOrtho())
405 return intersectPlane(exts.maxPoint(), exts.minPoint(), m_basis[0], -m_ivals[0].x, tol) && // Left
406 intersectPlane(exts.maxPoint(), exts.minPoint(), -m_basis[0], m_ivals[0].y, tol) && // Right
407 intersectPlane(exts.maxPoint(), exts.minPoint(), m_basis[1], -m_ivals[1].x, tol) && // Top
408 intersectPlane(exts.maxPoint(), exts.minPoint(), -m_basis[1], m_ivals[1].y, tol) && // Bottom
409 intersectPlane(exts.maxPoint(), exts.minPoint(), m_basis[2], -m_ivals[2].x, tol) && // Front
410 intersectPlane(exts.maxPoint(), exts.minPoint(), -m_basis[2], m_ivals[2].y, tol); // Back
411 else
412 { OdGePoint3d minPoint, maxPoint; OdGeVector3d xNorm, yNorm, zNorm;
413 getInternalArbitraryBasis(minPoint, maxPoint, xNorm, yNorm, zNorm);
414 return intersectPlane(exts.maxPoint(), exts.minPoint(), xNorm, -(xNorm.dotProduct(minPoint.asVector())), tol) && // Left
415 intersectPlane(exts.maxPoint(), exts.minPoint(), -xNorm, (xNorm.dotProduct(maxPoint.asVector())), tol) && // Right
416 intersectPlane(exts.maxPoint(), exts.minPoint(), yNorm, -(yNorm.dotProduct(minPoint.asVector())), tol) && // Top
417 intersectPlane(exts.maxPoint(), exts.minPoint(), -yNorm, (yNorm.dotProduct(maxPoint.asVector())), tol) && // Bottom
418 intersectPlane(exts.maxPoint(), exts.minPoint(), zNorm, -(zNorm.dotProduct(minPoint.asVector())), tol) && // Front
419 intersectPlane(exts.maxPoint(), exts.minPoint(), -zNorm, (zNorm.dotProduct(maxPoint.asVector())), tol); // Back
420 }
421}
422
423inline bool OdSiBoundBlock3d::contains(const OdGePoint3d &pt, const OdGeTol &tolerance) const
424{ const double tol = tolerance.equalPoint();
425 if (isBox())
426 return (pt.x + tol) >= m_ivals[0].x && (pt.y + tol) >= m_ivals[1].x &&
427 (pt.z + tol) >= m_ivals[2].x && m_ivals[0].y >= (pt.x - tol) &&
428 m_ivals[1].y >= (pt.y - tol) && m_ivals[2].y >= (pt.z - tol);
429 else if (isOrtho())
430 return intersectPoint(pt, m_basis[0], -m_ivals[0].x, tol) && // Left
431 intersectPoint(pt, -m_basis[0], m_ivals[0].y, tol) && // Right
432 intersectPoint(pt, m_basis[1], -m_ivals[1].x, tol) && // Top
433 intersectPoint(pt, -m_basis[1], m_ivals[1].y, tol) && // Bottom
434 intersectPoint(pt, m_basis[2], -m_ivals[2].x, tol) && // Front
435 intersectPoint(pt, -m_basis[2], m_ivals[2].y, tol); // Back
436 else
437 { OdGePoint3d minPoint, maxPoint; OdGeVector3d xNorm, yNorm, zNorm;
438 getInternalArbitraryBasis(minPoint, maxPoint, xNorm, yNorm, zNorm);
439 return intersectPoint(pt, xNorm, -(xNorm.dotProduct(minPoint.asVector())), tol) && // Left
440 intersectPoint(pt, -xNorm, (xNorm.dotProduct(maxPoint.asVector())), tol) && // Right
441 intersectPoint(pt, yNorm, -(yNorm.dotProduct(minPoint.asVector())), tol) && // Top
442 intersectPoint(pt, -yNorm, (yNorm.dotProduct(maxPoint.asVector())), tol) && // Bottom
443 intersectPoint(pt, zNorm, -(zNorm.dotProduct(minPoint.asVector())), tol) && // Front
444 intersectPoint(pt, -zNorm, (zNorm.dotProduct(maxPoint.asVector())), tol); // Back
445 }
446}
447
449{
450 if (isBox())
451 return OdGePoint3d(m_ivals[0].x, m_ivals[1].x, m_ivals[2].x);
452 else
453 return OdGePoint3d(m_origin.x + m_basis[0].x * ((m_basis[0].x > 0.0) ? m_ivals[0].x : m_ivals[0].y) +
454 m_basis[1].x * ((m_basis[1].x > 0.0) ? m_ivals[1].x : m_ivals[1].y) +
455 m_basis[2].x * ((m_basis[2].x > 0.0) ? m_ivals[2].x : m_ivals[2].y),
456 m_origin.y + m_basis[0].y * ((m_basis[0].y > 0.0) ? m_ivals[0].x : m_ivals[0].y) +
457 m_basis[1].y * ((m_basis[1].y > 0.0) ? m_ivals[1].x : m_ivals[1].y) +
458 m_basis[2].y * ((m_basis[2].y > 0.0) ? m_ivals[2].x : m_ivals[2].y),
459 m_origin.z + m_basis[0].z * ((m_basis[0].z > 0.0) ? m_ivals[0].x : m_ivals[0].y) +
460 m_basis[1].z * ((m_basis[1].z > 0.0) ? m_ivals[1].x : m_ivals[1].y) +
461 m_basis[2].z * ((m_basis[2].z > 0.0) ? m_ivals[2].x : m_ivals[2].y));
462}
463
465{
466 if (isBox())
467 return OdGePoint3d(m_ivals[0].y, m_ivals[1].y, m_ivals[2].y);
468 else
469 return OdGePoint3d(m_origin.x + m_basis[0].x * ((m_basis[0].x > 0.0) ? m_ivals[0].y : m_ivals[0].x) +
470 m_basis[1].x * ((m_basis[1].x > 0.0) ? m_ivals[1].y : m_ivals[1].x) +
471 m_basis[2].x * ((m_basis[2].x > 0.0) ? m_ivals[2].y : m_ivals[2].x),
472 m_origin.y + m_basis[0].y * ((m_basis[0].y > 0.0) ? m_ivals[0].y : m_ivals[0].x) +
473 m_basis[1].y * ((m_basis[1].y > 0.0) ? m_ivals[1].y : m_ivals[1].x) +
474 m_basis[2].y * ((m_basis[2].y > 0.0) ? m_ivals[2].y : m_ivals[2].x),
475 m_origin.z + m_basis[0].z * ((m_basis[0].z > 0.0) ? m_ivals[0].y : m_ivals[0].x) +
476 m_basis[1].z * ((m_basis[1].z > 0.0) ? m_ivals[1].y : m_ivals[1].x) +
477 m_basis[2].z * ((m_basis[2].z > 0.0) ? m_ivals[2].y : m_ivals[2].x));
478}
479
480#include "TD_PackPop.h"
481
482#endif // _SpBBlock_h_Included_
tol
tm
ODRX_CONSTEXPR const T & odmin(const T &a, const T &b)
Definition OdPlatform.h:64
ODRX_CONSTEXPR const T & odmax(const T &a, const T &b)
Definition OdPlatform.h:38
unsigned short OdUInt16
bool OdZero(double x, double tol=1.e-10)
Definition OdaDefs.h:532
#define GETBIT(flags, bit)
Definition OdaDefs.h:517
#define SETBIT_1(flags, bit)
Definition OdaDefs.h:520
#define CheckFlags(flags)
OdGePoint3d maxPoint() const
bool isBox() const
void get(OdGePoint3d &base, OdGeVector3d &side1, OdGeVector3d &side2, OdGeVector3d &side3) const
OdGePoint3d minPoint() const
void set(const OdGePoint3d &min, const OdGePoint3d &max)
const OdGePoint3d & maxPoint() const
const OdGePoint3d & minPoint() const
static GE_STATIC_EXPORT const OdGePoint3d kOrigin
Definition GePoint3d.h:106
double equalPoint() const
Definition GeTol.h:76
static GE_STATIC_EXPORT const OdGeVector3d kZAxis
Definition GeVector3d.h:103
double dotProduct(const OdGeVector3d &vect) const
Definition GeVector3d.h:586
static GE_STATIC_EXPORT const OdGeVector3d kYAxis
Definition GeVector3d.h:102
static GE_STATIC_EXPORT const OdGeVector3d kXAxis
Definition GeVector3d.h:101
void setGeBoundBlock(const OdGeBoundBlock3d &bb)
Definition SiBBlock.h:63
bool isDisjoint(const OdGeExtents3d &exts, const OdGeTol &tolerance=OdGeContext::gTol) const
Definition SiBBlock.h:342
bool isOrtho() const
Definition SiBBlock.h:293
void set(const OdGeBoundBlock3d &bb)
Definition SiBBlock.h:171
OdSiBoundBlock3d(const OdGePoint3d &p1, const OdGePoint3d &p2)
Definition SiBBlock.h:145
bool intersectPlane(const OdGePoint3d &minPt, const OdGePoint3d &maxPt, const OdGeVector3d &planeNormal, double planeDist, double tol) const
Definition SiBBlock.h:102
void getMinMaxPoints(OdGePoint3d &p1, OdGePoint3d &p2) const
Definition SiBBlock.h:283
OdSiBoundBlock3d(const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, const OdGeVector3d &zAxis)
Definition SiBBlock.h:156
void transformBy(const OdGeMatrix3d &tm)
Definition SiBBlock.h:213
OdGeVector2d m_ivals[3]
Definition SiBBlock.h:44
bool contains(const OdGeExtents3d &exts, const OdGeTol &tolerance=OdGeContext::gTol) const
Definition SiBBlock.h:398
OdGePoint3d m_origin
Definition SiBBlock.h:42
OdSiBoundBlock3d(const OdGeExtents3d &ab)
Definition SiBBlock.h:128
OdSiBoundBlock3d(const OdGeBoundBlock3d &bb)
Definition SiBBlock.h:136
OdGePoint3d maxPoint() const
Definition SiBBlock.h:464
void subClassifyArbitrary()
Definition SiBBlock.h:84
void extents(OdGeExtents3d &exts) const
Definition SiBBlock.h:290
void setGeExtents(const OdGeExtents3d &ab)
Definition SiBBlock.h:56
void setWcsBasis(bool bNormalIval=true)
Definition SiBBlock.h:47
OdGeVector3d m_basis[3]
Definition SiBBlock.h:43
void set(const OdGePoint3d &p1, const OdGePoint3d &p2)
Definition SiBBlock.h:179
bool intersectPlaneBk(const OdGeVector3d &planeNormal, double planeDist, double tol) const
Definition SiBBlock.h:109
void set(const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, const OdGeVector3d &zAxis)
Definition SiBBlock.h:189
void setUnclassified(const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, const OdGeVector3d &zAxis)
Definition SiBBlock.h:76
OdGePoint3d minPoint() const
Definition SiBBlock.h:448
void set(const OdGeExtents3d &ab)
Definition SiBBlock.h:164
void getInternalArbitraryBasis(OdGePoint3d &minPoint, OdGePoint3d &maxPoint, OdGeVector3d &xNorm, OdGeVector3d &yNorm, OdGeVector3d &zNorm) const
Definition SiBBlock.h:89
enum OdSiBoundBlock3d::BasisType m_type
bool intersectPoint(const OdGePoint3d &pt, const OdGeVector3d &planeNormal, double planeDist, double tol) const
Definition SiBBlock.h:98
bool isBox() const
Definition SiBBlock.h:292
void get(OdGePoint3d &origin, OdGeVector3d &xAxis, OdGeVector3d &yAxis, OdGeVector3d &zAxis) const
Definition SiBBlock.h:200
GLfloat GLfloat GLfloat z
Definition gles2_ext.h:318
GLfloat x
Definition gles2_ext.h:314
GLfloat GLfloat y
Definition gles2_ext.h:316
static GE_STATIC_EXPORT OdGeTol gTol
Definition GeGbl.h:67