Panda3D
Loading...
Searching...
No Matches
omniBoundingVolume.cxx
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file omniBoundingVolume.cxx
10 * @author drose
11 * @date 2000-06-22
12 */
13
14#include "omniBoundingVolume.h"
15#include "boundingHexahedron.h"
16#include "config_mathutil.h"
17
18#include <math.h>
19
20TypeHandle OmniBoundingVolume::_type_handle;
21
22/**
23 *
24 */
25BoundingVolume *OmniBoundingVolume::
26make_copy() const {
27 return new OmniBoundingVolume(*this);
28}
29
30/**
31 *
32 */
33LPoint3 OmniBoundingVolume::
34get_approx_center() const {
35 return LPoint3(0.0f, 0.0f, 0.0f);
36}
37
38/**
39 *
40 */
41void OmniBoundingVolume::
42xform(const LMatrix4 &) {
43}
44
45/**
46 *
47 */
48void OmniBoundingVolume::
49output(std::ostream &out) const {
50 out << "omni";
51}
52
53/**
54 *
55 */
56bool OmniBoundingVolume::
57extend_other(BoundingVolume *other) const {
58 other->set_infinite();
59 return true;
60}
61
62/**
63 *
64 */
65bool OmniBoundingVolume::
66around_other(BoundingVolume *other,
67 const BoundingVolume **,
68 const BoundingVolume **) const {
69 other->set_infinite();
70 return true;
71}
72
73/**
74 *
75 */
76int OmniBoundingVolume::
77contains_other(const BoundingVolume *) const {
78 return IF_possible | IF_some | IF_all;
79}
80
81/**
82 *
83 */
84bool OmniBoundingVolume::
85extend_by_point(const LPoint3 &) {
86 return true;
87}
88
89/**
90 *
91 */
92bool OmniBoundingVolume::
93extend_by_sphere(const BoundingSphere *) {
94 return true;
95}
96
97/**
98 *
99 */
100bool OmniBoundingVolume::
101extend_by_box(const BoundingBox *) {
102 return true;
103}
104
105/**
106 *
107 */
108bool OmniBoundingVolume::
109extend_by_hexahedron(const BoundingHexahedron *) {
110 return true;
111}
112
113/**
114 *
115 */
116bool OmniBoundingVolume::
117around_points(const LPoint3 *, const LPoint3 *) {
118 return true;
119}
120
121/**
122 *
123 */
124bool OmniBoundingVolume::
125around_spheres(const BoundingVolume **,
126 const BoundingVolume **) {
127 return true;
128}
129
130/**
131 *
132 */
133bool OmniBoundingVolume::
134around_boxes(const BoundingVolume **,
135 const BoundingVolume **) {
136 return true;
137}
138
139/**
140 *
141 */
142bool OmniBoundingVolume::
143around_hexahedrons(const BoundingVolume **,
144 const BoundingVolume **) {
145 return true;
146}
147
148/**
149 *
150 */
151int OmniBoundingVolume::
152contains_point(const LPoint3 &) const {
153 return IF_possible | IF_some | IF_all;
154}
155
156/**
157 *
158 */
159int OmniBoundingVolume::
160contains_lineseg(const LPoint3 &, const LPoint3 &) const {
161 return IF_possible | IF_some | IF_all;
162}
163
164/**
165 *
166 */
167int OmniBoundingVolume::
168contains_sphere(const BoundingSphere *) const {
169 return IF_possible | IF_some | IF_all;
170}
171
172/**
173 *
174 */
175int OmniBoundingVolume::
176contains_box(const BoundingBox *) const {
177 return IF_possible | IF_some | IF_all;
178}
179
180/**
181 *
182 */
183int OmniBoundingVolume::
184contains_hexahedron(const BoundingHexahedron *) const {
185 return IF_possible | IF_some | IF_all;
186}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An axis-aligned bounding box; that is, a minimum and maximum coordinate triple.
Definition boundingBox.h:29
This defines a bounding convex hexahedron.
This defines a bounding sphere, consisting of a center and a radius.
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
void set_infinite()
Marks the volume as infinite, even if it is normally finite.
This is a special kind of GeometricBoundingVolume that fills all of space.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.