VR-Forces 4.6 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvOsg
DtIndirectGeoComputeBoundCallback.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2017 VT-MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
#include <osg/Drawable>
13
#include <osg/ComputeBoundsVisitor>
14
15
#include <
vrvUtil/DtVirtualBaseClass.h
>
16
17
#include <
vrvCore/DtDe.h
>
18
19
namespace
makVrv
20
{
26
template
<
class
BoundingBoxProv
id
er>
27
class
DtIndirectGeoComputeBoundCallback
:
public
osg::Drawable::ComputeBoundingBoxCallback
28
{
29
public
:
31
DtIndirectGeoComputeBoundCallback
(BoundingBoxProvider* provider) :
myProvider
(provider) {}
32
34
DtIndirectGeoComputeBoundCallback
(
const
DtIndirectGeoComputeBoundCallback
& rhs,
const
osg::CopyOp& copyop) :
35
osg::
Drawable
::
ComputeBoundingBoxCallback
(rhs, copyop),
36
myProvider
(rhs.
myProvider
) {}
37
39
virtual
void
reset
() { }
41
virtual
osg::BoundingBox
computeBound
(
const
osg::Drawable& drawable)
const
42
{
43
return
myProvider
->boundingBox();
44
}
45
protected
:
46
const
BoundingBoxProvider*
myProvider
;
47
private
:
48
DtIndirectGeoComputeBoundCallback
(){}
49
};
50
52
template
<
class
BoundingBoxProv
id
er>
53
class
DtIndirectGeoComputeBoundCallbackCreator
:
public
DtVirtualBaseClass
54
{
55
public
:
57
DtIndirectGeoComputeBoundCallbackCreator
(
DtDe
&de);
58
60
virtual
~DtIndirectGeoComputeBoundCallbackCreator
();
61
63
virtual
osg::Drawable::ComputeBoundingBoxCallback*
create
(BoundingBoxProvider* provider)
const
;
64
67
static
DtIndirectGeoComputeBoundCallbackCreator
&
instance
(
DtDe
& de);
68
70
static
const
std::string&
theClassName
();
71
protected
:
72
DtDe
&
myDe
;
73
};
74
}
75
76
#include "DtIndirectGeoComputeBoundCallback.inl"
Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)