http://www.sim.no
http://www.coin3d.org
Main Page
Related Pages
Modules
Classes
Files
File List
include
Inventor
actions
SoGetBoundingBoxAction.h
1
#ifndef COIN_SOGETBOUNDINGBOXACTION_H
2
#define COIN_SOGETBOUNDINGBOXACTION_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/SoAction.h>
28
#include <Inventor/actions/SoSubAction.h>
29
#include <Inventor/SbViewportRegion.h>
30
#include <Inventor/SbBox3f.h>
31
#include <Inventor/SbXfBox3f.h>
32
33
34
class
COIN_DLL_API
SoGetBoundingBoxAction
:
public
SoAction
{
35
typedef
SoAction
inherited
;
36
37
SO_ACTION_HEADER(
SoGetBoundingBoxAction
);
38
39
public
:
40
SoGetBoundingBoxAction
(
const
SbViewportRegion
& vp);
41
virtual
~
SoGetBoundingBoxAction
();
42
43
static
void
initClass
(
void
);
44
45
enum
ResetType
{ TRANSFORM = 0x1, BBOX = 0x2, ALL = TRANSFORM | BBOX };
46
47
void
setViewportRegion(
const
SbViewportRegion
& newregion);
48
const
SbViewportRegion
& getViewportRegion(
void
)
const
;
49
50
SbBox3f
getBoundingBox(
void
)
const
;
51
SbXfBox3f
& getXfBoundingBox(
void
);
52
53
const
SbVec3f
& getCenter(
void
)
const
;
54
55
void
setInCameraSpace(
const
SbBool flag);
56
SbBool isInCameraSpace(
void
)
const
;
57
58
void
setResetPath(
const
SoPath
* path,
const
SbBool resetbefore = TRUE,
59
const
ResetType what = ALL);
60
const
SoPath
* getResetPath(
void
)
const
;
61
SbBool isResetPath(
void
)
const
;
62
SbBool isResetBefore(
void
)
const
;
63
SoGetBoundingBoxAction::ResetType
getWhatReset(
void
)
const
;
64
65
66
void
checkResetBefore(
void
);
67
void
checkResetAfter(
void
);
68
69
void
extendBy(
const
SbBox3f
& box);
70
void
extendBy(
const
SbXfBox3f
& box);
71
72
void
setCenter(
const
SbVec3f
& center,
const
SbBool transformcenter);
73
SbBool isCenterSet(
void
)
const
;
74
void
resetCenter(
void
);
75
76
protected
:
77
virtual
void
beginTraversal
(
SoNode
* node);
78
79
private
:
80
enum
{ CENTER_SET = 0x1, CAMERA_SPACE = 0x2, RESET_BEFORE= 0x4 };
81
82
SbXfBox3f
bbox;
83
SbVec3f
center;
84
SbViewportRegion
vpregion;
85
ResetType resettype;
86
const
SoPath
* resetpath;
87
unsigned
int
flags;
88
};
89
90
#endif // !COIN_SOGETBOUNDINGBOXACTION_H
Copyright © 1998-2007 by
Systems in Motion AS
. All rights reserved.
Generated on Thu Jul 19 2012 for Coin by
Doxygen.
1.8.1.1