载入中...
搜索中...
未找到
PlacementInternal.h
浏览该文件的文档.
1#pragma once
2
3// Private geometry shared by placement translation units; not a module boundary.
5
8 struct Point {
9 float x = 0.f;
10 float y = 0.f;
11 };
12 float x = 0.f;
13 float y = 0.f;
14 float radius = 0.f;
15 float halfWidth = 0.f;
16 float halfHeight = 0.f;
17 float rotationRadians = 0.f;
18 std::vector<Point> vertices;
19
20 bool isPolygon() const { return vertices.size() >= 3; }
21};
22
23bool hasFreeEdgeOverlap(const PlacementWorld& world, const BuildingDefinition& freeDefinition,
24 const FreeFootprint& footprint, const BuildingDefinition& edgeDefinition, EdgeAddress edge);
25float wrapDeg(float deg);
26int cardinalQuarter(float rotationDeg);
27float length3(float x, float y, float z);
28FreeFootprint definitionFreeFootprint(const BuildingDefinition& definition, const PlacementWorld& world, float x,
29 float y, float rotationDeg);
31 const PlacementWorld& world);
34std::vector<FreeFootprint::Point> worldVertices(const FreeFootprint& footprint);
35bool isPointInPolygon(const FreeFootprint& polygon, float x, float y);
37bool containsFreeFootprintPoint(const FreeFootprint& footprint, float x, float y);
38void cross3(float ax, float ay, float az, float bx, float by, float bz, float& x, float& y, float& z);
41} // namespace eve::building::placement_detail
double z
double y
double x
MeleePoint3 b
Definition MeleeHit.cpp:41
MeleePoint3 a
Definition MeleeHit.cpp:40
bool hit
bool placed
格子型建筑放置世界(脚本可直接操作)。
bool containsFreeFootprintPoint(const FreeFootprint &footprint, float x, float y)
bool isPointInPolygon(const FreeFootprint &polygon, float x, float y)
SurfaceFrameStatus normalizeSurfaceFrame(PlacementSystem::PlacementHit &hit)
FreeFootprint definitionFreeFootprint(const BuildingDefinition &definition, const PlacementWorld &world, float x, float y, float rotationDeg)
std::vector< FreeFootprint::Point > worldVertices(const FreeFootprint &footprint)
Transform footprint vertices. @cost Copies vertex count per overlap query.
bool hasFreeEdgeOverlap(const PlacementWorld &world, const BuildingDefinition &freeDefinition, const FreeFootprint &footprint, const BuildingDefinition &edgeDefinition, EdgeAddress edge)
float length3(float x, float y, float z)
void applyDefinitionFreeFootprint(PlacedBuilding &placed, const BuildingDefinition &definition, const PlacementWorld &world)
FreeFootprint placedFreeFootprint(const PlacedBuilding &placed)
int cardinalQuarter(float rotationDeg)
void cross3(float ax, float ay, float az, float bx, float by, float bz, float &x, float &y, float &z)
bool hasFreeFootprintOverlap(const FreeFootprint &a, const FreeFootprint &b)
建筑模板(进程级注册表中的定义)。
Canonical address of one grid edge.
已放置的建筑实例。
One sampled point and orthonormal frame on a placement surface.