mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-19 19:35:26 +00:00
Cleanup of export function to remove redundant arg
Removed unused var Cleaned up collision export on convexShape Added prefab export functionality
This commit is contained in:
parent
787b8be82c
commit
8dedcf456a
9 changed files with 23 additions and 13 deletions
|
|
@ -697,7 +697,7 @@ bool ConvexShape::buildPolyList( PolyListContext context, AbstractPolyList *plis
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ConvexShape::buildExportPolyList(PolyListContext context, ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &)
|
||||
bool ConvexShape::buildExportPolyList(ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &)
|
||||
{
|
||||
if (mGeometry.points.empty())
|
||||
return false;
|
||||
|
|
@ -740,9 +740,7 @@ bool ConvexShape::buildExportPolyList(PolyListContext context, ColladaUtils::Exp
|
|||
ColladaUtils::ExportData::detailLevel* curDetail = &meshData->meshDetailLevels.last();
|
||||
|
||||
//Make sure we denote the size this detail level has
|
||||
curDetail->size = getNextPow2(getObjBox().len());
|
||||
|
||||
bool t = true;
|
||||
curDetail->size = 512;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ public:
|
|||
virtual void prepRenderImage( SceneRenderState *state );
|
||||
virtual void buildConvex( const Box3F &box, Convex *convex );
|
||||
virtual bool buildPolyList( PolyListContext context, AbstractPolyList *polyList, const Box3F &box, const SphereF &sphere );
|
||||
virtual bool buildExportPolyList(PolyListContext context, ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &);
|
||||
virtual bool buildExportPolyList(ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &);
|
||||
virtual bool castRay( const Point3F &start, const Point3F &end, RayInfo *info );
|
||||
virtual bool collideBox( const Point3F &start, const Point3F &end, RayInfo *info );
|
||||
|
||||
|
|
|
|||
|
|
@ -538,6 +538,19 @@ bool Prefab::buildPolyList(PolyListContext context, AbstractPolyList* polyList,
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Prefab::buildExportPolyList(ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &sphere)
|
||||
{
|
||||
Vector<SceneObject*> foundObjects;
|
||||
mChildGroup->findObjectByType(foundObjects);
|
||||
|
||||
for (S32 i = 0; i < foundObjects.size(); i++)
|
||||
{
|
||||
foundObjects[i]->buildExportPolyList(exportData, box, sphere);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ExplodePrefabUndoAction::ExplodePrefabUndoAction( Prefab *prefab )
|
||||
: UndoAction( "Explode Prefab" )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ public:
|
|||
|
||||
bool buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &box, const SphereF& sphere);
|
||||
|
||||
bool buildExportPolyList(ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &);
|
||||
|
||||
protected:
|
||||
|
||||
void _closeFile( bool removeFileNotify );
|
||||
|
|
|
|||
|
|
@ -1073,7 +1073,7 @@ bool TSStatic::buildPolyList(PolyListContext context, AbstractPolyList* polyList
|
|||
return true;
|
||||
}
|
||||
|
||||
bool TSStatic::buildExportPolyList(PolyListContext context, ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &)
|
||||
bool TSStatic::buildExportPolyList(ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &)
|
||||
{
|
||||
if (!mShapeInstance)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ protected:
|
|||
bool castRay(const Point3F &start, const Point3F &end, RayInfo* info);
|
||||
bool castRayRendered(const Point3F &start, const Point3F &end, RayInfo* info);
|
||||
bool buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &box, const SphereF& sphere);
|
||||
bool buildExportPolyList(PolyListContext context, ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &);
|
||||
bool buildExportPolyList(ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &);
|
||||
void buildConvex(const Box3F& box, Convex* convex);
|
||||
|
||||
bool _createShape();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue