Efficient Collision Detection for Animation and Robotics Part 11 pot

14 176 0
Efficient Collision Detection for Animation and Robotics Part 11 pot

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... RETURN vdotvcrossv1, v2, v3  distance function: it tests for the type of features in order  to calculate the distance between them  and returns the distance between them It takes in 2 features Since it is rather simple,  we only document its functionality and input here PROCEDURE distfeat1, feat2  Given 2 features "feat1" and "feat2", this routine finds the  nearest point of one... the Distance Algorithm PART I - Data Structure type VEC REAL X  X-coordinate REAL Y  Y-coordinate REAL Z  Z-coordinate REAL W  scaling factor type VERTEX REAL X, Y, Z, W; FEATURE *edges;  pointer to its coboundary - a list of edges CELL *cell;  vertex's Voronoi region ; type EDGE VERTEX *H, *T;  the head and tail of this edge FACE *fright, *fleft;  the right and left face of this winged... PROCEDURE nearest-ptfeat1, feat2  Given 2 faces "Fa" and "Fb", it find the closest vertex  or edges in Fb's boundary to the plane containing Fa PROCEDURE closestToFplaneFa, Fb  Given an edge E and a face F, it finds the closest vertex  or edge in the boundary of the face F PROCEDURE closestToEE, F 142  Given 2 faces "Fa" and "Fb", it find the pair of edges  closest in distance... projection of Fa down  to Fb overlaps with Fb This can be implemented with best  known bound ON+M by marching along the boundary of Fa and  Fb to find the intersecting edges thus the overlap polygon,  where N and M is the number of vertices of Fa and Fb PROCEDURE overlapFa, Fb  This is the linear time routine used to find the closest  feature on one "polyhedron" to a given feature... *edges;  all its edges FEATURE *faces;  all its faces CELL *cells;  all the Voronoi regions assoc with features 141 VEC pos;  its current location vector VEC rot;  its current direction vector ; PART II - Algorithm  vector or vertex operation: dot product PROCEDURE vdot v1, v2 RETURN v1.X*v2.X + v1.Y*v2.Y + v1.Z*v2.Z + v1.W*v2.W  vector operation: cross product PROCEDURE vcross v1,... face's PRISM, NOT including the plane of face POLYHEDRON *cobnd;  the polyhedron containing the FACE ; type FEATURE union  features are union of VERTEX *v;  vertices, EDGE *e;  edges, FACE *f;  and faces ; FEATURE *next;  pointer to next feature ; struct CELL VEC cplane;  one constraint plane of a Voronoi region:  cplane.X * X + cplane.Y * Y + cplane.Z * Z + cplane.W = 0  PTR *neighbr;

Ngày đăng: 10/08/2014, 04:21

Tài liệu cùng người dùng

Tài liệu liên quan