VR-Vantage API Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Tutorials
File List
File Members
examples
exampleSimpleAgent
MyObjectClasses.hpp
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2007 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
7
8
#ifndef MyObjectClasses_H_
9
#define MyObjectClasses_H_
10
11
#include <
vrvCore/DtAgent.h
>
12
#include <../examples/exampleSimpleAgent/MyObjectAgent.hpp>
13
14
15
17
class
MyObjectAgentImplementation
:
public
virtual
MyObjectAgent
18
{
19
public
:
21
MyObjectAgentImplementation
();
22
24
virtual
~MyObjectAgentImplementation
();
25
// Load geometry and add it to the scene root.
26
virtual
void
createModel
();
27
28
// Rotate model by degrees.
29
virtual
void
setRotationAngle
(
double
rotationAngleInDegrees);
30
31
32
protected
:
33
virtual
MyObject
*
findObjectAsMyObject
();
34
35
};
36
37
38
39
#include <
vrvCore/DtAgentDefinition.h
>
40
#include "
MyObject.h
"
41
42
43
45
class
MyObjectClassDefinition
:
public
makVrv::DtAgentDefinition
<MyObject>
46
{
47
public
:
49
MyObjectClassDefinition
(
const
std::string&
className
=
"MyObject"
);
50
52
virtual
~MyObjectClassDefinition
();
53
55
enum
FunctionIds
56
{
57
function_createModel
,
58
function_setRotationAngle
,
59
end_FunctionIds
60
};
61
62
};
63
64
65
#include <
vrvCore/DtAgentCreator.h
>
66
#include <
vrvCore/DtAgentFactory.h
>
67
68
69
70
class
MyObjectClassDefinition
;
71
73
class
MyObjectClassesCreator
:
public
makVrv::DtAgentCreator
74
{
75
public
:
76
78
MyObjectClassesCreator
();
79
81
virtual
~MyObjectClassesCreator
();
82
83
static
makVrv::DtAgentCreator
*
create
();
84
86
virtual
makVrv::DtAgent
*
createAgent
(
makVrv::DtAgentManagerInterface
& sceneInterface);
87
89
virtual
makVrv::DtAgentUpdateResolverInterface
*
createResolver
(
makVrv::DtDe
& de,
makVrv::DtUniqueID
id
);
90
91
protected
:
92
MyObjectClassDefinition
*
myDefinition
;
93
94
static
bool
theRegisteredFlag
;
95
static
makVrv::DtAgentFactory::DtAutoUnregistrar
theAutoUnregistrar
;
96
};
97
98
99
100
#endif
101
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)