dedge.h
来自「[Game.Programming].Academic - Graphics G」· C头文件 代码 · 共 41 行
H
41 行
// -*- C++ -*-// dedge.h by George Vanecek Jr, June 1994#ifndef _DEDGE_H_#define _DEDGE_H_#ifndef _POINT_H_#include "point.h"#endifclass DEdge { // Directed Edgepublic: DEdge ( const Point& srcP ) : sP(srcP), nxt(this), prv(this), sPW(NOWHERE) { } DEdge* next( ) const { return nxt; } DEdge* prev( ) const { return prv; } const Point& srcPoint( ) const { return sP; } const Point& dstPoint( ) const { return nxt->sP; } Where& srcWhere( ) { return sPW; } Where& dstWhere( ) { return nxt->sPW; } Where where( ) const { return Where( sPW | nxt->sPW ); } double& distFromRefP( ) { return t; } private: DEdge ( const Point& srcP, DEdge* const last ); static void closeCycle( DEdge* const first, DEdge* const last ); void split ( const Point& ); DEdge* nxt; // Next DEdge on cycle DEdge* prv; // Previous DEdge on cycle const Point sP; // Source Point Where sPW; // Where is Source Point? double t; // Related to sP. Used in complexCut(...)friend class Polygon;};typedef DEdge* DEdgePtr;#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?