Geogram
Version 1.9.1-rc
A programming library of geometric algorithms
|
Internal OpenNL functions to manipulate contexts. More...
Go to the source code of this file.
Classes | |
struct | NLBufferBinding |
Stores the information relevant to access variables stored in buffers. More... | |
struct | NLContextStruct |
Macros | |
#define | NL_STATE_INITIAL 0 |
#define | NL_STATE_SYSTEM 1 |
#define | NL_STATE_MATRIX 2 |
#define | NL_STATE_ROW 3 |
#define | NL_STATE_MATRIX_CONSTRUCTED 4 |
#define | NL_STATE_SYSTEM_CONSTRUCTED 5 |
#define | NL_STATE_SOLVED 6 |
#define | NL_STATE_MATRIX_PATTERN 7 |
#define | NL_BUFFER_ITEM(B, i) *(double*)((void*)((char*)((B).base_address)+((i)*(B).stride))) |
Access to a double value in a buffer. More... | |
Typedefs | |
typedef NLboolean(* | NLSolverFunc) (void) |
The callback type for solver routines. More... | |
typedef void(* | NLProgressFunc) (NLuint cur_iter, NLuint max_iter, double cur_err, double max_err) |
The callback type for displaying progress. More... | |
Functions | |
void | nlCheckState (NLenum state) |
Makes sure that the finite state automaton is in the expected state. More... | |
void | nlTransition (NLenum from_state, NLenum to_state) |
Implements a transition of the finite state automaton. More... | |
NLboolean | nlDefaultSolver (void) |
Implements the default solver. More... | |
Variables | |
NLContextStruct * | nlCurrentContext |
Pointer to the current context. | |
Internal OpenNL functions to manipulate contexts.
Definition in file nl_context.h.
#define NL_BUFFER_ITEM | ( | B, | |
i | |||
) | *(double*)((void*)((char*)((B).base_address)+((i)*(B).stride))) |
Access to a double value in a buffer.
[in] | B | a NLBufferBinding |
[in] | i | index |
i
th value in B
Definition at line 100 of file nl_context.h.
The callback type for displaying progress.
Used by nlSetFunction(NL_FUNC_PROGRESS,f)
Definition at line 65 of file nl_context.h.
typedef NLboolean(* NLSolverFunc) (void) |
The callback type for solver routines.
Used by nlSetFunction(NL_FUNC_SOLVER,f)
Definition at line 59 of file nl_context.h.
void nlCheckState | ( | NLenum | state | ) |
Makes sure that the finite state automaton is in the expected state.
If expected state and current state differ, then the program is aborted with an error message.
[in] | state | the expected state. |
NLboolean nlDefaultSolver | ( | void | ) |
Implements the default solver.
Calls the right solver according to nlCurrentContext->solver.
NL_TRUE | if solve was successful |
NL_FALSE | otherwise |
Implements a transition of the finite state automaton.
If the current state does not match state
, then the program is aborted with an error message. The current state is replaced by to_state
.
[in] | from_state | the expected current state |
[in] | to_state | the new state |