amino
Lightweight Robot Utility Library
|
Geometric objects (shapes and meshes) More...
Go to the source code of this file.
Classes | |
struct | aa_rx_shape_box |
Shape for a box. More... | |
struct | aa_rx_shape_sphere |
Shape for a sphere. More... | |
struct | aa_rx_shape_cylinder |
Shape for a cylinder. More... | |
struct | aa_rx_shape_cone |
Shape for a cone. More... | |
struct | aa_rx_shape_grid |
Shape for a grid. More... | |
Enumerations | |
enum | aa_rx_geom_shape { AA_RX_NOSHAPE, AA_RX_MESH, AA_RX_BOX, AA_RX_SPHERE, AA_RX_CYLINDER, AA_RX_CONE, AA_RX_GRID } |
Enumeration of geometry shape types. More... | |
Functions | |
AA_API struct aa_rx_geom_opt * | aa_rx_geom_opt_create () |
Create a geometry option struct. | |
AA_API void | aa_rx_geom_opt_destroy (struct aa_rx_geom_opt *) |
Destroy a geometry option struct. | |
AA_API void | aa_rx_geom_opt_set_no_shadow (struct aa_rx_geom_opt *opt, int no_shadow) |
Set no-shadow option. | |
AA_API int | aa_rx_geom_opt_get_no_shadow (const struct aa_rx_geom_opt *opt) |
Get no-shadow option. | |
AA_API int | aa_rx_geom_opt_get_visual (const struct aa_rx_geom_opt *opt) |
Get visual option. | |
AA_API int | aa_rx_geom_opt_get_collision (const struct aa_rx_geom_opt *opt) |
Get collision option. | |
AA_API double | aa_rx_geom_opt_get_color_red (const struct aa_rx_geom_opt *opt) |
Get red color value. | |
AA_API double | aa_rx_geom_opt_get_color_blue (const struct aa_rx_geom_opt *opt) |
Get blue color value. | |
AA_API double | aa_rx_geom_opt_get_color_green (const struct aa_rx_geom_opt *opt) |
Get green color value. | |
AA_API double | aa_rx_geom_opt_get_alpha (const struct aa_rx_geom_opt *opt) |
Get alpha value. | |
AA_API double | aa_rx_geom_opt_get_specular_red (const struct aa_rx_geom_opt *opt) |
Get red specular value. | |
AA_API double | aa_rx_geom_opt_get_specular_blue (const struct aa_rx_geom_opt *opt) |
Get blue specular value. | |
AA_API double | aa_rx_geom_opt_get_specular_green (const struct aa_rx_geom_opt *opt) |
Get green specular value. | |
AA_API void | aa_rx_geom_opt_set_color3 (struct aa_rx_geom_opt *opt, double red, double blue, double green) |
Set color option. | |
AA_API void | aa_rx_geom_opt_set_alpha (struct aa_rx_geom_opt *opt, double alpha) |
Set alpha (transparency) option. | |
AA_API void | aa_rx_geom_opt_set_visual (struct aa_rx_geom_opt *opt, int visual) |
Set visual flag. More... | |
AA_API void | aa_rx_geom_opt_set_collision (struct aa_rx_geom_opt *opt, int collision) |
Set collision flag. More... | |
AA_API void | aa_rx_geom_opt_set_specular3 (struct aa_rx_geom_opt *opt, double red, double green, double blue) |
Set specular reflection. | |
AA_API void | aa_rx_geom_opt_set_scale (struct aa_rx_geom_opt *opt, double scale) |
Set mesh scaling. | |
AA_API double | aa_rx_geom_opt_get_scale (const struct aa_rx_geom_opt *opt) |
Get mesh scaling. | |
AA_API struct aa_rx_geom * | aa_rx_geom_copy (struct aa_rx_geom *src) |
Copy a geometry struct. | |
AA_API void | aa_rx_geom_destroy (struct aa_rx_geom *geom) |
Destroy a geometry struct. | |
AA_API const char * | aa_rx_geom_shape_str (enum aa_rx_geom_shape shape) |
Return a string for the shape type. | |
AA_API void * | aa_rx_geom_shape (const struct aa_rx_geom *g, enum aa_rx_geom_shape *shape_type) |
Extract the shape type from a geometry object. More... | |
AA_API struct aa_rx_geom * | aa_rx_geom_box (struct aa_rx_geom_opt *opt, const double dimension[3]) |
Create a box. | |
AA_API struct aa_rx_geom * | aa_rx_geom_sphere (struct aa_rx_geom_opt *opt, double radius) |
Create a sphere. | |
AA_API struct aa_rx_geom * | aa_rx_geom_cylinder (struct aa_rx_geom_opt *opt, double height, double radius) |
Create a cylinder. | |
AA_API struct aa_rx_geom * | aa_rx_geom_cone (struct aa_rx_geom_opt *opt, double height, double start_radius, double end_radius) |
Create a cone. | |
AA_API struct aa_rx_geom * | aa_rx_geom_grid (struct aa_rx_geom_opt *opt, const double dimension[2], const double delta[2], double width) |
Create a grid. | |
AA_API const struct aa_rx_geom_opt * | aa_rx_geom_get_opt (const struct aa_rx_geom *geom) |
Return the options for the geometry object. | |
AA_API struct aa_rx_cl_geom * | aa_rx_geom_get_collision (const struct aa_rx_geom *geom) |
Return the collision object for the geometry object. | |
AA_API void | aa_rx_geom_set_collision (struct aa_rx_geom *geom, struct aa_rx_cl_geom *) |
Set the collision object for the geometry object. | |
AA_API struct aa_rx_mesh * | aa_rx_mesh_create () |
Create a mesh. | |
AA_API void | aa_rx_mesh_destroy (struct aa_rx_mesh *mesh) |
Destroy the mesh. | |
AA_API void | aa_rx_mesh_set_vertices (struct aa_rx_mesh *mesh, size_t n, const float *vectors, int copy) |
Set the mesh vertices. | |
AA_API const float * | aa_rx_mesh_get_vertices (const struct aa_rx_mesh *mesh, size_t *size) |
Get the mesh vertices. | |
AA_API const unsigned * | aa_rx_mesh_get_indices (const struct aa_rx_mesh *mesh, size_t *size) |
Get the mesh indices. | |
AA_API void | aa_rx_mesh_set_normals (struct aa_rx_mesh *mesh, size_t n, const float *normals, int copy) |
Set the mesh normals. | |
AA_API void | aa_rx_mesh_set_indices (struct aa_rx_mesh *mesh, size_t n, const unsigned *indices, int copy) |
Set the mesh indices. | |
AA_API void | aa_rx_mesh_set_rgba (struct aa_rx_mesh *mesh, size_t width, size_t height, const uint8_t *rgba, int copy) |
Set the mesh colors and alpha. | |
AA_API void | aa_rx_mesh_set_uv (struct aa_rx_mesh *mesh, size_t n, const float *uv, int copy) |
Set the mesh colors and uv values. | |
AA_API void | aa_rx_mesh_set_texture (struct aa_rx_mesh *mesh, const struct aa_rx_geom_opt *opt) |
Set the mesh texture parameters. | |
AA_API struct aa_rx_geom * | aa_rx_geom_mesh (struct aa_rx_geom_opt *opt, struct aa_rx_mesh *mesh) |
Attach a mesh to frame. | |
AA_API void | aa_rx_geom_attach (struct aa_rx_sg *sg, const char *frame, struct aa_rx_geom *geom) |
Attach geometry to the scene graph. | |
AA_API unsigned | aa_rx_geom_refcount (const struct aa_rx_geom *g) |
Return the reference count value of `g'. | |
AA_API unsigned | aa_rx_mesh_refcount (const struct aa_rx_mesh *sg) |
Return the reference count value of `m'. | |
Geometric objects (shapes and meshes)
Definition in file scene_geom.h.
enum aa_rx_geom_shape |
Enumeration of geometry shape types.
Definition at line 219 of file scene_geom.h.
AA_API void aa_rx_geom_opt_set_collision | ( | struct aa_rx_geom_opt * | opt, |
int | collision | ||
) |
Set collision flag.
Does this geometry represent a collision object?
AA_API void aa_rx_geom_opt_set_visual | ( | struct aa_rx_geom_opt * | opt, |
int | visual | ||
) |
Set visual flag.
Does this geometry represent a visual object?
AA_API void* aa_rx_geom_shape | ( | const struct aa_rx_geom * | g, |
enum aa_rx_geom_shape * | shape_type | ||
) |
Extract the shape type from a geometry object.
[in] | g | the geometry object |
[out] | shape_type | the shape of the geometry |