Merge branch 'master' into input-overhaul

This commit is contained in:
rdb 2018-09-16 12:28:22 +02:00
commit e30b597926
185 changed files with 805 additions and 381 deletions

View File

@ -43,7 +43,7 @@ install:
script:
- $PYTHONV makepanda/makepanda.py --everything --git-commit $TRAVIS_COMMIT $FLAGS --threads 4
- LD_LIBRARY_PATH=built/lib PYTHONPATH=built $PYTHONV makepanda/test_imports.py
- LD_LIBRARY_PATH=built/lib PYTHONPATH=built $PYTHONV -m pytest tests
- LD_LIBRARY_PATH=built/lib PYTHONPATH=built $PYTHONV -m pytest -v tests
notifications:
irc:
channels:

View File

@ -15,7 +15,7 @@
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_DIRECT_DEADREC)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_DIRECT_DEADREC)
#error Buildsystem error: BUILDING_DIRECT_DEADREC not defined
#endif

View File

@ -30,7 +30,7 @@
#include "pset.h"
#if !defined(CPPPARSER) && !defined(BUILDING_DIRECT_DIRECTD)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_DIRECT_DIRECTD)
#error Buildsystem error: BUILDING_DIRECT_DIRECTD not defined
#endif

View File

@ -14,7 +14,7 @@
#include "config_distributed.h"
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_DIRECT_DISTRIBUTED)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_DIRECT_DISTRIBUTED)
#error Buildsystem error: BUILDING_DIRECT_DISTRIBUTED not defined
#endif

View File

@ -61,7 +61,14 @@ class DirectFrame(DirectGuiWidget):
def destroy(self):
DirectGuiWidget.destroy(self)
def setText(self):
def clearText(self):
self['text'] = None
self.setText()
def setText(self, text=None):
if text is not None:
self['text'] = text
# Determine if user passed in single string or a sequence
if self['text'] == None:
textList = (None,) * self['numStates']
@ -100,7 +107,14 @@ class DirectFrame(DirectGuiWidget):
sort = DGG.TEXT_SORT_INDEX,
)
def setGeom(self):
def clearGeom(self):
self['geom'] = None
self.setGeom()
def setGeom(self, geom=None):
if geom is not None:
self['geom'] = geom
# Determine argument type
geom = self['geom']
@ -142,7 +156,14 @@ class DirectFrame(DirectGuiWidget):
geom = geom, scale = 1,
sort = DGG.GEOM_SORT_INDEX)
def setImage(self):
def clearImage(self):
self['image'] = None
self.setImage()
def setImage(self, image=None):
if image is not None:
self['image'] = image
# Determine argument type
arg = self['image']
if arg == None:

View File

@ -29,7 +29,7 @@
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_DIRECT_INTERVAL)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_DIRECT_INTERVAL)
#error Buildsystem error: BUILDING_DIRECT_INTERVAL not defined
#endif

View File

@ -14,7 +14,7 @@
#include "config_motiontrail.h"
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_DIRECT_MOTIONTRAIL)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_DIRECT_MOTIONTRAIL)
#error Buildsystem error: BUILDING_DIRECT_MOTIONTRAIL not defined
#endif

View File

@ -934,8 +934,8 @@ class Loader(DirectObject):
just as in loadModel(); otherwise, the loading happens before
loadSound() returns."""
if not isinstance(soundPath, (MovieAudio, tuple, list, set)):
# We were given a single sound pathname.
if not isinstance(soundPath, (tuple, list, set)):
# We were given a single sound pathname or a MovieAudio instance.
soundList = [soundPath]
gotList = False
else:

View File

@ -37,7 +37,7 @@ FILTERKEYS g_StartupFilterKeys = {sizeof(FILTERKEYS), 0};
using std::max;
using std::min;
#if !defined(CPPPARSER) && !defined(BUILDING_DIRECT_SHOWBASE)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_DIRECT_SHOWBASE)
#error Buildsystem error: BUILDING_DIRECT_SHOWBASE not defined
#endif

View File

@ -13,7 +13,7 @@
#include "config_dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_DTOOL_DCONFIG)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_DTOOL_DCONFIG)
#error Buildsystem error: BUILDING_DTOOL_DCONFIG not defined
#endif

View File

@ -14,7 +14,7 @@
#include "dtoolbase.h"
#include "memoryHook.h"
#if !defined(CPPPARSER) && !defined(BUILDING_DTOOL_DTOOLBASE)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_DTOOL_DTOOLBASE)
#error Buildsystem error: BUILDING_DTOOL_DTOOLBASE not defined
#endif

View File

@ -49,6 +49,8 @@
// interrogate pass (CPPPARSER isn't defined), this maps to public.
#define PUBLISHED __published
#define PHAVE_ATOMIC 1
typedef int ios_openmode;
typedef int ios_fmtflags;
typedef int ios_iostate;
@ -93,6 +95,23 @@ typedef std::ios::iostate ios_iostate;
typedef std::ios::seekdir ios_seekdir;
#endif
#ifdef _MSC_VER
#define ALWAYS_INLINE __forceinline
#elif defined(__GNUC__)
#define ALWAYS_INLINE __attribute__((always_inline)) inline
#else
#define ALWAYS_INLINE inline
#endif
#ifdef FORCE_INLINING
// If FORCE_INLINING is defined, we use the keyword __forceinline, which tells
// MS VC++ to override its internal benefit heuristic and inline the fn if it
// is technically possible to do so.
#define INLINE ALWAYS_INLINE
#else
#define INLINE inline
#endif
// Apple has an outdated libstdc++. Not all is lost, though, as we can fill
// in some important missing functions.
#if defined(__GLIBCXX__) && __GLIBCXX__ <= 20070719
@ -115,24 +134,38 @@ namespace std {
}
template<class T> struct owner_less;
typedef enum memory_order {
memory_order_relaxed,
memory_order_consume,
memory_order_acquire,
memory_order_release,
memory_order_acq_rel,
memory_order_seq_cst,
} memory_order;
#define ATOMIC_FLAG_INIT { 0 }
class atomic_flag {
bool _flag;
public:
atomic_flag() noexcept = default;
ALWAYS_INLINE constexpr atomic_flag(bool flag) noexcept : _flag(flag) {}
atomic_flag(const atomic_flag &) = delete;
~atomic_flag() noexcept = default;
atomic_flag &operator = (const atomic_flag&) = delete;
ALWAYS_INLINE bool test_and_set(memory_order order = memory_order_seq_cst) noexcept {
return __atomic_test_and_set(&_flag, order);
}
ALWAYS_INLINE void clear(memory_order order = memory_order_seq_cst) noexcept {
__atomic_clear(&_flag, order);
}
};
};
#endif
#ifdef _MSC_VER
#define ALWAYS_INLINE __forceinline
#elif defined(__GNUC__)
#define ALWAYS_INLINE __attribute__((always_inline)) inline
#else
#define ALWAYS_INLINE inline
#endif
#ifdef FORCE_INLINING
// If FORCE_INLINING is defined, we use the keyword __forceinline, which tells
// MS VC++ to override its internal benefit heuristic and inline the fn if it
// is technically possible to do so.
#define INLINE ALWAYS_INLINE
#else
#define INLINE inline
// Expect that we have access to the <atomic> header.
#define PHAVE_ATOMIC 1
#endif
// Determine the availability of C++11 features.

View File

@ -11,13 +11,6 @@
* @date 2006-04-11
*/
/**
*
*/
constexpr MutexSpinlockImpl::
MutexSpinlockImpl() : _lock(0) {
}
/**
*
*/
@ -33,7 +26,7 @@ lock() {
*/
INLINE bool MutexSpinlockImpl::
try_lock() {
return (AtomicAdjust::compare_and_exchange(_lock, 0, 1) == 0);
return !_flag.test_and_set(std::memory_order_acquire);
}
/**
@ -41,5 +34,5 @@ try_lock() {
*/
INLINE void MutexSpinlockImpl::
unlock() {
AtomicAdjust::set(_lock, 0);
_flag.clear(std::memory_order_release);
}

View File

@ -17,12 +17,21 @@
#include "mutexSpinlockImpl.h"
#if defined(__i386__) || defined(__x86_64) || defined(_M_IX86) || defined(_M_X64)
#include <emmintrin.h>
#define PAUSE() _mm_pause()
#else
#define PAUSE()
#endif
/**
*
*/
void MutexSpinlockImpl::
do_lock() {
while (AtomicAdjust::compare_and_exchange(_lock, 0, 1) != 0) {
// Loop until we changed the flag from 0 to 1 (and it wasn't already 1).
while (_flag.test_and_set(std::memory_order_acquire)) {
PAUSE();
}
}

View File

@ -19,7 +19,9 @@
#ifdef MUTEX_SPINLOCK
#include "atomicAdjust.h"
#ifdef PHAVE_ATOMIC
#include <atomic>
#endif
/**
* Uses a simple user-space spinlock to implement a mutex. It is usually not
@ -29,7 +31,7 @@
*/
class EXPCL_DTOOL_DTOOLBASE MutexSpinlockImpl {
public:
constexpr MutexSpinlockImpl();
constexpr MutexSpinlockImpl() noexcept = default;
MutexSpinlockImpl(const MutexSpinlockImpl &copy) = delete;
MutexSpinlockImpl &operator = (const MutexSpinlockImpl &copy) = delete;
@ -42,7 +44,7 @@ public:
private:
void do_lock();
TVOLATILE AtomicAdjust::Integer _lock;
std::atomic_flag _flag = ATOMIC_FLAG_INIT;
};
#include "mutexSpinlockImpl.I"

View File

@ -16,7 +16,7 @@
#include "filename.h"
#include "pandaSystem.h"
#if !defined(CPPPARSER) && !defined(BUILDING_DTOOL_DTOOLUTIL)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_DTOOL_DTOOLUTIL)
#error Buildsystem error: BUILDING_DTOOL_DCTOOLUTIL not defined
#endif

View File

@ -254,14 +254,13 @@ call_function(ostream &out, int indent_level, bool convert_result,
&parser);
out << " = " << call << ";\n";
// MOVE() expands to std::move() when we are compiling with a compiler
// that supports rvalue references. It basically turns an lvalue into
// Use of the C++11 std::move function basically turns an lvalue into
// an rvalue, allowing a move constructor to be called instead of a
// copy constructor (since we won't be using the return value any
// more), which is usually more efficient if it exists. If it
// doesn't, it shouldn't do any harm.
string new_str =
_return_type->prepare_return_expr(out, indent_level, "MOVE(result)");
_return_type->prepare_return_expr(out, indent_level, "std::move(result)");
return_expr = _return_type->get_return_expr(new_str);
} else {

View File

@ -5491,7 +5491,7 @@ write_function_instance(ostream &out, FunctionRemap *remap,
// Use move constructor when available for functions that take an
// actual PointerTo. This eliminates an unref()ref() pair.
pexpr_string = "MOVE(" + param_name + "_this)";
pexpr_string = "std::move(" + param_name + "_this)";
} else {
// This is a move-assignable type, such as TypeHandle or LVecBase4.
@ -6156,7 +6156,7 @@ write_function_instance(ostream &out, FunctionRemap *remap,
indent(out, indent_level) << "return true;\n";
} else if (TypeManager::is_reference_count(remap->_cpptype)) {
indent(out, indent_level) << "coerced = MOVE(" << return_expr << ");\n";
indent(out, indent_level) << "coerced = std::move(" << return_expr << ");\n";
indent(out, indent_level) << "return true;\n";
} else {

View File

@ -516,7 +516,7 @@ main(int argc, char **argv) {
cerr << "Error parsing file: '" << argv[i] << "'\n";
exit(1);
}
builder.add_source_file(filename);
builder.add_source_file(filename.to_os_generic());
}
// Now that we've parsed all the source code, change the way things are

View File

@ -40,7 +40,7 @@ pass_parameter(std::ostream &out, const std::string &variable_name) {
if (variable_name.size() > 1 && variable_name[0] == '&') {
// Prevent generating something like *&param Also, if this is really some
// local type, we can presumably just move it?
out << "MOVE(" << variable_name.substr(1) << ")";
out << "std::move(" << variable_name.substr(1) << ")";
} else {
out << "*" << variable_name;
}

View File

@ -42,7 +42,7 @@ pass_parameter(std::ostream &out, const std::string &variable_name) {
// this parameter is an rvalue reference, but CPPParser can't know that,
// and it might have an overload that takes an rvalue reference. It
// shouldn't hurt either way.
out << "MOVE(" << variable_name.substr(1) << ")";
out << "std::move(" << variable_name.substr(1) << ")";
} else {
out << "*" << variable_name;
}

View File

@ -16,7 +16,7 @@
#include "configVariableEnum.h"
#include "pandaFileStreamBuf.h"
#if !defined(CPPPARSER) && !defined(BUILDING_DTOOL_PRC)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_DTOOL_PRC)
#error Buildsystem error: BUILDING_DTOOL_PRC not defined
#endif

View File

@ -2272,6 +2272,7 @@ DTOOL_CONFIG=[
("OS_SIMPLE_THREADS", '1', '1'),
("DEBUG_THREADS", 'UNDEF', 'UNDEF'),
("HAVE_POSIX_THREADS", 'UNDEF', '1'),
("MUTEX_SPINLOCK", 'UNDEF', 'UNDEF'),
("HAVE_AUDIO", '1', '1'),
("NOTIFY_DEBUG", 'UNDEF', 'UNDEF'),
("DO_PSTATS", 'UNDEF', 'UNDEF'),

View File

@ -14,7 +14,7 @@
#include "config_pstatclient.h"
#endif
#if !defined(CPPPARSER) && !defined(BUILDING_LIBPANDA)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_LIBPANDA)
#error Buildsystem error: BUILDING_LIBPANDA not defined
#endif

View File

@ -86,7 +86,7 @@ PUBLISHED:
virtual bool is_valid() = 0;
// Get a sound:
virtual PT(AudioSound) get_sound(const std::string& file_name, bool positional = false, int mode=SM_heuristic) = 0;
virtual PT(AudioSound) get_sound(const Filename &file_name, bool positional = false, int mode=SM_heuristic) = 0;
virtual PT(AudioSound) get_sound(MovieAudio *source, bool positional = false, int mode=SM_heuristic) = 0;
PT(AudioSound) get_null_sound();
@ -95,7 +95,7 @@ PUBLISHED:
// doesn't break any connection between AudioSounds that have already given
// by get_sound() from this manager. It's only affecting whether the
// AudioManager keeps a copy of the sound in its poolcache.
virtual void uncache_sound(const std::string& file_name) = 0;
virtual void uncache_sound(const Filename &file_name) = 0;
virtual void clear_cache() = 0;
virtual void set_cache_limit(unsigned int count) = 0;
virtual unsigned int get_cache_limit() const = 0;

View File

@ -21,7 +21,7 @@
#include "nullAudioSound.h"
#include "string_utils.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_AUDIO)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_AUDIO)
#error Buildsystem error: BUILDING_PANDA_AUDIO not defined
#endif

View File

@ -49,7 +49,7 @@ is_valid() {
*
*/
PT(AudioSound) NullAudioManager::
get_sound(const std::string&, bool positional, int mode) {
get_sound(const Filename &, bool positional, int mode) {
return get_null_sound();
}
@ -65,7 +65,7 @@ get_sound(MovieAudio *sound, bool positional, int mode) {
*
*/
void NullAudioManager::
uncache_sound(const std::string&) {
uncache_sound(const Filename &) {
// intentionally blank.
}

View File

@ -29,9 +29,9 @@ public:
virtual bool is_valid();
virtual PT(AudioSound) get_sound(const std::string&, bool positional = false, int mode=SM_heuristic);
virtual PT(AudioSound) get_sound(const Filename &, bool positional = false, int mode=SM_heuristic);
virtual PT(AudioSound) get_sound(MovieAudio *sound, bool positional = false, int mode=SM_heuristic);
virtual void uncache_sound(const std::string&);
virtual void uncache_sound(const Filename &);
virtual void clear_cache();
virtual void set_cache_limit(unsigned int);
virtual unsigned int get_cache_limit() const;

View File

@ -19,7 +19,7 @@
#include "pandaSystem.h"
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_FMOD_AUDIO)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_FMOD_AUDIO)
#error Buildsystem error: BUILDING_FMOD_AUDIO not defined
#endif

View File

@ -22,7 +22,7 @@
#include "pandaSystem.h"
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_MILES_AUDIO)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_MILES_AUDIO)
#error Buildsystem error: BUILDING_MILES_AUDIO not defined
#endif

View File

@ -18,7 +18,7 @@
#include "pandaSystem.h"
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_OPENAL_AUDIO)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_OPENAL_AUDIO)
#error Buildsystem error: BUILDING_OPENAL_AUDIO not defined
#endif

View File

@ -409,7 +409,7 @@ configure_filters(FilterProperties *config) {
* This is what creates a sound instance.
*/
PT(AudioSound) FmodAudioManager::
get_sound(const std::string &file_name, bool positional, int) {
get_sound(const Filename &file_name, bool positional, int) {
ReMutexHolder holder(_lock);
// Needed so People use Panda's Generic UNIX Style Paths for Filename.
// path.to_os_specific() converts it back to the proper OS version later on.
@ -772,7 +772,7 @@ reduce_sounds_playing_to(unsigned int count) {
* NOT USED FOR FMOD-EX!!! Clears a sound out of the sound cache.
*/
void FmodAudioManager::
uncache_sound(const std::string& file_name) {
uncache_sound(const Filename &file_name) {
audio_debug("FmodAudioManager::uncache_sound(\""<<file_name<<"\")");
}

View File

@ -88,7 +88,7 @@ public:
virtual bool is_valid();
virtual PT(AudioSound) get_sound(const std::string&, bool positional = false, int mode=SM_heuristic);
virtual PT(AudioSound) get_sound(const Filename &, bool positional = false, int mode=SM_heuristic);
virtual PT(AudioSound) get_sound(MovieAudio *, bool positional = false, int mode=SM_heuristic);
virtual int get_speaker_setup();
@ -146,7 +146,7 @@ public:
virtual void set_concurrent_sound_limit(unsigned int limit = 0);
virtual unsigned int get_concurrent_sound_limit() const;
virtual void reduce_sounds_playing_to(unsigned int count);
virtual void uncache_sound(const std::string&);
virtual void uncache_sound(const Filename &);
virtual void clear_cache();
virtual void set_cache_limit(unsigned int count);
virtual unsigned int get_cache_limit() const;

View File

@ -122,7 +122,7 @@ is_valid() {
*
*/
PT(AudioSound) MilesAudioManager::
get_sound(const string &file_name, bool, int) {
get_sound(const Filename &file_name, bool, int) {
LightReMutexHolder holder(_lock);
audio_debug("MilesAudioManager::get_sound(file_name=\""<<file_name<<"\")");
@ -218,7 +218,7 @@ get_sound(MovieAudio *sound, bool, int) {
*
*/
void MilesAudioManager::
uncache_sound(const string &file_name) {
uncache_sound(const Filename &file_name) {
audio_debug("MilesAudioManager::uncache_sound(file_name=\""
<<file_name<<"\")");
LightReMutexHolder holder(_lock);

View File

@ -43,9 +43,9 @@ public:
virtual bool is_valid();
virtual PT(AudioSound) get_sound(const std::string &file_name, bool positional = false, int mode=SM_heuristic);
virtual PT(AudioSound) get_sound(const Filename &file_name, bool positional = false, int mode=SM_heuristic);
virtual PT(AudioSound) get_sound(MovieAudio *sound, bool positional = false, int mode=SM_heuristic);
virtual void uncache_sound(const std::string &file_name);
virtual void uncache_sound(const Filename &file_name);
virtual void clear_cache();
virtual void set_cache_limit(unsigned int count);
virtual unsigned int get_cache_limit() const;

View File

@ -489,7 +489,7 @@ get_sound(MovieAudio *sound, bool positional, int mode) {
* This is what creates a sound instance.
*/
PT(AudioSound) OpenALAudioManager::
get_sound(const string &file_name, bool positional, int mode) {
get_sound(const Filename &file_name, bool positional, int mode) {
ReMutexHolder holder(_lock);
if(!is_valid()) {
return get_null_sound();
@ -525,7 +525,7 @@ get_sound(const string &file_name, bool positional, int mode) {
* use, then the sound cannot be deleted, and this function has no effect.
*/
void OpenALAudioManager::
uncache_sound(const string& file_name) {
uncache_sound(const Filename &file_name) {
ReMutexHolder holder(_lock);
nassertv(is_valid());
Filename path = file_name;

View File

@ -51,10 +51,10 @@ class EXPCL_OPENAL_AUDIO OpenALAudioManager : public AudioManager {
virtual bool is_valid();
virtual PT(AudioSound) get_sound(const std::string&, bool positional = false, int mode=SM_heuristic);
virtual PT(AudioSound) get_sound(const Filename &, bool positional = false, int mode=SM_heuristic);
virtual PT(AudioSound) get_sound(MovieAudio *sound, bool positional = false, int mode=SM_heuristic);
virtual void uncache_sound(const std::string&);
virtual void uncache_sound(const Filename &);
virtual void clear_cache();
virtual void set_cache_limit(unsigned int count);
virtual unsigned int get_cache_limit() const;

View File

@ -18,7 +18,7 @@
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDAAWESOMIUM)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDAAWESOMIUM)
#error Buildsystem error: BUILDING_PANDAAWESOMIUM not defined
#endif

View File

@ -12,9 +12,17 @@
*/
#include "bulletBodyNode.h"
#include "config_bullet.h"
#include "bulletShape.h"
#include "bulletWorld.h"
#include "bulletBoxShape.h"
#include "bulletCapsuleShape.h"
#include "bulletPlaneShape.h"
#include "bulletSphereShape.h"
#include "bulletTriangleMeshShape.h"
#include "bulletTriangleMesh.h"
#include "bulletWorld.h"
#include "collisionBox.h"
#include "collisionPlane.h"

View File

@ -16,6 +16,8 @@
#include "pandabase.h"
#include "bulletShape.h"
#include "bullet_includes.h"
#include "bullet_utils.h"
@ -25,8 +27,6 @@
#include "transformState.h"
#include "boundingSphere.h"
class BulletShape;
/**
*
*/

View File

@ -12,6 +12,9 @@
*/
#include "bulletBoxShape.h"
#include "bulletWorld.h"
#include "bullet_utils.h"
TypeHandle BulletBoxShape::_type_handle;

View File

@ -13,6 +13,8 @@
#include "bulletCapsuleShape.h"
#include "config_bullet.h"
TypeHandle BulletCapsuleShape::_type_handle;
/**

View File

@ -13,6 +13,10 @@
#include "bulletCharacterControllerNode.h"
#include "config_bullet.h"
#include "bulletWorld.h"
#if BT_BULLET_VERSION >= 285
static const btVector3 up_vectors[3] = {btVector3(1.0f, 0.0f, 0.0f), btVector3(0.0f, 1.0f, 0.0f), btVector3(0.0f, 0.0f, 1.0f)};
#endif

View File

@ -13,6 +13,10 @@
#include "bulletConeShape.h"
#include "config_bullet.h"
#include "bulletWorld.h"
TypeHandle BulletConeShape::_type_handle;
/**

View File

@ -12,7 +12,9 @@
*/
#include "bulletConeTwistConstraint.h"
#include "bulletRigidBodyNode.h"
#include "bulletWorld.h"
#include "deg_2_rad.h"

View File

@ -12,7 +12,9 @@
*/
#include "bulletConstraint.h"
#include "bulletRigidBodyNode.h"
#include "bulletShape.h"
TypeHandle BulletConstraint::_type_handle;

View File

@ -13,6 +13,8 @@
#include "bulletConvexHullShape.h"
#include "bulletWorld.h"
#include "nodePathCollection.h"
#include "geomNode.h"
#include "geomVertexReader.h"

View File

@ -22,6 +22,7 @@
#include "luse.h"
#include "geom.h"
#include "pta_LVecBase3.h"
#include "transformState.h"
/**
*

View File

@ -13,6 +13,10 @@
#include "bulletConvexPointCloudShape.h"
#include "bulletWorld.h"
#include "bullet_utils.h"
#include "geomVertexReader.h"
TypeHandle BulletConvexPointCloudShape::_type_handle;

View File

@ -13,6 +13,8 @@
#include "bulletCylinderShape.h"
#include "config_bullet.h"
using std::endl;
TypeHandle BulletCylinderShape::_type_handle;

View File

@ -13,6 +13,10 @@
#include "bulletDebugNode.h"
#include "config_bullet.h"
#include "bulletWorld.h"
#include "cullHandler.h"
#include "cullTraverser.h"
#include "cullableObject.h"

View File

@ -16,8 +16,13 @@
#include "pandabase.h"
#include "pandaNode.h"
#include "bullet_includes.h"
class CullTraverser;
class CullTraverserData;
/**
*
*/

View File

@ -12,7 +12,9 @@
*/
#include "bulletGenericConstraint.h"
#include "bulletRigidBodyNode.h"
#include "bulletWorld.h"
TypeHandle BulletGenericConstraint::_type_handle;

View File

@ -12,7 +12,9 @@
*/
#include "bulletGhostNode.h"
#include "bulletShape.h"
#include "bulletWorld.h"
TypeHandle BulletGhostNode::_type_handle;

View File

@ -13,6 +13,10 @@
#include "bulletHeightfieldShape.h"
#include "config_bullet.h"
#include "bulletWorld.h"
TypeHandle BulletHeightfieldShape::_type_handle;
/**

View File

@ -12,13 +12,17 @@
*/
#include "bulletHelper.h"
#include "bulletRigidBodyNode.h"
#include "bulletSoftBodyNode.h"
#include "bulletGhostNode.h"
#include "geomLines.h"
#include "geomTriangles.h"
#include "geomVertexRewriter.h"
#include "bullet_utils.h"
PT(InternalName) BulletHelper::_sb_index;
PT(InternalName) BulletHelper::_sb_flip;

View File

@ -23,6 +23,8 @@
#include "nodePath.h"
#include "nodePathCollection.h"
class BulletSoftBodyNode;
/**
*
*/

View File

@ -12,7 +12,9 @@
*/
#include "bulletHingeConstraint.h"
#include "bulletRigidBodyNode.h"
#include "bulletWorld.h"
#include "deg_2_rad.h"

View File

@ -13,6 +13,8 @@
#include "bulletManifoldPoint.h"
#include "bulletWorld.h"
/**
*
*/

View File

@ -13,6 +13,8 @@
#include "bulletMinkowskiSumShape.h"
#include "bulletWorld.h"
TypeHandle BulletMinkowskiSumShape::_type_handle;
/**

View File

@ -13,6 +13,8 @@
#include "bulletMultiSphereShape.h"
#include "bulletWorld.h"
#include "geomVertexReader.h"
TypeHandle BulletMultiSphereShape::_type_handle;

View File

@ -19,6 +19,7 @@
#include "bullet_includes.h"
#include "bulletShape.h"
#include "factoryParams.h"
#include "pta_LVecBase3.h"
#include "pta_stdfloat.h"

View File

@ -12,7 +12,9 @@
*/
#include "bulletPersistentManifold.h"
#include "bulletManifoldPoint.h"
#include "bulletWorld.h"
/**
*

View File

@ -13,6 +13,8 @@
#include "bulletPlaneShape.h"
#include "bulletWorld.h"
TypeHandle BulletPlaneShape::_type_handle;
/**

View File

@ -12,7 +12,11 @@
*/
#include "bulletRigidBodyNode.h"
#include "config_bullet.h"
#include "bulletShape.h"
#include "bulletWorld.h"
TypeHandle BulletRigidBodyNode::_type_handle;

View File

@ -13,6 +13,8 @@
#include "bulletRotationalLimitMotor.h"
#include "bulletWorld.h"
/**
*
*/

View File

@ -12,6 +12,9 @@
*/
#include "bulletShape.h"
#include "bulletWorld.h"
#include "bullet_utils.h"
TypeHandle BulletShape::_type_handle;

View File

@ -18,7 +18,7 @@
#include "bullet_includes.h"
#include "typedReferenceCount.h"
#include "typedWritableReferenceCount.h"
#include "boundingSphere.h"
/**

View File

@ -12,7 +12,9 @@
*/
#include "bulletSliderConstraint.h"
#include "bulletRigidBodyNode.h"
#include "bulletWorld.h"
#include "deg_2_rad.h"

View File

@ -13,6 +13,10 @@
#include "bulletSoftBodyConfig.h"
#include "bulletWorld.h"
#include "lightMutexHolder.h"
/**
*
*/

View File

@ -18,6 +18,8 @@
#include "bullet_includes.h"
#include "numeric_types.h"
/**
*
*/

View File

@ -30,3 +30,12 @@ empty() {
return BulletSoftBodyMaterial(material);
}
/**
*
*/
INLINE btSoftBody::Material &BulletSoftBodyMaterial::
get_material() const {
return _material;
}

View File

@ -13,6 +13,8 @@
#include "bulletSoftBodyMaterial.h"
#include "bulletWorld.h"
/**
*
*/
@ -21,15 +23,6 @@ BulletSoftBodyMaterial(btSoftBody::Material &material) : _material(material) {
}
/**
*
*/
btSoftBody::Material &BulletSoftBodyMaterial::
get_material() const {
return _material;
}
/**
* Getter for the property m_kLST.
*/

View File

@ -18,6 +18,8 @@
#include "bullet_includes.h"
#include "numeric_types.h"
/**
*
*/

View File

@ -12,12 +12,14 @@
*/
#include "bulletSoftBodyNode.h"
#include "bulletSoftBodyConfig.h"
#include "bulletSoftBodyControl.h"
#include "bulletSoftBodyMaterial.h"
#include "bulletSoftBodyShape.h"
#include "bulletSoftBodyWorldInfo.h"
#include "bulletHelper.h"
#include "bulletWorld.h"
#include "geomVertexRewriter.h"
#include "geomVertexReader.h"

View File

@ -29,6 +29,7 @@
#include "nurbsSurfaceEvaluator.h"
#include "pta_LVecBase3.h"
class BulletRigidBodyNode;
class BulletSoftBodyConfig;
class BulletSoftBodyControl;
class BulletSoftBodyMaterial;

View File

@ -12,7 +12,9 @@
*/
#include "bulletSoftBodyShape.h"
#include "bulletSoftBodyNode.h"
#include "bulletWorld.h"
TypeHandle BulletSoftBodyShape::_type_handle;

View File

@ -13,6 +13,8 @@
#include "bulletSoftBodyWorldInfo.h"
#include "bulletWorld.h"
/**
*
*/

View File

@ -13,6 +13,8 @@
#include "bulletSphereShape.h"
#include "bulletWorld.h"
TypeHandle BulletSphereShape::_type_handle;
/**

View File

@ -12,7 +12,9 @@
*/
#include "bulletSphericalConstraint.h"
#include "bulletRigidBodyNode.h"
#include "bulletWorld.h"
TypeHandle BulletSphericalConstraint::_type_handle;

View File

@ -13,6 +13,8 @@
#include "bulletTranslationalLimitMotor.h"
#include "bulletWorld.h"
/**
*
*/

View File

@ -13,7 +13,10 @@
#include "bulletTriangleMesh.h"
#include "bulletWorld.h"
#include "pvector.h"
#include "geomTriangles.h"
#include "geomVertexData.h"
#include "geomVertexReader.h"

View File

@ -12,7 +12,11 @@
*/
#include "bulletTriangleMeshShape.h"
#include "config_bullet.h"
#include "bulletTriangleMesh.h"
#include "bulletWorld.h"
#include "nodePathCollection.h"
#include "geomNode.h"

View File

@ -19,6 +19,7 @@
#include "bullet_includes.h"
#include "bulletShape.h"
#include "factoryParams.h"
#include "luse.h"
class BulletTriangleMesh;

View File

@ -12,6 +12,9 @@
*/
#include "bulletVehicle.h"
#include "config_bullet.h"
#include "bulletWorld.h"
#include "bulletRigidBodyNode.h"
#include "bulletWheel.h"

View File

@ -13,6 +13,8 @@
#include "bulletWheel.h"
#include "bulletWorld.h"
/**
*
*/

View File

@ -12,9 +12,14 @@
*/
#include "bulletWorld.h"
#include "config_bullet.h"
#include "bulletFilterCallbackData.h"
#include "bulletPersistentManifold.h"
#include "bulletShape.h"
#include "bulletSoftBodyWorldInfo.h"
#include "bulletTickCallbackData.h"
#include "collideMask.h"
#include "lightMutexHolder.h"

View File

@ -44,6 +44,8 @@ EXPCL_PANDABULLET CPT(TransformState) btTrans_to_TransformState(
EXPCL_PANDABULLET btTransform TransformState_to_btTrans(
CPT(TransformState) ts);
EXPCL_PANDABULLET void get_node_transform(btTransform &trans, PandaNode *node);
// UpAxis
BEGIN_PUBLISH

View File

@ -56,7 +56,7 @@ extern ContactDestroyedCallback gContactDestroyedCallback;
#include "dconfig.h"
#include "pandaSystem.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDABULLET)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDABULLET)
#error Buildsystem error: BUILDING_PANDABULLET not defined
#endif

View File

@ -34,7 +34,7 @@
#include "luse.h"
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_CHAN)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_CHAN)
#error Buildsystem error: BUILDING_PANDA_CHAN not defined
#endif

View File

@ -21,7 +21,7 @@
#include "jointVertexTransform.h"
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_CHAR)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_CHAR)
#error Buildsystem error: BUILDING_PANDA_CHAR not defined
#endif

View File

@ -20,7 +20,7 @@
#include "dconfig.h"
#include "pandaSystem.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_COCOADISPLAY)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_COCOADISPLAY)
#error Buildsystem error: BUILDING_PANDA_COCOADISPLAY not defined
#endif

View File

@ -17,7 +17,7 @@
#include "loaderFileTypeDae.h"
#include "loaderFileTypeRegistry.h"
#if !defined(CPPPARSER) && !defined(BUILDING_COLLADA)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_COLLADA)
#error Buildsystem error: BUILDING_COLLADA not defined
#endif

View File

@ -42,7 +42,7 @@
#include "collisionVisualizer.h"
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_COLLIDE)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_COLLIDE)
#error Buildsystem error: BUILDING_PANDA_COLLIDE not defined
#endif

View File

@ -22,7 +22,7 @@
#include "cullBinManager.h"
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_CULL)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_CULL)
#error Buildsystem error: BUILDING_PANDA_CULL not defined
#endif

View File

@ -30,7 +30,7 @@
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_DEVICE)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_DEVICE)
#error Buildsystem error: BUILDING_PANDA_DEVICE not defined
#endif

View File

@ -17,7 +17,7 @@
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_DGRAPH)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_DGRAPH)
#error Buildsystem error: BUILDING_PANDA_DGRAPH not defined
#endif

View File

@ -33,7 +33,7 @@
#include "subprocessWindow.h"
#include "windowHandle.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_DISPLAY)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_DISPLAY)
#error Buildsystem error: BUILDING_PANDA_DISPLAY not defined
#endif

View File

@ -20,7 +20,7 @@
#include "dconfig.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDAFX)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDAFX)
#error Buildsystem error: BUILDING_PANDAFX not defined
#endif

View File

@ -19,7 +19,7 @@
#include "pandaSystem.h"
#if !defined(CPPPARSER) && !defined(BUILDING_PANDA_DOWNLOADER)
#if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_DOWNLOADER)
#error Buildsystem error: BUILDING_PANDA_DOWNLOADER not defined
#endif

Some files were not shown because too many files have changed in this diff Show More