Functions
block.cc File Reference
#include "region.hh"
#include "worldfile.hh"
Include dependency graph for block.cc:

Go to the source code of this file.

Functions

static radians_t angle_change (point_t v1, point_t v2)
 util; How much was v1 rotated to get to v2? More...
 
static radians_t angles_sum (vector< point_t > const &vs)
 
static void canonicalize_winding (vector< point_t > &pts)
 
static vector< point_tfind_vectors (vector< point_t > const &pts)
 util; find vectors between adjacent points, pts[next] - pts[cur] More...
 
static bool is_canonical_winding (vector< point_t > const &ps)
 Util. More...
 
static void pi_ize (radians_t &angle)
 util; puts angle into -pi/2, pi/2 More...
 
static void positivize (radians_t &angle)
 util; puts angle into [0, 2pi) More...
 
void swap (int &a, int &b)
 

Function Documentation

◆ angle_change()

static radians_t angle_change ( point_t  v1,
point_t  v2 
)
static

util; How much was v1 rotated to get to v2?

Definition at line 354 of file block.cc.

◆ angles_sum()

static radians_t angles_sum ( vector< point_t > const &  vs)
static

util; finds sum of angle changes, from each vertex to the next one (in current ordering), wrapping around.

Definition at line 387 of file block.cc.

◆ canonicalize_winding()

static void canonicalize_winding ( vector< point_t > &  ps)
static

util; sums angle changes to see whether it's 2pi or -2pi. 2pi is counter-clockwise winding (which OpenGL requires), -2pi is clockwise. Reverses <pts> when winding is clockwise.

Definition at line 413 of file block.cc.

◆ find_vectors()

static vector<point_t> find_vectors ( vector< point_t > const &  pts)
static

util; find vectors between adjacent points, pts[next] - pts[cur]

Definition at line 371 of file block.cc.

◆ is_canonical_winding()

static bool is_canonical_winding ( vector< point_t > const &  ps)
static

Util.

Definition at line 400 of file block.cc.

◆ pi_ize()

static void pi_ize ( radians_t angle)
static

util; puts angle into -pi/2, pi/2

Definition at line 343 of file block.cc.

◆ positivize()

static void positivize ( radians_t angle)
static

util; puts angle into [0, 2pi)

Definition at line 334 of file block.cc.

◆ swap()

void swap ( int &  a,
int &  b 
)

Definition at line 191 of file block.cc.



stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Mon Feb 28 2022 23:48:56