mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
12e71ff1a6
@ -68,6 +68,19 @@ find_anim_bundle(PandaNode *root) {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void AnimBundleNode::
|
||||||
|
output(std::ostream &out) const {
|
||||||
|
PandaNode::output(out);
|
||||||
|
if (_bundle != nullptr) {
|
||||||
|
out << " (";
|
||||||
|
_bundle->output(out);
|
||||||
|
out << ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tells the BamReader how to create objects of type AnimBundleNode.
|
* Tells the BamReader how to create objects of type AnimBundleNode.
|
||||||
*/
|
*/
|
||||||
|
@ -49,6 +49,8 @@ private:
|
|||||||
PT(AnimBundle) _bundle;
|
PT(AnimBundle) _bundle;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
virtual void output(std::ostream &out) const;
|
||||||
|
|
||||||
static void register_with_read_factory();
|
static void register_with_read_factory();
|
||||||
virtual void write_datagram(BamWriter* manager, Datagram &me);
|
virtual void write_datagram(BamWriter* manager, Datagram &me);
|
||||||
virtual int complete_pointers(TypedWritable **p_list,
|
virtual int complete_pointers(TypedWritable **p_list,
|
||||||
|
@ -2185,6 +2185,8 @@ triangulate_single_polygon(int nvert, int posmax, int side) {
|
|||||||
endv = mchain[posmax].vnum;
|
endv = mchain[posmax].vnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int num_triangles = 0;
|
||||||
|
|
||||||
while ((v != endv) || (ri > 1))
|
while ((v != endv) || (ri > 1))
|
||||||
{
|
{
|
||||||
// cerr << " v = " << v << " ri = " << ri << " rc = " << rc.size() << "
|
// cerr << " v = " << v << " ri = " << ri << " rc = " << rc.size() << "
|
||||||
@ -2199,8 +2201,13 @@ triangulate_single_polygon(int nvert, int posmax, int side) {
|
|||||||
vert[rc[ri]].pt);
|
vert[rc[ri]].pt);
|
||||||
if ( crossResult >= 0 ) /* could be convex corner or straight */
|
if ( crossResult >= 0 ) /* could be convex corner or straight */
|
||||||
{
|
{
|
||||||
if ( crossResult > 0) /* convex corner: cut it off */
|
if (crossResult > 0) { /* convex corner: cut it off */
|
||||||
_result.push_back(Triangle(this, rc[ri - 1], rc[ri], v));
|
_result.push_back(Triangle(this, rc[ri - 1], rc[ri], v));
|
||||||
|
if (++num_triangles >= nvert - 2) {
|
||||||
|
// We can't generate more than this number of triangles.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
/* else : perfectly straight, will be abandoned anyway */
|
/* else : perfectly straight, will be abandoned anyway */
|
||||||
ri--;
|
ri--;
|
||||||
rc.pop_back();
|
rc.pop_back();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user