Class ufbx
Assembly: ufbxWrapper.dll
Syntax
Methods
ufbx_add_blend_shape_vertex_offsets(ufbx_blend_shape*, ufbx_vec3*, ulong, float)
Apply the blend shape with weight to given vertices.
Declaration
public static extern void ufbx_add_blend_shape_vertex_offsets(ufbx.ufbx_blend_shape* shape, ufbx.ufbx_vec3* vertices, ulong num_vertices, float weight)
Parameters
Apply the blend deformer with weight to given vertices.
NOTE: This depends on the current animated blend weight of the deformer.
Declaration
public static extern void ufbx_add_blend_vertex_offsets(ufbx.ufbx_blend_deformer* blend, ufbx.ufbx_vec3* vertices, ulong num_vertices, float weight)
Parameters
ufbx_as_anim_curve(ufbx_element*)
Declaration
public static extern ufbx.ufbx_anim_curve* ufbx_as_anim_curve(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_anim_layer(ufbx_element*)
Declaration
public static extern ufbx.ufbx_anim_layer* ufbx_as_anim_layer(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_anim_stack(ufbx_element*)
Declaration
public static extern ufbx.ufbx_anim_stack* ufbx_as_anim_stack(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_anim_value(ufbx_element*)
Declaration
public static extern ufbx.ufbx_anim_value* ufbx_as_anim_value(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_audio_clip(ufbx_element*)
Declaration
public static extern ufbx.ufbx_audio_clip* ufbx_as_audio_clip(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_audio_layer(ufbx_element*)
Declaration
public static extern ufbx.ufbx_audio_layer* ufbx_as_audio_layer(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_blend_channel(ufbx_element*)
Declaration
public static extern ufbx.ufbx_blend_channel* ufbx_as_blend_channel(ufbx.ufbx_element* element)
Parameters
Returns
Declaration
public static extern ufbx.ufbx_blend_deformer* ufbx_as_blend_deformer(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_blend_shape(ufbx_element*)
Declaration
public static extern ufbx.ufbx_blend_shape* ufbx_as_blend_shape(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_bone(ufbx_element*)
Declaration
public static extern ufbx.ufbx_bone* ufbx_as_bone(ufbx.ufbx_element* element)
Parameters
Returns
Declaration
public static extern ufbx.ufbx_cache_deformer* ufbx_as_cache_deformer(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_cache_file(ufbx_element*)
Declaration
public static extern ufbx.ufbx_cache_file* ufbx_as_cache_file(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_camera(ufbx_element*)
Declaration
public static extern ufbx.ufbx_camera* ufbx_as_camera(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_camera_switcher(ufbx_element*)
Declaration
public static extern ufbx.ufbx_camera_switcher* ufbx_as_camera_switcher(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_character(ufbx_element*)
Declaration
public static extern ufbx.ufbx_character* ufbx_as_character(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_constraint(ufbx_element*)
Declaration
public static extern ufbx.ufbx_constraint* ufbx_as_constraint(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_display_layer(ufbx_element*)
Declaration
public static extern ufbx.ufbx_display_layer* ufbx_as_display_layer(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_empty(ufbx_element*)
Declaration
public static extern ufbx.ufbx_empty* ufbx_as_empty(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_light(ufbx_element*)
Declaration
public static extern ufbx.ufbx_light* ufbx_as_light(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_line_curve(ufbx_element*)
Declaration
public static extern ufbx.ufbx_line_curve* ufbx_as_line_curve(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_lod_group(ufbx_element*)
Declaration
public static extern ufbx.ufbx_lod_group* ufbx_as_lod_group(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_marker(ufbx_element*)
Declaration
public static extern ufbx.ufbx_marker* ufbx_as_marker(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_material(ufbx_element*)
Declaration
public static extern ufbx.ufbx_material* ufbx_as_material(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_mesh(ufbx_element*)
Declaration
public static extern ufbx.ufbx_mesh* ufbx_as_mesh(ufbx.ufbx_element* element)
Parameters
Returns
Declaration
public static extern ufbx.ufbx_metadata_object* ufbx_as_metadata_object(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_node(ufbx_element*)
Declaration
public static extern ufbx.ufbx_node* ufbx_as_node(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_nurbs_curve(ufbx_element*)
Declaration
public static extern ufbx.ufbx_nurbs_curve* ufbx_as_nurbs_curve(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_nurbs_surface(ufbx_element*)
Declaration
public static extern ufbx.ufbx_nurbs_surface* ufbx_as_nurbs_surface(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_nurbs_trim_boundary(ufbx_element*)
Declaration
public static extern ufbx.ufbx_nurbs_trim_boundary* ufbx_as_nurbs_trim_boundary(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_nurbs_trim_surface(ufbx_element*)
Declaration
public static extern ufbx.ufbx_nurbs_trim_surface* ufbx_as_nurbs_trim_surface(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_pose(ufbx_element*)
Declaration
public static extern ufbx.ufbx_pose* ufbx_as_pose(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_procedural_geometry(ufbx_element*)
Declaration
public static extern ufbx.ufbx_procedural_geometry* ufbx_as_procedural_geometry(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_selection_node(ufbx_element*)
Declaration
public static extern ufbx.ufbx_selection_node* ufbx_as_selection_node(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_selection_set(ufbx_element*)
Declaration
public static extern ufbx.ufbx_selection_set* ufbx_as_selection_set(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_shader(ufbx_element*)
Declaration
public static extern ufbx.ufbx_shader* ufbx_as_shader(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_shader_binding(ufbx_element*)
Declaration
public static extern ufbx.ufbx_shader_binding* ufbx_as_shader_binding(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_skin_cluster(ufbx_element*)
Declaration
public static extern ufbx.ufbx_skin_cluster* ufbx_as_skin_cluster(ufbx.ufbx_element* element)
Parameters
Returns
Declaration
public static extern ufbx.ufbx_skin_deformer* ufbx_as_skin_deformer(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_stereo_camera(ufbx_element*)
Declaration
public static extern ufbx.ufbx_stereo_camera* ufbx_as_stereo_camera(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_texture(ufbx_element*)
Declaration
public static extern ufbx.ufbx_texture* ufbx_as_texture(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_unknown(ufbx_element*)
Functions for converting an untyped ufbx_element to a concrete type.
Returns NULL if the element is not that type.
Declaration
public static extern ufbx.ufbx_unknown* ufbx_as_unknown(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_as_video(ufbx_element*)
Declaration
public static extern ufbx.ufbx_video* ufbx_as_video(ufbx.ufbx_element* element)
Parameters
Returns
ufbx_bake_anim(ufbx_scene*, ufbx_anim*, ufbx_bake_opts*, ufbx_error*)
"Bake" an animation to linearly interpolated keyframes.
Composites the FBX transformation chain into quaternion rotations.
Declaration
public static extern ufbx.ufbx_baked_anim* ufbx_bake_anim(ufbx.ufbx_scene* scene, ufbx.ufbx_anim* anim, ufbx.ufbx_bake_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_catch_compute_normals(ufbx_panic*, ufbx_mesh*, ufbx_vertex_vec3*, uint*, ulong, ufbx_vec3*, ulong)
Compute normals given normal indices.
You can use ufbx_generate_normal_mapping() to generate the normal indices.
Declaration
public static extern void ufbx_catch_compute_normals(ufbx.ufbx_panic* panic, ufbx.ufbx_mesh* mesh, ufbx.ufbx_vertex_vec3* positions, uint* normal_indices, ulong num_normal_indices, ufbx.ufbx_vec3* normals, ulong num_normals)
Parameters
ufbx_catch_compute_topology(ufbx_panic*, ufbx_mesh*, ufbx_topo_edge*, ulong)
Generate the half-edge representation of mesh to topo[mesh-num_indices]
Declaration
public static extern void ufbx_catch_compute_topology(ufbx.ufbx_panic* panic, ufbx.ufbx_mesh* mesh, ufbx.ufbx_topo_edge* topo, ulong num_topo)
Parameters
ufbx_catch_generate_normal_mapping(ufbx_panic*, ufbx_mesh*, ufbx_topo_edge*, ulong, uint*, ulong, bool)
Generate indices for normals from the topology.
Respects smoothing groups.
Declaration
public static extern ulong ufbx_catch_generate_normal_mapping(ufbx.ufbx_panic* panic, ufbx.ufbx_mesh* mesh, ufbx.ufbx_topo_edge* topo, ulong num_topo, uint* normal_indices, ulong num_normal_indices, bool assume_smooth)
Parameters
Returns
Get a matrix representing the deformation for a single vertex.
Returns fallback if the vertex is not skinned.
Declaration
public static extern ufbx.ufbx_matrix ufbx_catch_get_skin_vertex_matrix(ufbx.ufbx_panic* panic, ufbx.ufbx_skin_deformer* skin, ulong vertex, ufbx.ufbx_matrix* fallback)
Parameters
Returns
ufbx_catch_get_vertex_real(ufbx_panic*, ufbx_vertex_real*, ulong)
Utility functions for reading geometry data for a single index.
Declaration
public static extern float ufbx_catch_get_vertex_real(ufbx.ufbx_panic* panic, ufbx.ufbx_vertex_real* v, ulong index)
Parameters
Returns
ufbx_catch_get_vertex_vec2(ufbx_panic*, ufbx_vertex_vec2*, ulong)
Declaration
public static extern ufbx.ufbx_vec2 ufbx_catch_get_vertex_vec2(ufbx.ufbx_panic* panic, ufbx.ufbx_vertex_vec2* v, ulong index)
Parameters
Returns
ufbx_catch_get_vertex_vec3(ufbx_panic*, ufbx_vertex_vec3*, ulong)
Declaration
public static extern ufbx.ufbx_vec3 ufbx_catch_get_vertex_vec3(ufbx.ufbx_panic* panic, ufbx.ufbx_vertex_vec3* v, ulong index)
Parameters
Returns
ufbx_catch_get_vertex_vec4(ufbx_panic*, ufbx_vertex_vec4*, ulong)
Declaration
public static extern ufbx.ufbx_vec4 ufbx_catch_get_vertex_vec4(ufbx.ufbx_panic* panic, ufbx.ufbx_vertex_vec4* v, ulong index)
Parameters
Returns
ufbx_catch_get_vertex_w_vec3(ufbx_panic*, ufbx_vertex_vec3*, ulong)
Declaration
public static extern float ufbx_catch_get_vertex_w_vec3(ufbx.ufbx_panic* panic, ufbx.ufbx_vertex_vec3* v, ulong index)
Parameters
Returns
ufbx_catch_get_weighted_face_normal(ufbx_panic*, ufbx_vertex_vec3*, ufbx_face)
Calculate a normal for a given face.
The returned normal is weighted by face area.
Declaration
public static extern ufbx.ufbx_vec3 ufbx_catch_get_weighted_face_normal(ufbx.ufbx_panic* panic, ufbx.ufbx_vertex_vec3* positions, ufbx.ufbx_face face)
Parameters
Returns
ufbx_catch_topo_next_vertex_edge(ufbx_panic*, ufbx_topo_edge*, ulong, uint)
Get the next half-edge in topo.
Declaration
public static extern uint ufbx_catch_topo_next_vertex_edge(ufbx.ufbx_panic* panic, ufbx.ufbx_topo_edge* topo, ulong num_topo, uint index)
Parameters
Returns
ufbx_catch_topo_prev_vertex_edge(ufbx_panic*, ufbx_topo_edge*, ulong, uint)
Get the previous half-edge in topo.
Declaration
public static extern uint ufbx_catch_topo_prev_vertex_edge(ufbx.ufbx_panic* panic, ufbx.ufbx_topo_edge* topo, ulong num_topo, uint index)
Parameters
Returns
ufbx_catch_triangulate_face(ufbx_panic*, uint*, ulong, ufbx_mesh*, ufbx_face)
Triangulate a mesh face, returning the number of triangles.
NOTE: You need to space for (face.num_indices - 2) * 3 - 1 indices!
HINT: Using ufbx_mesh.max_face_triangles * 3 is always safe.
Declaration
public static extern uint ufbx_catch_triangulate_face(ufbx.ufbx_panic* panic, uint* indices, ulong num_indices, ufbx.ufbx_mesh* mesh, ufbx.ufbx_face face)
Parameters
Returns
ufbx_compute_normals(ufbx_mesh*, ufbx_vertex_vec3*, uint*, ulong, ufbx_vec3*, ulong)
Declaration
public static extern void ufbx_compute_normals(ufbx.ufbx_mesh* mesh, ufbx.ufbx_vertex_vec3* positions, uint* normal_indices, ulong num_normal_indices, ufbx.ufbx_vec3* normals, ulong num_normals)
Parameters
ufbx_compute_topology(ufbx_mesh*, ufbx_topo_edge*, ulong)
Declaration
public static extern void ufbx_compute_topology(ufbx.ufbx_mesh* mesh, ufbx.ufbx_topo_edge* topo, ulong num_topo)
Parameters
ufbx_coordinate_axes_valid(ufbx_coordinate_axes)
Returns true if axes forms a valid coordinate space.
Declaration
public static extern bool ufbx_coordinate_axes_valid(ufbx.ufbx_coordinate_axes axes)
Parameters
Returns
ufbx_create_anim(ufbx_scene*, ufbx_anim_opts*, ufbx_error*)
Create a custom animation descriptor.
ufbx_anim_opts is used to specify animation layers and weights.
HINT: You can also leave ufbx_anim_opts.layer_ids[] empty and only specify
overrides to evaluate the scene with different properties or local transforms.
Declaration
public static extern ufbx.ufbx_anim* ufbx_create_anim(ufbx.ufbx_scene* scene, ufbx.ufbx_anim_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_default_open_file(void*, ufbx_stream*, string, ulong, ufbx_open_file_info*)
Same as ufbx_open_file() but compatible with the callback in ufbx_open_file_fn.
The user parameter is actually not used here.
Declaration
public static extern bool ufbx_default_open_file(void* user, ufbx.ufbx_stream* stream, string path, ulong path_len, ufbx.ufbx_open_file_info* info)
Parameters
Returns
ufbx_dom_find(ufbx_dom_node*, string)
Declaration
public static extern ufbx.ufbx_dom_node* ufbx_dom_find(ufbx.ufbx_dom_node* parent, string name)
Parameters
Returns
ufbx_dom_find_len(ufbx_dom_node*, string, ulong)
Find a DOM node given a name.
Declaration
public static extern ufbx.ufbx_dom_node* ufbx_dom_find_len(ufbx.ufbx_dom_node* parent, string name, ulong name_len)
Parameters
Returns
ufbx_euler_to_quat(ufbx_vec3, ufbx_rotation_order)
Declaration
public static extern ufbx.ufbx_quat ufbx_euler_to_quat(ufbx.ufbx_vec3 v, ufbx.ufbx_rotation_order order)
Parameters
Returns
ufbx_evaluate_anim_value_real(ufbx_anim_value*, double)
Evaluate a value from bundled animation curves.
Declaration
public static extern float ufbx_evaluate_anim_value_real(ufbx.ufbx_anim_value* anim_value, double time)
Parameters
Returns
ufbx_evaluate_anim_value_real_flags(ufbx_anim_value*, double, uint)
Declaration
public static extern float ufbx_evaluate_anim_value_real_flags(ufbx.ufbx_anim_value* anim_value, double time, uint flags)
Parameters
Returns
ufbx_evaluate_anim_value_vec3(ufbx_anim_value*, double)
Declaration
public static extern ufbx.ufbx_vec3 ufbx_evaluate_anim_value_vec3(ufbx.ufbx_anim_value* anim_value, double time)
Parameters
Returns
ufbx_evaluate_anim_value_vec3_flags(ufbx_anim_value*, double, uint)
Declaration
public static extern ufbx.ufbx_vec3 ufbx_evaluate_anim_value_vec3_flags(ufbx.ufbx_anim_value* anim_value, double time, uint flags)
Parameters
Returns
ufbx_evaluate_baked_quat(ufbx_baked_quat_list, double)
Evaluate baked animation keyframes at time.
Internally spherically interpolates (ufbx_quat_slerp()) between two adjacent keyframes.
Handles stepped tangents cleanly, which is not strictly necessary for custom interpolation.
Declaration
public static extern ufbx.ufbx_quat ufbx_evaluate_baked_quat(ufbx.ufbx_baked_quat_list keyframes, double time)
Parameters
Returns
ufbx_evaluate_baked_vec3(ufbx_baked_vec3_list, double)
Evaluate baked animation keyframes at time.
Internally linearly interpolates between two adjacent keyframes.
Handles stepped tangents cleanly, which is not strictly necessary for custom interpolation.
Declaration
public static extern ufbx.ufbx_vec3 ufbx_evaluate_baked_vec3(ufbx.ufbx_baked_vec3_list keyframes, double time)
Parameters
Returns
ufbx_evaluate_blend_weight(ufbx_anim*, ufbx_blend_channel*, double)
Evaluate the blend shape weight of a blend channel.
NOTE: Return value uses 1.0 for full weight, instead of 100.0 that the internal property UFBX_Weight uses.
Declaration
public static extern float ufbx_evaluate_blend_weight(ufbx.ufbx_anim* anim, ufbx.ufbx_blend_channel* channel, double time)
Parameters
Returns
ufbx_evaluate_blend_weight_flags(ufbx_anim*, ufbx_blend_channel*, double, uint)
Declaration
public static extern float ufbx_evaluate_blend_weight_flags(ufbx.ufbx_anim* anim, ufbx.ufbx_blend_channel* channel, double time, uint flags)
Parameters
Returns
ufbx_evaluate_curve(ufbx_anim_curve*, double, float)
Evaluate a single animation curve at a time.
Returns default_value only if curve == NULL or it has no keyframes.
Declaration
public static extern float ufbx_evaluate_curve(ufbx.ufbx_anim_curve* curve, double time, float default_value)
Parameters
Returns
ufbx_evaluate_curve_flags(ufbx_anim_curve*, double, float, uint)
Declaration
public static extern float ufbx_evaluate_curve_flags(ufbx.ufbx_anim_curve* curve, double time, float default_value, uint flags)
Parameters
Returns
ufbx_evaluate_nurbs_basis(ufbx_nurbs_basis*, float, float*, ulong, float*, ulong)
Low-level utility to evaluate NURBS the basis functions.
Declaration
public static extern ulong ufbx_evaluate_nurbs_basis(ufbx.ufbx_nurbs_basis* basis, float u, float* weights, ulong num_weights, float* derivatives, ulong num_derivatives)
Parameters
Returns
ufbx_evaluate_nurbs_curve(ufbx_nurbs_curve*, float)
Evaluate a point on a NURBS curve given the parameter u.
Declaration
public static extern ufbx.ufbx_curve_point ufbx_evaluate_nurbs_curve(ufbx.ufbx_nurbs_curve* curve, float u)
Parameters
Returns
ufbx_evaluate_nurbs_surface(ufbx_nurbs_surface*, float, float)
Evaluate a point on a NURBS surface given the parameter u and v.
Declaration
public static extern ufbx.ufbx_surface_point ufbx_evaluate_nurbs_surface(ufbx.ufbx_nurbs_surface* surface, float u, float v)
Parameters
Returns
ufbx_evaluate_prop(ufbx_anim*, ufbx_element*, string, double)
Declaration
public static extern ufbx.ufbx_prop ufbx_evaluate_prop(ufbx.ufbx_anim* anim, ufbx.ufbx_element* element, string name, double time)
Parameters
Returns
ufbx_evaluate_prop_flags(ufbx_anim*, ufbx_element*, string, double, uint)
Declaration
public static extern ufbx.ufbx_prop ufbx_evaluate_prop_flags(ufbx.ufbx_anim* anim, ufbx.ufbx_element* element, string name, double time, uint flags)
Parameters
Returns
ufbx_evaluate_prop_len(ufbx_anim*, ufbx_element*, string, ulong, double)
Evaluate an animated property name from element at time.
NOTE: If the property is not found it will have the flag UFBX_PROP_FLAG_NOT_FOUND.
Declaration
public static extern ufbx.ufbx_prop ufbx_evaluate_prop_len(ufbx.ufbx_anim* anim, ufbx.ufbx_element* element, string name, ulong name_len, double time)
Parameters
Returns
ufbx_evaluate_prop_len_flags(ufbx_anim*, ufbx_element*, string, ulong, double, uint)
Declaration
public static extern ufbx.ufbx_prop ufbx_evaluate_prop_len_flags(ufbx.ufbx_anim* anim, ufbx.ufbx_element* element, string name, ulong name_len, double time, uint flags)
Parameters
Returns
ufbx_evaluate_props(ufbx_anim*, ufbx_element*, double, ufbx_prop*, ulong)
Evaluate all animated properties of element.
HINT: This function returns an ufbx_props structure with the original properties as
ufbx_props.defaults. This lets you use ufbx_find_prop/value() for the results.
Declaration
public static extern ufbx.ufbx_props ufbx_evaluate_props(ufbx.ufbx_anim* anim, ufbx.ufbx_element* element, double time, ufbx.ufbx_prop* buffer, ulong buffer_size)
Parameters
Returns
ufbx_evaluate_props_flags(ufbx_anim*, ufbx_element*, double, ufbx_prop*, ulong, uint)
Declaration
public static extern ufbx.ufbx_props ufbx_evaluate_props_flags(ufbx.ufbx_anim* anim, ufbx.ufbx_element* element, double time, ufbx.ufbx_prop* buffer, ulong buffer_size, uint flags)
Parameters
Returns
ufbx_evaluate_scene(ufbx_scene*, ufbx_anim*, double, ufbx_evaluate_opts*, ufbx_error*)
Evaluate the whole scene at a specific time in the animation anim.
The returned scene behaves as if it had been exported at a specific time
in the specified animation, except that animated elements' properties contain
only the animated values, the original ones are in props-defaults.
NOTE: The returned scene refers to the original scene so the original
scene cannot be freed until all evaluated scenes are freed.
Declaration
public static extern ufbx.ufbx_scene* ufbx_evaluate_scene(ufbx.ufbx_scene* scene, ufbx.ufbx_anim* anim, double time, ufbx.ufbx_evaluate_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
Evaluate the animated transform of a node given a time.
The returned transform is the local transform of the node (ie. relative to the parent),
comparable to ufbx_node.local_transform.
Declaration
public static extern ufbx.ufbx_transform ufbx_evaluate_transform(ufbx.ufbx_anim* anim, ufbx.ufbx_node* node, double time)
Parameters
Returns
Declaration
public static extern ufbx.ufbx_transform ufbx_evaluate_transform_flags(ufbx.ufbx_anim* anim, ufbx.ufbx_node* node, double time, uint flags)
Parameters
Returns
ufbx_find_anim_prop(ufbx_anim_layer*, ufbx_element*, string)
Declaration
public static extern ufbx.ufbx_anim_prop* ufbx_find_anim_prop(ufbx.ufbx_anim_layer* layer, ufbx.ufbx_element* element, string prop)
Parameters
Returns
ufbx_find_anim_prop_len(ufbx_anim_layer*, ufbx_element*, string, ulong)
Find a single animated property prop of element in layer.
Returns NULL if not found.
Declaration
public static extern ufbx.ufbx_anim_prop* ufbx_find_anim_prop_len(ufbx.ufbx_anim_layer* layer, ufbx.ufbx_element* element, string prop, ulong prop_len)
Parameters
Returns
ufbx_find_anim_props(ufbx_anim_layer*, ufbx_element*)
Find all animated properties of element in layer.
Declaration
public static extern ufbx.ufbx_anim_prop_list ufbx_find_anim_props(ufbx.ufbx_anim_layer* layer, ufbx.ufbx_element* element)
Parameters
Returns
ufbx_find_anim_stack(ufbx_scene*, string)
Declaration
public static extern ufbx.ufbx_anim_stack* ufbx_find_anim_stack(ufbx.ufbx_scene* scene, string name)
Parameters
Returns
ufbx_find_anim_stack_len(ufbx_scene*, string, ulong)
Find an animation stack in scene by name (shorthand for ufbx_find_element(UFBX_ELEMENT_ANIM_STACK))
Declaration
public static extern ufbx.ufbx_anim_stack* ufbx_find_anim_stack_len(ufbx.ufbx_scene* scene, string name, ulong name_len)
Parameters
Returns
ufbx_find_baked_element(ufbx_baked_anim*, ufbx_element*)
Declaration
public static extern ufbx.ufbx_baked_element* ufbx_find_baked_element(ufbx.ufbx_baked_anim* bake, ufbx.ufbx_element* element)
Parameters
Returns
ufbx_find_baked_element_by_element_id(ufbx_baked_anim*, uint)
Declaration
public static extern ufbx.ufbx_baked_element* ufbx_find_baked_element_by_element_id(ufbx.ufbx_baked_anim* bake, uint element_id)
Parameters
Returns
ufbx_find_baked_node(ufbx_baked_anim*, ufbx_node*)
Declaration
public static extern ufbx.ufbx_baked_node* ufbx_find_baked_node(ufbx.ufbx_baked_anim* bake, ufbx.ufbx_node* node)
Parameters
Returns
ufbx_find_baked_node_by_typed_id(ufbx_baked_anim*, uint)
Declaration
public static extern ufbx.ufbx_baked_node* ufbx_find_baked_node_by_typed_id(ufbx.ufbx_baked_anim* bake, uint typed_id)
Parameters
Returns
ufbx_find_blob(ufbx_props*, string, ufbx_blob)
Declaration
public static extern ufbx.ufbx_blob ufbx_find_blob(ufbx.ufbx_props* props, string name, ufbx.ufbx_blob def)
Parameters
Returns
ufbx_find_blob_len(ufbx_props*, string, ulong, ufbx_blob)
Declaration
public static extern ufbx.ufbx_blob ufbx_find_blob_len(ufbx.ufbx_props* props, string name, ulong name_len, ufbx.ufbx_blob def)
Parameters
Returns
ufbx_find_bool(ufbx_props*, string, bool)
Declaration
public static extern bool ufbx_find_bool(ufbx.ufbx_props* props, string name, bool def)
Parameters
Returns
ufbx_find_bool_len(ufbx_props*, string, ulong, bool)
Declaration
public static extern bool ufbx_find_bool_len(ufbx.ufbx_props* props, string name, ulong name_len, bool def)
Parameters
Returns
ufbx_find_element(ufbx_scene*, ufbx_element_type, string)
Declaration
public static extern ufbx.ufbx_element* ufbx_find_element(ufbx.ufbx_scene* scene, ufbx.ufbx_element_type type, string name)
Parameters
Returns
ufbx_find_element_len(ufbx_scene*, ufbx_element_type, string, ulong)
Find any element of type type in scene by name.
For example if you want to find ufbx_material named Mat:
(ufbx_material*)ufbx_find_element(scene, UFBX_ELEMENT_MATERIAL, "Mat");
Declaration
public static extern ufbx.ufbx_element* ufbx_find_element_len(ufbx.ufbx_scene* scene, ufbx.ufbx_element_type type, string name, ulong name_len)
Parameters
Returns
ufbx_find_face_index(ufbx_mesh*, ulong)
Find the face that contains a given index.
Returns UFBX_NO_INDEX if out of bounds.
Declaration
public static extern uint ufbx_find_face_index(ufbx.ufbx_mesh* mesh, ulong index)
Parameters
Returns
ufbx_find_int(ufbx_props*, string, long)
Declaration
public static extern long ufbx_find_int(ufbx.ufbx_props* props, string name, long def)
Parameters
Returns
ufbx_find_int_len(ufbx_props*, string, ulong, long)
Declaration
public static extern long ufbx_find_int_len(ufbx.ufbx_props* props, string name, ulong name_len, long def)
Parameters
Returns
ufbx_find_material(ufbx_scene*, string)
Declaration
public static extern ufbx.ufbx_material* ufbx_find_material(ufbx.ufbx_scene* scene, string name)
Parameters
Returns
ufbx_find_material_len(ufbx_scene*, string, ulong)
Find a material in scene by name (shorthand for ufbx_find_element(UFBX_ELEMENT_MATERIAL)).
Declaration
public static extern ufbx.ufbx_material* ufbx_find_material_len(ufbx.ufbx_scene* scene, string name, ulong name_len)
Parameters
Returns
ufbx_find_node(ufbx_scene*, string)
Declaration
public static extern ufbx.ufbx_node* ufbx_find_node(ufbx.ufbx_scene* scene, string name)
Parameters
Returns
ufbx_find_node_len(ufbx_scene*, string, ulong)
Find node in scene by name (shorthand for ufbx_find_element(UFBX_ELEMENT_NODE)).
Declaration
public static extern ufbx.ufbx_node* ufbx_find_node_len(ufbx.ufbx_scene* scene, string name, ulong name_len)
Parameters
Returns
ufbx_find_prop(ufbx_props*, string)
Declaration
public static extern ufbx.ufbx_prop* ufbx_find_prop(ufbx.ufbx_props* props, string name)
Parameters
Returns
ufbx_find_prop_concat(ufbx_props*, ufbx_string*, ulong)
Find property in props with concatenated parts[num_parts].
Declaration
public static extern ufbx.ufbx_prop* ufbx_find_prop_concat(ufbx.ufbx_props* props, ufbx.ufbx_string* parts, ulong num_parts)
Parameters
Returns
ufbx_find_prop_element(ufbx_element*, string, ufbx_element_type)
Declaration
public static extern ufbx.ufbx_element* ufbx_find_prop_element(ufbx.ufbx_element* element, string name, ufbx.ufbx_element_type type)
Parameters
Returns
ufbx_find_prop_element_len(ufbx_element*, string, ulong, ufbx_element_type)
Find an element connected to a property by name.
Declaration
public static extern ufbx.ufbx_element* ufbx_find_prop_element_len(ufbx.ufbx_element* element, string name, ulong name_len, ufbx.ufbx_element_type type)
Parameters
Returns
ufbx_find_prop_len(ufbx_props*, string, ulong)
Find a property name from props, returns NULL if not found.
Searches through ufbx_props.defaults as well.
Declaration
public static extern ufbx.ufbx_prop* ufbx_find_prop_len(ufbx.ufbx_props* props, string name, ulong name_len)
Parameters
Returns
ufbx_find_prop_texture(ufbx_material*, string)
Declaration
public static extern ufbx.ufbx_texture* ufbx_find_prop_texture(ufbx.ufbx_material* material, string name)
Parameters
Returns
ufbx_find_prop_texture_len(ufbx_material*, string, ulong)
Find a texture for a given material FBX property.
Declaration
public static extern ufbx.ufbx_texture* ufbx_find_prop_texture_len(ufbx.ufbx_material* material, string name, ulong name_len)
Parameters
Returns
ufbx_find_real(ufbx_props*, string, float)
Declaration
public static extern float ufbx_find_real(ufbx.ufbx_props* props, string name, float def)
Parameters
Returns
ufbx_find_real_len(ufbx_props*, string, ulong, float)
Utility functions for finding the value of a property, returns def if not found.
NOTE: For ufbx_string you need to ensure the lifetime of the default is
sufficient as no copy is made.
Declaration
public static extern float ufbx_find_real_len(ufbx.ufbx_props* props, string name, ulong name_len, float def)
Parameters
Returns
ufbx_find_shader_prop(ufbx_shader*, string)
Declaration
public static extern ufbx.ufbx_string ufbx_find_shader_prop(ufbx.ufbx_shader* shader, string name)
Parameters
Returns
ufbx_find_shader_prop_bindings(ufbx_shader*, string)
Declaration
public static extern ufbx.ufbx_shader_prop_binding_list ufbx_find_shader_prop_bindings(ufbx.ufbx_shader* shader, string name)
Parameters
Returns
ufbx_find_shader_prop_bindings_len(ufbx_shader*, string, ulong)
Map from a shader property to material property.
Declaration
public static extern ufbx.ufbx_shader_prop_binding_list ufbx_find_shader_prop_bindings_len(ufbx.ufbx_shader* shader, string name, ulong name_len)
Parameters
Returns
ufbx_find_shader_prop_len(ufbx_shader*, string, ulong)
Find a texture for a given shader property.
Declaration
public static extern ufbx.ufbx_string ufbx_find_shader_prop_len(ufbx.ufbx_shader* shader, string name, ulong name_len)
Parameters
Returns
ufbx_find_shader_texture_input(ufbx_shader_texture*, string)
Declaration
public static extern ufbx.ufbx_shader_texture_input* ufbx_find_shader_texture_input(ufbx.ufbx_shader_texture* shader, string name)
Parameters
Returns
ufbx_find_shader_texture_input_len(ufbx_shader_texture*, string, ulong)
Find an input in a shader texture.
Declaration
public static extern ufbx.ufbx_shader_texture_input* ufbx_find_shader_texture_input_len(ufbx.ufbx_shader_texture* shader, string name, ulong name_len)
Parameters
Returns
ufbx_find_string(ufbx_props*, string, ufbx_string)
Declaration
public static extern ufbx.ufbx_string ufbx_find_string(ufbx.ufbx_props* props, string name, ufbx.ufbx_string def)
Parameters
Returns
ufbx_find_string_len(ufbx_props*, string, ulong, ufbx_string)
Declaration
public static extern ufbx.ufbx_string ufbx_find_string_len(ufbx.ufbx_props* props, string name, ulong name_len, ufbx.ufbx_string def)
Parameters
Returns
ufbx_find_vec3(ufbx_props*, string, ufbx_vec3)
Declaration
public static extern ufbx.ufbx_vec3 ufbx_find_vec3(ufbx.ufbx_props* props, string name, ufbx.ufbx_vec3 def)
Parameters
Returns
ufbx_find_vec3_len(ufbx_props*, string, ulong, ufbx_vec3)
Declaration
public static extern ufbx.ufbx_vec3 ufbx_find_vec3_len(ufbx.ufbx_props* props, string name, ulong name_len, ufbx.ufbx_vec3 def)
Parameters
Returns
Format a textual description of error.
Always produces a NULL-terminated string to char dst[dst_size], truncating if
necessary. Returns the number of characters written not including the NULL terminator.
Declaration
public static extern ulong ufbx_format_error(string dst, ulong dst_size, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_free_anim(ufbx_anim*)
Free an animation returned by ufbx_create_anim().
Declaration
public static extern void ufbx_free_anim(ufbx.ufbx_anim* anim)
Parameters
ufbx_free_baked_anim(ufbx_baked_anim*)
Declaration
public static extern void ufbx_free_baked_anim(ufbx.ufbx_baked_anim* bake)
Parameters
ufbx_free_geometry_cache(ufbx_geometry_cache*)
Free a geometry cache returned from ufbx_load_geometry_cache().
Declaration
public static extern void ufbx_free_geometry_cache(ufbx.ufbx_geometry_cache* cache)
Parameters
ufbx_free_line_curve(ufbx_line_curve*)
Free a line returned by ufbx_tessellate_nurbs_curve().
Declaration
public static extern void ufbx_free_line_curve(ufbx.ufbx_line_curve* curve)
Parameters
ufbx_free_mesh(ufbx_mesh*)
Free a mesh returned from ufbx_subdivide_mesh() or ufbx_tessellate_nurbs_surface().
Declaration
public static extern void ufbx_free_mesh(ufbx.ufbx_mesh* mesh)
Parameters
ufbx_free_scene(ufbx_scene*)
Free a previously loaded or evaluated scene
Declaration
public static extern void ufbx_free_scene(ufbx.ufbx_scene* scene)
Parameters
ufbx_generate_indices(ufbx_vertex_stream*, ulong, uint*, ulong, ufbx_allocator_opts*, ufbx_error*)
Generate an index buffer for a flat vertex buffer.
streams specifies one or more vertex data arrays, each stream must contain num_indices vertices.
This function compacts the data within streams in-place, writing the deduplicated indices to indices.
Declaration
public static extern ulong ufbx_generate_indices(ufbx.ufbx_vertex_stream* streams, ulong num_streams, uint* indices, ulong num_indices, ufbx.ufbx_allocator_opts* allocator, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_generate_normal_mapping(ufbx_mesh*, ufbx_topo_edge*, ulong, uint*, ulong, bool)
Declaration
public static extern ulong ufbx_generate_normal_mapping(ufbx.ufbx_mesh* mesh, ufbx.ufbx_topo_edge* topo, ulong num_topo, uint* normal_indices, ulong num_normal_indices, bool assume_smooth)
Parameters
Returns
ufbx_get_blend_shape_offset_index(ufbx_blend_shape*, ulong)
Resolve the index into ufbx_blend_shape.position_offsets[] given a vertex.
Returns UFBX_NO_INDEX if the vertex is not included in the blend shape.
Declaration
public static extern uint ufbx_get_blend_shape_offset_index(ufbx.ufbx_blend_shape* shape, ulong vertex)
Parameters
Returns
ufbx_get_blend_shape_vertex_offset(ufbx_blend_shape*, ulong)
Get the offset for a given vertex in the blend shape.
Returns ufbx_zero_vec3 if the vertex is not a included in the blend shape.
Declaration
public static extern ufbx.ufbx_vec3 ufbx_get_blend_shape_vertex_offset(ufbx.ufbx_blend_shape* shape, ulong vertex)
Parameters
Returns
Get the current blend offset given a blend deformer.
NOTE: This depends on the current animated blend weight of the deformer.
Declaration
public static extern ufbx.ufbx_vec3 ufbx_get_blend_vertex_offset(ufbx.ufbx_blend_deformer* blend, ulong vertex)
Parameters
Returns
ufbx_get_bone_pose(ufbx_pose*, ufbx_node*)
Retrieve the bone pose for node.
Returns NULL if the pose does not contain node.
Declaration
public static extern ufbx.ufbx_bone_pose* ufbx_get_bone_pose(ufbx.ufbx_pose* pose, ufbx.ufbx_node* node)
Parameters
Returns
ufbx_get_compatible_matrix_for_normals(ufbx_node*)
Declaration
public static extern ufbx.ufbx_matrix ufbx_get_compatible_matrix_for_normals(ufbx.ufbx_node* node)
Parameters
Returns
ufbx_get_prop_element(ufbx_element*, ufbx_prop*, ufbx_element_type)
Get an element connected to a property.
Declaration
public static extern ufbx.ufbx_element* ufbx_get_prop_element(ufbx.ufbx_element* element, ufbx.ufbx_prop* prop, ufbx.ufbx_element_type type)
Parameters
Returns
ufbx_get_weighted_face_normal(ufbx_vertex_vec3*, ufbx_face)
Declaration
public static extern ufbx.ufbx_vec3 ufbx_get_weighted_face_normal(ufbx.ufbx_vertex_vec3* positions, ufbx.ufbx_face face)
Parameters
Returns
Decompress a DEFLATE compressed buffer.
Returns the decompressed size or a negative error code (see source for details).
NOTE: You must supply a valid retain with ufbx_inflate_retain.initialized == false
but the rest can be uninitialized.
Declaration
public static extern long ufbx_inflate(void* dst, ulong dst_size, ufbx.ufbx_inflate_input* input, ufbx.ufbx_inflate_retain* retain)
Parameters
Returns
ufbx_is_thread_safe()
Practically always true (see below), if not you need to be careful with threads.
Guaranteed to be true in any of the following conditions:
- ufbx.c has been compiled using: GCC / Clang / MSVC / ICC / EMCC / TCC
- ufbx.c has been compiled as C++11 or later
- ufbx.c has been compiled as C11 or later with
stdatomic .h support
If false you can't call the following functions concurrently:
ufbx_evaluate_scene()
ufbx_free_scene()
ufbx_subdivide_mesh()
ufbx_tessellate_nurbs_surface()
ufbx_free_mesh()
Declaration
public static extern bool ufbx_is_thread_safe()
Returns
ufbx_load_file(string, ufbx_load_opts*, ufbx_error*)
Load a scene by opening a file named filename
Declaration
public static extern ufbx.ufbx_scene* ufbx_load_file(string filename, ufbx.ufbx_load_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_load_file_len(string, ulong, ufbx_load_opts*, ufbx_error*)
Declaration
public static extern ufbx.ufbx_scene* ufbx_load_file_len(string filename, ulong filename_len, ufbx.ufbx_load_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_load_geometry_cache(string, ufbx_geometry_cache_opts*, ufbx_error*)
Load geometry cache information from a file.
As geometry caches can be massive, this does not actually read the data, but
only seeks through the files to form the metadata.
Declaration
public static extern ufbx.ufbx_geometry_cache* ufbx_load_geometry_cache(string filename, ufbx.ufbx_geometry_cache_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_load_geometry_cache_len(string, ulong, ufbx_geometry_cache_opts*, ufbx_error*)
Declaration
public static extern ufbx.ufbx_geometry_cache* ufbx_load_geometry_cache_len(string filename, ulong filename_len, ufbx.ufbx_geometry_cache_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_load_memory(void*, ulong, ufbx_load_opts*, ufbx_error*)
Load a scene from a size byte memory buffer at data
Declaration
public static extern ufbx.ufbx_scene* ufbx_load_memory(void* data, ulong data_size, ufbx.ufbx_load_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_load_stdio(void*, ufbx_load_opts*, ufbx_error*)
Load a scene by reading from an FILE *file stream
NOTE: file is passed as a void pointer to avoid including
stdio
.h
Declaration
public static extern ufbx.ufbx_scene* ufbx_load_stdio(void* file, ufbx.ufbx_load_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_load_stdio_prefix(void*, void*, ulong, ufbx_load_opts*, ufbx_error*)
Load a scene by reading from an FILE *file stream with a prefix
NOTE: file is passed as a void pointer to avoid including
stdio
.h
Declaration
public static extern ufbx.ufbx_scene* ufbx_load_stdio_prefix(void* file, void* prefix, ulong prefix_size, ufbx.ufbx_load_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_load_stream(ufbx_stream*, ufbx_load_opts*, ufbx_error*)
Load a scene from a user-specified stream
Declaration
public static extern ufbx.ufbx_scene* ufbx_load_stream(ufbx.ufbx_stream* stream, ufbx.ufbx_load_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_load_stream_prefix(ufbx_stream*, void*, ulong, ufbx_load_opts*, ufbx_error*)
Load a scene from a user-specified stream with a prefix
Declaration
public static extern ufbx.ufbx_scene* ufbx_load_stream_prefix(ufbx.ufbx_stream* stream, void* prefix, ulong prefix_size, ufbx.ufbx_load_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_matrix_determinant(ufbx_matrix*)
Declaration
public static extern float ufbx_matrix_determinant(ufbx.ufbx_matrix* m)
Parameters
Returns
ufbx_matrix_for_normals(ufbx_matrix*)
Get a matrix that can be used to transform geometry normals.
NOTE: You must normalize the normals after transforming them with this matrix,
eg. using ufbx_vec3_normalize().
NOTE: This function flips the normals if the determinant is negative.
Declaration
public static extern ufbx.ufbx_matrix ufbx_matrix_for_normals(ufbx.ufbx_matrix* m)
Parameters
Returns
ufbx_matrix_invert(ufbx_matrix*)
Declaration
public static extern ufbx.ufbx_matrix ufbx_matrix_invert(ufbx.ufbx_matrix* m)
Parameters
Returns
ufbx_matrix_mul(ufbx_matrix*, ufbx_matrix*)
Matrix math utility functions.
Declaration
public static extern ufbx.ufbx_matrix ufbx_matrix_mul(ufbx.ufbx_matrix* a, ufbx.ufbx_matrix* b)
Parameters
Returns
Declaration
public static extern ufbx.ufbx_transform ufbx_matrix_to_transform(ufbx.ufbx_matrix* m)
Parameters
Returns
ufbx_open_file(ufbx_stream*, string, ulong, ufbx_open_file_opts*, ufbx_error*)
Open a ufbx_stream from a file.
Use path_len == SIZE_MAX for NULL terminated string.
Declaration
public static extern bool ufbx_open_file(ufbx.ufbx_stream* stream, string path, ulong path_len, ufbx.ufbx_open_file_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_open_file_ctx(ufbx_stream*, ulong, string, ulong, ufbx_open_file_opts*, ufbx_error*)
Declaration
public static extern bool ufbx_open_file_ctx(ufbx.ufbx_stream* stream, ulong ctx, string path, ulong path_len, ufbx.ufbx_open_file_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_open_memory(ufbx_stream*, void*, ulong, ufbx_open_memory_opts*, ufbx_error*)
NOTE: Uses the default ufbx allocator!
Declaration
public static extern bool ufbx_open_memory(ufbx.ufbx_stream* stream, void* data, ulong data_size, ufbx.ufbx_open_memory_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_open_memory_ctx(ufbx_stream*, ulong, void*, ulong, ufbx_open_memory_opts*, ufbx_error*)
Declaration
public static extern bool ufbx_open_memory_ctx(ufbx.ufbx_stream* stream, ulong ctx, void* data, ulong data_size, ufbx.ufbx_open_memory_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_quat_dot(ufbx_quat, ufbx_quat)
Quaternion math utility functions.
Declaration
public static extern float ufbx_quat_dot(ufbx.ufbx_quat a, ufbx.ufbx_quat b)
Parameters
Returns
ufbx_quat_fix_antipodal(ufbx_quat, ufbx_quat)
Declaration
public static extern ufbx.ufbx_quat ufbx_quat_fix_antipodal(ufbx.ufbx_quat q, ufbx.ufbx_quat reference)
Parameters
Returns
ufbx_quat_mul(ufbx_quat, ufbx_quat)
Declaration
public static extern ufbx.ufbx_quat ufbx_quat_mul(ufbx.ufbx_quat a, ufbx.ufbx_quat b)
Parameters
Returns
ufbx_quat_normalize(ufbx_quat)
Declaration
public static extern ufbx.ufbx_quat ufbx_quat_normalize(ufbx.ufbx_quat q)
Parameters
Returns
ufbx_quat_rotate_vec3(ufbx_quat, ufbx_vec3)
Declaration
public static extern ufbx.ufbx_vec3 ufbx_quat_rotate_vec3(ufbx.ufbx_quat q, ufbx.ufbx_vec3 v)
Parameters
Returns
ufbx_quat_slerp(ufbx_quat, ufbx_quat, float)
Declaration
public static extern ufbx.ufbx_quat ufbx_quat_slerp(ufbx.ufbx_quat a, ufbx.ufbx_quat b, float t)
Parameters
Returns
ufbx_quat_to_euler(ufbx_quat, ufbx_rotation_order)
Declaration
public static extern ufbx.ufbx_vec3 ufbx_quat_to_euler(ufbx.ufbx_quat q, ufbx.ufbx_rotation_order order)
Parameters
Returns
ufbx_read_geometry_cache_real(ufbx_cache_frame*, float*, ulong, ufbx_geometry_cache_data_opts*)
Read a frame from a geometry cache.
Declaration
public static extern ulong ufbx_read_geometry_cache_real(ufbx.ufbx_cache_frame* frame, float* data, ulong num_data, ufbx.ufbx_geometry_cache_data_opts* opts)
Parameters
Returns
ufbx_read_geometry_cache_vec3(ufbx_cache_frame*, ufbx_vec3*, ulong, ufbx_geometry_cache_data_opts*)
Declaration
public static extern ulong ufbx_read_geometry_cache_vec3(ufbx.ufbx_cache_frame* frame, ufbx.ufbx_vec3* data, ulong num_data, ufbx.ufbx_geometry_cache_data_opts* opts)
Parameters
Returns
ufbx_retain_anim(ufbx_anim*)
Increase the animation reference count.
Declaration
public static extern void ufbx_retain_anim(ufbx.ufbx_anim* anim)
Parameters
ufbx_retain_baked_anim(ufbx_baked_anim*)
Declaration
public static extern void ufbx_retain_baked_anim(ufbx.ufbx_baked_anim* bake)
Parameters
ufbx_retain_geometry_cache(ufbx_geometry_cache*)
Increase the geometry cache reference count.
Declaration
public static extern void ufbx_retain_geometry_cache(ufbx.ufbx_geometry_cache* cache)
Parameters
ufbx_retain_line_curve(ufbx_line_curve*)
Increase the refcount of the line.
Declaration
public static extern void ufbx_retain_line_curve(ufbx.ufbx_line_curve* curve)
Parameters
ufbx_retain_mesh(ufbx_mesh*)
Increase the mesh reference count.
Declaration
public static extern void ufbx_retain_mesh(ufbx.ufbx_mesh* mesh)
Parameters
ufbx_retain_scene(ufbx_scene*)
Declaration
public static extern void ufbx_retain_scene(ufbx.ufbx_scene* scene)
Parameters
ufbx_sample_geometry_cache_real(ufbx_cache_channel*, double, float*, ulong, ufbx_geometry_cache_data_opts*)
Sample the a geometry cache channel, linearly blending between adjacent frames.
Declaration
public static extern ulong ufbx_sample_geometry_cache_real(ufbx.ufbx_cache_channel* channel, double time, float* data, ulong num_data, ufbx.ufbx_geometry_cache_data_opts* opts)
Parameters
Returns
ufbx_sample_geometry_cache_vec3(ufbx_cache_channel*, double, ufbx_vec3*, ulong, ufbx_geometry_cache_data_opts*)
Declaration
public static extern ulong ufbx_sample_geometry_cache_vec3(ufbx.ufbx_cache_channel* channel, double time, ufbx.ufbx_vec3* data, ulong num_data, ufbx.ufbx_geometry_cache_data_opts* opts)
Parameters
Returns
ufbx_subdivide_mesh(ufbx_mesh*, ulong, ufbx_subdivide_opts*, ufbx_error*)
Subdivide a mesh using the Catmull-Clark subdivision level times.
Declaration
public static extern ufbx.ufbx_mesh* ufbx_subdivide_mesh(ufbx.ufbx_mesh* mesh, ulong level, ufbx.ufbx_subdivide_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_tessellate_nurbs_curve(ufbx_nurbs_curve*, ufbx_tessellate_curve_opts*, ufbx_error*)
Tessellate a NURBS curve into a polyline.
Declaration
public static extern ufbx.ufbx_line_curve* ufbx_tessellate_nurbs_curve(ufbx.ufbx_nurbs_curve* curve, ufbx.ufbx_tessellate_curve_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_tessellate_nurbs_surface(ufbx_nurbs_surface*, ufbx_tessellate_surface_opts*, ufbx_error*)
Tessellate a NURBS surface into a mesh.
Declaration
public static extern ufbx.ufbx_mesh* ufbx_tessellate_nurbs_surface(ufbx.ufbx_nurbs_surface* surface, ufbx.ufbx_tessellate_surface_opts* opts, ufbx.ufbx_error* error)
Parameters
Returns
ufbx_thread_pool_get_user_ptr(ulong)
Declaration
public static extern void* ufbx_thread_pool_get_user_ptr(ulong ctx)
Parameters
| Type |
Name |
Description |
| ulong |
ctx |
|
Returns
ufbx_thread_pool_run_task(ulong, uint)
Run a single thread pool task.
See ufbx_thread_pool_run_fn for more information.
Declaration
public static extern void ufbx_thread_pool_run_task(ulong ctx, uint index)
Parameters
ufbx_thread_pool_set_user_ptr(ulong, void*)
Get or set an arbitrary user pointer for the thread pool context.
ufbx_thread_pool_get_user_ptr() returns NULL if unset.
Declaration
public static extern void ufbx_thread_pool_set_user_ptr(ulong ctx, void* user_ptr)
Parameters
| Type |
Name |
Description |
| ulong |
ctx |
|
| void* |
user_ptr |
|
ufbx_topo_next_vertex_edge(ufbx_topo_edge*, ulong, uint)
Declaration
public static extern uint ufbx_topo_next_vertex_edge(ufbx.ufbx_topo_edge* topo, ulong num_topo, uint index)
Parameters
Returns
ufbx_topo_prev_vertex_edge(ufbx_topo_edge*, ulong, uint)
Declaration
public static extern uint ufbx_topo_prev_vertex_edge(ufbx.ufbx_topo_edge* topo, ulong num_topo, uint index)
Parameters
Returns
Declaration
public static extern ufbx.ufbx_vec3 ufbx_transform_direction(ufbx.ufbx_matrix* m, ufbx.ufbx_vec3 v)
Parameters
Returns
Matrix transformation utilities.
Declaration
public static extern ufbx.ufbx_vec3 ufbx_transform_position(ufbx.ufbx_matrix* m, ufbx.ufbx_vec3 v)
Parameters
Returns
Conversions between ufbx_matrix and ufbx_transform.
Declaration
public static extern ufbx.ufbx_matrix ufbx_transform_to_matrix(ufbx.ufbx_transform* t)
Parameters
Returns
ufbx_triangulate_face(uint*, ulong, ufbx_mesh*, ufbx_face)
Declaration
public static extern uint ufbx_triangulate_face(uint* indices, ulong num_indices, ufbx.ufbx_mesh* mesh, ufbx.ufbx_face face)
Parameters
Returns
ufbx_vec3_normalize(ufbx_vec3)
Vector math utility functions.
Declaration
public static extern ufbx.ufbx_vec3 ufbx_vec3_normalize(ufbx.ufbx_vec3 v)
Parameters
Returns