OSDN Git Service

Merge branch 'feature/#36529_SlimDXからSharpDXへの移行' into develop
[dtxmania/dtxmania.git] / SlimDXc_Jun2010(VC++2008) / source / direct3d9 / AnimationSet.cpp
diff --git a/SlimDXc_Jun2010(VC++2008)/source/direct3d9/AnimationSet.cpp b/SlimDXc_Jun2010(VC++2008)/source/direct3d9/AnimationSet.cpp
deleted file mode 100644 (file)
index dd56eae..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#include "stdafx.h"\r
-/*\r
-* Copyright (c) 2007-2010 SlimDX Group\r
-* \r
-* Permission is hereby granted, free of charge, to any person obtaining a copy\r
-* of this software and associated documentation files (the "Software"), to deal\r
-* in the Software without restriction, including without limitation the rights\r
-* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
-* copies of the Software, and to permit persons to whom the Software is\r
-* furnished to do so, subject to the following conditions:\r
-* \r
-* The above copyright notice and this permission notice shall be included in\r
-* all copies or substantial portions of the Software.\r
-* \r
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
-* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
-* THE SOFTWARE.\r
-*/\r
-#include <d3d9.h>\r
-#include <d3dx9.h>\r
-#include <vcclr.h>\r
-\r
-#include "../ComObject.h"\r
-#include "../Math/Vector3.h"\r
-#include "../DataStream.h"\r
-\r
-#include "Device.h"\r
-#include "Mesh.h"\r
-#include "ProgressiveMesh.h"\r
-#include "PatchMesh.h"\r
-#include "SkinInfo.h"\r
-#include "AnimationFrame.h"\r
-#include "AnimationSet.h"\r
-#include "Direct3D9Exception.h"\r
-\r
-using namespace System;\r
-using namespace System::Collections::Generic;\r
-using namespace System::Runtime::InteropServices;\r
-\r
-namespace SlimDX\r
-{\r
-namespace Direct3D9\r
-{\r
-       int AnimationSet::GetAnimationIndex( String^ name )\r
-       {\r
-               array<unsigned char>^ nameBytes = System::Text::ASCIIEncoding::ASCII->GetBytes( name );\r
-               pin_ptr<const unsigned char> pinnedName = &nameBytes[0];\r
-               unsigned int result;\r
-\r
-               HRESULT hr = InternalPointer->GetAnimationIndexByName( reinterpret_cast<LPCSTR>( pinnedName ), &result );\r
-\r
-               if( RECORD_D3D9( hr ).IsFailure )\r
-                       return 0;\r
-\r
-               return static_cast<int>( result );\r
-       }\r
-\r
-       String^ AnimationSet::GetAnimationName( int index )\r
-       {\r
-               LPCSTR result;\r
-               HRESULT hr = InternalPointer->GetAnimationNameByIndex( index, &result );\r
-\r
-               if( RECORD_D3D9( hr ).IsFailure )\r
-                       return nullptr;\r
-\r
-               return gcnew String( result );\r
-       }\r
-\r
-       IntPtr AnimationSet::GetCallback( double position, CallbackSearchFlags flags, [Out] double% callbackPosition )\r
-       {\r
-               pin_ptr<double> pinPosition = &callbackPosition;\r
-               LPVOID data;\r
-\r
-               HRESULT hr = InternalPointer->GetCallback( position, static_cast<DWORD>( flags ), pinPosition, &data );\r
-\r
-               if( RECORD_D3D9( hr ).IsFailure )\r
-                       return IntPtr::Zero;\r
-\r
-               return IntPtr( data );\r
-       }\r
-\r
-       AnimationOutput^ AnimationSet::GetTransformation( double periodicPosition, int animation )\r
-       {\r
-               Vector3 scale;\r
-               Vector3 translation;\r
-               Quaternion rotation;\r
-\r
-               HRESULT hr = InternalPointer->GetSRT( periodicPosition, animation, reinterpret_cast<D3DXVECTOR3*>( &scale ), \r
-                       reinterpret_cast<D3DXQUATERNION*>( &rotation ), reinterpret_cast<D3DXVECTOR3*>( &translation ) );\r
-               \r
-               if( RECORD_D3D9( hr ).IsFailure )\r
-                       return nullptr;\r
-\r
-               AnimationOutput^ output = gcnew AnimationOutput();\r
-               output->Flags = AnimationOutputFlags::Rotation | AnimationOutputFlags::Scale | AnimationOutputFlags::Translation;\r
-               output->Scaling = scale;\r
-               output->Translation = translation;\r
-               output->Rotation = rotation;\r
-\r
-               return output;\r
-       }\r
-\r
-       String^ AnimationSet::Name::get()\r
-       {\r
-               return gcnew String( InternalPointer->GetName() );\r
-       }\r
-\r
-       int AnimationSet::AnimationCount::get()\r
-       {\r
-               return InternalPointer->GetNumAnimations();\r
-       }\r
-\r
-       double AnimationSet::Period::get()\r
-       {\r
-               return InternalPointer->GetPeriod();\r
-       }\r
-\r
-       double AnimationSet::GetPeriodicPosition( double position )\r
-       {\r
-               return InternalPointer->GetPeriodicPosition( position );\r
-       }\r
-}\r
-}
\ No newline at end of file