http://www.sim.no
http://www.coin3d.org
Main Page
Related Pages
Modules
Classes
Files
File List
include
Inventor
actions
SoRayPickAction.h
1
#ifndef COIN_SORAYPICKACTION_H
2
#define COIN_SORAYPICKACTION_H
3
4
/**************************************************************************\
5
*
6
* This file is part of the Coin 3D visualization library.
7
* Copyright (C) 1998-2007 by Systems in Motion. All rights reserved.
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 Systems in Motion about acquiring
18
* a Coin Professional Edition License.
19
*
20
* See http://www.coin3d.org/ for more information.
21
*
22
* Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
23
* http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24
*
25
\**************************************************************************/
26
27
#include <Inventor/actions/SoPickAction.h>
28
29
class
SbBox3f
;
30
class
SbLine
;
31
class
SbMatrix
;
32
class
SbVec2f
;
33
class
SbVec2s
;
34
class
SbVec3f
;
35
class
SbViewVolume
;
36
class
SbViewportRegion
;
37
class
SoPickedPoint
;
38
class
SoPickedPointList
;
39
40
class
COIN_DLL_API
SoRayPickAction
:
public
SoPickAction
{
41
typedef
SoPickAction
inherited
;
42
43
SO_ACTION_HEADER(
SoRayPickAction
);
44
45
public
:
46
SoRayPickAction
(
const
SbViewportRegion
& viewportregion);
47
virtual
~
SoRayPickAction
();
48
static
void
initClass
(
void
);
49
50
void
setPoint(
const
SbVec2s
& viewportPoint);
51
void
setNormalizedPoint(
const
SbVec2f
& normpoint);
52
void
setRadius(
const
float
radiusinpixels);
53
void
setRay(
const
SbVec3f
& start,
const
SbVec3f
& direction,
54
float
neardistance = -1.0,
55
float
fardistance = -1.0);
56
void
setPickAll(
const
SbBool flag);
57
SbBool isPickAll(
void
)
const
;
58
const
SoPickedPointList
& getPickedPointList(
void
)
const
;
59
SoPickedPoint
* getPickedPoint(
const
int
index = 0)
const
;
60
61
62
void
computeWorldSpaceRay(
void
);
63
SbBool hasWorldSpaceRay(
void
)
const
;
64
void
setObjectSpace(
void
);
65
void
setObjectSpace(
const
SbMatrix
& matrix);
66
SbBool intersect(
const
SbVec3f
& v0,
const
SbVec3f
& v1,
const
SbVec3f
& v2,
67
SbVec3f
& intersection,
SbVec3f
& barycentric,
68
SbBool & front)
const
;
69
SbBool intersect(
const
SbVec3f
& v0,
const
SbVec3f
& v1,
70
SbVec3f
& intersection)
const
;
71
SbBool intersect(
const
SbVec3f
& point)
const
;
72
SbBool intersect(
const
SbBox3f
& box,
const
SbBool usefullviewvolume = TRUE);
73
SbBool intersect(
const
SbBox3f
& box,
SbVec3f
& intersection,
74
const
SbBool usefullviewvolume = TRUE);
75
const
SbViewVolume
& getViewVolume(
void
);
76
const
SbLine
& getLine(
void
);
77
SbBool isBetweenPlanes(
const
SbVec3f
& intersection)
const
;
78
SoPickedPoint
* addIntersection(
const
SbVec3f
& objectspacepoint);
79
80
void
reset(
void
);
81
82
protected
:
83
virtual
void
beginTraversal
(
SoNode
* node);
84
85
private
:
86
class
SoRayPickActionP * pimpl;
87
};
88
89
#endif // !COIN_SORAYPICKACTION_H
Copyright © 1998-2007 by
Systems in Motion AS
. All rights reserved.
Generated on Wed Jul 25 2012 for Coin by
Doxygen.
1.8.1.1