RigsofRods
Soft-body Physics Simulation
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Functions
_
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
i
k
l
m
n
p
r
s
t
u
v
w
Typedefs
a
c
d
e
f
g
l
m
n
o
p
r
s
t
v
w
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
a
b
c
d
g
h
l
m
n
o
p
r
s
t
v
Enumerator
a
b
c
d
f
g
h
l
m
n
o
r
s
t
v
Related Functions
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
k
o
Macros
_
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
t
x
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
source
main
gameplay
CharacterFactory.h
Go to the documentation of this file.
1
/*
2
This source file is part of Rigs of Rods
3
Copyright 2005-2012 Pierre-Michel Ricordel
4
Copyright 2007-2012 Thomas Fischer
5
Copyright 2013-2018 Petr Ohlidal
6
7
For more information, see http://www.rigsofrods.org/
8
9
Rigs of Rods is free software: you can redistribute it and/or modify
10
it under the terms of the GNU General Public License version 3, as
11
published by the Free Software Foundation.
12
13
Rigs of Rods is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
22
#pragma once
23
24
#include "
Application.h
"
25
26
#include "
Character.h
"
27
#include "
Network.h
"
28
29
#include <memory>
30
31
namespace
RoR
{
32
35
38
39
class
CharacterFactory
40
{
41
public
:
42
CharacterFactory
() {}
43
Character
*
CreateLocalCharacter
();
44
Character
*
GetLocalCharacter
() {
return
m_local_character
.get(); }
45
void
DeleteAllCharacters
();
46
void
UndoRemoteActorCoupling
(
ActorPtr
actor);
47
void
Update
(
float
dt);
48
#ifdef USE_SOCKETW
49
void
handleStreamData
(std::vector<RoR::NetRecvPacket> packet);
50
#endif // USE_SOCKETW
51
52
private
:
53
54
std::unique_ptr<Character>
m_local_character
;
55
std::vector<std::unique_ptr<Character>>
m_remote_characters
;
56
57
void
createRemoteInstance
(
int
sourceid,
int
streamid);
58
void
removeStreamSource
(
int
sourceid);
59
};
60
63
64
}
// namespace RoR
RoR::CharacterFactory::CharacterFactory
CharacterFactory()
Definition:
CharacterFactory.h:42
RoR::CharacterFactory::handleStreamData
void handleStreamData(std::vector< RoR::NetRecvPacket > packet)
Definition:
CharacterFactory.cpp:108
RoR::CharacterFactory::UndoRemoteActorCoupling
void UndoRemoteActorCoupling(ActorPtr actor)
Definition:
CharacterFactory.cpp:90
RoR::CharacterFactory::CreateLocalCharacter
Character * CreateLocalCharacter()
Definition:
CharacterFactory.cpp:32
RoR::CharacterFactory
Definition:
CharacterFactory.h:39
RefCountingObjectPtr< Actor >
RoR::CharacterFactory::removeStreamSource
void removeStreamSource(int sourceid)
Definition:
CharacterFactory.cpp:67
RoR::CharacterFactory::Update
void Update(float dt)
Definition:
CharacterFactory.cpp:80
RoR::Character
Definition:
Character.h:39
Character.h
RoR::CharacterFactory::createRemoteInstance
void createRemoteInstance(int sourceid, int streamid)
Definition:
CharacterFactory.cpp:51
Application.h
Central state/object manager and communications hub.
RoR::CharacterFactory::m_remote_characters
std::vector< std::unique_ptr< Character > > m_remote_characters
Definition:
CharacterFactory.h:55
RoR::CharacterFactory::m_local_character
std::unique_ptr< Character > m_local_character
Definition:
CharacterFactory.h:54
RoR::CharacterFactory::DeleteAllCharacters
void DeleteAllCharacters()
Definition:
CharacterFactory.cpp:101
RoR::CharacterFactory::GetLocalCharacter
Character * GetLocalCharacter()
Definition:
CharacterFactory.h:44
RoR
Definition:
AppContext.h:36
Network.h
Generated by
1.8.17