mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Bit more detailed debug info
This commit is contained in:
parent
b717dfefdc
commit
4436e39be5
@ -317,19 +317,29 @@ void DAEToEggConverter::process_instance(PT(EggGroup) parent, const FCDEntityIns
|
|||||||
void DAEToEggConverter::process_mesh(PT(EggGroup) parent, const FCDGeometryMesh* mesh, PT(DaeMaterials) materials) {
|
void DAEToEggConverter::process_mesh(PT(EggGroup) parent, const FCDGeometryMesh* mesh, PT(DaeMaterials) materials) {
|
||||||
nassertv(mesh != NULL);
|
nassertv(mesh != NULL);
|
||||||
daeegg_cat.debug() << "Processing mesh with id " << FROM_FSTRING(mesh->GetDaeId()) << endl;
|
daeegg_cat.debug() << "Processing mesh with id " << FROM_FSTRING(mesh->GetDaeId()) << endl;
|
||||||
|
|
||||||
// Create the egg stuff to hold this mesh
|
// Create the egg stuff to hold this mesh
|
||||||
PT(EggGroup) mesh_group = new EggGroup(FROM_FSTRING(mesh->GetDaeId()));
|
PT(EggGroup) mesh_group = new EggGroup(FROM_FSTRING(mesh->GetDaeId()));
|
||||||
parent->add_child(mesh_group);
|
parent->add_child(mesh_group);
|
||||||
PT(EggVertexPool) mesh_pool = new EggVertexPool(FROM_FSTRING(mesh->GetDaeId()));
|
PT(EggVertexPool) mesh_pool = new EggVertexPool(FROM_FSTRING(mesh->GetDaeId()));
|
||||||
mesh_group->add_child(mesh_pool);
|
mesh_group->add_child(mesh_pool);
|
||||||
_vertex_pools[FROM_FSTRING(mesh->GetDaeId())] = mesh_pool;
|
_vertex_pools[FROM_FSTRING(mesh->GetDaeId())] = mesh_pool;
|
||||||
|
|
||||||
// First retrieve the vertex source
|
// First retrieve the vertex source
|
||||||
if (mesh->GetSourceCount() == 0) return;
|
if (mesh->GetSourceCount() == 0) {
|
||||||
|
daeegg_cat.debug() << "Mesh with id " << FROM_FSTRING(mesh->GetDaeId()) << " has no sources" << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
const FCDGeometrySource* vsource = mesh->FindSourceByType(FUDaeGeometryInput::POSITION);
|
const FCDGeometrySource* vsource = mesh->FindSourceByType(FUDaeGeometryInput::POSITION);
|
||||||
if (vsource == NULL) return;
|
if (vsource == NULL) {
|
||||||
|
daeegg_cat.debug() << "Mesh with id " << FROM_FSTRING(mesh->GetDaeId()) << " has no source for POSITION data" << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Loop through the polygon groups and add them
|
// Loop through the polygon groups and add them
|
||||||
daeegg_cat.spam() << "Mesh with id " << FROM_FSTRING(mesh->GetDaeId()) << " has " << mesh->GetPolygonsCount() << " polygon groups" << endl;
|
daeegg_cat.spam() << "Mesh with id " << FROM_FSTRING(mesh->GetDaeId()) << " has " << mesh->GetPolygonsCount() << " polygon groups" << endl;
|
||||||
if (mesh->GetPolygonsCount() == 0) return;
|
if (mesh->GetPolygonsCount() == 0) return;
|
||||||
|
|
||||||
// This is an array of pointers, I know. But since they are refcounted, I don't have a better idea.
|
// This is an array of pointers, I know. But since they are refcounted, I don't have a better idea.
|
||||||
PT(EggGroup) *primitive_holders = new PT(EggGroup) [mesh->GetPolygonsCount()];
|
PT(EggGroup) *primitive_holders = new PT(EggGroup) [mesh->GetPolygonsCount()];
|
||||||
for (size_t gr = 0; gr < mesh->GetPolygonsCount(); ++gr) {
|
for (size_t gr = 0; gr < mesh->GetPolygonsCount(); ++gr) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user