SbXfBox3d.h Source File

| http://www.sim.no/ http://www.coin3d.org/

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

SbXfBox3d.h
1 #ifndef COIN_SBXFBOX3D_H
2 #define COIN_SBXFBOX3D_H
3
4 /**************************************************************************\
5 *
6 * This file is part of the Coin 3D visualization library.
7 * Copyright (C) by Kongsberg Oil & Gas Technologies.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * ("GPL") version 2 as published by the Free Software Foundation.
12 * See the file LICENSE.GPL at the root directory of this source
13 * distribution for additional information about the GNU GPL.
14 *
15 * For using Coin with software that can not be combined with the GNU
16 * GPL, and for taking advantage of the additional benefits of our
17 * support services, please contact Kongsberg Oil & Gas Technologies
18 * about acquiring a Coin Professional Edition License.
19 *
20 * See http://www.coin3d.org/ for more information.
21 *
22 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24 *
25 \**************************************************************************/
26
27 #include <Inventor/SbBox3d.h>
28 #include <Inventor/SbDPMatrix.h>
29
30 class COIN_DLL_API SbXfBox3d : public SbBox3d {
31 typedef SbBox3d inherited;
32
33 public:
34 SbXfBox3d(void);
35 SbXfBox3d(const SbVec3d & boxmin, const SbVec3d & boxmax);
36 SbXfBox3d(const SbBox3d & box);
37
38 void setTransform(const SbDPMatrix & matrix);
39
40 const SbDPMatrix & getTransform(void) const { return matrix; }
41 const SbDPMatrix & getInverse(void) const;
42 SbVec3d getCenter(void) const;
43
44 void extendBy(const SbVec3d & pt);
45 void extendBy(const SbBox3d & bb);
46 void extendBy(const SbXfBox3d & bb);
47 SbBool intersect(const SbVec3d & pt) const;
48 SbBool intersect(const SbBox3d & bb) const;
49 SbBool intersect(const SbXfBox3d & bb) const;
50 SbBox3d project(void) const;
51 void getSpan(const SbVec3d & direction, double & dMin, double & dMax) const;
52
53 // Must override the transform() method from SbBox3f, as the box and
54 // the transform matrix are supposed to be kept separate in
55 // SbXfBox3f. --mortene
56 void transform(const SbDPMatrix & matrix);
57
58 // Overridden from SbBox3d
59 double getVolume(void) const;
60
61 private:
62 // These are incorrect for SbXfBox3d. Privatize/hide them.
63 using SbBox3d::getMin;
64 using SbBox3d::getMax;
65
66 void calcInverse(void) const;
67 void makeInvInvalid(void);
68
69 SbDPMatrix matrix;
70 mutable SbDPMatrix invertedmatrix; // lazy cache
71
72 }; // SbXfBox3d
73
74 COIN_DLL_API int operator == (const SbXfBox3d & b1, const SbXfBox3d & b2);
75 COIN_DLL_API int operator != (const SbXfBox3d & b1, const SbXfBox3d & b2);
76
77 #endif // !COIN_SBXFBOX3D_H
SbVec3d
The SbVec3d class is a 3 dimensional vector with double precision floating point coordinates.This vector class provides storage for a 3 dimensional double precision floating point vector aswell as simple floating point arithmetic operations.
Definition: SbVec3d.h:39
SbBox2d::operator!=
int operator!=(const SbBox2d &b1, const SbBox2d &b2)
Definition: SbBox2d.h:92
SbBox3d::getCenter
SbVec3d getCenter(void) const
Definition: SbBox3d.h:81
SbBox2d::operator==
int operator==(const SbBox2d &b1, const SbBox2d &b2)
Definition: SbBox2d.h:88
SbBox3d::getMin
const SbVec3d & getMin(void) const
Definition: SbBox3d.h:61
SbXfBox3d::getTransform
const SbDPMatrix & getTransform(void) const
Definition: SbXfBox3d.h:40
SbBox3d::getSpan
void getSpan(const SbVec3d &dir, double &dmin, double &dmax) const
Definition: SbBox3d.cpp:347
SbBox3d::extendBy
void extendBy(const SbVec3d &pt)
Definition: SbBox3d.cpp:202
SbBox3d
The SbBox3d class is an abstraction for an axis aligned 3 dimensional box.This box abstraction class ...
Definition: SbBox3d.h:37
SbBox3d::getMax
const SbVec3d & getMax(void) const
Definition: SbBox3d.h:63
SbXfBox3d
The SbXfBox3d class is a 3 dimensional box with double precision coordinates and an attached transfor...
Definition: SbXfBox3d.h:30
SbBox3d::intersect
SbBool intersect(const SbVec3d &point) const
Definition: SbBox3d.cpp:242
SbDPMatrix
The SbDPMatrix class is a 4x4 dimensional representation of a double-precision matrix.This class is like the SbMatrix class, but uses double-precision floating point values for its elements. For more class documentation, see SbMatrix.
Definition: SbDPMatrix.h:38
SbBox3d::getVolume
double getVolume(void) const
Definition: SbBox3d.h:73
SbBox3d::transform
void transform(const SbDPMatrix &matrix)
Definition: SbBox3d.cpp:395

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.