SbXfBox3f.h Source File

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

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

- File List
- File Members

SbXfBox3f.h
1 #ifndef COIN_SBXFBOX3F_H
2 #define COIN_SBXFBOX3F_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 <stdio.h>
28 #include <Inventor/SbBox3f.h>
29 #include <Inventor/SbMatrix.h>
30
31 class COIN_DLL_API SbXfBox3f : public SbBox3f {
32 typedef SbBox3f inherited;
33
34 public:
35 SbXfBox3f(void);
36 SbXfBox3f(const SbVec3f & boxmin, const SbVec3f & boxmax);
37 SbXfBox3f(const SbBox3f & box);
38 ~SbXfBox3f();
39
40 void setTransform(const SbMatrix & m);
41 const SbMatrix & getTransform(void) const;
42 const SbMatrix & getInverse(void) const;
43 SbVec3f getCenter(void) const;
44 void extendBy(const SbVec3f & pt);
45 void extendBy(const SbBox3f & bb);
46 void extendBy(const SbXfBox3f & bb);
47 SbBool intersect(const SbVec3f & pt) const;
48 SbBool intersect(const SbBox3f & bb) const;
49 SbBool intersect(const SbXfBox3f & bb) const;
50 void getSpan(const SbVec3f & direction, float & dMin, float & dMax) const;
51 SbBox3f project(void) const;
52 friend COIN_DLL_API int operator ==(const SbXfBox3f & b1, const SbXfBox3f & b2);
53 friend COIN_DLL_API int operator !=(const SbXfBox3f & b1, const SbXfBox3f & b2);
54 // Must override the transform() method from SbBox3f, as the box and
55 // the transform matrix are supposed to be kept separate in
56 // SbXfBox3f. --mortene
57 void transform(const SbMatrix & m);
58 // Overridden from SbBox3f
59 float getVolume(void) const;
60
61 void print(FILE * file) const;
62
63 private:
64 // incorrect for SbXfBox3f. Hide them
65 const SbVec3f & getMin(void) const {return SbBox3f::getMin(); }
66 const SbVec3f & getMax(void) const { return SbBox3f::getMax(); }
67
68 void calcInverse(void) const;
69 void makeInvInvalid(void);
70
71 SbMatrix matrix, invertedmatrix;
72 };
73
74 COIN_DLL_API int operator ==(const SbXfBox3f & b1, const SbXfBox3f & b2);
75 COIN_DLL_API int operator !=(const SbXfBox3f & b1, const SbXfBox3f & b2);
76
77 #endif // !COIN_SBXFBOX3F_H
SbBox3f::getMax
const SbVec3f & getMax(void) const
Definition: SbBox3f.h:63
SbBox3f::print
void print(FILE *file) const
Definition: SbBox3f.cpp:425
SbBox3f::getMin
const SbVec3f & getMin(void) const
Definition: SbBox3f.h:61
SbBox3f
The SbBox3f class is an abstraction for an axis aligned 3 dimensional box.This box abstraction class ...
Definition: SbBox3f.h:37
SbBox2d::operator!=
int operator!=(const SbBox2d &b1, const SbBox2d &b2)
Definition: SbBox2d.h:92
SbBox3f::operator!=
int operator!=(const SbBox3f &b1, const SbBox3f &b2)
Definition: SbBox3f.h:106
SbBox3f::getCenter
SbVec3f getCenter(void) const
Definition: SbBox3f.h:81
SbBox2d::operator==
int operator==(const SbBox2d &b1, const SbBox2d &b2)
Definition: SbBox2d.h:88
SbXfBox3f
The SbXfBox3f class is a 3 dimensional box with floating point coordinates and an attached transforma...
Definition: SbXfBox3f.h:31
SbBox3f::getSpan
void getSpan(const SbVec3f &dir, float &dmin, float &dmax) const
Definition: SbBox3f.cpp:347
SbBox3f::getVolume
float getVolume(void) const
Definition: SbBox3f.h:73
SbVec3f
The SbVec3f class is a 3 dimensional vector with floating point coordinates.This vector class is used...
Definition: SbVec3f.h:40
SbMatrix
The SbMatrix class is a 4x4 dimensional representation of a matrix.SbMatrix is used by many other cla...
Definition: SbMatrix.h:37
SbBox3f::intersect
SbBool intersect(const SbVec3f &pt) const
Definition: SbBox3f.cpp:241
SbBox3f::extendBy
void extendBy(const SbVec3f &pt)
Definition: SbBox3f.cpp:201
SbBox3f::transform
void transform(const SbMatrix &matrix)
Definition: SbBox3f.cpp:395
SbBox3f::operator==
int operator==(const SbBox3f &b1, const SbBox3f &b2)
Definition: SbBox3f.h:102

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