mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 11:29:50 +02:00
poor mans version of mesh part bounds
This commit is contained in:
parent
ea31fdcc26
commit
750d9c0616
2 changed files with 13 additions and 12 deletions
|
@ -3420,6 +3420,13 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se
|
||||||
|
|
||||||
// Before the deferred pass, let's try to use the render engine
|
// Before the deferred pass, let's try to use the render engine
|
||||||
_renderEngine->run();
|
_renderEngine->run();
|
||||||
|
|
||||||
|
/*
|
||||||
|
qDebug() << "renderArgs._materialSwitches:" << renderArgs->_materialSwitches;
|
||||||
|
qDebug() << "renderArgs._trianglesRendered:" << renderArgs->_trianglesRendered;
|
||||||
|
qDebug() << "renderArgs._quadsRendered:" << renderArgs->_quadsRendered;
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -784,7 +784,7 @@ namespace render {
|
||||||
|
|
||||||
template <> const Item::Bound payloadGetBound(const TransparentMeshPart::Pointer& payload) {
|
template <> const Item::Bound payloadGetBound(const TransparentMeshPart::Pointer& payload) {
|
||||||
if (payload) {
|
if (payload) {
|
||||||
//return payload->model->getPartBounds(payload->meshIndex, payload->partIndex);
|
return payload->model->getPartBounds(payload->meshIndex, payload->partIndex);
|
||||||
}
|
}
|
||||||
return render::Item::Bound();
|
return render::Item::Bound();
|
||||||
}
|
}
|
||||||
|
@ -815,7 +815,7 @@ namespace render {
|
||||||
|
|
||||||
template <> const Item::Bound payloadGetBound(const OpaqueMeshPart::Pointer& payload) {
|
template <> const Item::Bound payloadGetBound(const OpaqueMeshPart::Pointer& payload) {
|
||||||
if (payload) {
|
if (payload) {
|
||||||
//return payload->model->getPartBounds(payload->meshIndex, payload->partIndex);
|
return payload->model->getPartBounds(payload->meshIndex, payload->partIndex);
|
||||||
}
|
}
|
||||||
return render::Item::Bound();
|
return render::Item::Bound();
|
||||||
}
|
}
|
||||||
|
@ -2176,16 +2176,10 @@ bool Model::renderInScene(float alpha, RenderArgs* args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
AABox Model::getPartBounds(int meshIndex, int partIndex) {
|
AABox Model::getPartBounds(int meshIndex, int partIndex) {
|
||||||
const FBXGeometry& geometry = _geometry->getFBXGeometry();
|
if (_calculatedMeshBoxesValid) {
|
||||||
const FBXMesh& mesh = geometry.meshes.at(meshIndex);
|
return _calculatedMeshBoxes[meshIndex];
|
||||||
AABox partBox = mesh._mesh.evalPartBound(partIndex);
|
}
|
||||||
|
return AABox();
|
||||||
// FIX ME!
|
|
||||||
// 1) needs to translate to world space, these values are in model space
|
|
||||||
// 2) mesh._mesh.parts doesn't always have the correct values in it... so we
|
|
||||||
// need to just use mesh.parts or find/fix whatever is causing mesh._mesh
|
|
||||||
// to not contain data
|
|
||||||
return partBox;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Model::renderPart(RenderArgs* args, int meshIndex, int partIndex, bool translucent) {
|
void Model::renderPart(RenderArgs* args, int meshIndex, int partIndex, bool translucent) {
|
||||||
|
|
Loading…
Reference in a new issue