예제 #1
0
        /// <summary>	
        /// <p>Destroys the subtree of frames under the root, including the root.</p>	
        /// </summary>	
        /// <param name="frameRootRef"><dd>  <p>Pointer to the root node.</p> </dd></param>	
        /// <param name="allocRef"><dd>  <p>Allocation interface used to deallocate nodes of the frame hierarchy.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXFrameDestroy']/*"/>	
        /// <msdn-id>bb172848</msdn-id>	
        /// <unmanaged>HRESULT D3DXFrameDestroy([In] D3DXFRAME* pFrameRoot,[In] ID3DXAllocateHierarchy* pAlloc)</unmanaged>	
        /// <unmanaged-short>D3DXFrameDestroy</unmanaged-short>	
        public static void FrameDestroy(ref SharpDX.Direct3D9.Frame frameRootRef, SharpDX.Direct3D9.IAllocateHierarchy allocRef) {
            unsafe {
                var frameRootRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRootRef.__MarshalTo(ref frameRootRef_);
                SharpDX.Result __result__;
                __result__= 
				D3DXFrameDestroy_(&frameRootRef_, (void*)((allocRef == null)?IntPtr.Zero:allocRef.NativePointer));		
                frameRootRef.__MarshalFree(ref frameRootRef_);
                __result__.CheckError();
            }
        }
예제 #2
0
        /// <summary>	
        /// <p>Counts number of frames in a subtree that have non-null names.</p>	
        /// </summary>	
        /// <param name="frameRootRef"><dd>  <p>Pointer to the root node of the subtree.</p> </dd></param>	
        /// <returns><p>Returns the frame count.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXFrameNumNamedMatrices']/*"/>	
        /// <msdn-id>bb172850</msdn-id>	
        /// <unmanaged>unsigned int D3DXFrameNumNamedMatrices([In] const D3DXFRAME* pFrameRoot)</unmanaged>	
        /// <unmanaged-short>D3DXFrameNumNamedMatrices</unmanaged-short>	
        public static int FrameNumNamedMatrices(ref SharpDX.Direct3D9.Frame frameRootRef) {
            unsafe {
                var frameRootRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRootRef.__MarshalTo(ref frameRootRef_);
                int __result__;
                __result__= 
				D3DXFrameNumNamedMatrices_(&frameRootRef_);		
                frameRootRef.__MarshalFree(ref frameRootRef_);
                return __result__;
            }
        }
예제 #3
0
        /// <summary>	
        /// <p>Computes the bounding sphere of all the meshes in the frame hierarchy.</p>	
        /// </summary>	
        /// <param name="frameRootRef"><dd>  <p>Pointer to the root node.</p> </dd></param>	
        /// <param name="objectCenterRef"><dd>  <p>Returns the center of the bounding sphere.</p> </dd></param>	
        /// <param name="objectRadiusRef"><dd>  <p>Returns the radius of the bounding sphere.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXFrameCalculateBoundingSphere']/*"/>	
        /// <msdn-id>bb172847</msdn-id>	
        /// <unmanaged>HRESULT D3DXFrameCalculateBoundingSphere([In] const D3DXFRAME* pFrameRoot,[In] D3DXVECTOR3* pObjectCenter,[In] float* pObjectRadius)</unmanaged>	
        /// <unmanaged-short>D3DXFrameCalculateBoundingSphere</unmanaged-short>	
        public static void FrameCalculateBoundingSphere(ref SharpDX.Direct3D9.Frame frameRootRef, SharpDX.Mathematics.Interop.RawVector3 objectCenterRef, float objectRadiusRef) {
            unsafe {
                var frameRootRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRootRef.__MarshalTo(ref frameRootRef_);
                SharpDX.Result __result__;
                __result__= 
				D3DXFrameCalculateBoundingSphere_(&frameRootRef_, &objectCenterRef, &objectRadiusRef);		
                frameRootRef.__MarshalFree(ref frameRootRef_);
                __result__.CheckError();
            }
        }
예제 #4
0
        /// <summary>	
        /// <p>Finds the child frame of a root frame.</p>	
        /// </summary>	
        /// <param name="frameRootRef"><dd>  <p>Pointer to the root frame. See <strong><see cref="SharpDX.Direct3D9.Frame"/></strong>.</p> </dd></param>	
        /// <param name="name"><dd>  <p>Name of the child frame to find.</p> </dd></param>	
        /// <returns><p>Returns the child frame if it is found, or <strong><c>null</c></strong> otherwise. See <strong><see cref="SharpDX.Direct3D9.Frame"/></strong>.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXFrameFind']/*"/>	
        /// <msdn-id>bb172849</msdn-id>	
        /// <unmanaged>D3DXFRAME* D3DXFrameFind([In] const D3DXFRAME* pFrameRoot,[In] const char* Name)</unmanaged>	
        /// <unmanaged-short>D3DXFrameFind</unmanaged-short>	
        public static SharpDX.Direct3D9.Frame FrameFind(ref SharpDX.Direct3D9.Frame frameRootRef, string name) {
            unsafe {
                var frameRootRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRootRef.__MarshalTo(ref frameRootRef_);
                IntPtr name_ = Utilities.StringToHGlobalAnsi(name);
                SharpDX.Direct3D9.Frame __result__;
                __result__= 
				D3DXFrameFind_(&frameRootRef_, (void*)name_);		
                frameRootRef.__MarshalFree(ref frameRootRef_);
                Marshal.FreeHGlobal(name_ );
                return __result__;
            }
        }
예제 #5
0
        /// <summary>	
        /// <p>Loads the first frame hierarchy from a .x file.</p>	
        /// </summary>	
        /// <param name="memory"><dd>  <p>Pointer to a buffer that contains the mesh hierarchy.</p> </dd></param>	
        /// <param name="sizeOfMemory"><dd>  <p>Size of the pMemory buffer, in bytes.</p> </dd></param>	
        /// <param name="meshOptions"><dd>  <p>Combination of one or more flags from the <strong>D3DXMESH</strong> enumeration that specify creation options for the mesh.</p> </dd></param>	
        /// <param name="d3DDeviceRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.Device"/></strong> interface, the device object associated with the mesh.</p> </dd></param>	
        /// <param name="allocRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong> interface.</p> </dd></param>	
        /// <param name="userDataLoaderRef"><dd>  <p>Application provided interface that allows loading of user data. See <strong><see cref="SharpDX.Direct3D9.ILoadUserData"/></strong>.</p> </dd></param>	
        /// <param name="frameHierarchyOut"><dd>  <p>Returns a reference to the loaded frame hierarchy. See <strong><see cref="SharpDX.Direct3D9.Frame"/></strong>.</p> </dd></param>	
        /// <param name="animControllerOut"><dd>  <p>Returns a reference to the animation controller corresponding to animation in the .x file. This is created with default tracks and events. See <strong><see cref="SharpDX.Direct3D9.AnimationController"/></strong>.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <remarks>	
        /// <p>All the meshes in the file will be collapsed into one output mesh. If the file contains a frame hierarchy, all the transformations will be applied to the mesh.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXLoadMeshHierarchyFromXInMemory']/*"/>	
        /// <msdn-id>bb172895</msdn-id>	
        /// <unmanaged>HRESULT D3DXLoadMeshHierarchyFromXInMemory([In] const void* Memory,[In] unsigned int SizeOfMemory,[In] unsigned int MeshOptions,[In] IDirect3DDevice9* pD3DDevice,[In] ID3DXAllocateHierarchy* pAlloc,[In] ID3DXLoadUserData* pUserDataLoader,[In] D3DXFRAME** ppFrameHierarchy,[In] ID3DXAnimationController** ppAnimController)</unmanaged>	
        /// <unmanaged-short>D3DXLoadMeshHierarchyFromXInMemory</unmanaged-short>	
        public static void LoadMeshHierarchyFromXInMemory(System.IntPtr memory, int sizeOfMemory, int meshOptions, SharpDX.Direct3D9.Device d3DDeviceRef, SharpDX.Direct3D9.IAllocateHierarchy allocRef, SharpDX.Direct3D9.ILoadUserData userDataLoaderRef, ref SharpDX.Direct3D9.Frame frameHierarchyOut, out SharpDX.Direct3D9.AnimationController animControllerOut) {
            unsafe {
                var frameHierarchyOut_ = new SharpDX.Direct3D9.Frame.__Native();
                frameHierarchyOut.__MarshalTo(ref frameHierarchyOut_);
                IntPtr animControllerOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				D3DXLoadMeshHierarchyFromXInMemory_((void*)memory, sizeOfMemory, meshOptions, (void*)((d3DDeviceRef == null)?IntPtr.Zero:d3DDeviceRef.NativePointer), (void*)((allocRef == null)?IntPtr.Zero:allocRef.NativePointer), (void*)((userDataLoaderRef == null)?IntPtr.Zero:userDataLoaderRef.NativePointer), &frameHierarchyOut_, &animControllerOut_);		
                frameHierarchyOut.__MarshalFree(ref frameHierarchyOut_);
                animControllerOut= (animControllerOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D9.AnimationController(animControllerOut_);	
                __result__.CheckError();
            }
        }
예제 #6
0
        /// <summary>	
        /// <p>Creates a .x file and saves the mesh hierarchy and corresponding animations in it.</p>	
        /// </summary>	
        /// <param name="filename"><dd>  <p>Pointer to a string that specifies the name of the .x file identifying the saved mesh. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.</p> </dd></param>	
        /// <param name="xFormat"><dd>  <p>Format of the .x file (text or binary, compressed or not). See <see cref="SharpDX.Direct3D9.XFileFormat"/>. <see cref="SharpDX.Direct3D9.XFileFormat.Compressed"/> can be combined (using a logical OR) with either the <see cref="SharpDX.Direct3D9.XFileFormat.Binary"/> or <see cref="SharpDX.Direct3D9.XFileFormat.Text"/> flags to reduce the output file size.</p> </dd></param>	
        /// <param name="frameRootRef"><dd>  <p>Root node of the hierarchy to be saved. See <strong><see cref="SharpDX.Direct3D9.Frame"/></strong>.</p> </dd></param>	
        /// <param name="animControllerRef"><dd>  <p>Animation controller that has animation sets to be stored. See <strong><see cref="SharpDX.Direct3D9.AnimationController"/></strong>.</p> </dd></param>	
        /// <param name="userDataSaverRef"><dd>  <p>Application-provided interface that allows saving of user data. See <strong><see cref="SharpDX.Direct3D9.ISaveUserData"/></strong>.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
        /// <remarks>	
        /// <p>The compiler setting also determines the function version. If Unicode is defined, the function call resolves to <see cref="SharpDX.Direct3D9.D3DX9.SaveMeshHierarchyToFileW"/>. Otherwise, the function call resolves to D3DXSaveMeshHierarchyToFileA.</p><p>This function does not save compressed animation sets.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXSaveMeshHierarchyToFileW']/*"/>	
        /// <msdn-id>bb205427</msdn-id>	
        /// <unmanaged>HRESULT D3DXSaveMeshHierarchyToFileW([In] const wchar_t* Filename,[In] unsigned int XFormat,[In] const D3DXFRAME* pFrameRoot,[In] ID3DXAnimationController* pAnimController,[In] ID3DXSaveUserData* pUserDataSaver)</unmanaged>	
        /// <unmanaged-short>D3DXSaveMeshHierarchyToFileW</unmanaged-short>	
        public static void SaveMeshHierarchyToFileW(string filename, int xFormat, ref SharpDX.Direct3D9.Frame frameRootRef, SharpDX.Direct3D9.AnimationController animControllerRef, SharpDX.Direct3D9.ISaveUserData userDataSaverRef) {
            unsafe {
                IntPtr filename_ = Utilities.StringToHGlobalUni(filename);
                var frameRootRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRootRef.__MarshalTo(ref frameRootRef_);
                SharpDX.Result __result__;
                __result__= 
				D3DXSaveMeshHierarchyToFileW_((void*)filename_, xFormat, &frameRootRef_, (void*)((animControllerRef == null)?IntPtr.Zero:animControllerRef.NativePointer), (void*)((userDataSaverRef == null)?IntPtr.Zero:userDataSaverRef.NativePointer));		
                Marshal.FreeHGlobal(filename_ );
                frameRootRef.__MarshalFree(ref frameRootRef_);
                __result__.CheckError();
            }
        }
예제 #7
0
        /// <summary>	
        /// <p>Loads the first frame hierarchy from a .x file.</p>	
        /// </summary>	
        /// <param name="filename"><dd>  <p>Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.</p> </dd></param>	
        /// <param name="meshOptions"><dd>  <p>Combination of one or more flags from the <strong>D3DXMESH</strong> enumeration that specify creation options for the mesh.</p> </dd></param>	
        /// <param name="d3DDeviceRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.Device"/></strong> interface, the device object associated with the mesh.</p> </dd></param>	
        /// <param name="allocRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong> interface.</p> </dd></param>	
        /// <param name="userDataLoaderRef"><dd>  <p>Application provided interface that allows loading of user data. See <strong><see cref="SharpDX.Direct3D9.ILoadUserData"/></strong>.</p> </dd></param>	
        /// <param name="frameHierarchyOut"><dd>  <p>Returns a reference to the loaded frame hierarchy. See <strong><see cref="SharpDX.Direct3D9.Frame"/></strong>.</p> </dd></param>	
        /// <param name="animControllerOut"><dd>  <p>Returns a reference to the animation controller corresponding to animation in the .x file. This is created with default tracks and events. See <strong><see cref="SharpDX.Direct3D9.AnimationController"/></strong>.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <remarks>	
        /// <p>The compiler setting also determines the function version. If Unicode is defined, the function call resolves to <see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/>. Otherwise, the function call resolves to D3DXLoadMeshHierarchyFromXA.</p><p>All the meshes in the file will be collapsed into one output mesh. If the file contains a frame hierarchy, all the transformations will be applied to the mesh.</p><p><strong><see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/></strong> loads the animation data and frame hierarchy from a .x file. It scans the .x file and builds a frame hierarchy and animation controller according to the <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong>-derived object passed to it through pAlloc. Loading the data requires several steps as follows:</p><ol> <li>Derive <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong>, implementing each method.  This controls how frames and meshes are allocated and freed.</li> <li>Derive <strong><see cref="SharpDX.Direct3D9.ILoadUserData"/></strong>, implementing each method. If your .x file has no embedded user-defined data, or if you do not need it, you can skip this part.</li> <li>Create an object of your <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong> class, and optionally of your LoadUserData class. You do not need to call any methods of these objects yourself.</li> <li>Call <strong><see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/></strong>, passing in your <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong> object and your <strong><see cref="SharpDX.Direct3D9.ILoadUserData"/></strong> object (or <strong><c>null</c></strong>) to create the frame hierarchy and animation controller.  All the animation sets and frames are automatically registered to the animation controller.</li> </ol><p>During the load, <strong>CreateFrame</strong> and <strong>LoadFrameChildData</strong> are called back on each frame to control loading and allocation of the frame.  The application defines these methods to control how frames are stored.  <strong>CreateMeshContainer</strong> and <strong>LoadMeshChildData</strong> are called back on each mesh object to control loading and allocation of mesh objects.  <strong>LoadTopLevelData</strong> is called back for each top level object that doesn't get loaded by the other methods.</p><p>To free this data, call ID3DXAnimationController::Release to free the animation sets, and <strong>D3DXFRAMEDestroy</strong>, passing in the root node of the frame hierarchy and an object of your derived <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong> class.  <strong>DestroyFrame</strong> and <strong>DestroyMeshContainer</strong> will each be called for every frame and mesh object in the frame hierarchy.  Your implementation of <strong>DestroyFrame</strong> should release everything allocated by <strong>CreateFrame</strong>, and likewise for the mesh container methods.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXLoadMeshHierarchyFromXW']/*"/>	
        /// <msdn-id>bb172894</msdn-id>	
        /// <unmanaged>HRESULT D3DXLoadMeshHierarchyFromXW([In] const wchar_t* Filename,[In] unsigned int MeshOptions,[In] IDirect3DDevice9* pD3DDevice,[In] ID3DXAllocateHierarchy* pAlloc,[In] ID3DXLoadUserData* pUserDataLoader,[In] D3DXFRAME** ppFrameHierarchy,[In] ID3DXAnimationController** ppAnimController)</unmanaged>	
        /// <unmanaged-short>D3DXLoadMeshHierarchyFromXW</unmanaged-short>	
        public static void LoadMeshHierarchyFromXW(string filename, int meshOptions, SharpDX.Direct3D9.Device d3DDeviceRef, SharpDX.Direct3D9.IAllocateHierarchy allocRef, SharpDX.Direct3D9.ILoadUserData userDataLoaderRef, ref SharpDX.Direct3D9.Frame frameHierarchyOut, out SharpDX.Direct3D9.AnimationController animControllerOut) {
            unsafe {
                IntPtr filename_ = Utilities.StringToHGlobalUni(filename);
                var frameHierarchyOut_ = new SharpDX.Direct3D9.Frame.__Native();
                frameHierarchyOut.__MarshalTo(ref frameHierarchyOut_);
                IntPtr animControllerOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				D3DXLoadMeshHierarchyFromXW_((void*)filename_, meshOptions, (void*)((d3DDeviceRef == null)?IntPtr.Zero:d3DDeviceRef.NativePointer), (void*)((allocRef == null)?IntPtr.Zero:allocRef.NativePointer), (void*)((userDataLoaderRef == null)?IntPtr.Zero:userDataLoaderRef.NativePointer), &frameHierarchyOut_, &animControllerOut_);		
                Marshal.FreeHGlobal(filename_ );
                frameHierarchyOut.__MarshalFree(ref frameHierarchyOut_);
                animControllerOut= (animControllerOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D9.AnimationController(animControllerOut_);	
                __result__.CheckError();
            }
        }
예제 #8
0
        /// <summary>	
        /// <p>Given a frame hierarchy, registers all the named matrices in the animation mixer.</p>	
        /// </summary>	
        /// <param name="frameRootRef"><dd>  <p>The top level node in the frame hierarchy.</p> </dd></param>	
        /// <param name="animControllerRef"><dd>  <p>Pointer to the animation controller object.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXFrameRegisterNamedMatrices']/*"/>	
        /// <msdn-id>bb172851</msdn-id>	
        /// <unmanaged>HRESULT D3DXFrameRegisterNamedMatrices([In] D3DXFRAME* pFrameRoot,[In] ID3DXAnimationController* pAnimController)</unmanaged>	
        /// <unmanaged-short>D3DXFrameRegisterNamedMatrices</unmanaged-short>	
        public static void FrameRegisterNamedMatrices(ref SharpDX.Direct3D9.Frame frameRootRef, SharpDX.Direct3D9.AnimationController animControllerRef) {
            unsafe {
                var frameRootRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRootRef.__MarshalTo(ref frameRootRef_);
                SharpDX.Result __result__;
                __result__= 
				D3DXFrameRegisterNamedMatrices_(&frameRootRef_, (void*)((animControllerRef == null)?IntPtr.Zero:animControllerRef.NativePointer));		
                frameRootRef.__MarshalFree(ref frameRootRef_);
                __result__.CheckError();
            }
        }
예제 #9
0
        /// <summary>	
        /// <p>Adds a child frame to a frame.</p>	
        /// </summary>	
        /// <param name="frameParentRef"><dd>  <p>Pointer to the parent node.</p> </dd></param>	
        /// <param name="frameChildRef"><dd>  <p>Pointer to the child node.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXFrameAppendChild']/*"/>	
        /// <msdn-id>bb172846</msdn-id>	
        /// <unmanaged>HRESULT D3DXFrameAppendChild([In] D3DXFRAME* pFrameParent,[In] const D3DXFRAME* pFrameChild)</unmanaged>	
        /// <unmanaged-short>D3DXFrameAppendChild</unmanaged-short>	
        public static void FrameAppendChild(ref SharpDX.Direct3D9.Frame frameParentRef, ref SharpDX.Direct3D9.Frame frameChildRef) {
            unsafe {
                var frameParentRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameParentRef.__MarshalTo(ref frameParentRef_);
                var frameChildRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameChildRef.__MarshalTo(ref frameChildRef_);
                SharpDX.Result __result__;
                __result__= 
				D3DXFrameAppendChild_(&frameParentRef_, &frameChildRef_);		
                frameParentRef.__MarshalFree(ref frameParentRef_);
                frameChildRef.__MarshalFree(ref frameChildRef_);
                __result__.CheckError();
            }
        }
예제 #10
0
        /// <summary>	
        /// <p>Requests deallocation of a frame object.</p>	
        /// </summary>	
        /// <param name="frameToFreeRef"><dd>  <p>Pointer to the frame to be deallocated.</p> </dd></param>	
        /// <returns><p>The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. Otherwise, program the method to return an appropriate error message  from D3DERR or D3DXERR, as this will cause <strong><see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/></strong> to fail also, and return the error.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXAllocateHierarchy::DestroyFrame']/*"/>	
        /// <msdn-id>bb205622</msdn-id>	
        /// <unmanaged>HRESULT ID3DXAllocateHierarchy::DestroyFrame([In] D3DXFRAME* pFrameToFree)</unmanaged>	
        /// <unmanaged-short>ID3DXAllocateHierarchy::DestroyFrame</unmanaged-short>	
        public void DestroyFrame(ref SharpDX.Direct3D9.Frame frameToFreeRef) {
            unsafe {
                var frameToFreeRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameToFreeRef.__MarshalTo(ref frameToFreeRef_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, &frameToFreeRef_,((void**)(*(void**)_nativePointer))[2]);		
                frameToFreeRef.__MarshalFree(ref frameToFreeRef_);
                __result__.CheckError();
            }
        }
예제 #11
0
        /// <summary>	
        /// <p>Requests allocation of a frame object.</p>	
        /// </summary>	
        /// <param name="name"><dd>  <p>Name of the frame to be created.</p> </dd></param>	
        /// <param name="newFrameOut"><dd>  <p>Returns the created frame object.</p> </dd></param>	
        /// <returns><p>The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. Otherwise, program the method to return an appropriate error message from D3DERR or D3DXERR,  as this will cause <strong><see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/></strong> to fail also, and return the error.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXAllocateHierarchy::CreateFrame']/*"/>	
        /// <msdn-id>bb205620</msdn-id>	
        /// <unmanaged>HRESULT ID3DXAllocateHierarchy::CreateFrame([In] const char* Name,[In] D3DXFRAME** ppNewFrame)</unmanaged>	
        /// <unmanaged-short>ID3DXAllocateHierarchy::CreateFrame</unmanaged-short>	
        public void CreateFrame(string name, ref SharpDX.Direct3D9.Frame newFrameOut) {
            unsafe {
                IntPtr name_ = Utilities.StringToHGlobalAnsi(name);
                var newFrameOut_ = new SharpDX.Direct3D9.Frame.__Native();
                newFrameOut.__MarshalTo(ref newFrameOut_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, (void*)name_, &newFrameOut_,((void**)(*(void**)_nativePointer))[0]);		
                Marshal.FreeHGlobal(name_ );
                newFrameOut.__MarshalFree(ref newFrameOut_);
                __result__.CheckError();
            }
        }
예제 #12
0
        /// <summary>	
        /// <p>Transforms animations in an animation set into a compressed format and returns a reference to the buffer that stores the compressed data.</p>	
        /// </summary>	
        /// <param name="flags"><dd>  <p>One of the <strong><see cref="SharpDX.Direct3D9.CompressionFlags"/></strong> values that define the compression mode used for storing compressed animation set data. <see cref="SharpDX.Direct3D9.CompressionFlags.Default"/> is the only value currently supported.</p> </dd></param>	
        /// <param name="lossiness"><dd>  <p>Desired compression loss ratio, in the range from 0 to 1.</p> </dd></param>	
        /// <param name="hierarchyRef"><dd>  <p>Pointer to a <strong><see cref="SharpDX.Direct3D9.Frame"/></strong> transformation frame hierarchy. Can be <strong><c>null</c></strong>.</p> </dd></param>	
        /// <param name="compressedDataOut"><dd>  <p>Address of a reference to the <strong><see cref="SharpDX.Direct3D.Blob"/></strong> compressed animation set.</p> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Result.Ok"/>. If the method fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXKeyframedAnimationSet::Compress']/*"/>	
        /// <msdn-id>bb173990</msdn-id>	
        /// <unmanaged>HRESULT ID3DXKeyframedAnimationSet::Compress([In] unsigned int Flags,[In] float Lossiness,[In] D3DXFRAME* pHierarchy,[In] ID3DXBuffer** ppCompressedData)</unmanaged>	
        /// <unmanaged-short>ID3DXKeyframedAnimationSet::Compress</unmanaged-short>	
        public void Compress(int flags, float lossiness, ref SharpDX.Direct3D9.Frame hierarchyRef, out SharpDX.Direct3D.Blob compressedDataOut) {
            unsafe {
                var hierarchyRef_ = new SharpDX.Direct3D9.Frame.__Native();
                hierarchyRef.__MarshalTo(ref hierarchyRef_);
                IntPtr compressedDataOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, flags, lossiness, &hierarchyRef_, &compressedDataOut_,((void**)(*(void**)_nativePointer))[33]);		
                hierarchyRef.__MarshalFree(ref hierarchyRef_);
                compressedDataOut= (compressedDataOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(compressedDataOut_);	
                __result__.CheckError();
            }
        }
예제 #13
0
        /// <summary>	
        /// <p>Add child data to the frame.</p>	
        /// </summary>	
        /// <param name="frameRef"><dd>  <p>Pointer to a mesh container. See <strong><see cref="SharpDX.Direct3D9.Frame"/></strong>.</p> </dd></param>	
        /// <param name="xofSaveRef"><dd>  <p>Pointer to a .x file save object. Use the reference to call <strong><see cref="SharpDX.Direct3D9.XFileSaveObject.AddDataObject"/></strong> to add a child data object. Do not save the data with <strong><see cref="SharpDX.Direct3D9.XFileSaveObject.Save"/></strong>.</p> </dd></param>	
        /// <param name="xofFrameDataRef"><dd>  <p>Pointer to a .x file data node. Use the reference to call <strong><see cref="SharpDX.Direct3D9.XFileSaveData.AddDataObject"/></strong> to add a child data object.</p> </dd></param>	
        /// <returns><p>The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. Otherwise, program the method to return an appropriate error message from D3DERR or <strong>D3DXERR</strong>, as this will cause <strong><see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/></strong> to fail also, and return the error.</p></returns>	
        /// <remarks>	
        /// <p> <strong><see cref="SharpDX.Direct3D9.ISaveUserData.RegisterTemplates"/></strong> and <strong><see cref="SharpDX.Direct3D9.ISaveUserData.SaveTemplates"/></strong> provide a mechanism for adding a template to a .x file for saving user data.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXSaveUserData::AddFrameChildData']/*"/>	
        /// <msdn-id>bb174200</msdn-id>	
        /// <unmanaged>HRESULT ID3DXSaveUserData::AddFrameChildData([In] const D3DXFRAME* pFrame,[In] ID3DXFileSaveObject* pXofSave,[In] ID3DXFileSaveData* pXofFrameData)</unmanaged>	
        /// <unmanaged-short>ID3DXSaveUserData::AddFrameChildData</unmanaged-short>	
        public void AddFrameChildData(ref SharpDX.Direct3D9.Frame frameRef, SharpDX.Direct3D9.XFileSaveObject xofSaveRef, SharpDX.Direct3D9.XFileSaveData xofFrameDataRef) {
            unsafe {
                var frameRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRef.__MarshalTo(ref frameRef_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, &frameRef_, (void*)((xofSaveRef == null)?IntPtr.Zero:xofSaveRef.NativePointer), (void*)((xofFrameDataRef == null)?IntPtr.Zero:xofFrameDataRef.NativePointer),((void**)(*(void**)_nativePointer))[0]);		
                frameRef.__MarshalFree(ref frameRef_);
                __result__.CheckError();
            }
        }