commit 36a4d2dca50330939003c27b3b9fa6c3a54e26dc
parent f6330fde88d1445e43e38ee65c4b2633af4f713e
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Fri, 13 Dec 2019 11:04:21 +0100
Rename files and lib the star-engine way
Diffstat:
8 files changed, 46 insertions(+), 390 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -56,7 +56,7 @@ set(SG3_FILES_SRC
)
set(SG3_FILES_INC_API
- star-geometry.h)
+ sg3.h)
set(SG3_FILES_INC
sg3_device.h
@@ -80,19 +80,19 @@ if(MSVC)
endif()
-add_library(star-geometry SHARED
+add_library(sg3 SHARED
${SG3_FILES_SRC}
${SG3_FILES_INC}
${SG3_FILES_INC_API})
-target_link_libraries(star-geometry RSys ${MATH_LIB})
+target_link_libraries(sg3 RSys ${MATH_LIB})
-set_target_properties(star-geometry PROPERTIES
+set_target_properties(sg3 PROPERTIES
DEFINE_SYMBOL SG3_SHARED_BUILD
VERSION ${VERSION}
SOVERSION ${VERSION_MAJOR})
-rcmake_copy_runtime_libraries(star-geometry)
+rcmake_copy_runtime_libraries(sg3)
-rcmake_setup_devel(star-geometry SdisGeom ${VERSION} star-geometry_version.h)
+rcmake_setup_devel(sg3 StarGeom ${VERSION} sg3_version.h)
################################################################################
# Add tests
@@ -103,7 +103,7 @@ if(NOT NO_TEST)
${STAR_GEOM_SOURCE_DIR}/${_name}.c
${STAR_GEOM_SOURCE_DIR}/test_sg3_utils.h
)
- target_link_libraries(${_name} RSys star-geometry)
+ target_link_libraries(${_name} RSys sg3)
endfunction()
function(register_test _name)
@@ -124,10 +124,9 @@ endif()
################################################################################
# Define output & install directories
################################################################################
-install(TARGETS star-geometry
+install(TARGETS sg3
ARCHIVE DESTINATION bin
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
-install(FILES ${SG3_FILES_INC_API} DESTINATION include/)
+install(FILES ${SG3_FILES_INC_API} DESTINATION include/star)
install(FILES ${SG3_FILES_DOC} DESTINATION share/doc/star-geometry)
-
diff --git a/src/sg3_device.c b/src/sg3_device.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "star-geometry.h"
+#include "sg3.h"
#include "sg3_device.h"
#include <rsys/logger.h>
diff --git a/src/sg3_geometry.c b/src/sg3_geometry.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "star-geometry.h"
+#include "sg3.h"
#include "sg3_geometry.h"
#include "sg3_device.h"
@@ -27,9 +27,9 @@
static void
geometry_release(ref_T* ref)
{
- struct sg3_geometry* geom;
+ struct sg3* geom;
ASSERT(ref);
- geom = CONTAINER_OF(ref, struct sg3_geometry, ref);
+ geom = CONTAINER_OF(ref, struct sg3, ref);
darray_triangle_release(&geom->unique_triangles);
darray_vertex_release(&geom->unique_vertices);
@@ -97,7 +97,7 @@ trg_make_key(struct unsigned3* k, const unsigned t[3])
static void
dump_trg_property
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
FILE* stream,
const enum sg3_property_type type)
{
@@ -133,7 +133,7 @@ dump_trg_property
******************************************************************************/
res_T
geometry_register_triangle
- (struct sg3_geometry* geom,
+ (struct sg3* geom,
const struct triangle* triangle,
const unsigned triangle_unique_id,
const unsigned set_id,
@@ -220,7 +220,7 @@ error:
static void
dump_partition
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
FILE* stream,
const char* group_name,
enum sg3_dump_content partition)
@@ -263,9 +263,9 @@ dump_partition
res_T
sg3_geometry_create
(struct sg3_device* dev,
- struct sg3_geometry** out_geometry)
+ struct sg3** out_geometry)
{
- struct sg3_geometry* geom = NULL;
+ struct sg3* geom = NULL;
res_T res = RES_OK;
if(!dev || !out_geometry) {
@@ -273,10 +273,10 @@ sg3_geometry_create
goto error;
}
- geom = MEM_CALLOC(dev->allocator, 1, sizeof(struct sg3_geometry));
+ geom = MEM_CALLOC(dev->allocator, 1, sizeof(struct sg3));
if(!geom) {
log_err(dev,
- "%s: could not allocate the sg3_geometry.\n", FUNC_NAME);
+ "%s: could not allocate the sg3.\n", FUNC_NAME);
res = RES_MEM_ERR;
goto error;
}
@@ -310,7 +310,7 @@ error:
res_T
sg3_geometry_add
- (struct sg3_geometry* geom,
+ (struct sg3* geom,
const unsigned ntris,
void(*indices)(const unsigned, unsigned*, void*),
void(*properties)(const unsigned, unsigned*, void*), /* Can be NULL */
@@ -491,7 +491,7 @@ error:
res_T
sg3_geometry_validate_properties
- (struct sg3_geometry* geom,
+ (struct sg3* geom,
res_T(*validate)(const unsigned, const unsigned*, void*, int*),
void* ctx)
{
@@ -535,7 +535,7 @@ error:
res_T
sg3_geometry_get_unique_vertices_count
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
unsigned* count)
{
res_T res = RES_OK;
@@ -555,7 +555,7 @@ error:
res_T
sg3_geometry_get_unique_vertex
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
const unsigned ivtx,
double coord[3])
{
@@ -577,7 +577,7 @@ error:
res_T
sg3_geometry_get_unique_triangles_count
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
unsigned* count)
{
res_T res = RES_OK;
@@ -597,7 +597,7 @@ error:
res_T
sg3_geometry_get_unique_triangle_vertices
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
const unsigned itri,
unsigned indices[3])
{
@@ -620,7 +620,7 @@ error:
res_T
sg3_geometry_get_unique_triangle_properties
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
const unsigned itri,
unsigned properties[SG3_PROP_TYPES_COUNT__])
{
@@ -644,7 +644,7 @@ error:
res_T
sg3_geometry_get_unique_triangle_global_id
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
const unsigned itri,
unsigned* global_id)
{
@@ -666,7 +666,7 @@ error:
res_T
sg3_geometry_get_triangle_with_undefined_side_count
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
unsigned* count)
{
res_T res = RES_OK;
@@ -683,7 +683,7 @@ error:
res_T
sg3_geometry_get_triangle_with_undefined_interface_count
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
unsigned* count)
{
res_T res = RES_OK;
@@ -700,7 +700,7 @@ error:
res_T
sg3_geometry_get_merge_conflict_count
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
unsigned* count)
{
res_T res = RES_OK;
@@ -717,7 +717,7 @@ error:
res_T
sg3_geometry_get_properties_conflict_count
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
unsigned* count)
{
res_T res = RES_OK;
@@ -734,7 +734,7 @@ error:
res_T
sg3_geometry_dump_as_obj
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
FILE* stream,
int flags)
{
@@ -785,7 +785,7 @@ error:
res_T
sg3_geometry_dump_as_vtk
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
FILE* stream)
{
res_T res = RES_OK;
@@ -874,7 +874,7 @@ error:
}
res_T
sg3_geometry_dump_as_C_code
- (const struct sg3_geometry* geom,
+ (const struct sg3* geom,
FILE* stream,
const char* name_prefix)
{
@@ -965,7 +965,7 @@ error:
}
res_T
-sg3_geometry_ref_get(struct sg3_geometry* geom)
+sg3_geometry_ref_get(struct sg3* geom)
{
if(!geom) return RES_BAD_ARG;
ref_get(&geom->ref);
@@ -973,7 +973,7 @@ sg3_geometry_ref_get(struct sg3_geometry* geom)
}
res_T
-sg3_geometry_ref_put(struct sg3_geometry* geom)
+sg3_geometry_ref_put(struct sg3* geom)
{
if(!geom) return RES_BAD_ARG;
ref_put(&geom->ref, geometry_release);
diff --git a/src/sg3_geometry.h b/src/sg3_geometry.h
@@ -16,7 +16,7 @@
#ifndef SG3_GEOMETRY_H__
#define SG3_GEOMETRY_H__
-#include "star-geometry.h"
+#include "sg3.h"
#include "sg3_misc.h"
#include <rsys/ref_count.h>
@@ -228,7 +228,7 @@ init_trg_intfaceid
/*******************************************************************************
* Types to store geometry amid sg3_geometry_add calls.
******************************************************************************/
-struct sg3_geometry {
+struct sg3 {
/* Record unique (i.e. deduplicated) triangles */
struct darray_triangle unique_triangles;
/* Record coordinates for unique (i.e. deduplicated) vertices */
@@ -261,7 +261,7 @@ struct sg3_geometry {
extern res_T
geometry_register_triangle
- (struct sg3_geometry* geometry,
+ (struct sg3* geometry,
const struct triangle* triangle,
const unsigned triangle_unique_id,
const unsigned set_id,
@@ -270,7 +270,7 @@ geometry_register_triangle
/* Add new undefined triangle descriptions to a geometry */
static res_T
geometry_enlarge_trg_descriptions
- (struct sg3_geometry* geom,
+ (struct sg3* geom,
const size_t sz)
{
res_T res = RES_OK;
diff --git a/src/star-geometry.h b/src/star-geometry.h
@@ -1,343 +0,0 @@
-/* Copyright (C) 2016-2019 |Meso|Star> (contact@meso-star.com)
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef STAR_GEOMETRY_H__
-#define STAR_GEOMETRY_H__
-
-#include <rsys/rsys.h>
-#include <rsys/dynamic_array_uint.h>
-
-#include <limits.h>
-
-/* Library symbol management */
-#if defined(SG3_SHARED_BUILD)
- #define SG3_API extern EXPORT_SYM
-#elif defined(SG3_STATIC_BUILD)
- #define SG3_API extern LOCAL_SYM
-#else /* Use shared library */
- #define SG3_API extern IMPORT_SYM
-#endif
-
-/* Helper macro that asserts if the invocation of the star-geometry function
- * `Func' returns an error. One should use this macro on star-geometry
- * function calls for which no explicit error checking is performed. */
-#ifndef NDEBUG
-#define SG3(Func) ASSERT(sg3_ ## Func == RES_OK)
-#else
-#define SG3(Func) sg3_ ## Func
-#endif
-
- /* Forward declaration of external opaque data types */
-struct logger;
-struct mem_allocator;
-struct senc_scene;
-
-/* Forward declaration of the star-geometry opaque data types. These data
- * types are ref counted. Once created the caller implicitly owns the created
- * data, i.e. its reference counter is set to 1. The sdis_<TYPE>_ref_<get|put>
- * functions get or release a reference on the data, i.e. they increment or
- * decrement the reference counter, respectively. When this counter reaches 0,
- * the object is silently destroyed and cannot be used anymore. */
-struct sg3_device;
-struct sg3_geometry;
-
-/*******************************************************************************
- * A type to list the different user properties attached to triangles.
- ******************************************************************************/
-enum sg3_property_type {
- SG3_FRONT,
- SG3_BACK,
- SG3_INTFACE,
- SG3_PROP_TYPES_COUNT__
-};
-
-/*******************************************************************************
- * A type to list the different possible partitions of triangles.
- ******************************************************************************/
-enum sg3_dump_content {
- SG3_MERGE_CONFLICTS = BIT(0),
- SG3_PROPERTY_CONFLICTS = BIT(1),
- SG3_VALID_TRIANGLE = BIT(2),
- SG3_ALL_TRIANGLES =
- SG3_MERGE_CONFLICTS | SG3_PROPERTY_CONFLICTS | SG3_VALID_TRIANGLE
-};
-
-/*******************************************************************************
- * The value that should be used for properties attached to triangles (i.e.
- * media or interface) when not defined.
- * SG3_UNDEFINED_PROPERTY can be used for a property that has already been
- * defined; in this case the previous value will remain.
- ******************************************************************************/
-#define SG3_UNDEFINED_PROPERTY UINT_MAX
-
-BEGIN_DECLS
-
-/*******************************************************************************
- * A helper function on properties compatibility.
- ******************************************************************************/
-static INLINE int
-sg3_compatible_property
- (const unsigned p1,
- const unsigned p2)
-{
- if(p1 == SG3_UNDEFINED_PROPERTY || p2 == SG3_UNDEFINED_PROPERTY) return 1;
- return (p1 == p2);
-}
-
-/*******************************************************************************
- * star-geometry device. It is an handle toward the star-geometry library.
- * It manages the star-geometry resources.
- ******************************************************************************/
-SG3_API res_T
-sg3_device_create
- (struct logger* logger, /* Can be NULL <=> use default logger */
- struct mem_allocator* allocator, /* Can be NULL <=> use default allocator */
- const int verbose, /* Verbosity level */
- struct sg3_device** dev);
-
-SG3_API res_T
-sg3_device_ref_get
- (struct sg3_device* dev);
-
-SG3_API res_T
-sg3_device_ref_put
- (struct sg3_device* dev);
-
-/*******************************************************************************
- * star-geometry geometry.
- * It stores decorated geometry accumulated through calls to sg3_geometry_add,
- * information related to this geometry and its creation process, including merge
- * conflicts.
- ******************************************************************************/
-/* Create a geometry that can be used to accumulate vertices and triangles
- * decorated with properties. */
-SG3_API res_T
-sg3_geometry_create
- (struct sg3_device* dev,
- struct sg3_geometry** geometry);
-
-/* Add a new set of 3D vertices and triangles to the geometry; triangles can
- * be decorated with 3 properties (front and back media and interface) that can
- * be let undefined using the SG3_UNDEFINED_PROPERTY special value.
- * Vertices can be duplicates and are silently deduplicated, always valid.
- * Triangles can be duplicates, but this can be ruled invalid due to property
- * inconsistency. Triangle duplicates are silently deduplicated, even if
- * invalid. Consistency is to be understood as the consistency of the
- * successive values for the same property across calls of sg3_geometry_add,
- * not as the consistency of the values of the 3 properties of a triangle at
- * some given time (this question has its own callback (validate) in the
- * sg3_geometry_validate_properties API call).
- * Duplicate triangles validity is either ruled by the user-provided
- * merge_triangle callback, or is just a matter of properties consistency if no
- * callback is provided. In either case, sg3_geometry_add never stops
- * prematurely nor returns an error code due to a merge conflict.
- * - if provided, the callback must return the consistency status using the
- * merge_conflict_status int* paramater (0 for consistent; any other value
- * for inconsistent, this value being recorded); regardless of
- * merge_conflict_status, the callback can change the properties of the
- * triangle before the SG3_UNDEFINED_PROPERTY overwriting step;
- * - if not, a non-SG3_UNDEFINED_PROPERTY is only consistent with itself and
- * with SG3_UNDEFINED_PROPERTY (if inconsistent, merge_conflict_status is set
- * to 1 and recorded) ; regardless of merge_conflict_status, a
- * non-SG3_UNDEFINED_PROPERTY property is never overridden.
- * When deduplicating triangles, the first occurence remains (with its
- * original index in user world). After consistency being computed, a final
- * step consists in rewriting SG3_UNDEFINED_PROPERTY properties if the merged
- * property is defined. */
-SG3_API res_T
-sg3_geometry_add
- (struct sg3_geometry* geometry,
- /* Number of added triangles */
- const unsigned triangles_count,
- /* User function that provides vertices ids for added triangles */
- void(*indices)(const unsigned itri, unsigned ids[3], void* context),
- /* User function that provides properties for added triangles */
- void(*properties) /* Can be NULL <=> SG3_UNDEFINED_PROPERTY used */
- (const unsigned itri,
- unsigned properties[SG3_PROP_TYPES_COUNT__],
- void* context),
- /* Number of added vertices */
- const unsigned vertices_count,
- /* User function that provides coordinates for added vertices */
- void(*position)(const unsigned ivert, double pos[3], void* context),
- /* Called for each new triangle so that the client app can manage its own
- * triangle data/properties/attributes.
- * If return is not RES_OK, sg3_geometry_add stops immediately and returns
- * whatever value add_triangle returned. */
- res_T(*add_triangle) /* Can be NULL */
- (const unsigned global_id, const unsigned itri, void* context),
- /* Called if the itri_th triangle of the current sg3_geometry_add is equal
- * to the global_id_th global triangle so that the client app can merge
- * its own triangle data, rule merge validity, and possibly change the
- * recorded properties.
- * The reversed_triangle arg indicates if the triangle vertices' order is
- * the same it was when the triangle was first added.
- * The merge_conflict_status argument can be set to any value. Any non-0
- * value is accounted for a conflict and is kept as-is in dumps, allowing
- * different shades of conflict.
- * The triangle_properties and merged_properties args contain the involved
- * properties. */
- res_T(*merge_triangle) /* Can be NULL */
- (const unsigned global_id,
- const unsigned itri,
- const int reversed_triangle,
- unsigned triangle_properties[SG3_PROP_TYPES_COUNT__],
- const unsigned merged_properties[SG3_PROP_TYPES_COUNT__],
- void* context,
- int* merge_conflict_status),
- void* context); /* Can be NULL */
-
-/* Apply a validation callback on each triangle included in this geometry that
- * is not already flagged with a merge error. If validate returns a non-RES_OK
- * value, the validation stops and returns the same error value; on the other
- * hand, validation goes to the end regardless of properties conflicts.
- * The properties_conflict_status argument can be set to any value. Any non-0
- * value is accounted for a conflict and is kept as-is in dumps, allowing
- * different shades of conflict.
- * If validation is processed again, the properties conflict count is reset,
- * as well as the properties_conflict_status status of the triangles. */
-SG3_API res_T
-sg3_geometry_validate_properties
- (struct sg3_geometry* geometry,
- res_T(*validate)
- (const unsigned itri,
- const unsigned properties[SG3_PROP_TYPES_COUNT__],
- void* context,
- int* properties_conflict_status),
- void* context); /* Can be NULL */
-
-/* Get the number of unique vertices. */
-SG3_API res_T
-sg3_geometry_get_unique_vertices_count
- (const struct sg3_geometry* geometry,
- unsigned* count);
-
-/* Get the ivtx_th vertex. */
-SG3_API res_T
-sg3_geometry_get_unique_vertex
- (const struct sg3_geometry* geometry,
- const unsigned ivtx,
- double coord[3]);
-
-/* Get the number of unique triangles. */
-SG3_API res_T
-sg3_geometry_get_unique_triangles_count
- (const struct sg3_geometry* geometry,
- unsigned* count);
-
-/* Get the vertex indices of the itri_th triangle. */
-SG3_API res_T
-sg3_geometry_get_unique_triangle_vertices
- (const struct sg3_geometry* geometry,
- const unsigned itri,
- unsigned indices[3]);
-
-/* Get the properties of the itri_th triangle. */
-SG3_API res_T
-sg3_geometry_get_unique_triangle_properties
- (const struct sg3_geometry* geometry,
- const unsigned itri,
- unsigned properties[SG3_PROP_TYPES_COUNT__]);
-
-/* Get the global ID of the itri_th triangle, that is its original index in
- * user world. */
-SG3_API res_T
-sg3_geometry_get_unique_triangle_global_id
- (const struct sg3_geometry* geometry,
- const unsigned itri,
- unsigned* global_id);
-
-/* Get the number of triangle with (at least) one undefined side. */
-SG3_API res_T
-sg3_geometry_get_triangle_with_undefined_side_count
- (const struct sg3_geometry* geometry,
- unsigned* count);
-
-/* Get the number of triangle with undefined interface. */
-SG3_API res_T
-sg3_geometry_get_triangle_with_undefined_interface_count
- (const struct sg3_geometry* geometry,
- unsigned* count);
-
-/* Get the number of triangle flagged with a merge conflict. */
-SG3_API res_T
-sg3_geometry_get_merge_conflict_count
- (const struct sg3_geometry* geometry,
- unsigned* count);
-
-/* Get the number of triangle flagged with a property conflict. Only meaningful
- * after sg3_geometry_validate_properties has been called. */
-SG3_API res_T
-sg3_geometry_get_properties_conflict_count
- (const struct sg3_geometry* geometry,
- unsigned* count);
-
-/* Dump a geometry in the provided stream in the OBJ format.
- * The geometry can include conflicts, but cannot be empty.
- * The dump is made of the vertices and some triangles, without their
- * properties. The dumped triangles are defined by the flags argument, that
- * must be ORed enum sg3_dump_content values.
- * The dumped triangles are partitioned in the following groups:
- * - Valid_triangles
- * - Merge_conflicts
- * - Property_conflict */
-SG3_API res_T
-sg3_geometry_dump_as_obj
- (const struct sg3_geometry* geometry,
- FILE* stream,
- int flags);
-
-/* Dump a geometry in the provided stream in the VTK ascii format.
- * The geometry can include conflicts, but cannot be empty.
- * The dump is made of the vertices and triangles, with most of their
- * properties:
- * - Front_medium (medium ID of the front side, INT_MAX for both undefined and
- * conflicted)
- * - Back_medium (medium ID of the back side, INT_MAX for both undefined and
- * conflicted)
- * - Interface (interface ID, INT_MAX for both undefined and conflicted)
- * - Merge_conflict (merge conflict status)
- * - Property_conflict (property conflict status)
- * - Created_at_sg3_geometry_add (rank of the sg3_geometry_add that created the
- * triangle) */
-SG3_API res_T
-sg3_geometry_dump_as_vtk
- (const struct sg3_geometry* geometry,
- FILE* stream);
-
-/* Dump the geometry as C code.
- * The geometry cannot be empty and must be conflict-free.
- * The C code defines the 3 variables:
- * - const double <name_prefix>_vertices[<N1>] = { .... };
- * - const unsigned <name_prefix>_triangles[<N2>] = { .... };
- * - const unsigned <name_prefix>_properties[<N2>] = { .... };
-* Where <N1> is 3 * vertices_count and <N2> is 3 * triangles_count. */
-SG3_API res_T
-sg3_geometry_dump_as_C_code
- (const struct sg3_geometry* geometry,
- FILE* stream,
- const char* name_prefix); /* Can be NULL or "" */
-
-SG3_API res_T
-sg3_geometry_ref_get
- (struct sg3_geometry* geometry);
-
-SG3_API res_T
-sg3_geometry_ref_put
- (struct sg3_geometry* geometry);
-
-END_DECLS
-
-#endif /* STAR_GEOMETRY_H__ */
diff --git a/src/test_sg3_device.c b/src/test_sg3_device.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "star-geometry.h"
+#include "sg3.h"
#include "test_sg3_utils.h"
#include <rsys/logger.h>
diff --git a/src/test_sg3_geometry.c b/src/test_sg3_geometry.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "star-geometry.h"
+#include "sg3.h"
#include "test_sg3_utils.h"
#include <rsys/double3.h>
@@ -54,7 +54,7 @@ main(int argc, char** argv)
{
struct mem_allocator allocator;
struct sg3_device* dev;
- struct sg3_geometry* geom;
+ struct sg3* geom;
double coord[3];
unsigned indices[3];
unsigned properties[SG3_PROP_TYPES_COUNT__];
diff --git a/src/test_sg3_geometry_2.c b/src/test_sg3_geometry_2.c
@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "star-geometry.h"
+#include "sg3.h"
#include "test_sg3_utils.h"
#include <rsys/double3.h>
@@ -93,7 +93,7 @@ main(int argc, char** argv)
{
struct mem_allocator allocator;
struct sg3_device* dev;
- struct sg3_geometry* geom;
+ struct sg3* geom;
struct context ctx;
struct add_geom_ctx add_geom_ctx;
unsigned property[12];