Wildmeshing Toolkit
is_ccw.hxx
Go to the documentation of this file.
1
2
#pragma once
3
4
#include <cassert>
5
#include <
wmtk/utils/TupleInspector.hpp
>
6
#include "
autogenerated_tables.hpp
"
7
#include "
local_id_table_offset.hpp
"
8
9
namespace
wmtk::autogen::tri_mesh
{
10
inline
bool
is_ccw
(
const
Tuple
& tuple)
11
{
12
assert(
tuple_is_valid_for_ccw
(tuple));
13
using namespace
utils;
14
const
int64_t offset =
local_id_table_offset
(tuple);
15
return
auto_2d_table_ccw
[offset] == 1;
16
}
17
inline
bool
tuple_is_valid_for_ccw
(
const
Tuple
& tuple)
18
{
19
using namespace
utils;
20
if
(tuple.
is_null
()) {
21
return
false
;
22
}
23
const
int64_t offset =
local_id_table_offset
(tuple);
24
return
auto_2d_table_ccw
[offset] != -1;
25
}
26
}
// namespace wmtk::autogen::tri_mesh
TupleInspector.hpp
wmtk::Tuple
Definition:
Tuple.hpp:42
wmtk::Tuple::is_null
bool is_null() const
Checks if a tuple is "null". This merely implies the global index is -1.
Definition:
Tuple.hxx:40
wmtk::autogen::tri_mesh
Definition:
autogenerated_tables.cpp:4
wmtk::autogen::tri_mesh::local_id_table_offset
int64_t local_id_table_offset(const Tuple &t)
Definition:
local_id_table_offset.hxx:7
wmtk::autogen::tri_mesh::auto_2d_table_ccw
const int64_t auto_2d_table_ccw[9]
Definition:
autogenerated_tables.cpp:14
wmtk::autogen::tri_mesh::tuple_is_valid_for_ccw
bool tuple_is_valid_for_ccw(const Tuple &t)
Definition:
is_ccw.hxx:17
wmtk::autogen::tri_mesh::is_ccw
bool is_ccw(const Tuple &t)
Definition:
is_ccw.hxx:10
autogenerated_tables.hpp
local_id_table_offset.hpp
src
wmtk
autogen
tri_mesh
is_ccw.hxx
Generated by
1.9.1