Split off epvector.h into its own file in an attempt to cut down compilation time

This commit is contained in:
rdb 2014-09-14 22:04:36 +00:00
parent 5437a3e5a9
commit 87910799b6
23 changed files with 148 additions and 117 deletions

View File

@ -114,7 +114,7 @@ enable (bool enable) {
// Description: Set the GeomNode. // Description: Set the GeomNode.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void CMotionTrail:: void CMotionTrail::
set_geom_node (PT(GeomNode) geom_node) { set_geom_node (GeomNode *geom_node) {
_geom_node = geom_node; _geom_node = geom_node;
} }

View File

@ -24,7 +24,7 @@
#include "luse.h" #include "luse.h"
#include "nurbsCurveEvaluator.h" #include "nurbsCurveEvaluator.h"
#include "plist.h" #include "plist.h"
#include "pvector.h" #include "epvector.h"
class CMotionTrailVertex { class CMotionTrailVertex {
public: public:
@ -32,7 +32,7 @@ public:
LVecBase4 _start_color; LVecBase4 _start_color;
LVecBase4 _end_color; LVecBase4 _end_color;
PN_stdfloat _v; PN_stdfloat _v;
PT(NurbsCurveEvaluator) _nurbs_curve_evaluator; PT(NurbsCurveEvaluator) _nurbs_curve_evaluator;
}; };
@ -44,71 +44,68 @@ public:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Class : CMotionTrail // Class : CMotionTrail
// Description : The method used in creating the motion trail is // Description : The method used in creating the motion trail is
// based on taking samples of time and transformations // based on taking samples of time and transformations
// (the position and orientation matrix) in real-time. // (the position and orientation matrix) in real-time.
// The method also requires a number of vertices // The method also requires a number of vertices
// (positions) that determines "shape" of the motion // (positions) that determines "shape" of the motion
// trail (i.e. the edge of a blade). A start color // trail (i.e. the edge of a blade). A start color
// and end color is also required for each vertex. // and end color is also required for each vertex.
// The color is interpolated as function of time. // The color is interpolated as function of time.
// The colors are typically used to fade the motion // The colors are typically used to fade the motion
// trail so the end color is typically black. // trail so the end color is typically black.
// //
// The vertices are submitted via the "add_vertex" // The vertices are submitted via the "add_vertex"
// function. For each frame, a sample is submited via // function. For each frame, a sample is submited via
// the "update_motion_trail" function. During the // the "update_motion_trail" function. During the
// "update_motion_trail" function, the motion trail // "update_motion_trail" function, the motion trail
// geometry is created dynamically from the sample // geometry is created dynamically from the sample
// history and the vertices. // history and the vertices.
// //
// The user must specifiy a GeomNode via // The user must specifiy a GeomNode via
// "set_geom_node". // "set_geom_node".
// //
// The duration of the sample history is specified by // The duration of the sample history is specified by
// a time window. A larger time window creates longer // a time window. A larger time window creates longer
// motion trails (given constant speed). Samples that // motion trails (given constant speed). Samples that
// are no longer within the time window are // are no longer within the time window are
// automatically discarded. // automatically discarded.
// //
// The nurbs option can be used to create smooth // The nurbs option can be used to create smooth
// interpolated curves from the samples. The nurbs // interpolated curves from the samples. The nurbs
// option is useful for animations that lack sampling // option is useful for animations that lack sampling
// to begin with, animations that move very quickly, // to begin with, animations that move very quickly,
// or low frame rates. // or low frame rates.
// //
// The texture option be used to create variation to // The texture option be used to create variation to
// the motion trail. The u coordinate of the texture // the motion trail. The u coordinate of the texture
// corresponds to time and the v coordinate // corresponds to time and the v coordinate
// corresponds to the "shape" of the motion trail. // corresponds to the "shape" of the motion trail.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
class EXPCL_DIRECT CMotionTrail : public TypedReferenceCount { class EXPCL_DIRECT CMotionTrail : public TypedReferenceCount {
PUBLISHED: PUBLISHED:
CMotionTrail();
~CMotionTrail();
CMotionTrail ( ); void reset();
~CMotionTrail ( ); void reset_vertex_list();
void reset ( ); void enable(bool enable);
void reset_vertex_list ( );
void enable (bool enable); void set_geom_node(GeomNode *geom_node);
void add_vertex(LVector4 *vertex, LVector4 *start_color, LVector4 *end_color, PN_stdfloat v);
void set_geom_node (PT(GeomNode) geom_node); void set_parameters(PN_stdfloat sampling_time, PN_stdfloat time_window, bool use_texture, bool calculate_relative_matrix, bool use_nurbs, PN_stdfloat resolution_distance);
void add_vertex (LVector4 *vertex, LVector4 *start_color, LVector4 *end_color, PN_stdfloat v);
void set_parameters (PN_stdfloat sampling_time, PN_stdfloat time_window, bool use_texture, bool calculate_relative_matrix, bool use_nurbs, PN_stdfloat resolution_distance); int check_for_update(PN_stdfloat current_time);
void update_motion_trail(PN_stdfloat current_time, LMatrix4 *transform);
int check_for_update (PN_stdfloat current_time);
void update_motion_trail (PN_stdfloat current_time, LMatrix4 *transform);
public: public:
void begin_geometry ( ); void begin_geometry();
void add_geometry_quad (LVector3 &v0, LVector3 &v1, LVector3 &v2, LVector3 &v3, LVector4 &c0, LVector4 &c1, LVector4 &c2, LVector4 &c3, LVector2 &t0, LVector2 &t1, LVector2 &t2, LVector2 &t3); void add_geometry_quad(LVector3 &v0, LVector3 &v1, LVector3 &v2, LVector3 &v3, LVector4 &c0, LVector4 &c1, LVector4 &c2, LVector4 &c3, LVector2 &t0, LVector2 &t1, LVector2 &t2, LVector2 &t3);
void add_geometry_quad (LVector4 &v0, LVector4 &v1, LVector4 &v2, LVector4 &v3, LVector4 &c0, LVector4 &c1, LVector4 &c2, LVector4 &c3, LVector2 &t0, LVector2 &t1, LVector2 &t2, LVector2 &t3); void add_geometry_quad(LVector4 &v0, LVector4 &v1, LVector4 &v2, LVector4 &v3, LVector4 &c0, LVector4 &c1, LVector4 &c2, LVector4 &c3, LVector2 &t0, LVector2 &t1, LVector2 &t2, LVector2 &t3);
void end_geometry ( ); void end_geometry();
int _active; int _active;
int _enable; int _enable;
@ -143,14 +140,14 @@ public:
// geom // geom
PT(GeomNode) _geom_node; PT(GeomNode) _geom_node;
// real-time data // real-time data
int _vertex_index; int _vertex_index;
PT(GeomVertexData) _vertex_data; PT(GeomVertexData) _vertex_data;
GeomVertexWriter _vertex_writer; GeomVertexWriter _vertex_writer;
GeomVertexWriter _color_writer; GeomVertexWriter _color_writer;
GeomVertexWriter _texture_writer; GeomVertexWriter _texture_writer;
PT(GeomTriangles) _triangles; PT(GeomTriangles) _triangles;
CMotionTrailVertex *_vertex_array; CMotionTrailVertex *_vertex_array;

View File

@ -39,7 +39,8 @@
typeRegistryNode.I typeRegistryNode.h \ typeRegistryNode.I typeRegistryNode.h \
typedObject.I typedObject.h \ typedObject.I typedObject.h \
pallocator.T pallocator.h \ pallocator.T pallocator.h \
pdeque.h plist.h pmap.h pset.h pvector.h \ pdeque.h plist.h pmap.h pset.h \
pvector.h epvector.h \
lookup3.h lookup3.c \ lookup3.h lookup3.c \
dlmalloc_src.cxx ptmalloc2_smp_src.cxx dlmalloc_src.cxx ptmalloc2_smp_src.cxx
@ -97,7 +98,8 @@
typeRegistryNode.I typeRegistryNode.h \ typeRegistryNode.I typeRegistryNode.h \
typedObject.I typedObject.h \ typedObject.I typedObject.h \
pallocator.T pallocator.h \ pallocator.T pallocator.h \
pdeque.h plist.h pmap.h pset.h pvector.h \ pdeque.h plist.h pmap.h pset.h \
pvector.h epvector.h \
lookup3.h lookup3.h
#end lib_target #end lib_target

View File

@ -0,0 +1,61 @@
// Filename: epvector.h
// Created by: drose (19Dec11)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have received a copy of this license along
// with this source code in a file named "LICENSE."
//
////////////////////////////////////////////////////////////////////
#ifndef EPVECTOR_H
#define EPVECTOR_H
#include "pvector.h"
#if defined(HAVE_EIGEN) && defined(_WIN32) && !defined(CPPPARSER)
#include <Eigen/StdVector>
////////////////////////////////////////////////////////////////////
// Class : epvector
// Description : Unfortunately, on Windows, std::vector can't be used
// for classes with explicitly alignment requirements,
// due to a minor mistake in the template definition
// (one of the vector methods receives a concrete
// object, which the compiler flags as an error, even if
// the method is never called).
//
// As a workaround, Eigen provides their own
// specialization of vector, using their own aligned
// allocator. We define that here as epvector, which is
// meant to be a drop-in replacement for pvector for
// classes that include a linmath object that requires
// alignment. Unfortunately, this means we can't use
// the Panda allocator, so memory allocated for this
// vector class won't be tracked as part of Panda's
// memory tracking system. Them's the breaks, kids.
////////////////////////////////////////////////////////////////////
template<class Type>
class epvector : public vector<Type, Eigen::aligned_allocator<Type> > {
public:
typedef Eigen::aligned_allocator<Type> allocator;
typedef vector<Type, allocator> base_class;
typedef TYPENAME base_class::size_type size_type;
epvector(TypeHandle type_handle = pvector_type_handle) : base_class(allocator()) { }
epvector(const epvector<Type> &copy) : base_class(copy) { }
epvector(size_type n, TypeHandle type_handle = pvector_type_handle) : base_class(n, Type(), allocator()) { }
epvector(size_type n, const Type &value, TypeHandle type_handle = pvector_type_handle) : base_class(n, value, allocator()) { }
epvector(const Type *begin, const Type *end, TypeHandle type_handle = pvector_type_handle) : base_class(begin, end, allocator()) { }
};
#else // HAVE_EIGEN
#define epvector pvector
#endif // HAVE_EIGEN
#endif

View File

@ -51,46 +51,4 @@ public:
#endif // USE_STL_ALLOCATOR #endif // USE_STL_ALLOCATOR
#if defined(HAVE_EIGEN) && defined(_WIN32) && !defined(CPPPARSER)
#include <Eigen/StdVector>
////////////////////////////////////////////////////////////////////
// Class : epvector
// Description : Unfortunately, on Windows, std::vector can't be used
// for classes with explicitly alignment requirements,
// due to a minor mistake in the template definition
// (one of the vector methods receives a concrete
// object, which the compiler flags as an error, even if
// the method is never called).
//
// As a workaround, Eigen provides their own
// specialization of vector, using their own aligned
// allocator. We define that here as epvector, which is
// meant to be a drop-in replacement for pvector for
// classes that include a linmath object that requires
// alignment. Unfortunately, this means we can't use
// the Panda allocator, so memory allocated for this
// vector class won't be tracked as part of Panda's
// memory tracking system. Them's the breaks, kids.
////////////////////////////////////////////////////////////////////
template<class Type>
class epvector : public vector<Type, Eigen::aligned_allocator<Type> > {
public:
typedef Eigen::aligned_allocator<Type> allocator;
typedef vector<Type, allocator> base_class;
typedef TYPENAME base_class::size_type size_type;
epvector(TypeHandle type_handle = pvector_type_handle) : base_class(allocator()) { }
epvector(const epvector<Type> &copy) : base_class(copy) { }
epvector(size_type n, TypeHandle type_handle = pvector_type_handle) : base_class(n, Type(), allocator()) { }
epvector(size_type n, const Type &value, TypeHandle type_handle = pvector_type_handle) : base_class(n, value, allocator()) { }
epvector(const Type *begin, const Type *end, TypeHandle type_handle = pvector_type_handle) : base_class(begin, end, allocator()) { }
};
#else // HAVE_EIGEN
#define epvector pvector
#endif // HAVE_EIGEN
#endif #endif

View File

@ -18,6 +18,7 @@
#include "collisionPolygon.h" #include "collisionPolygon.h"
#include "config_collide.h" #include "config_collide.h"
#include "dcast.h" #include "dcast.h"
#include "epvector.h"
TypeHandle CollisionHandlerPusher::_type_handle; TypeHandle CollisionHandlerPusher::_type_handle;
@ -95,7 +96,7 @@ handle_entries() {
// shove. We hack around this by testing if two shove vectors // shove. We hack around this by testing if two shove vectors
// share nearly the same direction, and if so, we keep only the // share nearly the same direction, and if so, we keep only the
// longer of the two. // longer of the two.
typedef epvector<ShoveData> Shoves; typedef epvector<ShoveData> Shoves;
Shoves shoves; Shoves shoves;
@ -110,13 +111,13 @@ handle_entries() {
LPoint3 interior_point; LPoint3 interior_point;
if (!entry->get_all(def._target, surface_point, normal, interior_point)) { if (!entry->get_all(def._target, surface_point, normal, interior_point)) {
#ifndef NDEBUG #ifndef NDEBUG
if (collide_cat.is_debug()) { if (collide_cat.is_debug()) {
collide_cat.debug() collide_cat.debug()
<< "Cannot shove on " << from_node_path << " for collision into " << "Cannot shove on " << from_node_path << " for collision into "
<< entry->get_into_node_path() << "; no normal/depth information.\n"; << entry->get_into_node_path() << "; no normal/depth information.\n";
} }
#endif #endif
} else { } else {
// Shove it just enough to clear the volume. // Shove it just enough to clear the volume.
if (!surface_point.almost_equal(interior_point)) { if (!surface_point.almost_equal(interior_point)) {

View File

@ -37,6 +37,7 @@
#include "geomLinestrips.h" #include "geomLinestrips.h"
#include "geomVertexWriter.h" #include "geomVertexWriter.h"
#include "renderState.h" #include "renderState.h"
#include "epvector.h"
#include <algorithm> #include <algorithm>
@ -1490,14 +1491,14 @@ fillin(DatagramIterator &scan, BamReader *manager) {
if (_points.size() >= 3) { if (_points.size() >= 3) {
LMatrix4 to_3d_mat; LMatrix4 to_3d_mat;
rederive_to_3d_mat(to_3d_mat); rederive_to_3d_mat(to_3d_mat);
epvector<LPoint3> verts; epvector<LPoint3> verts;
verts.reserve(_points.size()); verts.reserve(_points.size());
Points::const_iterator pi; Points::const_iterator pi;
for (pi = _points.begin(); pi != _points.end(); ++pi) { for (pi = _points.begin(); pi != _points.end(); ++pi) {
verts.push_back(to_3d((*pi)._p, to_3d_mat)); verts.push_back(to_3d((*pi)._p, to_3d_mat));
} }
const LPoint3 *verts_begin = &verts[0]; const LPoint3 *verts_begin = &verts[0];
const LPoint3 *verts_end = verts_begin + verts.size(); const LPoint3 *verts_end = verts_begin + verts.size();
setup_points(verts_begin, verts_end); setup_points(verts_begin, verts_end);

View File

@ -25,6 +25,7 @@
#include "eggVertex.h" #include "eggVertex.h"
#include "eggTextureCollection.h" #include "eggTextureCollection.h"
#include "eggMaterialCollection.h" #include "eggMaterialCollection.h"
#include "epvector.h"
#include "pt_EggTexture.h" #include "pt_EggTexture.h"
#include "pt_EggMaterial.h" #include "pt_EggMaterial.h"
#include "config_egg.h" #include "config_egg.h"

View File

@ -21,7 +21,7 @@
#include "indent.h" #include "indent.h"
#include "pvector.h" #include "epvector.h"
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Class : EggMorphList // Class : EggMorphList

View File

@ -28,6 +28,7 @@
#include "pta_LVecBase4.h" #include "pta_LVecBase4.h"
#include "pta_LVecBase3.h" #include "pta_LVecBase3.h"
#include "pta_LVecBase2.h" #include "pta_LVecBase2.h"
#include "epvector.h"
#ifdef HAVE_CG #ifdef HAVE_CG
// I don't want to include the Cg header file into panda as a // I don't want to include the Cg header file into panda as a

View File

@ -17,7 +17,7 @@
#include "pandabase.h" #include "pandabase.h"
#include "perlinNoise3.h" #include "perlinNoise3.h"
#include "pvector.h" #include "epvector.h"
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Class : StackedPerlinNoise3 // Class : StackedPerlinNoise3

View File

@ -17,7 +17,7 @@
#include "pandabase.h" #include "pandabase.h"
#include "luse.h" #include "luse.h"
#include "pvector.h" #include "epvector.h"
#include "pmap.h" #include "pmap.h"
class NurbsVertex; class NurbsVertex;

View File

@ -20,10 +20,10 @@
#include "datagramIterator.h" #include "datagramIterator.h"
#include "bamWriter.h" #include "bamWriter.h"
#include "bamReader.h" #include "bamReader.h"
#include "epvector.h"
TypeHandle NurbsCurve::_type_handle; TypeHandle NurbsCurve::_type_handle;
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: NurbsCurve::Constructor // Function: NurbsCurve::Constructor
// Access: Published // Access: Published

View File

@ -20,6 +20,7 @@
#include "piecewiseCurve.h" #include "piecewiseCurve.h"
#include "nurbsCurveInterface.h" #include "nurbsCurveInterface.h"
#include "cubicCurveseg.h" #include "cubicCurveseg.h"
#include "epvector.h"
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Class : NurbsCurve // Class : NurbsCurve
@ -112,7 +113,6 @@ protected:
epvector<CV> _cvs; epvector<CV> _cvs;
// TypedWritable stuff // TypedWritable stuff
public: public:
static void register_with_read_factory(); static void register_with_read_factory();

View File

@ -22,6 +22,7 @@
#include "pointerTo.h" #include "pointerTo.h"
#include "vector_stdfloat.h" #include "vector_stdfloat.h"
#include "pvector.h" #include "pvector.h"
#include "epvector.h"
#include "nodePath.h" #include "nodePath.h"
#include "referenceCount.h" #include "referenceCount.h"
#include "luse.h" #include "luse.h"

View File

@ -19,6 +19,7 @@
#include "referenceCount.h" #include "referenceCount.h"
#include "nurbsBasisVector.h" #include "nurbsBasisVector.h"
#include "vector_stdfloat.h" #include "vector_stdfloat.h"
#include "epvector.h"
class NurbsVertex; class NurbsVertex;
@ -52,7 +53,7 @@ PUBLISHED:
INLINE PN_stdfloat eval_extended_point(PN_stdfloat t, int d); INLINE PN_stdfloat eval_extended_point(PN_stdfloat t, int d);
INLINE bool eval_extended_points(PN_stdfloat t, int d, INLINE bool eval_extended_points(PN_stdfloat t, int d,
PN_stdfloat result[], int num_values); PN_stdfloat result[], int num_values);
INLINE int get_num_segments() const; INLINE int get_num_segments() const;
void eval_segment_point(int segment, PN_stdfloat t, LVecBase3 &point) const; void eval_segment_point(int segment, PN_stdfloat t, LVecBase3 &point) const;
void eval_segment_tangent(int segment, PN_stdfloat t, LVecBase3 &tangent) const; void eval_segment_tangent(int segment, PN_stdfloat t, LVecBase3 &tangent) const;
@ -67,14 +68,14 @@ PUBLISHED:
INLINE const LPoint3 &get_sample_point(int n) const; INLINE const LPoint3 &get_sample_point(int n) const;
MAKE_SEQ(get_sample_ts, get_num_samples, get_sample_t); MAKE_SEQ(get_sample_ts, get_num_samples, get_sample_t);
MAKE_SEQ(get_sample_points, get_num_samples, get_sample_points); MAKE_SEQ(get_sample_points, get_num_samples, get_sample_points);
private: private:
int find_segment(PN_stdfloat t); int find_segment(PN_stdfloat t);
int r_find_segment(PN_stdfloat t, int top, int bot) const; int r_find_segment(PN_stdfloat t, int top, int bot) const;
void r_adaptive_sample(int segment, PN_stdfloat t0, const LPoint3 &p0, void r_adaptive_sample(int segment, PN_stdfloat t0, const LPoint3 &p0,
PN_stdfloat t1, const LPoint3 &p1, PN_stdfloat tolerance_2); PN_stdfloat t1, const LPoint3 &p1, PN_stdfloat tolerance_2);
static PN_stdfloat sqr_dist_to_line(const LPoint3 &point, const LPoint3 &origin, static PN_stdfloat sqr_dist_to_line(const LPoint3 &point, const LPoint3 &origin,
const LVector3 &vec); const LVector3 &vec);
NurbsBasisVector _basis; NurbsBasisVector _basis;

View File

@ -22,6 +22,7 @@
#include "pointerTo.h" #include "pointerTo.h"
#include "vector_stdfloat.h" #include "vector_stdfloat.h"
#include "pvector.h" #include "pvector.h"
#include "epvector.h"
#include "nodePath.h" #include "nodePath.h"
#include "referenceCount.h" #include "referenceCount.h"
#include "luse.h" #include "luse.h"

View File

@ -18,6 +18,7 @@
#include "pandabase.h" #include "pandabase.h"
#include "referenceCount.h" #include "referenceCount.h"
#include "nurbsBasisVector.h" #include "nurbsBasisVector.h"
#include "epvector.h"
class NurbsVertex; class NurbsVertex;
@ -30,8 +31,8 @@ class NurbsVertex;
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
class EXPCL_PANDA_PARAMETRICS NurbsSurfaceResult : public ReferenceCount { class EXPCL_PANDA_PARAMETRICS NurbsSurfaceResult : public ReferenceCount {
public: public:
NurbsSurfaceResult(const NurbsBasisVector &u_basis, NurbsSurfaceResult(const NurbsBasisVector &u_basis,
const NurbsBasisVector &v_basis, const NurbsBasisVector &v_basis,
const LVecBase4 vecs[], const NurbsVertex *verts, const LVecBase4 vecs[], const NurbsVertex *verts,
int num_u_vertices, int num_v_vertices); int num_u_vertices, int num_v_vertices);
@ -47,9 +48,9 @@ PUBLISHED:
INLINE bool eval_point(PN_stdfloat u, PN_stdfloat v, LVecBase3 &point); INLINE bool eval_point(PN_stdfloat u, PN_stdfloat v, LVecBase3 &point);
INLINE bool eval_normal(PN_stdfloat u, PN_stdfloat v, LVecBase3 &normal); INLINE bool eval_normal(PN_stdfloat u, PN_stdfloat v, LVecBase3 &normal);
INLINE PN_stdfloat eval_extended_point(PN_stdfloat u, PN_stdfloat v, int d); INLINE PN_stdfloat eval_extended_point(PN_stdfloat u, PN_stdfloat v, int d);
INLINE bool eval_extended_points(PN_stdfloat u, PN_stdfloat v, int d, INLINE bool eval_extended_points(PN_stdfloat u, PN_stdfloat v, int d,
PN_stdfloat result[], int num_values); PN_stdfloat result[], int num_values);
INLINE int get_num_u_segments() const; INLINE int get_num_u_segments() const;
INLINE int get_num_v_segments() const; INLINE int get_num_v_segments() const;
void eval_segment_point(int ui, int vi, PN_stdfloat u, PN_stdfloat v, LVecBase3 &point) const; void eval_segment_point(int ui, int vi, PN_stdfloat u, PN_stdfloat v, LVecBase3 &point) const;
@ -59,7 +60,7 @@ PUBLISHED:
PN_stdfloat result[], int num_values) const; PN_stdfloat result[], int num_values) const;
INLINE PN_stdfloat get_segment_u(int ui, PN_stdfloat u) const; INLINE PN_stdfloat get_segment_u(int ui, PN_stdfloat u) const;
INLINE PN_stdfloat get_segment_v(int vi, PN_stdfloat v) const; INLINE PN_stdfloat get_segment_v(int vi, PN_stdfloat v) const;
private: private:
INLINE int verti(int ui, int vi) const; INLINE int verti(int ui, int vi) const;
INLINE int segi(int ui, int vi) const; INLINE int segi(int ui, int vi) const;

View File

@ -24,6 +24,7 @@
#include "angularForce.h" #include "angularForce.h"
#include "pvector.h" #include "pvector.h"
#include "epvector.h"
class Physical; class Physical;
@ -41,7 +42,7 @@ public:
virtual ~BaseIntegrator(); virtual ~BaseIntegrator();
PUBLISHED: PUBLISHED:
virtual void output(ostream &out) const; virtual void output(ostream &out) const;
virtual void write_precomputed_linear_matrices(ostream &out, virtual void write_precomputed_linear_matrices(ostream &out,
unsigned int indent=0) const; unsigned int indent=0) const;

View File

@ -25,6 +25,8 @@
#include "geomPrimitive.h" #include "geomPrimitive.h"
#include "geomNode.h" #include "geomNode.h"
#include "pandaNode.h" #include "pandaNode.h"
#include "pvector.h"
#include "epvector.h"
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Class : ObjToEggConverter // Class : ObjToEggConverter
@ -83,7 +85,7 @@ protected:
Vec2Table _xvt_table; Vec2Table _xvt_table;
Vec3Table _synth_vn_table; Vec3Table _synth_vn_table;
UniqueVec3Table _unique_synth_vn_table; UniqueVec3Table _unique_synth_vn_table;
LVecBase2 _ref_plane_res; LVecBase2 _ref_plane_res;
bool _v4_given, _vt3_given; bool _v4_given, _vt3_given;
bool _f_given; bool _f_given;
@ -122,8 +124,8 @@ protected:
VertexData(PandaNode *parent, const string &name); VertexData(PandaNode *parent, const string &name);
int add_vertex(const ObjToEggConverter *converter, const VertexEntry &entry); int add_vertex(const ObjToEggConverter *converter, const VertexEntry &entry);
void add_triangle(const ObjToEggConverter *converter, const VertexEntry &v0, void add_triangle(const ObjToEggConverter *converter, const VertexEntry &v0,
const VertexEntry &v1, const VertexEntry &v2, const VertexEntry &v1, const VertexEntry &v2,
int synth_vni); int synth_vni);
void close_geom(const ObjToEggConverter *converter); void close_geom(const ObjToEggConverter *converter);

View File

@ -1,6 +1,6 @@
// Filename: indexedFaceSet.h // Filename: indexedFaceSet.h
// Created by: drose (24Jun99) // Created by: drose (24Jun99)
// //
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// PANDA 3D SOFTWARE // PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved. // Copyright (c) Carnegie Mellon University. All rights reserved.
@ -15,6 +15,7 @@
#include "pandatoolbase.h" #include "pandatoolbase.h"
#include "pvector.h" #include "pvector.h"
#include "epvector.h"
#include "pset.h" #include "pset.h"
#include "eggPolygon.h" #include "eggPolygon.h"
#include "eggVertex.h" #include "eggVertex.h"
@ -43,9 +44,9 @@ private:
void get_polys(); void get_polys();
void get_vrml_colors(const VrmlNode *color_node, double transparency, void get_vrml_colors(const VrmlNode *color_node, double transparency,
pvector<UnalignedLVecBase4> &color_list); pvector<UnalignedLVecBase4> &color_list);
void get_vrml_normals(const VrmlNode *normal_node, void get_vrml_normals(const VrmlNode *normal_node,
pvector<LNormald> &normal_list); pvector<LNormald> &normal_list);
void get_vrml_uvs(const VrmlNode *texCoord_node, void get_vrml_uvs(const VrmlNode *texCoord_node,
pvector<LTexCoordd> &uv_list); pvector<LTexCoordd> &uv_list);
bool get_colors(); bool get_colors();

View File

@ -17,7 +17,7 @@
#include "pandatoolbase.h" #include "pandatoolbase.h"
#include "pmap.h" #include "pmap.h"
#include "pvector.h" #include "epvector.h"
#include "luse.h" #include "luse.h"
#include "namable.h" #include "namable.h"

View File

@ -17,6 +17,7 @@
#include "pandatoolbase.h" #include "pandatoolbase.h"
#include "pvector.h" #include "pvector.h"
#include "epvector.h"
#include "pmap.h" #include "pmap.h"
#include "indirectCompareTo.h" #include "indirectCompareTo.h"
#include "namable.h" #include "namable.h"