Panda3D
panda
src
bullet
bulletGhostNode.h
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file bulletGhostNode.h
10
* @author enn0x
11
* @date 2010-11-19
12
*/
13
14
#ifndef __BULLET_GHOST_NODE_H__
15
#define __BULLET_GHOST_NODE_H__
16
17
#include "
pandabase.h
"
18
19
#include "
bullet_includes.h
"
20
#include "
bullet_utils.h
"
21
#include "
bulletBodyNode.h
"
22
23
#include "
pandaNode.h
"
24
#include "
collideMask.h
"
25
26
class
BulletShape
;
27
28
/**
29
*
30
*/
31
class
EXPCL_PANDABULLET
BulletGhostNode
:
public
BulletBodyNode
{
32
PUBLISHED:
33
explicit
BulletGhostNode
(
const
char
*name=
"ghost"
);
34
INLINE ~
BulletGhostNode
();
35
36
// Overlapping
37
int
get_num_overlapping_nodes()
const
;
38
PandaNode
*get_overlapping_node(
int
idx)
const
;
39
MAKE_SEQ(get_overlapping_nodes, get_num_overlapping_nodes, get_overlapping_node);
40
41
MAKE_SEQ_PROPERTY(overlapping_nodes, get_num_overlapping_nodes, get_overlapping_node);
42
43
public
:
44
virtual
btCollisionObject *get_object()
const
;
45
46
void
do_sync_p2b();
47
void
do_sync_b2p();
48
49
protected
:
50
virtual
void
parents_changed();
51
virtual
void
transform_changed();
52
53
private
:
54
CPT(
TransformState
) _sync;
55
bool
_sync_disable;
56
bool
_sync_local;
57
58
btPairCachingGhostObject *_ghost;
59
60
void
do_transform_changed();
61
62
public
:
63
static
TypeHandle
get_class_type() {
64
return
_type_handle;
65
}
66
static
void
init_type() {
67
BulletBodyNode::init_type();
68
register_type
(_type_handle,
"BulletGhostNode"
,
69
BulletBodyNode::get_class_type());
70
}
71
virtual
TypeHandle
get_type()
const
{
72
return
get_class_type();
73
}
74
virtual
TypeHandle
force_init_type() {
75
init_type();
76
return
get_class_type();
77
}
78
79
private
:
80
static
TypeHandle
_type_handle;
81
};
82
83
#include "
bulletGhostNode.I
"
84
85
#endif // __BULLET_GHOST_NODE_H__
pandaNode.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bulletGhostNode.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition:
register_type.I:22
bullet_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
BulletShape
Definition:
bulletShape.h:27
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition:
typeHandle.h:81
BulletBodyNode
Definition:
bulletBodyNode.h:33
collideMask.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bullet_utils.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TransformState
Indicates a coordinate-system transform on vertices.
Definition:
transformState.h:54
bulletBodyNode.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
BulletGhostNode
Definition:
bulletGhostNode.h:31
PandaNode
A basic node of the scene graph or data graph.
Definition:
pandaNode.h:64
Generated on Sat Jan 11 2020 15:14:42 for Panda3D by
1.8.17