本文整理汇总了Python中Point.Point.set_reference_point方法的典型用法代码示例。如果您正苦于以下问题:Python Point.set_reference_point方法的具体用法?Python Point.set_reference_point怎么用?Python Point.set_reference_point使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Point.Point
的用法示例。
在下文中一共展示了Point.set_reference_point方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do_parse_vessel_file
# 需要导入模块: from Point import Point [as 别名]
# 或者: from Point.Point import set_reference_point [as 别名]
def do_parse_vessel_file(self):
# print "ok"
start = time.time()
with open(self.filePath, "r+b") as f:
# memory-mapInput the file, size 0 means whole file
map_input = mmap.mmap(f.fileno(), 0)
# read content via standard file methods
for s in iter(map_input.readline, ""):
s = s.translate(None, "\r\n")
# print s
a_line_of_values = s.split(" ")
# print a_line_of_values
point = Point()
if len(a_line_of_values) == 5:
point.set_reference_point(float(a_line_of_values[0]), float(a_line_of_values[1]),
float(a_line_of_values[2]), float(a_line_of_values[3]),
float(a_line_of_values[4]))
# print point.get_x()
elif len(a_line_of_values) == 3:
point.set_centerline_point(float(a_line_of_values[0]), float(a_line_of_values[1]),
float(a_line_of_values[2]))
# print point.get_x()
self.vesselValues.append(point)
map_input.close()
end = time.time()
print "Time for completion", end - start