CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
SiShapeBoundPlane.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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-2022 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#ifndef _SiShapeBoundedPlane_h_Included_
25#define _SiShapeBoundedPlane_h_Included_
26
27#include "Ge/GePlane.h"
28#include "Ge/GeExtents3d.h"
29#include "Ge/GeBoundBlock3d.h"
30#include "Si/SiSpatialIndex.h"
31#include "Si/SiShapePlane.h"
32
33#include "TD_PackPush.h"
34
42{
45
53 OdSiShapeBoundPlane( const OdGePoint3d& origin, const OdGeVector3d& planeNormal, const OdGeExtents3d& bounds ) :
54 OdSiShapePlane(origin, planeNormal)
55 {
56 m_bounds = bounds;
57 }
58
65 OdSiShapeBoundPlane( const OdGePlane& plane, const OdGeExtents3d& bounds) :
66 OdSiShapePlane(plane)
67 {
68 m_bounds = bounds;
69 }
70
80 bool contains(const OdGeExtents3d& extents, bool planar, const OdGeTol& tol) const
81 {
82 return false;
83 }
84
94 bool intersects(const OdGeExtents3d& extents, bool planar, const OdGeTol& tol) const
95 {
96 if (m_bounds.isDisjoint(extents, tol))
97 return false;
98
99 if (!OdSiShapePlane::intersects(extents, planar, tol))
100 return false;
101
102 return true;
103 }
104
111
117 virtual void transform(const OdGeMatrix3d& tf)
118 {
121 }
122};
123
124#include "TD_PackPop.h"
125
126#endif
tol
Definition: DimVarDefs.h:2287
bool isDisjoint(const OdGeExtents3d &extents, const OdGeTol &tol=OdGeContext::gTol) const
Definition: GeExtents3d.h:545
void transformBy(const OdGeMatrix3d &xfm)
Definition: GeTol.h:49
OdGeExtents3d m_bounds
virtual void transform(const OdGeMatrix3d &tf)
OdSiShapeBoundPlane(const OdGePoint3d &origin, const OdGeVector3d &planeNormal, const OdGeExtents3d &bounds)
virtual OdSiShape * clone() const
bool contains(const OdGeExtents3d &extents, bool planar, const OdGeTol &tol) const
OdSiShapeBoundPlane(const OdGePlane &plane, const OdGeExtents3d &bounds)
bool intersects(const OdGeExtents3d &extents, bool planar, const OdGeTol &tol) const
bool intersects(const OdGeExtents3d &extents, bool planar, const OdGeTol &tol) const
Definition: SiShapePlane.h:58
virtual void transform(const OdGeMatrix3d &tf)
Definition: SiShapePlane.h:126
OdGeVector3d m_planeNormal
Definition: SiShapePlane.h:42
OdGePoint3d m_pointOnPlane
Definition: SiShapePlane.h:41