- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
2、平面内直角坐标系中坐标旋转变换公式_Eric_Wangyz的博客-CSDN博客_坐标旋转变换公式
{
"windows" : [
{
"category" : {
"window" : {
}
},
"confidence" : {
"medium" : {
}
},
"dimensions" : [
4.4304699897766113,
2.4727039337158203,
0
],
"completedEdges" : [
],
"parentIdentifier" : "B4002F3F-2741-405F-9A82-18FF65284C8C",
"identifier" : "70ABA8D4-0AA8-4404-940E-04309F358EBC",
"curve" : null,
"transform" : [
-0.30633658170700073,
0,
-0.95192313194274902,
0,
0,
0.99999994039535522,
0,
0,
0.9519231915473938,
0,
-0.30633658170700073,
0,
-3.3060400485992432,
-0.20823472738265991,
2.7119290828704834,
1
]
}
],
"doors" : [
{
"category" : {
"door" : {
"isOpen" : false
}
},
"confidence" : {
"medium" : {
}
},
"dimensions" : [
1.0301132202148438,
2.5737776756286621,
0
],
"completedEdges" : [
],
"parentIdentifier" : "CC22237C-B6ED-44B5-8547-180A3A0E5994",
"identifier" : "B19AD43B-3C4D-4DA5-A5C0-34A1D39F5892",
"curve" : null,
"transform" : [
0.3063366711139679,
0,
0.95192307233810425,
0,
0,
1,
0,
0,
-0.95192307233810425,
0,
0.3063366711139679,
0,
0.90193623304367065,
-0.24133116006851196,
-0.033205278217792511,
1
]
},
{
"category" : {
"door" : {
"isOpen" : false
}
},
"confidence" : {
"medium" : {
}
},
"dimensions" : [
1.0522669553756714,
2.411841869354248,
0
],
"completedEdges" : [
],
"parentIdentifier" : "CC22237C-B6ED-44B5-8547-180A3A0E5994",
"identifier" : "8095E4C9-2986-446E-9FC9-D92225777FBC",
"curve" : null,
"transform" : [
0.30633670091629028,
0,
0.95192313194274902,
0,
0,
0.99999994039535522,
0,
0,
-0.95192307233810425,
0,
0.3063366711139679,
0,
1.2751809358596802,
-0.2488710880279541,
1.1266312599182129,
1
]
},
{
"category" : {
"door" : {
"isOpen" : true
}
},
"confidence" : {
"medium" : {
}
},
"dimensions" : [
0.79290330410003662,
2.3365452289581299,
0
],
"completedEdges" : [
],
"parentIdentifier" : "CC22237C-B6ED-44B5-8547-180A3A0E5994",
"identifier" : "717D86E1-F273-4577-85DF-E03B933D6188",
"curve" : null,
"transform" : [
0.30633661150932312,
0,
0.95192325115203857,
0,
0,
1,
0,
0,
-0.95192325115203857,
0,
0.30633661150932312,
0,
0.5105128288269043,
-0.35994744300842285,
-1.249530553817749,
1
]
}
],
"walls" : [
{
"category" : {
"wall" : {
}
},
"confidence" : {
"high" : {
}
},
"dimensions" : [
5.6710019111633301,
2.9569838047027588,
0
],
"completedEdges" : [
],
"parentIdentifier" : "8D161454-7233-4E76-BC11-3E3186A8B6D6",
"identifier" : "B4002F3F-2741-405F-9A82-18FF65284C8C",
"curve" : null,
"transform" : [
-0.30633664131164551,
0,
-0.9519231915473938,
0,
0,
0.99999994039535522,
0,
0,
0.95192313194274902,
0,
-0.30633658170700073,
0,
-3.4495170116424561,
-0.049728155136108398,
2.2660825252532959,
1
]
},
{
"category" : {
"wall" : {
}
},
"confidence" : {
"high" : {
}
},
"dimensions" : [
4.8466057777404785,
2.9569838047027588,
0
],
"completedEdges" : [
],
"parentIdentifier" : "5ADD04DA-13E7-4010-B381-D3307FFD5E46",
"identifier" : "F4BCF245-4442-422E-9894-177078F54AE0",
"curve" : null,
"transform" : [
0.9519231915473938,
0,
-0.30633658170700073,
0,
0,
0.99999994039535522,
0,
0,
0.30633652210235596,
0,
0.95192307233810425,
0,
-2.0113365650177002,
-0.049728155136108398,
-1.1754434108734131,
1
]
},
{
"category" : {
"wall" : {
}
},
"confidence" : {
"high" : {
}
},
"dimensions" : [
4.1486597061157227,
2.9569838047027588,
0
],
"completedEdges" : [
],
"parentIdentifier" : "25A96F47-C12D-4EFE-B971-472089DF4594",
"identifier" : "4AD4A1DE-4257-49F2-B788-EAEE5223107C",
"curve" : null,
"transform" : [
-0.9519231915473938,
0,
0.30633658170700073,
0,
0,
0.99999994039535522,
0,
0,
-0.30633652210235596,
0,
-0.95192307233810425,
0,
0.18788377940654755,
-0.049728155136108398,
4.5193233489990234,
1
]
},
{
"category" : {
"wall" : {
}
},
"confidence" : {
"high" : {
}
},
"dimensions" : [
0.69794571399688721,
2.9569838047027588,
0
],
"completedEdges" : [
],
"parentIdentifier" : "44C4678D-23CB-4C12-B6C4-762CB0452E60",
"identifier" : "74CA573A-F192-47E2-A262-EEF9CAF44E7E",
"curve" : null,
"transform" : [
-0.95192313194274902,
0,
0.30633693933486938,
0,
0,
0.99999994039535522,
0,
0,
-0.306336909532547,
0,
-0.95192307233810425,
0,
-2.2487037181854248,
-0.049728155136108398,
4.8583579063415527,
1
]
},
{
"category" : {
"wall" : {
}
},
"confidence" : {
"high" : {
}
},
"dimensions" : [
0.4236811101436615,
2.9569838047027588,
0
],
"completedEdges" : [
],
"parentIdentifier" : "D510898F-31C8-4986-8A1C-9EE75CC68D91",
"identifier" : "4912B095-361F-4914-8F1A-FB2F9A0C3C94",
"curve" : null,
"transform" : [
-0.30633756518363953,
0,
-0.95192277431488037,
0,
0,
0.99999994039535522,
0,
0,
0.95192277431488037,
0,
-0.30633756518363953,
0,
-1.8516137599945068,
-0.049728155136108398,
4.9531106948852539,
1
]
},
{
"category" : {
"wall" : {
}
},
"confidence" : {
"high" : {
}
},
"dimensions" : [
6.0946831703186035,
2.9569838047027588,
0
],
"completedEdges" : [
],
"parentIdentifier" : "34D0C39D-D4D7-48B4-9DE0-7ACD7E6EFBB9",
"identifier" : "CC22237C-B6ED-44B5-8547-180A3A0E5994",
"curve" : null,
"transform" : [
0.30633670091629028,
0,
0.9519231915473938,
0,
0,
0.99999994039535522,
0,
0,
-0.95192313194274902,
0,
0.30633664131164551,
0,
1.2289738655090332,
-0.049728155136108398,
0.98304539918899536,
1
]
}
],
"openings" : [
],
"objects" : [
{
"dimensions" : [
1.5987249612808228,
0.94955956935882568,
0.065000005066394806
],
"confidence" : {
"medium" : {
}
},
"transform" : [
0.95192325115203857,
0,
-0.30633643269538879,
0,
0,
0.99999994039535522,
0,
0,
0.30633637309074402,
0,
0.9519231915473938,
0,
-1.6764084100723267,
-0.001988828182220459,
-0.99941855669021606,
1
],
"category" : {
"television" : {
}
},
"identifier" : "C3BEB09E-7408-42CE-8954-E87B355B4299"
},
{
"dimensions" : [
0.51159495115280151,
1.0113105773925781,
0.56274306774139404
],
"confidence" : {
"medium" : {
}
},
"transform" : [
-0.95192283391952515,
0,
0.30633756518363953,
0,
0,
1,
0,
0,
-0.30633753538131714,
0,
-0.95192289352416992,
0,
-0.40752917528152466,
-1.0225648880004883,
3.9929168224334717,
1
],
"category" : {
"chair" : {
}
},
"identifier" : "B8105472-71D6-417E-9E2C-F1155FB1F1F2"
},
{
"dimensions" : [
0.4749830961227417,
0.40395355224609375,
0.57471352815628052
],
"confidence" : {
"medium" : {
}
},
"transform" : [
-0.95192235708236694,
0,
0.30633917450904846,
0,
0,
1.0000001192092896,
0,
0,
-0.30633923411369324,
0,
-0.95192247629165649,
0,
-0.55003666877746582,
-1.3262432813644409,
3.1927976608276367,
1
],
"category" : {
"chair" : {
}
},
"identifier" : "2A7F638D-DAB2-4FAB-A4EA-FA0F9793390A"
},
{
"dimensions" : [
0.47498306632041931,
0.40395355224609375,
0.57471358776092529
],
"confidence" : {
"medium" : {
}
},
"transform" : [
-0.30632853507995605,
0,
-0.95192575454711914,
0,
0,
1.0000001192092896,
0,
0,
0.95192593336105347,
0,
-0.30632859468460083,
0,
-1.6257414817810059,
-1.3262432813644409,
1.6771179437637329,
1
],
"category" : {
"chair" : {
}
},
"identifier" : "0ED886B4-014C-47E9-B952-F868561FC3B0"
},
{
"dimensions" : [
0.52009981870651245,
0.94679880142211914,
0.57890421152114868
],
"confidence" : {
"medium" : {
}
},
"transform" : [
0.21847167611122131,
0,
0.97584319114685059,
0,
0,
0.99999988079071045,
0,
0,
-0.97584307193756104,
0,
0.21847164630889893,
0,
1.4021255970001221,
-1.0548207759857178,
2.5414259433746338,
1
],
"category" : {
"chair" : {
}
},
"identifier" : "5A194FF7-5D66-4FFA-9379-4B801234BA3A"
},
{
"dimensions" : [
3.7170906066894531,
0.83971703052520752,
1.2917746305465698
],
"confidence" : {
"high" : {
}
},
"transform" : [
0.30633649230003357,
0,
0.9519231915473938,
0,
0,
1.0000001192092896,
0,
0,
-0.95192337036132812,
0,
0.30633652210235596,
0,
-1.0929687023162842,
-1.1083616018295288,
1.5056676864624023,
1
],
"category" : {
"table" : {
}
},
"identifier" : "2524B480-8A47-4ED7-BD97-0A9C6ACE8A95"
},
{
"dimensions" : [
3.3376014232635498,
2.3581094741821289,
0.49721428751945496
],
"confidence" : {
"medium" : {
}
},
"transform" : [
-0.95192277431488037,
0,
0.30633765459060669,
0,
0,
1,
0,
0,
-0.3063376247882843,
0,
-0.95192277431488037,
0,
-0.2743067741394043,
-0.34916538000106812,
4.4068951606750488,
1
],
"category" : {
"storage" : {
}
},
"identifier" : "52E23C35-59C5-404B-A46F-DBDB2A5BECCC"
}
],
"version" : 1
}
# 墙体信息
for wall in json_data["walls"]:
# 墙体中心坐标
center_p = np.array([wall["transform"][-4], wall["transform"][-2]])
length = wall["dimensions"][0]
transform01 = abs(wall["transform"][10])
if wall["transform"][10] < 0:
transform02 = wall["transform"][8]
else:
transform02 = -wall["transform"][8]
# 基于中心点与四维矩阵,获取起始点
p1 = center_p + 0.5 * length * np.array([transform01, transform02])
p2 = center_p - 0.5 * length * np.array([transform01, transform02])
cos = abs(json_data["walls"][0]["transform"][10])
sin = -abs(json_data["walls"][0]["transform"][8])
# # # 坐标翻转
x1 = p1[0] * cos - p1[1] * sin
y1 = p1[1] * cos + p1[0] * sin
p1 = Point2D(int(round(x1 * 1000, 0)), int(round(y1 * 1000, 0)))
x2 = p2[0] * cos - p2[1] * sin
y2 = p2[1] * cos + p2[0] * sin
p2 = Point2D(int(round(x2 * 1000, 0)), int(round(y2 * 1000, 0)))
import json
from sympy.geometry import *
PATH = r"D:\Desktop\room74.json"
f = open(PATH, 'rb')
j = json.load(f)
f.close()
def get_start_end_point(center_p, length, transform01, transform02, cos, sin):
# 基于中心点与四维矩阵,获取起始点
p1 = center_p + 0.5 * length * np.array([transform01, transform02])
p2 = center_p - 0.5 * length * np.array([transform01, transform02])
# # # 坐标翻转
x1 = p1[0] * cos - p1[1] * sin
y1 = p1[1] * cos + p1[0] * sin
p1 = Point2D(int(round(x1 * 1000, 0)), int(round(y1 * 1000, 0)))
x2 = p2[0] * cos - p2[1] * sin
y2 = p2[1] * cos + p2[0] * sin
p2 = Point2D(int(round(x2 * 1000, 0)), int(round(y2 * 1000, 0)))
return p1, p2
def get_wall_points(json_data):
# 获取墙所有的坐标点
wall_p_list = []
# 墙体信息
cos = abs(json_data["walls"][0]["transform"][10])
sin = -abs(json_data["walls"][0]["transform"][8])
for wall in json_data["walls"]:
# 墙体中心坐标
center_p = np.array([wall["transform"][-4], wall["transform"][-2]])
length = wall["dimensions"][0]
transform01 = abs(wall["transform"][10])
if wall["transform"][10] < 0:
transform02 = wall["transform"][8]
else:
transform02 = -wall["transform"][8]
p1, p2 = get_start_end_point(center_p, length, transform01, transform02, cos, sin)
wall_p_list.extend([p1, p2])
return wall_p_list
# 获取墙所有的坐标点:
wall_points_list = get_wall_points(json_data)
print(wall_points_list )
[[Point2D(760, -869), Point2D(-270, -869)], [Point2D(1989, -869), Point2D(937, -869)], [Point2D(-637, -869), Point2D(-1430, -869)]]
我正在尝试将一个字符串逐个字符地复制到另一个字符串中。目的不是复制整个字符串,而是复制其中的一部分(我稍后会为此做一些条件......) 但我不知道如何使用迭代器。 你能帮帮我吗? std::stri
我想将 void 指针转换为结构引用。 结构的最小示例: #include "Interface.h" class Foo { public: Foo() : mAddress((uint
这有点烦人:我有一个 div,它从窗口的左上角开始过渡,即使它位于文档的其他任何位置。我试过 usign -webkit-transform-origin 但没有成功,也许我用错了。有人可以帮助我吗?
假设,如果将 CSS3 转换/转换/动画分配给 DOM 元素,我是否可以检测到该过程的状态? 我想这样做的原因是因为我正在寻找类似过渡链的东西,例如,在前一个过渡之后运行一个过渡。 最佳答案 我在 h
最近我遇到了“不稳定”屏幕,这很可能是由 CSS 转换引起的。事实上,它只发生在 Chrome 浏览器 上(可能还有 Safari,因为一些人也报告了它)。知道如何让它看起来光滑吗?此外,您可能会注意
我正在开发一个简单的 slider ,它使用 CSS 过渡来为幻灯片设置动画。我用一些基本样式和一些 javascript 创建了一支笔 here .注意:由于 Codepen 使用 Prefixfr
我正在使用以下代码返回 IList: public IList FindCodesByCountry(string country) { var query =
如何设计像这样的操作: 计算 转化 翻译 例如:从“EUR”转换为“CNY”金额“100”。 这是 /convert?from=EUR&to=CNY&amount=100 RESTful 吗? 最佳答
我使用 jquery 组合了一个图像滚动器,如下所示 function rotateImages(whichHolder, start) { var images = $('#' +which
如何使用 CSS (-moz-transform) 更改一个如下所示的 div: 最佳答案 你可以看看Mozilla Developer Center .甚至还有例子。 但是,在我看来,您的具体示例不
我需要帮助我正在尝试在选中和未选中的汉堡菜单上实现动画。我能够为菜单设置动画,但我不知道如何在转换为 0 时为左菜单动画设置动画 &__menu { transform: translateX(
我正在为字典格式之间的转换而苦苦挣扎:我正在尝试将下面的项目数组转换为下面的结果数组。本质上是通过在项目第一个元素中查找重复项,然后仅在第一个参数不同时才将文件添加到结果集中。 var items:[
如果我有两个定义相同的结构,那么在它们之间进行转换的最佳方式是什么? struct A { int i; float f; }; struct B { int i; float f; }; void
我编写了一个 javascript 代码,可以将视口(viewport)从一个链接滑动到另一个链接。基本上一切正常,你怎么能在那里看到http://jsfiddle.net/DruwJ/8/ 我现在的
我需要将文件上传到 meteor ,对其进行一些图像处理(必要时进行图像转换,从图像生成缩略图),然后将其存储在外部图像存储服务器(s3)中。这应该尽可能快。 您对 nodejs 图像处理库有什么建议
刚开始接触KDB+,有一些问题很难从Q for Mortals中得到。 说,这里 http://code.kx.com/wiki/JB:QforMortals2/casting_and_enumera
我在这里的一个项目中使用 JSF 1.2 和 IceFaces 1.8。 我有一个页面,它基本上是一大堆浮点数字段的大编辑网格。这是通过 inputText 实现的页面上的字段指向具有原始值的值对象
ScnMatrix4 是一个 4x4 矩阵。我的问题是什么矩阵行对应于位置(ScnVector3),旋转(ScnVector4),比例(ScnVector3)。第 4 行是空的吗? 编辑: 我玩弄了
恐怕我是 Scala 新手: 我正在尝试根据一些简单的逻辑将 Map 转换为新 Map: val postVals = Map("test" -> "testing1", "test2" -> "te
输入: This is sample 1 This is sample 2 输出: ~COLOR~[Green]This is sample 1~COLOR~[Red]This is sam
我是一名优秀的程序员,十分优秀!