14#ifndef __BULLET_CAPSULE_SHAPE_H__
15#define __BULLET_CAPSULE_SHAPE_H__
28class EXPCL_PANDABULLET BulletCapsuleShape :
public BulletShape {
31 INLINE BulletCapsuleShape();
34 explicit BulletCapsuleShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up);
35 BulletCapsuleShape(
const BulletCapsuleShape ©);
36 INLINE ~BulletCapsuleShape();
46 virtual btCollisionShape *ptr()
const;
53 btCapsuleShape *_shape;
63 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
70 static void init_type() {
71 BulletShape::init_type();
73 BulletShape::get_class_type());
75 virtual TypeHandle get_type()
const {
76 return get_class_type();
78 virtual TypeHandle force_init_type() {
80 return get_class_type();
84 static TypeHandle _type_handle;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
static BulletCapsuleShape * make_from_solid(const CollisionCapsule *solid)
Constructs a new BulletCapsuleShape using the information from a CollisionCapsule from the builtin co...
static void register_with_read_factory()
Tells the BamReader how to create objects of type BulletShape.
get_radius
Returns the radius that was used to construct this capsule.
get_height
Returns the height that was used to construct this capsule.
PN_stdfloat get_half_height() const
Returns half of get_height().
This implements a solid consisting of a cylinder with hemispherical endcaps, also known as a capsule ...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
TypeHandle is the identifier used to differentiate C++ class types.
virtual void fillin(DatagramIterator &scan, BamReader *manager)
This internal function is intended to be called by each class's make_from_bam() method to read in all...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...