在 XNA 4.0 中绘制具有多个侧面的纹理立方体

2024-02-02

几个小时以来我一直在努力解决这个问题。我想做的是画一个立方体,每一面都有不同的纹理;或者更具体地说,我希望能够指定每面我想要的任何纹理。我用了这个例子here http://www.switchonthecode.com/tutorials/creating-a-textured-box-in-xna首先,然后尝试进一步开发它,这样我就可以拥有多个纹理。但是,无论我做什么,它仍然只使用应用于效果的最后一个纹理,并且不理会任何先前的分配。这是我的形状类:

public class BasicShape {

 public Vector3 shapeSize;
 public Vector3 shapePosition;
 private VertexPositionNormalTexture[][] shapeVertices;
 private int shapeTriangles;
 private VertexBuffer shapeBuffer;
 public Texture2D topTexture;
 public Texture2D frontTexture;
 public Texture2D backTexture;
 public Texture2D leftTexture;
 public Texture2D rightTexture;
 public Texture2D bottomTexture;

 public BasicShape(Vector3 size, Vector3 position) {
    shapeSize = size;
    shapePosition = position;
 }

 private void BuildShape() {
    shapeTriangles = 12;

    shapeVertices = new VertexPositionNormalTexture[6][];
    for(int i = 0; i < 6; i++) {
        shapeVertices[i] = new VertexPositionNormalTexture[6];
    }

    Vector3 topLeftFront = shapePosition +
     new Vector3(0.0f, 1.0f, 0.0f) * shapeSize;
    Vector3 bottomLeftFront = shapePosition +
     new Vector3(0.0f, 0.0f, 0.0f) * shapeSize;
    Vector3 topRightFront = shapePosition +
     new Vector3(1.0f, 1.0f, 0.0f) * shapeSize;
    Vector3 bottomRightFront = shapePosition +
     new Vector3(1.0f, 0.0f, 0.0f) * shapeSize;
    Vector3 topLeftBack = shapePosition +
     new Vector3(0.0f, 1.0f, 1.0f) * shapeSize;
    Vector3 topRightBack = shapePosition +
     new Vector3(1.0f, 1.0f, 1.0f) * shapeSize;
    Vector3 bottomLeftBack = shapePosition +
     new Vector3(0.0f, 0.0f, 1.0f) * shapeSize;
    Vector3 bottomRightBack = shapePosition +
     new Vector3(1.0f, 0.0f, 1.0f) * shapeSize;

    Vector3 topLeftFront2 = shapePosition +
     new Vector3(0.0f, 1.0f, 0.0f) * shapeSize;
    Vector3 bottomLeftFront2 = shapePosition +
     new Vector3(0.0f, 0.0f, 0.0f) * shapeSize;
    Vector3 topRightFront2 = shapePosition +
     new Vector3(1.0f, 1.0f, 0.0f) * shapeSize;
    Vector3 bottomRightFront2 = shapePosition +
     new Vector3(1.0f, 0.0f, 0.0f) * shapeSize;
    Vector3 topLeftBack2 = shapePosition +
     new Vector3(0.0f, 1.0f, 1.0f) * shapeSize;
    Vector3 topRightBack2 = shapePosition +
     new Vector3(1.0f, 1.0f, 1.0f) * shapeSize;
    Vector3 bottomLeftBack2 = shapePosition +
     new Vector3(0.0f, 0.0f, 1.0f) * shapeSize;
    Vector3 bottomRightBack2 = shapePosition +
     new Vector3(1.0f, 0.0f, 1.0f) * shapeSize;

    Vector3 topLeftFront3 = shapePosition +
     new Vector3(0.0f, 1.0f, 0.0f) * shapeSize;
    Vector3 bottomLeftFront3 = shapePosition +
     new Vector3(0.0f, 0.0f, 0.0f) * shapeSize;
    Vector3 topRightFront3 = shapePosition +
     new Vector3(1.0f, 1.0f, 0.0f) * shapeSize;
    Vector3 bottomRightFront3 = shapePosition +
     new Vector3(1.0f, 0.0f, 0.0f) * shapeSize;
    Vector3 topLeftBack3 = shapePosition +
     new Vector3(0.0f, 1.0f, 1.0f) * shapeSize;
    Vector3 topRightBack3 = shapePosition +
     new Vector3(1.0f, 1.0f, 1.0f) * shapeSize;
    Vector3 bottomLeftBack3 = shapePosition +
     new Vector3(0.0f, 0.0f, 1.0f) * shapeSize;
    Vector3 bottomRightBack3 = shapePosition +
     new Vector3(1.0f, 0.0f, 1.0f) * shapeSize;

    Vector3 frontNormal = new Vector3(0.0f, 0.0f, 1.0f) * shapeSize;
    Vector3 backNormal = new Vector3(0.0f, 0.0f, -1.0f) * shapeSize;
    Vector3 topNormal = new Vector3(0.0f, 1.0f, 0.0f) * shapeSize;
    Vector3 bottomNormal = new Vector3(0.0f, -1.0f, 0.0f) * shapeSize;
    Vector3 leftNormal = new Vector3(-1.0f, 0.0f, 0.0f) * shapeSize;
    Vector3 rightNormal = new Vector3(1.0f, 0.0f, 0.0f) * shapeSize;

    Vector2 textureTopLeft = new Vector2(1f * shapeSize.X, 0.0f * shapeSize.Y);
    Vector2 textureTopRight = new Vector2(0.0f * shapeSize.X, 0.0f * shapeSize.Y);
    Vector2 textureBottomLeft = new Vector2(1f * shapeSize.X, 1f * shapeSize.Y);
    Vector2 textureBottomRight = new Vector2(0.0f * shapeSize.X, 1f * shapeSize.Y);

    // Front face.
    shapeVertices[0][0] = new VertexPositionNormalTexture(
     topLeftFront, frontNormal, textureTopLeft);
    shapeVertices[0][1] = new VertexPositionNormalTexture(
     bottomLeftFront, frontNormal, textureBottomLeft);
    shapeVertices[0][2] = new VertexPositionNormalTexture(
     topRightFront, frontNormal, textureTopRight);
    shapeVertices[0][3] = new VertexPositionNormalTexture(
     bottomLeftFront, frontNormal, textureBottomLeft);
    shapeVertices[0][4] = new VertexPositionNormalTexture(
     bottomRightFront, frontNormal, textureBottomRight);
    shapeVertices[0][5] = new VertexPositionNormalTexture(
     topRightFront, frontNormal, textureTopRight);

    // Back face.
    shapeVertices[1][0] = new VertexPositionNormalTexture(
     topLeftBack, backNormal, textureTopRight);
    shapeVertices[1][1] = new VertexPositionNormalTexture(
     topRightBack, backNormal, textureTopLeft);
    shapeVertices[1][2] = new VertexPositionNormalTexture(
     bottomLeftBack, backNormal, textureBottomRight);
    shapeVertices[1][3] = new VertexPositionNormalTexture(
     bottomLeftBack, backNormal, textureBottomRight);
    shapeVertices[1][4] = new VertexPositionNormalTexture(
     topRightBack, backNormal, textureTopLeft);
    shapeVertices[1][5] = new VertexPositionNormalTexture(
     bottomRightBack, backNormal, textureBottomLeft);

    // Top face.
    shapeVertices[2][0] = new VertexPositionNormalTexture(
     topLeftFront2, topNormal, textureBottomLeft);
    shapeVertices[2][1] = new VertexPositionNormalTexture(
     topRightBack2, topNormal, textureTopRight);
    shapeVertices[2][2] = new VertexPositionNormalTexture(
     topLeftBack2, topNormal, textureTopLeft);
    shapeVertices[2][3] = new VertexPositionNormalTexture(
     topLeftFront2, topNormal, textureBottomLeft);
    shapeVertices[2][4] = new VertexPositionNormalTexture(
     topRightFront2, topNormal, textureBottomRight);
    shapeVertices[2][5] = new VertexPositionNormalTexture(
     topRightBack2, topNormal, textureTopRight);

    // Bottom face.
    shapeVertices[3][0] = new VertexPositionNormalTexture(
     bottomLeftFront2, bottomNormal, textureTopLeft);
    shapeVertices[3][1] = new VertexPositionNormalTexture(
     bottomLeftBack2, bottomNormal, textureBottomLeft);
    shapeVertices[3][2] = new VertexPositionNormalTexture(
     bottomRightBack2, bottomNormal, textureBottomRight);
    shapeVertices[3][3] = new VertexPositionNormalTexture(
     bottomLeftFront2, bottomNormal, textureTopLeft);
    shapeVertices[3][4] = new VertexPositionNormalTexture(
     bottomRightBack2, bottomNormal, textureBottomRight);
    shapeVertices[3][5] = new VertexPositionNormalTexture(
     bottomRightFront2, bottomNormal, textureTopRight);

    // Left face.
    shapeVertices[4][0] = new VertexPositionNormalTexture(
     topLeftFront3, leftNormal, textureTopRight);
    shapeVertices[4][1] = new VertexPositionNormalTexture(
     bottomLeftBack3, leftNormal, textureBottomLeft);
    shapeVertices[4][2] = new VertexPositionNormalTexture(
     bottomLeftFront3, leftNormal, textureBottomRight);
    shapeVertices[4][3] = new VertexPositionNormalTexture(
     topLeftBack3, leftNormal, textureTopLeft);
    shapeVertices[4][4] = new VertexPositionNormalTexture(
     bottomLeftBack3, leftNormal, textureBottomLeft);
    shapeVertices[4][5] = new VertexPositionNormalTexture(
     topLeftFront3, leftNormal, textureTopRight);

    // Right face.
    shapeVertices[5][0] = new VertexPositionNormalTexture(
     topRightFront3, rightNormal, textureTopLeft);
    shapeVertices[5][1] = new VertexPositionNormalTexture(
     bottomRightFront3, rightNormal, textureBottomLeft);
    shapeVertices[5][2] = new VertexPositionNormalTexture(
     bottomRightBack3, rightNormal, textureBottomRight);
    shapeVertices[5][3] = new VertexPositionNormalTexture(
     topRightBack3, rightNormal, textureTopRight);
    shapeVertices[5][4] = new VertexPositionNormalTexture(
     topRightFront3, rightNormal, textureTopLeft);
    shapeVertices[5][5] = new VertexPositionNormalTexture(
     bottomRightBack3, rightNormal, textureBottomRight);
 }

 public void SetTopTexture(Texture2D tex) {
    topTexture = tex;
 }
 public void SetSideTexture(Texture2D tex) {
    frontTexture = tex;
    backTexture = tex;
    leftTexture = tex;
    rightTexture = tex;
 }
 public void SetBottomTexture(Texture2D tex) {
    bottomTexture = tex;
 }

 public void RenderShape(GraphicsDevice device, Effect effect) {
    BuildShape();


    effect.Parameters["xTexture"].SetValue(topTexture);
    device.DrawUserPrimitives(PrimitiveType.TriangleList, shapeVertices[2], 0, 2);
    effect.Parameters["xTexture"].SetValue(bottomTexture);
    device.DrawUserPrimitives(PrimitiveType.TriangleList, shapeVertices[3], 0, 2);
    effect.Parameters["xTexture"].SetValue(frontTexture);
    device.DrawUserPrimitives(PrimitiveType.TriangleList, shapeVertices[0], 0, 2);
    effect.Parameters["xTexture"].SetValue(backTexture);
    device.DrawUserPrimitives(PrimitiveType.TriangleList, shapeVertices[1], 0, 2);
    effect.Parameters["xTexture"].SetValue(leftTexture);
    device.DrawUserPrimitives(PrimitiveType.TriangleList, shapeVertices[4], 0, 2);
    effect.Parameters["xTexture"].SetValue(rightTexture);
    device.DrawUserPrimitives(PrimitiveType.TriangleList, shapeVertices[5], 0, 2);

 }

}

在我的游戏的 Draw 方法中:

cubeEffect.CurrentTechnique = cubeEffect.Techniques["Textured"];
   foreach(EffectPass pass in cubeEffect.CurrentTechnique.Passes) {
      pass.Apply();
      BasicShape s = new BasicShape(new Vector3(1, 1, 1), new Vector3(0, 0, 3));
      s.SetTopTexture(TextureLoader.GetTexture(4));
      s.SetSideTexture(TextureLoader.GetTexture(35));
      s.SetBottomTexture(TextureLoader.GetTexture(4));
      s.RenderShape(GraphicsDevice, cubeEffect);   

  }

正如你所看到的,我正在加载不同的纹理,但结果是这样的:

我的立方体 http://www.tinyimg.org/images/769MinecraftClassic_2011_.bmp http://www.tinyimg.org/images/769MinecraftClassic_2011_.bmp

我确信纹理是不同的,但所有侧面都绘制相同的纹理。我需要为每一面设置单独的效果吗?这绝对看起来有点矫枉过正。


在调用 EffectPass.Apply() 之前,对效果设置的任何参数都不会应用。这是因为对效果应用更改的成本很高,并且您可能希望一次性执行多项更改。

您的 RenderShape 函数应类似于:

public void RenderShape(GraphicsDevice device, Effect effect)
{
    BuildShape();

    foreach (EffectPass pass in effect.CurrentTechnique.Passes)
    {
        effect.Parameters["xTexture"].SetValue(topTexture);
        pass.Apply();
        device.DrawUserPrimitives(PrimitiveType.TriangleList, shapeVertices[2], 0, 2);

        effect.Parameters["xTexture"].SetValue(bottomTexture);
        pass.Apply();
        device.DrawUserPrimitives(PrimitiveType.TriangleList, shapeVertices[3], 0, 2);

        effect.Parameters["xTexture"].SetValue(frontTexture);
        pass.Apply();
        device.DrawUserPrimitives(PrimitiveType.TriangleList, shapeVertices[0], 0, 2);

        effect.Parameters["xTexture"].SetValue(backTexture);
        pass.Apply();
        device.DrawUserPrimitives(PrimitiveType.TriangleList, shapeVertices[1], 0, 2);

        effect.Parameters["xTexture"].SetValue(leftTexture);
        pass.Apply();
        device.DrawUserPrimitives(PrimitiveType.TriangleList, shapeVertices[4], 0, 2);

        effect.Parameters["xTexture"].SetValue(rightTexture);
        pass.Apply();
        device.DrawUserPrimitives(PrimitiveType.TriangleList, shapeVertices[5], 0, 2);
    }
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 XNA 4.0 中绘制具有多个侧面的纹理立方体 的相关文章

  • 如何验证文件名称在 Windows 中是否有效?

    是否有一个 Windows API 函数可以将字符串值传递给该函数 该函数将返回一个指示文件名是否有效的值 我需要验证文件名是否有效 并且我正在寻找一种简单的方法来完成此操作 而无需重新发明轮子 我正在直接使用 C 但针对的是 Win32
  • 获取按下的按钮的返回值

    我有一个在特定事件中弹出的表单 它从数组中提取按钮并将标签值设置为特定值 因此 如果您要按下或单击此按钮 该函数应返回标签值 我怎样才能做到这一点 我如何知道点击了哪个按钮 此时代码返回 DialogResult 但我想从函数返回 Tag
  • UML类图:抽象方法和属性是这样写的吗?

    当我第一次为一个小型 C 项目创建 uml 类图时 我在属性方面遇到了一些麻烦 最后我只是将属性添加为变量 lt
  • 将布尔参数传递给 SQL Server 存储过程

    我早些时候问过这个问题 我以为我找到了问题所在 但我没有 我在将布尔参数传递给存储过程时遇到问题 这是我的 C 代码 public bool upload false protected void showDate object sende
  • WPF 中的调度程序和异步等待

    我正在尝试学习 WPF C 中的异步编程 但我陷入了异步编程和使用调度程序的困境 它们是不同的还是在相同的场景中使用 我愿意简短地回答这个问题 以免含糊不清 因为我知道我混淆了 WPF 中的概念和函数 但还不足以在功能上正确使用它 我在这里
  • 获取没有非标准端口的原始 url (C#)

    第一个问题 环境 MVC C AppHarbor Problem 我正在调用 openid 提供商 并根据域生成绝对回调 url 在我的本地机器上 如果我点击的话 效果很好http localhost 12345 login Request
  • 将目录压缩为单个文件的方法有哪些

    不知道怎么问 所以我会解释一下情况 我需要存储一些压缩文件 最初的想法是创建一个文件夹并存储所需数量的压缩文件 并创建一个文件来保存有关每个压缩文件的数据 但是 我不被允许创建许多文件 只能有一个 我决定创建一个压缩文件 其中包含有关进一步
  • Json.NET - 反序列化接口属性引发错误“类型是接口或抽象类,无法实例化”

    我有一个类 其属性是接口 public class Foo public int Number get set public ISomething Thing get set 尝试反序列化Foo使用 Json NET 的类给我一条错误消息
  • 如果使用 SingleOrDefault() 并在数字列表中搜索不在列表中的数字,如何返回 null?

    使用查询正数列表时SingleOrDefault 当在列表中找不到数字时 如何返回 null 或像 1 这样的自定义值 而不是类型的默认值 在本例中为 0 你可以使用 var first theIntegers Cast
  • Web API - 访问 DbContext 类中的 HttpContext

    在我的 C Web API 应用程序中 我添加了CreatedDate and CreatedBy所有表中的列 现在 每当在任何表中添加新记录时 我想填充这些列 为此目的我已经覆盖SaveChanges and SaveChangesAsy
  • 从路径中获取文件夹名称

    我有一些路c server folderName1 another name something another folder 我如何从那里提取最后一个文件夹名称 我尝试了几件事 但没有成功 我只是不想寻找最后的 然后就去休息了 Thank
  • 将自定义元数据添加到 jpeg 文件

    我正在开发一个图像处理项目 C 我需要在处理完成后将自定义元数据写入 jpeg 文件 我怎样才能做到这一点 有没有可用的图书馆可以做到这一点 如果您正在谈论 EXIF 元数据 您可能需要查看exiv2 http www exiv2 org
  • 如何衡量两个字符串之间的相似度? [关闭]

    Closed 这个问题需要多问focused help closed questions 目前不接受答案 给定两个字符串text1 and text2 public SOMEUSABLERETURNTYPE Compare string t
  • clang 实例化后静态成员初始化

    这样的代码可以用 GCC 编译 但 clang 3 5 失败 include
  • 将 unsigned char * (uint8_t *) 转换为 const char *

    我有一个带有 uint8 t 参数的函数 uint8 t ihex decode uint8 t in size t len uint8 t out uint8 t i hn ln for i 0 i lt len i 2 hn in i
  • C++ 复制初始化和直接初始化,奇怪的情况

    在继续阅读本文之前 请阅读在 C 中 复制初始化和直接初始化之间有区别吗 https stackoverflow com questions 1051379 is there a difference in c between copy i
  • 32 位到 64 位内联汇编移植

    我有一段 C 代码 在 GNU Linux 环境下用 g 编译 它加载一个函数指针 它如何执行并不重要 使用一些内联汇编将一些参数推送到堆栈上 然后调用该函数 代码如下 unsigned long stack 1 23 33 43 save
  • const、span 和迭代器的问题

    我尝试编写一个按索引迭代容器的迭代器 AIt and a const It两者都允许更改容器的内容 AConst it and a const Const it两者都禁止更改容器的内容 之后 我尝试写一个span
  • 防止索引超出范围错误

    我想编写对某些条件的检查 而不必使用 try catch 并且我想避免出现 Index Out of Range 错误的可能性 if array Element 0 Object Length gt 0 array Element 1 Ob
  • 恢复上传文件控制

    我确实阅读了以下帖子 C 暂停 恢复上传 https stackoverflow com questions 1048330 pause resume upload in c 使用 HTTP 恢复上传 https stackoverflow

随机推荐

  • SwiftUI TextField 货币格式问题

    我在使用 TextField 输入货币金额时遇到了 SwiftUI 最终用户的可用性问题 绑定字段是双精度型 初始设置为 0 当显示文本字段时 提示为 0 00 问题是 当用户想要输入一个值时 他们必须手动使用退格键删除 0 00 另外 如
  • Oracle XE查询日志

    在 Postgres 中 您可以打开查询日志记录 从而生成一个包含任何客户端发出的所有查询的文件 Oracle XE 中是否有类似的可能性 如何打开它以及在哪里可以找到生成的文件 你会 更改会话设置 sql trace true 跟踪文件将
  • 为本机 iOS 应用程序创建 Jitsi Meet 框架并集成到 Xcode 项目中

    我已经从 Jitsi meet 网站和 git repo 检查了详细信息 以在本机应用程序中实现它 执行构建命令后 我无法在提到的位置找到框架 我也无法识别符号位置 如建议的那样 如何获取需要包含在本机应用程序中的框架 以使 jitsi m
  • 带声音的图像按钮不起作用

    我在android studio中制作了一个程序 其中有10个图像按钮 每个图像按钮单击时都会产生声音 但是 当我在模拟器上运行它们时 只有前 7 个图像按钮会发出声音 不在乎我单击的按钮的顺序 我对此很陌生 请帮助我 这是我的代码 pub
  • 如何在 ASP.NET 中找到当前页面的(文件)名称?

    如何在后面的代码中找到 default aspx 当前页面或Web控件的名称 我想编写一个使用这个名称的超类 你的意思是你想找到当前执行的对象的原始文件名 即 从您想要检索的控件 MyControl 内部MyControlOnDisk as
  • pythonunittestassertCountEqual使用'is'而不是'=='?

    我正在尝试使用 python 的unittest库来编写一些单元测试 我有一个返回对象的无序列表的函数 我想验证对象是否相同 并且我正在尝试使用断言计数等于 http docs python org py3k library unittes
  • 如何通过客户端 Java 代码获取 Google Web Toolkit 中的当前 URL?

    我试图读取 URL 的查询参数 https stackoverflow com questions 4514940 reading request parameters in google app engine with java在客户端
  • 处理 NULL 的最佳方法

    在我的函数顶部 我正在尝试用最好的方法来处理 C 中进入我的程序的 null 值 检查和处理空值的最佳方法是什么 为什么 我已经添加了我现在正在使用的完整代码 Resharper 告诉我使用选项 1 通常我会按照它所说的去做 因为我明白为什
  • 使用 JS 强制页面缩放至 100%

    我在 Canvas 中创建了一个小游戏 但遇到了问题 某些将默认缩放设置为 100 以外的用户无法看到整个游戏页面 我尝试过使用这个CSS zoom 100 这个 HTML 还有这个JS style zoom 75 有什么想法如何以编程方式
  • React Redux:获取 Props 并更新状态

    我是第一次尝试 React Redux JS 我对在组件中设置状态与让 redux 更新它有点困惑 我想单击一个按钮将 lightOn 设置为 true 并显示更新的 this props lightOn 值 我错过了一些基本的东西 但不确
  • JsonConverter如何反序列化为通用对象

    我通过 webapi 发送这个结构 DataContract public class PacketData public enum Opcodes Hello 0x00 Close 0x01 Serial 0x02 GPIO 0x04 D
  • 模型类未声明显式 app_label 并且不在 INSTALLED_APPS 中的应用程序中

    我正在使用 sphinx 并尝试为我的 Django 项目生成文档 我决定首先尝试记录模型 因此在我的 rst 文件中我这样做了 wdland models automodule wdland models members undoc me
  • 如何检测innerHTML何时完成

    我已经做了很多寻找这个问题的解决方案 但到目前为止还没有找到一个可以跨浏览器工作的解决方案 我需要的是一个原始的javascript函数 一旦innerHTML成功插入到dom中 它将接受一个元素并运行回调 e g var element
  • 对 CUBEVALUE 中的多个度量求和

    我尝试了多个不同的函数 CUBESET CUBEVALUE 等 但我似乎无法找到一种方法来在同一公式中对多个度量求和 关于如何完成这项工作有什么建议吗 我进行了大量搜索但找不到方法 想法如下 但这不起作用 CUBEVALUE Connect
  • org.webrtc.RTCPeerConnection 无法将视频发布到服务器

    我使用 webrtc 在会议中发送和获取视频 子主视频正常显示 但问题是视频没有发布到服务器 我检查方法 setlocalDescription 没有返回错误 这是我的sdp 有人可以帮忙吗 我搜索了很多解决方案 但我仍然不知道我的问题 我
  • Oracle PLSQL IN() 子句中的数组

    我将字符串数组 plcListchar 传递给存储过程 我想在 IN 子句中使用这个字符串数组 我不能在 IN 子句中直接使用 plcListchar 让我展示一下如何在 JAVA 中创建 plcListchar 字符串数组 String
  • github 操作workflow_run.conclusion 随机失败的任何解决方法吗?

    我在用着workflow run conclusion按照以下方式发送工作流程通知github 文档 https docs github com en actions using workflows events that trigger
  • Python 与电报机器人中的关键字“from”冲突

    我想使用 python telegram bot 在 Python 脚本中打印用户信息 参考this https core telegram org bots api user page 但是当我打字时 print update messa
  • 如何在 Azure 表存储中存储任意键值对?

    背景 我从客户端收到 CSV 数据文件 其中包含大量我不需要的数据和少量我需要的数据 将来我可能需要访问这些数据 虽然我正在存档原始数据文件 但我希望有一些更容易查询的东西 我希望找到一个并不意味着数据文件保持相同格式的解决方案 即客户端可
  • 在 XNA 4.0 中绘制具有多个侧面的纹理立方体

    几个小时以来我一直在努力解决这个问题 我想做的是画一个立方体 每一面都有不同的纹理 或者更具体地说 我希望能够指定每面我想要的任何纹理 我用了这个例子here http www switchonthecode com tutorials c