mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Merge branch 'development' of https://github.com/GarageGames/Torque3D into memberMess
# Conflicts: # Engine/source/console/consoleFunctions.cpp
This commit is contained in:
commit
cbce2ee805
154 changed files with 2950 additions and 705 deletions
|
|
@ -695,6 +695,54 @@ bool ConvexShape::buildPolyList( PolyListContext context, AbstractPolyList *plis
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ConvexShape::buildExportPolyList(ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &)
|
||||
{
|
||||
if (mGeometry.points.empty())
|
||||
return false;
|
||||
|
||||
//Get the collision mesh geometry
|
||||
{
|
||||
ColladaUtils::ExportData::colMesh* colMesh;
|
||||
exportData->colMeshes.increment();
|
||||
colMesh = &exportData->colMeshes.last();
|
||||
|
||||
colMesh->mesh.setTransform(&mObjToWorld, mObjScale);
|
||||
colMesh->mesh.setObject(this);
|
||||
|
||||
//Just get the visible
|
||||
buildPolyList(PLC_Export, &colMesh->mesh, getWorldBox(), getWorldSphere());
|
||||
|
||||
colMesh->colMeshName = String::ToString("ColMesh%d-1", exportData->colMeshes.size());
|
||||
}
|
||||
|
||||
//Next, process the geometry and materials.
|
||||
//Convex shapes only have the one 'level', so we'll just rely on the export post-process to back-fill
|
||||
if (isServerObject() && getClientObject())
|
||||
{
|
||||
ConvexShape* clientShape = dynamic_cast<ConvexShape*>(getClientObject());
|
||||
|
||||
exportData->meshData.increment();
|
||||
|
||||
//Prep a meshData for this shape in particular
|
||||
ColladaUtils::ExportData::meshLODData* meshData = &exportData->meshData.last();
|
||||
|
||||
//Fill out the info we'll need later to actually append our mesh data for the detail levels during the processing phase
|
||||
meshData->shapeInst = nullptr;
|
||||
meshData->originatingObject = this;
|
||||
meshData->meshTransform = mObjToWorld;
|
||||
meshData->scale = mObjScale;
|
||||
|
||||
meshData->meshDetailLevels.increment();
|
||||
|
||||
ColladaUtils::ExportData::detailLevel* curDetail = &meshData->meshDetailLevels.last();
|
||||
|
||||
//Make sure we denote the size this detail level has
|
||||
curDetail->size = 512;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ConvexShape::_export( OptimizedPolyList *plist, const Box3F &box, const SphereF &sphere )
|
||||
{
|
||||
BaseMatInstance *matInst = mMaterialInst;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue