Coin Logo http://www.sim.no/
http://www.coin3d.org/

SbDPPlane.h
1 #ifndef COIN_SBDPPLANE_H
2 #define COIN_SBDPPLANE_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 
29 #include <Inventor/SbVec3d.h>
30 
31 class SbDPLine;
32 class SbDPMatrix;
33 
34 class COIN_DLL_API SbDPPlane {
35 public:
36  SbDPPlane(void);
37  SbDPPlane(const SbVec3d & normal, const double D);
38  SbDPPlane(const SbVec3d & p0, const SbVec3d & p1, const SbVec3d & p2);
39  SbDPPlane(const SbVec3d & normal, const SbVec3d & point);
40 
41  void offset(const double d);
42  SbBool intersect(const SbDPLine & l, SbVec3d & intersection) const;
43  void transform(const SbDPMatrix & matrix);
44  SbBool isInHalfSpace(const SbVec3d & point) const;
45  double getDistance(const SbVec3d & point) const;
46  const SbVec3d & getNormal(void) const;
47  double getDistanceFromOrigin(void) const;
48  friend COIN_DLL_API int operator ==(const SbDPPlane & p1, const SbDPPlane & p2);
49  friend COIN_DLL_API int operator !=(const SbDPPlane & p1, const SbDPPlane & p2);
50 
51  void print(FILE * file) const;
52 
53  SbBool intersect(const SbDPPlane & pl, SbDPLine & line) const;
54 
55 private:
56  SbVec3d normal;
57  double distance;
58 };
59 
60 COIN_DLL_API int operator ==(const SbDPPlane & p1, const SbDPPlane & p2);
61 COIN_DLL_API int operator !=(const SbDPPlane & p1, const SbDPPlane & p2);
62 
63 #endif // !COIN_SBPLANE_H
The SbDPLine class represents a line in 3D space.SbDPLine is used by many other classes in Coin...
Definition: SbDPLine.h:32
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
int operator!=(const SbBox2d &b1, const SbBox2d &b2)
Definition: SbBox2d.h:92
int operator==(const SbBox2d &b1, const SbBox2d &b2)
Definition: SbBox2d.h:88
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

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

Generated for Coin by Doxygen 1.8.14.