Cleanup: Move lineart_cpu.c to C++
To enable further mesh data structure refactoring-- access to loose edges in particular.
This commit is contained in:
parent
fba7461e1a
commit
3eb2bc2c3f
|
@ -67,7 +67,7 @@ set(SRC
|
|||
# Lineart code
|
||||
intern/lineart/lineart_chain.c
|
||||
intern/lineart/lineart_cpp_bridge.cc
|
||||
intern/lineart/lineart_cpu.c
|
||||
intern/lineart/lineart_cpu.cc
|
||||
intern/lineart/lineart_ops.c
|
||||
intern/lineart/lineart_shadow.c
|
||||
intern/lineart/lineart_util.c
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
|
||||
/* Operator types should be in exposed header. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void OBJECT_OT_lineart_bake_strokes(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_lineart_bake_strokes_all(struct wmOperatorType *ot);
|
||||
void OBJECT_OT_lineart_clear(struct wmOperatorType *ot);
|
||||
|
@ -20,3 +24,7 @@ void WM_operatortypes_lineart(void);
|
|||
struct LineartCache;
|
||||
|
||||
void MOD_lineart_clear_cache(struct LineartCache **lc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct LineartStaticMemPoolNode {
|
||||
Link item;
|
||||
size_t size;
|
||||
|
@ -74,6 +78,7 @@ typedef enum eLineArtElementNodeFlag {
|
|||
LRT_ELEMENT_NO_INTERSECTION = (1 << 2),
|
||||
LRT_ELEMENT_INTERSECTION_DATA = (1 << 3),
|
||||
} eLineArtElementNodeFlag;
|
||||
ENUM_OPERATORS(eLineArtElementNodeFlag, LRT_ELEMENT_INTERSECTION_DATA);
|
||||
|
||||
typedef struct LineartElementLinkNode {
|
||||
struct LineartElementLinkNode *next, *prev;
|
||||
|
@ -929,3 +934,7 @@ void MOD_lineart_gpencil_generate(LineartCache *cache,
|
|||
float MOD_lineart_chain_compute_length(LineartEdgeChain *ec);
|
||||
|
||||
void ED_operatortypes_lineart(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,6 +17,10 @@
|
|||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct LineartEdge;
|
||||
struct LineartData;
|
||||
struct LineartStaticMemPool;
|
||||
|
@ -148,7 +152,7 @@ bool lineart_edge_from_triangle(const struct LineartTriangle *tri,
|
|||
LineartBoundingArea *lineart_edge_first_bounding_area(struct LineartData *ld,
|
||||
double *fbcoord1,
|
||||
double *fbcoord2);
|
||||
LineartBoundingArea *lineart_bounding_area_next(struct LineartBoundingArea *_this,
|
||||
LineartBoundingArea *lineart_bounding_area_next(struct LineartBoundingArea *self,
|
||||
double *fbcoord1,
|
||||
double *fbcoord2,
|
||||
double x,
|
||||
|
@ -169,10 +173,6 @@ void lineart_add_edge_to_array(struct LineartPendingEdges *pe, struct LineartEdg
|
|||
void lineart_finalize_object_edge_array_reserve(struct LineartPendingEdges *pe, int count);
|
||||
void lineart_destroy_render_data_keep_init(struct LineartData *ld);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void lineart_sort_adjacent_items(struct LineartAdjacentEdge *ai, int length);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_object_enums.h"
|
||||
|
||||
#include "DNA_customdata_types.h"
|
||||
|
@ -233,6 +235,7 @@ enum eObjectLineArt_Usage {
|
|||
OBJECT_LRT_NO_INTERSECTION = (1 << 4),
|
||||
OBJECT_LRT_FORCE_INTERSECTION = (1 << 5),
|
||||
};
|
||||
ENUM_OPERATORS(eObjectLineArt_Usage, OBJECT_LRT_FORCE_INTERSECTION);
|
||||
|
||||
enum eObjectLineArt_Flags {
|
||||
OBJECT_LRT_OWN_CREASE = (1 << 0),
|
||||
|
|
Loading…
Reference in New Issue