Wildmeshing Toolkit
Loading...
Searching...
No Matches
is_ccw.hxx
Go to the documentation of this file.
1
2#pragma once
3
4#include <cassert>
7
9inline bool is_ccw(const Tuple& tuple)
10{
11 assert(tuple_is_valid_for_ccw(tuple));
12 const int64_t offset = local_id_table_offset(tuple);
13 return auto_2d_table_ccw[offset] == 1;
14}
15inline bool tuple_is_valid_for_ccw(const Tuple& tuple)
16{
17 if (tuple.is_null()) {
18 return false;
19 }
20 const int64_t offset = local_id_table_offset(tuple);
21 return auto_2d_table_ccw[offset] != -1;
22}
23} // namespace wmtk::autogen::tri_mesh
The Tuple is the basic navigation tool in our mesh data structure.
Definition Tuple.hpp:19
bool is_null() const
Checks if a tuple is "null". This merely implies the global index is -1.
Definition Tuple.hxx:41
int64_t local_id_table_offset(const Tuple &t)
bool tuple_is_valid_for_ccw(const Tuple &t)
Definition is_ccw.hxx:15
bool is_ccw(const Tuple &t)
Definition is_ccw.hxx:9