*** empty log message ***

This commit is contained in:
David Rose 2001-05-15 01:25:17 +00:00
parent c5238516b2
commit 41a58def4f
36 changed files with 184 additions and 34 deletions

View File

@ -22,6 +22,10 @@
// vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_PARTGROUPSTAR std::_Vector_val<PartGroup *, std::allocator<PartGroup *> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PARTGROUPSTAR)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<PartGroup *>)
typedef vector<PartGroup *> vector_PartGroupStar;

View File

@ -161,8 +161,10 @@ recompute_bound() {
child_volumes.push_back(&(*gi)->get_bound());
}
const BoundingVolume **child_begin = &child_volumes[0];
const BoundingVolume **child_end = child_begin + child_volumes.size();
bool success =
_bound->around(child_volumes.begin(), child_volumes.end());
_bound->around(child_begin, child_end);
#ifndef NDEBUG
if (!success) {

View File

@ -151,7 +151,10 @@ xform(const LMatrix4f &mat) {
if (_reversed) {
reverse(verts.begin(), verts.end());
}
setup_points(verts.begin(), verts.end());
const LPoint3f *verts_begin = &verts[0];
const LPoint3f *verts_end = verts_begin + verts.size();
setup_points(verts_begin, verts_end);
}
clear_viz_arcs();
@ -202,7 +205,9 @@ recompute_bound() {
vertices.push_back(to_3d(*pi));
}
gbv->around(vertices.begin(), vertices.end());
const LPoint3f *vertices_begin = &vertices[0];
const LPoint3f *vertices_end = vertices_begin + vertices.size();
gbv->around(vertices_begin, vertices_end);
}
////////////////////////////////////////////////////////////////////

View File

@ -3,6 +3,16 @@
//
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
// Function: GraphicsWindowInputDevice::Default Constructor
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE GraphicsWindowInputDevice::
GraphicsWindowInputDevice() {
_flags = 0;
}
////////////////////////////////////////////////////////////////////
// Function: GraphicsWindowInputDevice::get_name
// Access: Public

View File

@ -31,6 +31,7 @@ public:
static GraphicsWindowInputDevice keyboard_only(const string &name);
static GraphicsWindowInputDevice pointer_and_keyboard(const string &name);
INLINE GraphicsWindowInputDevice();
GraphicsWindowInputDevice(const GraphicsWindowInputDevice &copy);
void operator = (const GraphicsWindowInputDevice &copy);
~GraphicsWindowInputDevice();
@ -75,6 +76,10 @@ private:
#include "graphicsWindowInputDevice.I"
#ifdef HAVE_DINKUM
#define VV_GRAPHICSWINDOWINPUTDEVICE std::_Vector_val<GraphicsWindowInputDevice, std::allocator<GraphicsWindowInputDevice> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_GRAPHICSWINDOWINPUTDEVICE)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<GraphicsWindowInputDevice>)
typedef vector<GraphicsWindowInputDevice> vector_GraphicsWindowInputDevice;

View File

@ -22,6 +22,10 @@
// file, rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_PT_EGGMATERIAL std::_Vector_val<PT_EggMaterial, std::allocator<PT_EggMaterial> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, VV_PT_EGGMATERIAL)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector<PT_EggMaterial>)
typedef vector<PT_EggMaterial> vector_PT_EggMaterial;

View File

@ -22,6 +22,10 @@
// file, rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_PT_EGGTEXTURE std::_Vector_val<PT_EggTexture, std::allocator<PT_EggTexture> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, VV_PT_EGGTEXTURE)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector<PT_EggTexture>)
typedef vector<PT_EggTexture> vector_PT_EggTexture;

View File

@ -22,6 +22,10 @@
// file, rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_PT_EGGVERTEX std::_Vector_val<PT_EggVertex, std::allocator<PT_EggVertex> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, VV_PT_EGGVERTEX)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector<PT_EggVertex>)
typedef vector<PT_EggVertex> vector_PT_EggVertex;

View File

@ -250,6 +250,7 @@ reset() {
_point_smooth_enabled = false;
_scissor_enabled = false;
_lighting_enabled = false;
_lighting_enabled_this_frame = false;
_normals_enabled = false;
_texturing_enabled = false;
_multisample_alpha_one_enabled = false;

View File

@ -5,6 +5,15 @@
#include <math.h>
////////////////////////////////////////////////////////////////////
// Function: LODSwitch::Default Constructor
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE LODSwitch::
LODSwitch() {
}
////////////////////////////////////////////////////////////////////
// Function: LODSwitch::Constructor
// Access: Public
@ -15,6 +24,29 @@ LODSwitch(float in, float out) {
set_range(in, out);
}
////////////////////////////////////////////////////////////////////
// Function: LODSwitch::Copy Constructor
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE LODSwitch::
LODSwitch(const LODSwitch &copy) :
_in(copy._in),
_out(copy._out)
{
}
////////////////////////////////////////////////////////////////////
// Function: LODSwitch::Copy Assignment Operator
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
INLINE void LODSwitch::
operator = (const LODSwitch &copy) {
_in = copy._in;
_out = copy._out;
}
////////////////////////////////////////////////////////////////////
// Function: LODSwitch::get_range
// Access: Public

View File

@ -31,7 +31,11 @@ class DatagramIterator;
////////////////////////////////////////////////////////////////////
class EXPCL_PANDA LODSwitch {
public:
INLINE LODSwitch();
INLINE LODSwitch(float in, float out);
INLINE LODSwitch(const LODSwitch &copy);
INLINE void operator = (const LODSwitch &copy);
INLINE void get_range(float &in, float &out) const;
INLINE float get_in() const;
INLINE float get_out() const;
@ -54,6 +58,10 @@ protected:
float _out;
};
#ifdef HAVE_DINKUM
#define VV_LODSWITCH std::_Vector_val<LODSwitch, std::allocator<LODSwitch> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_LODSWITCH)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<LODSwitch>)
typedef vector<LODSwitch> LODSwitchVector;

View File

@ -469,7 +469,10 @@ recompute_bound() {
}
}
gbv->around(vertices.begin(), vertices.end());
const LPoint3f *vertices_begin = &vertices[0];
const LPoint3f *vertices_end = vertices_begin + vertices.size();
gbv->around(vertices_begin, vertices_end);
}
////////////////////////////////////////////////////////////////////

View File

@ -15,8 +15,8 @@ ArcComponent(Node *node) :
_next(NULL)
{
MemoryUsage::update_type(this, get_class_type());
nassertv(node != (Node *)NULL);
_p._node = node;
nassertv(node != (Node *)NULL);
_p._node->ref();
}
@ -33,9 +33,9 @@ ArcComponent(NodeRelation *arc, ArcComponent *next) :
_next(next)
{
MemoryUsage::update_type(this, get_class_type());
_p._arc = arc;
nassertv(_next != (ArcComponent *)NULL);
nassertv(arc != (NodeRelation *)NULL);
_p._arc = arc;
_p._arc->ref();
_p._arc->ref_parent();
}
@ -52,10 +52,12 @@ ArcComponent(const ArcComponent &copy) :
MemoryUsage::update_type(this, get_class_type());
if (has_arc()) {
_p._arc = copy._p._arc;
nassertv(_p._arc != (NodeRelation *)NULL);
_p._arc->ref();
_p._arc->ref_parent();
} else {
_p._node = copy._p._node;
nassertv(_p._node != (Node *)NULL);
_p._node->ref();
}
}
@ -69,9 +71,11 @@ ArcComponent(const ArcComponent &copy) :
INLINE_GRAPH ArcChain::ArcComponent::
~ArcComponent() {
if (has_arc()) {
nassertv(_p._arc != (NodeRelation *)NULL);
_p._arc->unref_parent();
unref_delete(_p._arc);
} else {
nassertv(_p._node != (Node *)NULL);
unref_delete(_p._node);
}
}
@ -251,10 +255,15 @@ ArcChain() {
// This chain may now be extended by repeatedly calling
// push_back() with each arc below that node in
// sequence.
//
// If the Node pointer is NULL, this quietly creates an
// empty ArcChain.
////////////////////////////////////////////////////////////////////
INLINE_GRAPH ArcChain::
ArcChain(Node *top_node) {
_head = new ArcComponent(top_node);
if (top_node != (Node *)NULL) {
_head = new ArcComponent(top_node);
}
}
////////////////////////////////////////////////////////////////////

View File

@ -825,8 +825,11 @@ recompute_bound() {
child_volumes.push_back(&(*drpi)->get_bound());
}
const BoundingVolume **child_begin = &child_volumes[0];
const BoundingVolume **child_end = child_begin + child_volumes.size();
bool success =
_bound->around(child_volumes.begin(), child_volumes.end());
_bound->around(child_begin, child_end);
#ifndef NDEBUG
if (!success) {

View File

@ -21,6 +21,10 @@ class NodeRelation;
// file, rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_NODERELATION_STAR std::_Vector_val<NodeRelation *, std::allocator<NodeRelation *> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_NODERELATION_STAR)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<NodeRelation *>)
typedef vector<NodeRelation *> vector_NodeRelation_star;

View File

@ -22,6 +22,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_PT_NODE std::_Vector_val<PT_Node, std::allocator<PT_Node> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PT_NODE)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<PT_Node>)
typedef vector<PT_Node> vector_PT_Node;

View File

@ -22,6 +22,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_PT_NODERELATION std::_Vector_val<PT_NodeRelation, std::allocator<PT_NodeRelation> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PT_NODERELATION)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<PT_NodeRelation>)
typedef vector<PT_NodeRelation> vector_PT_NodeRelation;

View File

@ -21,6 +21,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_PT_LIGHT std::_Vector_val<PT_Light, std::allocator<PT_Light> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PT_LIGHT)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<PT_Light>)
typedef vector<PT_Light> vector_PT_Light;

View File

@ -33,8 +33,8 @@
pta_TexCoordf.cxx pta_TexCoordf.h pta_Vertexf.cxx pta_Vertexf.h \
vector_Colorf.cxx vector_Colorf.h vector_LPoint2f.cxx \
vector_LPoint2f.h vector_LVecBase3f.cxx vector_LVecBase3f.h \
vector_Normalf.cxx vector_Normalf.h vector_Vertexf.cxx \
vector_Vertexf.h
vector_Normalf.cxx vector_Normalf.h vector_TexCoordf.h \
vector_Vertexf.cxx vector_Vertexf.h
#define INSTALL_HEADERS \
cmath.I cmath.h compose_matrix.h compose_matrix_src.I \

View File

@ -21,6 +21,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_COLORF std::_Vector_val<Colorf, std::allocator<Colorf> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_COLORF)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<Colorf>)
typedef vector<Colorf> vector_Colorf;

View File

@ -21,6 +21,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_LPOINT2F std::_Vector_val<LPoint2f, std::allocator<LPoint2f> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_LPOINT2F)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<LPoint2f>)
typedef vector<LPoint2f> vector_LPoint2f;

View File

@ -21,6 +21,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_LVECBASE3F std::_Vector_val<LVecBase3f, std::allocator<LVecBase3f> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_LVECBASE3F)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<LVecBase3f>)
typedef vector<LVecBase3f> vector_LVecBase3f;

View File

@ -21,6 +21,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_NORMALF std::_Vector_val<Normalf, std::allocator<Normalf> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_NORMALF)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<Normalf>)
typedef vector<Normalf> vector_Normalf;

View File

@ -21,6 +21,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_VERTEXF std::_Vector_val<Vertexf, std::allocator<Vertexf> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_VERTEXF)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<Vertexf>)
typedef vector<Vertexf> vector_Vertexf;

View File

@ -211,20 +211,6 @@ back() const {
return _ptr->back();
}
////////////////////////////////////////////////////////////////////
// Function: PointerToArray::insert
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
template<class Element>
INLINE PointerToArray<Element>::iterator PointerToArray<Element>::
insert(iterator position) const {
nassertr(_ptr != NULL, position);
nassertr(position >= _ptr->begin() &&
position <= _ptr->end(), position);
return _ptr->insert(position);
}
////////////////////////////////////////////////////////////////////
// Function: PointerToArray::insert
// Access: Public

View File

@ -115,7 +115,6 @@ public:
INLINE size_type capacity() const;
INLINE reference front() const;
INLINE reference back() const;
INLINE iterator insert(iterator position) const;
INLINE iterator insert(iterator position, const Element &x) const;
INLINE void insert(iterator position, size_type n, const Element &x) const;

View File

@ -253,6 +253,6 @@ string_to_double(const string &str, double &result) {
bool
string_to_float(const string &str, float &result) {
string tail;
result = string_to_double(str, tail);
result = (float)string_to_double(str, tail);
return tail.empty();
}

View File

@ -19,6 +19,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_DOUBLE std::_Vector_val<double, std::allocator<double> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_DOUBLE)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<double>)
typedef vector<double> vector_double;

View File

@ -19,6 +19,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_FLOAT std::_Vector_val<float, std::allocator<float> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_FLOAT)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<float>)
typedef vector<float> vector_float;

View File

@ -14,13 +14,17 @@ class TypedWritable;
////////////////////////////////////////////////////////////////////
// Class : vector_typedWritable
// Description : A vector of TypedWritable. This class is defined once here,
// and exported to PANDA.DLL; other packages that want
// to use a vector of this type (whether they need to
// export it or not) should include this header file,
// rather than defining the vector again.
// Description : A vector of TypedWritable *. This class is defined
// once here, and exported to PANDA.DLL; other packages
// that want to use a vector of this type (whether they
// need to export it or not) should include this header
// file, rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_TYPEDWRITABLE std::_Vector_val<TypedWritable *, std::allocator<TypedWritable *> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_TYPEDWRITABLE)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<TypedWritable*>)
typedef vector<TypedWritable*> vector_typedWritable;

View File

@ -19,6 +19,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_UCHAR std::_Vector_val<unsigned char, std::allocator<unsigned char> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_UCHAR)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<unsigned char>)
typedef vector<unsigned char> vector_uchar;

View File

@ -19,6 +19,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_ULONG std::_Vector_val<unsigned long, std::allocator<unsigned long> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_ULONG)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<unsigned long>)
typedef vector<unsigned long> vector_ulong;

View File

@ -19,6 +19,10 @@
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_USHORT std::_Vector_val<unsigned short, std::allocator<unsigned short> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_USHORT)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<unsigned short>)
typedef vector<unsigned short> vector_ushort;

View File

@ -14,13 +14,17 @@ class Writable;
////////////////////////////////////////////////////////////////////
// Class : vector_writable
// Description : A vector of TypedWritable. This class is defined once here,
// Description : A vector of Writable *. This class is defined once here,
// and exported to PANDA.DLL; other packages that want
// to use a vector of this type (whether they need to
// export it or not) should include this header file,
// rather than defining the vector again.
////////////////////////////////////////////////////////////////////
#ifdef HAVE_DINKUM
#define VV_WRITABLE std::_Vector_val<Writable *, std::allocator<Writable *> >
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_WRITABLE)
#endif
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector<Writable*>)
typedef vector<Writable*> vector_writable;

View File

@ -23,6 +23,9 @@ NodePath(TypeHandle graph_type) : NodePathBase(graph_type) {
// top node. It's not yet much of a path, but it does
// reference at least the one node and can be used as an
// ordinary node pointer.
//
// If the Node pointer is NULL, this quietly creates an
// empty NodePath.
////////////////////////////////////////////////////////////////////
INLINE NodePath::
NodePath(Node *top_node, TypeHandle graph_type) : NodePathBase(top_node, graph_type) {

View File

@ -210,7 +210,9 @@ add_geom(dDrawable *geom) {
////////////////////////////////////////////////////////////////////
void GeomNode::
add_geoms_from(const GeomNode *other) {
_geoms.insert(_geoms.end(), other->_geoms.begin(), other->_geoms.end());
const PT(dDrawable) *geoms_begin = &other->_geoms[0];
const PT(dDrawable) *geoms_end = geoms_begin + other->_geoms.size();
_geoms.insert(_geoms.end(), geoms_begin, geoms_end);
mark_bound_stale();
}
@ -234,7 +236,9 @@ recompute_bound() {
child_volumes.push_back(&(*gi)->get_bound());
}
_bound->around(child_volumes.begin(), child_volumes.end());
const BoundingVolume **child_begin = &child_volumes[0];
const BoundingVolume **child_end = child_begin + child_volumes.size();
_bound->around(child_begin, child_end);
}
////////////////////////////////////////////////////////////////////