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

Method exportToCollada

Engine/source/gui/editor/guiShapeEdPreview.cpp:908–940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

906}
907
908void GuiShapeEdPreview::exportToCollada( const String& path )
909{
910#ifdef TORQUE_COLLADA
911 if ( mModel )
912 {
913 MatrixF orientation( true );
914 orientation.setPosition( mModel->getShape()->mBounds.getCenter() );
915 orientation.inverse();
916
917 OptimizedPolyList polyList;
918 polyList.setBaseTransform( orientation );
919
920 mModel->buildPolyList( &polyList, mCurrentDL );
921 for ( S32 i = 0; i < mMounts.size(); i++ )
922 {
923 MountedShape* mount = mMounts[i];
924
925 MatrixF mat( true );
926 if ( mount->mNode != -1 )
927 {
928 mat = mModel->mNodeTransforms[ mount->mNode ];
929 mat *= mount->mTransform;
930 }
931
932 polyList.setTransform( &mat, Point3F::One );
933 mount->mShape->buildPolyList( &polyList, 0 );
934 }
935
936 // Use a ColladaUtils function to do the actual export to a Collada file
937 ColladaUtils::exportToCollada( path, polyList );
938 }
939#endif
940}
941
942//-----------------------------------------------------------------------------
943// 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