MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / exportToCollada

Method exportToCollada

Engine/source/gui/editor/guiShapeEdPreview.cpp:850–882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

848}
849
850void GuiShapeEdPreview::exportToCollada( const String& path )
851{
852#ifdef TORQUE_COLLADA
853 if ( mModel )
854 {
855 MatrixF orientation( true );
856 orientation.setPosition( mModel->getShape()->bounds.getCenter() );
857 orientation.inverse();
858
859 OptimizedPolyList polyList;
860 polyList.setBaseTransform( orientation );
861
862 mModel->buildPolyList( &polyList, mCurrentDL );
863 for ( S32 i = 0; i < mMounts.size(); i++ )
864 {
865 MountedShape* mount = mMounts[i];
866
867 MatrixF mat( true );
868 if ( mount->mNode != -1 )
869 {
870 mat = mModel->mNodeTransforms[ mount->mNode ];
871 mat *= mount->mTransform;
872 }
873
874 polyList.setTransform( &mat, Point3F::One );
875 mount->mShape->buildPolyList( &polyList, 0 );
876 }
877
878 // Use a ColladaUtils function to do the actual export to a Collada file
879 ColladaUtils::exportToCollada( path, polyList );
880 }
881#endif
882}
883
884//-----------------------------------------------------------------------------
885// Camera control and Node editing

Callers 1

Calls 8

setBaseTransformMethod · 0.80
setPositionMethod · 0.45
getCenterMethod · 0.45
getShapeMethod · 0.45
inverseMethod · 0.45
buildPolyListMethod · 0.45
sizeMethod · 0.45
setTransformMethod · 0.45

Tested by

no test coverage detected