|
BRL-CAD
|
#include "common.h"#include <stdio.h>#include "bu/magic.h"#include "bu/avs.h"#include "bn/mat.h"#include "rt/defines.h"#include "rt/resource.h"Go to the source code of this file.
Data Structures | |
| struct | rt_db_internal |
Macros | |
| #define | idb_type idb_minor_type |
| #define | RT_DB_INTERNAL_INIT(_p) |
| #define | RT_DB_INTERNAL_INIT_ZERO {RT_DB_INTERNAL_MAGIC, -1, -1, NULL, NULL, BU_AVS_INIT_ZERO} |
| #define | RT_CK_DB_INTERNAL(_p) BU_CKMAG(_p, RT_DB_INTERNAL_MAGIC, "rt_db_internal") |
Functions | |
| int | rt_db_get_internal (struct rt_db_internal *ip, const struct directory *dp, const struct db_i *dbip, const mat_t mat, struct resource *resp) |
| int | rt_db_put_internal (struct directory *dp, struct db_i *dbip, struct rt_db_internal *ip, struct resource *resp) |
| int | rt_fwrite_internal (FILE *fp, const char *name, const struct rt_db_internal *ip, double conv2mm) |
| void | rt_db_free_internal (struct rt_db_internal *ip) |
| int | rt_db_lookup_internal (struct db_i *dbip, const char *obj_name, struct directory **dpp, struct rt_db_internal *ip, int noisy, struct resource *resp) |
| #define idb_type idb_minor_type |
Definition at line 54 of file db_internal.h.
| #define RT_DB_INTERNAL_INIT | ( | _p | ) |
Definition at line 55 of file db_internal.h.
| #define RT_DB_INTERNAL_INIT_ZERO {RT_DB_INTERNAL_MAGIC, -1, -1, NULL, NULL, BU_AVS_INIT_ZERO} |
Definition at line 63 of file db_internal.h.
| #define RT_CK_DB_INTERNAL | ( | _p | ) | BU_CKMAG(_p, RT_DB_INTERNAL_MAGIC, "rt_db_internal") |
Definition at line 64 of file db_internal.h.
| int rt_db_get_internal | ( | struct rt_db_internal * | ip, |
| const struct directory * | dp, | ||
| const struct db_i * | dbip, | ||
| const mat_t | mat, | ||
| struct resource * | resp | ||
| ) |
Get an object from the database, and convert it into its internal (i.e., unserialized in-memory) representation. Applies the provided matrix transform only to the in-memory internal being returned.
Returns - <0 On error id On success.
| int rt_db_put_internal | ( | struct directory * | dp, |
| struct db_i * | dbip, | ||
| struct rt_db_internal * | ip, | ||
| struct resource * | resp | ||
| ) |
Convert the internal representation of a solid to the external one, and write it into the database. On success only, the internal representation is freed.
Returns - <0 error 0 success
| int rt_fwrite_internal | ( | FILE * | fp, |
| const char * | name, | ||
| const struct rt_db_internal * | ip, | ||
| double | conv2mm | ||
| ) |
Put an object in internal format out onto a file in external format. Used by LIBWDB.
Can't really require a dbip parameter, as many callers won't have one.
THIS ROUTINE ONLY SUPPORTS WRITING V4 GEOMETRY.
Returns - 0 OK <0 error
| void rt_db_free_internal | ( | struct rt_db_internal * | ip | ) |
| int rt_db_lookup_internal | ( | struct db_i * | dbip, |
| const char * | obj_name, | ||
| struct directory ** | dpp, | ||
| struct rt_db_internal * | ip, | ||
| int | noisy, | ||
| struct resource * | resp | ||
| ) |
Convert an object name to a rt_db_internal pointer
Looks up the named object in the directory of the specified model, obtaining a directory pointer. Then gets that object from the database and constructs its internal representation. Returns ID_NULL on error, otherwise returns the type of the object.