技术标签: direct3d filter border Direct 3d游戏编程 textures function buffer
Creates a texture from a file.
HRESULT D3DXCreateTextureFromFile( LPDIRECT3DDEVICE9 pDevice, LPCTSTR pSrcFile, LPDIRECT3DTEXTURE9 * ppTexture );
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following:
D3DERR_NOTAVAILABLED3DERR_OUTOFVIDEOMEMORYD3DERR_INVALIDCALLD3DXERR_INVALIDDATAE_OUTOFMEMORYThe compiler setting also determines the function version. If Unicode is defined, the function call resolves to D3DXCreateTextureFromFileW. Otherwise, the function call resolves to D3DXCreateTextureFromFileA because ANSI strings are being used.
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See D3DXIMAGE_FILEFORMAT.
The function is equivalent to D3DXCreateTextureFromFileEx(pDevice, pSrcFile, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, ppTexture).
Mipmapped textures automatically have each level filled with the loaded texture.
When loading images into mipmapped textures, some devices are unable to go to a 1x1 image and this function will fail. If this happens, the images need to be loaded manually.
Note that a resource created with this function will be placed in the memory class denoted by D3DPOOL_MANAGED.
Filtering is automatically applied to a texture created using this method. The filtering is equivalent to D3DX_FILTER_TRIANGLE | D3DX_FILTER_DITHER in D3DX_FILTER.
For the best performance when using D3DXCreateTextureFromFile:
可以使用更高级的函数D3DXCreateTextureFromFileEx来创建纹理对象。
Creates a texture from a file. This is a more advanced function than D3DXCreateTextureFromFile.
HRESULT D3DXCreateTextureFromFileEx(
LPDIRECT3DDEVICE9 pDevice,
LPCTSTR pSrcFile,
UINT Width,
UINT Height,
UINT MipLevels,
DWORD Usage,
D3DFORMAT Format,
D3DPOOL Pool,
DWORD Filter,
DWORD MipFilter,
D3DCOLOR ColorKey,
D3DXIMAGE_INFO * pSrcInfo,
PALETTEENTRY * pPalette,
LPDIRECT3DTEXTURE9 * ppTexture
);
Parameters
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL.
D3DERR_NOTAVAILABLED3DERR_OUTOFVIDEOMEMORYD3DXERR_INVALIDDATAE_OUTOFMEMORYThe compiler setting also determines the function version. If Unicode is defined, the function call resolves to D3DXCreateTextureFromFileExW. Otherwise, the function call resolves to D3DXCreateTextureFromFileExA because ANSI strings are being used.
Use D3DXCheckTextureRequirements to determine if your device can support the texture given the current state.
This function supports the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga. See D3DXIMAGE_FILEFORMAT.
Mipmapped textures automatically have each level filled with the loaded texture. When loading images into mipmapped textures, some devices are unable to go to a 1x1 image and this function will fail. If this happens, then the images need to be loaded manually.
For the best performance when using D3DXCreateTextureFromFileEx:
When skipping mipmap levels while loading a .dds file, use the D3DX_SKIP_DDS_MIP_LEVELS macro to generate the MipFilter value. This macro takes the number of levels to skip and the filter type and returns the filter value, which would then be passed into the MipFilter parameter.
当然也可以通过IDirect3DDevice9::CreateTexture来创建一个纹理对象。
Creates a texture resource.
HRESULT CreateTexture( UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle );
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DERR_OUTOFVIDEOMEMORY, E_OUTOFMEMORY.
An application can discover support for Automatic Generation of Mipmaps (Direct3D 9) in a particular format by calling IDirect3D9::CheckDeviceFormat with D3DUSAGE_AUTOGENMIPMAP. If IDirect3D9::CheckDeviceFormat returns D3DOK_NOAUTOGEN, IDirect3DDevice9::CreateTexture will succeed but it will return a one-level texture.
通过IDirect3DTexture9::LockRect创建完IDirect3DTexture9对象后,可以通过IDirect3DTexture9::LockRect获得纹理数据。
Locks a rectangle on a texture resource.
HRESULT LockRect( UINT Level, D3DLOCKED_RECT * pLockedRect, CONST RECT * pRect, DWORD Flags );
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be D3DERR_INVALIDCALL.
Textures created with D3DPOOL_DEFAULT are not lockable. Textures created in video memory are lockable when created with USAGE_DYNAMIC.
For performance reasons, dirty regions are recorded only for level zero of a texture. Dirty regions are automatically recorded when IDirect3DTexture9::LockRect is called without D3DLOCK_NO_DIRTY_UPDATE or D3DLOCK_READONLY. See IDirect3DDevice9::UpdateTexture for more information.
The only lockable format for a depth-stencil texture is D3DLOCK_D16_LOCKABLE.
Video memory textures cannot be locked, but must be modified by calling IDirect3DDevice9::UpdateSurface or IDirect3DDevice9::UpdateTexture. There are exceptions for some proprietary driver pixel formats that Direct3D 9 does not recognize. These can be locked.
This method cannot retrieve data from a texture resource created with D3DUSAGE_RENDERTARGET because such a texture must be assigned to D3DPOOL_DEFAULT memory and is therefore not lockable. In this case, use instead IDirect3DDevice9::GetRenderTargetData to copy texture data from device memory to system memory.
锁定之后,必须通过IDirect3DTexture9::UnlockRect来对IDirect3DTexture9对象进行解锁。
Unlocks a rectangle on a texture resource.
HRESULT UnlockRect( UINT Level );
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be D3DERR_INVALIDCALL.
利用IDirect3DDevice9接口提供的SetTexture函数进行纹理设置,由于可进行多次纹理蒙皮,将纹理对象设置给固定渲染管道流水线时,必须提供所在的采样器序号或纹理状态序号,以区别不同的纹理处理。
Sets a texture.
HRESULT SetTexture( D3DXHANDLE hParameter, LPDIRECT3DBASETEXTURE9 pTexture );
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be D3DERR_INVALIDCALL.
可以通过GetLevelDesc来获取特定采样级别的纹理表面描述信息:
Retrieves a level description of a texture resource.
HRESULT GetLevelDesc( UINT Level, D3DSURFACE_DESC * pDesc );
If the method succeeds, the return value is D3D_OK. D3DERR_INVALIDCALL is returned if one of the arguments is invalid.
pDesc为一个指向D3DSURFACE_DESC数据类型的指针,来看看它的具体定义:
Describes a surface.
typedef struct D3DSURFACE_DESC { D3DFORMAT Format; D3DRESOURCETYPE Type; DWORD Usage; D3DPOOL Pool; D3DMULTISAMPLE_TYPE MultiSampleType; DWORD MultiSampleQuality; UINT Width; UINT Height; } D3DSURFACE_DESC, *LPD3DSURFACE_DESC;
Defines resource types.
typedef enum D3DRESOURCETYPE { D3DRTYPE_SURFACE = 1, D3DRTYPE_VOLUME = 2, D3DRTYPE_TEXTURE = 3, D3DRTYPE_VOLUMETEXTURE = 4, D3DRTYPE_CubeTexture = 5, D3DRTYPE_VERTEXBUFFER = 6, D3DRTYPE_INDEXBUFFER = 7, D3DRTYPE_FORCE_DWORD = 0x7fffffff, } D3DRESOURCETYPE, *LPD3DRESOURCETYPE;
Sets the sampler state value.
HRESULT SetSamplerState( DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value );
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be D3DERR_INVALIDCALL.
来看看D3DSAMPLERSTATETYPE的具体定义:
Sampler states define texture sampling operations such as texture addressing and texture filtering. Some sampler states set-up vertex processing, and some set-up pixel processing. Sampler states can be saved and restored using stateblocks (see State Blocks Save and Restore State (Direct3D 9)).
typedef enum D3DSAMPLERSTATETYPE { D3DSAMP_ADDRESSU = 1, D3DSAMP_ADDRESSV = 2, D3DSAMP_ADDRESSW = 3, D3DSAMP_BORDERCOLOR = 4, D3DSAMP_MAGFILTER = 5, D3DSAMP_MINFILTER = 6, D3DSAMP_MIPFILTER = 7, D3DSAMP_MIPMAPLODBIAS = 8, D3DSAMP_MAXMIPLEVEL = 9, D3DSAMP_MAXANISOTROPY = 10, D3DSAMP_SRGBTEXTURE = 11, D3DSAMP_ELEMENTINDEX = 12, D3DSAMP_DMAPOFFSET = 13, D3DSAMP_FORCE_DWORD = 0x7fffffff, } D3DSAMPLERSTATETYPE, *LPD3DSAMPLERSTATETYPE;
对于过滤技术来说,Type参数可取值D3DSAMP_MIPFILTER,D3DSAMP_MAGFILTER和 D3DSAMP_MINFILTER,而Value参数可取如下类型的枚举值。
Defines texture filtering modes for a texture stage.
typedef enum D3DTEXTUREFILTERTYPE { D3DTEXF_NONE = 0, D3DTEXF_POINT = 1, D3DTEXF_LINEAR = 2, D3DTEXF_ANISOTROPIC = 3, D3DTEXF_PYRAMIDALQUAD = 6, D3DTEXF_GAUSSIANQUAD = 7, D3DTEXF_FORCE_DWORD = 0x7fffffff, } D3DTEXTUREFILTERTYPE, *LPD3DTEXTUREFILTERTYPE;
To check if a format supports texture filter types other than D3DTEXF_POINT (which is always supported), call IDirect3D9::CheckDeviceFormat with D3DUSAGE_QUERY_FILTER.
Set a texture stage's magnification filter by calling IDirect3DDevice9::SetSamplerState with the D3DSAMP_MAGFILTER value as the second parameter and one member of this enumeration as the third parameter.
Set a texture stage's minification filter by calling IDirect3DDevice9::SetSamplerState with the D3DSAMP_MINFILTER value as the second parameter and one member of this enumeration as the third parameter.
Set the texture filter to use between-mipmap levels by calling IDirect3DDevice9::SetSamplerState with the D3DSAMP_MIPFILTER value as the second parameter and one member of this enumeration as the third parameter.
Not all valid filtering modes for a device will apply to volume maps. In general, D3DTEXF_POINT and D3DTEXF_LINEAR magnification filters will be supported for volume maps. If D3DPTEXTURECAPS_MIPVOLUMEMAP is set, then the D3DTEXF_POINT mipmap filter and D3DTEXF_POINT and D3DTEXF_LINEAR minification filters will be supported for volume maps. The device may or may not support the D3DTEXF_LINEAR mipmap filter for volume maps. Devices that support anisotropic filtering for 2D maps do not necessarily support anisotropic filtering for volume maps. However, applications that enable anisotropic filtering will receive the best available filtering (probably linear) if anisotropic filtering is not supported.
纹理地址模式
纹理源图像的像素点都用纹理坐标系的[0, 1] x [0, 1]范围内的坐标来量度,如果选定的顶点纹理坐标u和v大于1或小于0时,那么对应的纹理像素点在纹理源图上是不存在的。因此需要用相应的纹理地址模式来寻址,确定该顶点颜色值应该采用的纹理像素颜色值。由此可见,当选定的待渲染三角形面顶点的纹理坐标超出[0, 1]区间时,可获得一些特别的渲染效果。
纹理地址模式具有包装模式(Wrap),镜像模式(Mirror),夹子模式(Clamp),边界模式(Border)和一次镜像模式(MirrorOnce)等多种寻址控制方式,来看看这些模式的枚举定义:
Defines constants that describe the supported texture-addressing modes.
typedef enum D3DTEXTUREADDRESS { D3DTADDRESS_WRAP = 1, D3DTADDRESS_MIRROR = 2, D3DTADDRESS_CLAMP = 3, D3DTADDRESS_BORDER = 4, D3DTADDRESS_MIRRORONCE = 5, D3DTADDRESS_FORCE_DWORD = 0x7fffffff, } D3DTEXTUREADDRESS, *LPD3DTEXTUREADDRESS;
头文件使用结构体CUSTOM_VERTEX定义了一个正方形的顶点格式,包括顶点坐标和顶点纹理坐标,Set_Texture_Address_Mode函数用来设置纹理地址模式,Render函数将使用三角形带方式进行渲染,并将纹理对象贴在正方形面上。
来看看TextureAddress.cpp的实现:
/************************************************************************************* [Implement File] PURPOSE: Define for texture mapped. *************************************************************************************/ #include "GE_COMMON.h" #include "TextureAddress.h" //------------------------------------------------------------------------------------ // Constructor, initialize all pointer with NULL. //------------------------------------------------------------------------------------ TEXTURE_ADDRESS::TEXTURE_ADDRESS() { _d3d = NULL; _d3d_device = NULL; _vertex_buffer = NULL; _d3d_texture = NULL; } //------------------------------------------------------------------------------------ // Destructor, release resource allocated for Direct3D. //------------------------------------------------------------------------------------ TEXTURE_ADDRESS::~TEXTURE_ADDRESS() { Release_Direct3D(); } //------------------------------------------------------------------------------------ // Create direct3D interface and direct3D device. //------------------------------------------------------------------------------------ bool TEXTURE_ADDRESS::Create_D3D_Device(HWND hwnd, bool full_screen) { // Create a IDirect3D9 object and returns an interace to it. _d3d = Direct3DCreate9(D3D_SDK_VERSION); if(_d3d == NULL) return false; // retrieve adapter capability D3DCAPS9 d3d_caps; _d3d->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &d3d_caps); bool hardware_process_enable = (d3d_caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT ? true : false); // Retrieves the current display mode of the adapter. D3DDISPLAYMODE display_mode; if(FAILED(_d3d->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &display_mode))) return false; // set present parameter for direct3D device D3DPRESENT_PARAMETERS present_param = {0}; present_param.BackBufferWidth = WINDOW_WIDTH; present_param.BackBufferHeight = WINDOW_HEIGHT; present_param.BackBufferFormat = display_mode.Format; present_param.BackBufferCount = 1; present_param.hDeviceWindow = hwnd; present_param.Windowed = !full_screen; present_param.SwapEffect = D3DSWAPEFFECT_FLIP; present_param.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT; // Creates a device to represent the display adapter. DWORD behavior_flags; behavior_flags = hardware_process_enable ? D3DCREATE_HARDWARE_VERTEXPROCESSING : D3DCREATE_SOFTWARE_VERTEXPROCESSING; if(FAILED(_d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, behavior_flags, &present_param, &_d3d_device))) { return false; } // create successfully return true; } //------------------------------------------------------------------------------------ // Initialize vertex buffer. //------------------------------------------------------------------------------------ bool TEXTURE_ADDRESS::Init_Vertex_Buffer() { CUSTOM_VERTEX custom_vertex[] = { {100.0f, 100.0f, 0.0f, 1.0f, 0.0f, 0.0f}, {380.0f, 100.0f, 0.0f, 1.0f, 3.0f, 0.0f}, {100.0f, 380.0f, 0.0f, 1.0f, 0.0f, 3.0f}, {380.0f, 380.0f, 0.0f, 1.0f, 3.0f, 3.0f} }; BYTE* vertex_data; // create vertex buffer if(FAILED(_d3d_device->CreateVertexBuffer(4 * sizeof(CUSTOM_VERTEX), 0, CUSTOM_VERTEX_FVF, D3DPOOL_MANAGED, &_vertex_buffer, NULL))) { return false; } // get data pointer to vertex buffer if(FAILED(_vertex_buffer->Lock(0, 0, (void **) &vertex_data, 0))) return false; // copy custom vertex data into vertex buffer memcpy(vertex_data, custom_vertex, sizeof(custom_vertex)); // unlock vertex buffer _vertex_buffer->Unlock(); return true; } //------------------------------------------------------------------------------------ // Sets the sampler state value. //------------------------------------------------------------------------------------ void TEXTURE_ADDRESS::Set_Texture_Address_Mode(int mode) { switch(mode) { case D3DTADDRESS_WRAP: _d3d_device->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP); _d3d_device->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP); break; case D3DTADDRESS_MIRROR: _d3d_device->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_MIRROR); _d3d_device->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_MIRROR); break; case D3DTADDRESS_CLAMP: _d3d_device->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP); _d3d_device->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP); break; case D3DTADDRESS_BORDER: _d3d_device->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_BORDER); _d3d_device->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_BORDER); break; case D3DTADDRESS_MIRRORONCE: _d3d_device->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_MIRRORONCE); _d3d_device->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_MIRRORONCE); break; } } //------------------------------------------------------------------------------------ // Render object. //------------------------------------------------------------------------------------ void TEXTURE_ADDRESS::Render() { if(_d3d_device == NULL) return; // clear surface with color white _d3d_device->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(255, 255, 255), 1.0, 0); // begin scene _d3d_device->BeginScene(); // Binds a vertex buffer to a device data stream. _d3d_device->SetStreamSource(0, _vertex_buffer, 0, sizeof(CUSTOM_VERTEX)); // Sets the current vertex stream declaration. _d3d_device->SetFVF(CUSTOM_VERTEX_FVF); // Creates a texture from a file. if(FAILED(D3DXCreateTextureFromFile(_d3d_device, _T("tiger.jpg"), &_d3d_texture))) { MessageBox(NULL, "Create texture interface failed.", "ERROR", MB_OK); return; } // Assigns a texture to a stage for a device. _d3d_device->SetTexture(0, _d3d_texture); // Renders a sequence of nonindexed, geometric primitives of the specified type from the current // set of data input streams. _d3d_device->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2); // end scene _d3d_device->EndScene(); // Presents the contents of the next buffer in the sequence of back buffers owned by the device. _d3d_device->Present(NULL, NULL, NULL, NULL); } //------------------------------------------------------------------------------------ // Release resource allocated for Direct3D. //------------------------------------------------------------------------------------ void TEXTURE_ADDRESS::Release_Direct3D() { Safe_Release(_d3d_texture); Safe_Release(_vertex_buffer); Safe_Release(_d3d_device); Safe_Release(_d3d); }
再来看看测试代码:
/************************************************************************************* [Implement File] PURPOSE: Test for texture render. *************************************************************************************/ #define DIRECTINPUT_VERSION 0x0800 #include "GE_APP.h" #include "GE_INPUT.h" #include "TextureAddress.h" #pragma warning(disable : 4305 4996) int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR cmd_line, int cmd_show) { GE_APP ge_app; GE_INPUT ge_input; TEXTURE_ADDRESS texture_address; MSG msg = {0}; // create window if(! ge_app.Create_Window("Material and light test", instance, cmd_show)) return false; HWND hwnd = ge_app.Get_Window_Handle(); HDC hdc = GetDC(hwnd); // create directinput ge_input.Create_Input(instance, hwnd); SetWindowPos(hwnd, 0, 0,0,0,0, SWP_NOSIZE); SetCursorPos(0, 0); // Create direct3D interface and direct3D device. if(! texture_address.Create_D3D_Device(hwnd, false)) return false; // Initialize vertex buffer with curstom vertex structure. if(! texture_address.Init_Vertex_Buffer()) return false; while(msg.message != WM_QUIT) { if(PeekMessage(&msg, NULL, 0,0 , PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); } else { // read data from keyboard buffer if(ge_input.Read_Keyboard()) { bool key_w_pressed = ge_input.Is_Key_Pressed(DIK_W); bool key_m_pressed = ge_input.Is_Key_Pressed(DIK_M); bool key_c_pressed = ge_input.Is_Key_Pressed(DIK_C); bool key_b_pressed = ge_input.Is_Key_Pressed(DIK_B); bool key_o_pressed = ge_input.Is_Key_Pressed(DIK_O); const char* text = NULL; // set texture address mode if(key_w_pressed || key_m_pressed || key_c_pressed || key_b_pressed || key_o_pressed) { if(key_w_pressed) { texture_address.Set_Texture_Address_Mode(D3DTADDRESS_WRAP); text = "wrap mode"; } if(key_m_pressed) { texture_address.Set_Texture_Address_Mode(D3DTADDRESS_MIRROR); text = "morror mode"; } if(key_c_pressed) { texture_address.Set_Texture_Address_Mode(D3DTADDRESS_CLAMP); text = "clamp mode"; } if(key_b_pressed) { texture_address.Set_Texture_Address_Mode(D3DTADDRESS_BORDER); text = "address border mode"; } if(key_o_pressed) { texture_address.Set_Texture_Address_Mode(D3DTADDRESS_MIRRORONCE); text = "address mirror once mode"; } // render object texture_address.Render(); // print hint information TextOut(hdc, WINDOW_WIDTH - 200, WINDOW_HEIGHT - 100, text, (int) strlen(text)); } // press "ESC", close window. if(ge_input.Is_Key_Pressed(DIK_ESCAPE)) PostQuitMessage(0); } } } UnregisterClass(WINDOW_CLASS_NAME, instance); return true; }
按下W键将启用包裹(Wrap)模式,按下M键将启用镜像(Mirror)模式,按下C键将启用夹子(Clamp)模式,按下B键将启用边界(Border)模式,按下O键将启用一次镜像(MirrorOnce)模式。 运行效果: 包裹模式 镜像模式 夹子模式 边界模式 一次镜像模式
文章浏览阅读965次,点赞18次,收藏21次。现在我们有了 2021 年和 2023 年的 NDVI 数据帧,我们需要从 2021 年的值中减去 2023 年的值以捕获 NDVI 的差异。该数据集包括像素级别的植被值,我们将编写一个自定义函数来根据红色和绿色波段的表面反射率计算 NDVI。在我的上一篇文章中,我演示了如何将单个多边形分割/镶嵌为一组大小均匀的六边形。现在我们有了植被损失数据,让我们使用 Kepler.gl 可视化每个六边形的植被损失。将地图保存为 HTML 文件,在浏览器中打开 HTML 以获得更好的视图。现在我们将调用该函数并使用、
文章浏览阅读3.3k次,点赞6次,收藏5次。正态分布,又称高斯分布或钟形曲线,是统计学中最为重要和常用的分布之一。_echarts正态分布图
文章浏览阅读217次。首先要在Mainfest.xml中加入所需要的权限:[html] view plain copyprint?uses-permission android:name="android.permission.SEND_SMS"/> uses-permission android:name="android.permission.READ_SMS"/> _android bundle.get("pdus");
文章浏览阅读2.6k次。0、说明最近在学习 Data Assimilation Research Testbed (DART) 相关内容,其软件是在 Unix/Linux 操作系统下编译和运行的 ,由于我的电脑是 Windows 10 的,DART 推荐可以使用 Windows Subsystem For Linux (WSL) 来创建一个 Windows 下的 Linux 子系统。以下的内容主要介绍如何安装 WSL2,以及 WSL2 的联网。1、如何在 Windows 10 下安装WSL具体的安装流程可以在 microso_wsl2 联网
文章浏览阅读1k次。DB_LINK 介绍在本机数据库orcl上创建了一个prod_link的publicdblink(使用远程主机的scott用户连接),则用sqlplus连接到本机数据库,执行select * from scott.emp@prod_link即可以将远程数据库上的scott用户下的emp表中的数据获取到。也可以在本地建一个同义词来指向scott.emp@prod_link,这样取值就方便多了..._添加 database link重复的数据库链接命
文章浏览阅读3.1k次。ylbtech-云-腾讯云-实时音视频:实时音视频(TRTC)支持跨终端、全平台之间互通,从零开始快速搭建实时音视频通信平台1.返回顶部 1、腾讯实时音视频(Tencent Real-Time Communication,TRTC)拥有QQ十几年来在音视频技术上的积累,致力于帮助企业快速搭建低成本、高品质音视频通讯能力的完整解决方案。..._腾讯实时音视频 分享链接
文章浏览阅读534次,点赞10次,收藏8次。编写一个完整的日历表需要处理许多细节,包括公历和农历之间的转换、节气、闰年等。运行程序后,会输出指定年份的日历表。注意,这个程序只是一个简单的示例,还有很多可以改进和扩展的地方,例如添加节气、节日等。_农历库c语言
文章浏览阅读1w次,点赞28次,收藏27次。FL Studio21.1.1.3750中文破解版是最优秀、最繁荣的数字音频工作站 (DAW) 之一,日新月异。它是一款录音机和编辑器,可让您不惜一切代价制作精美的音乐作品并保存精彩的活动画廊。为方便用户,FL Studio 21提供三种不同的版本——Fruity 版、Producer 版和签名版。所有这些版本都是独一无二的,同样具有竞争力。用户可以根据自己的需要选择其中任何一种。FL Studio21.1.1.3750中文版可以说是一站式综合音乐制作单位,可以让您录制、作曲、混音和编辑音乐。_fl studio 21 注册机
文章浏览阅读1.3k次。冯诺依曼计算机工作原理冯 诺依曼计算机工作原理的核心是 和 程序控制世界上不同型号的计算机,就其工作原理而言,一般都是认为冯 诺依曼提出了什么原理冯 诺依曼原理中,计算机硬件系统由那五大部分组成的 急急急急急急急急急急急急急急急急急急急急急急冯诺依曼结构计算机工作原理的核心冯诺依曼结构和现代计算机结构模型 转载重学计算机组成原理 一 冯 诺依曼体系结构从冯.诺依曼的存储程序工作原理及计算机的组成来..._简述冯诺依曼计算机结构及工作原理
文章浏览阅读559次。这次在随机乱下的基础上加上了一些简单的处理,如进营、炸棋、吃子等功能,在和敌方棋子产生碰撞之后会获取敌方棋子大小的一些信息,目前采用的是事件驱动模型,当下完一步棋界面返回结果后会判断是否触发了相关事件,有事件发生则处理相关事件,没有事件发生则仍然是随机下棋。1.事件驱动模型首先定义一个各种事件的枚举变量,目前的事件有工兵吃子,摸暗棋,进营,明确吃子,炸棋。定义如下:enum MoveE..._军棋引擎
文章浏览阅读85次。1, 模板观念与函数模板简单模板: template< typename T > T Function( T a, T b) {… }类模板: template struct Object{……….}; 函数模板 template< class T> inline T Function( T a, T b){……} 不可以使用不同型别的..._geekband 讲义
文章浏览阅读158次。"^\d+$" //非负整数(正整数 + 0)"^[0-9]*[1-9][0-9]*$" //正整数"^((-\d+)|(0+))$" //非正整数(负整数 + 0)"^-[0-9]*[1-9][0-9]*$" //负整数"^-?\d+$" //整数"^\d+(\.\d+)?$" //非负浮点数(正浮点数 + 0)"^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0..._vb.net 正则表达式 取html中的herf