29 template<
class V,
class M>
30 inline V
mul_pos(
const V& src,
const M& m)
32 const auto a = src[0] * m.x[0][0] + src[1] * m.x[1][0] + src[2] * m.x[2][0] + m.x[3][0];
33 const auto b = src[0] * m.x[0][1] + src[1] * m.x[1][1] + src[2] * m.x[2][1] + m.x[3][1];
34 const auto c = src[0] * m.x[0][2] + src[1] * m.x[1][2] + src[2] * m.x[2][2] + m.x[3][2];
40 template<
class V,
class M>
41 inline V
mul_dir(
const V& src,
const M& m)
43 const auto a = src[0] * m.x[0][0] + src[1] * m.x[1][0] + src[2] * m.x[2][0];
44 const auto b = src[0] * m.x[0][1] + src[1] * m.x[1][1] + src[2] * m.x[2][1];
45 const auto c = src[0] * m.x[0][2] + src[1] * m.x[1][2] + src[2] * m.x[2][2];
131 bool negate_normal =
false 257 MAQUINA_EXPORT void drm_init(
const std::string& software_name,
const std::wstring& license_file_path,
const std::string& license_server);
286 using iterator_category = std::forward_iterator_tag;
287 using value_type = std::string_view;
288 using difference_type = std::ptrdiff_t;
289 using pointer = std::string_view;
295 Iterator& operator++();
296 Iterator(
const std::string_view&
tags,
size_t start);
298 void _init(
size_t start);
299 const std::string_view _tags;
304 Iterator
begin()
const;
305 Iterator
end()
const;
307 const std::string_view _tags;
317 const std::function<
void(uint32_t first, uint32_t last)>&
function 362 const std::string& attribute_name,
const Shape::Topology& attribute_topology,
bool interpolate_vertex);
385 MAQUINA_EXPORT std::pair<std::vector<Node>, std::vector<Plug>> _document_paths(
const Node& node);
MAQUINA_EXPORT void drm_init(const std::string &software_name, const std::wstring &license_file_path, const std::string &license_server)
Initialize the drm.
Definition: ImathBox.h:71
MAQUINA_EXPORT std::string base64_encode(const uint8_t *data, size_t size)
Encode a bunch of binary data in a base64 text.
Topology
The different attribute topologies.
Definition: Shape.h:38
MAQUINA_EXPORT std::wstring file_name(const wchar_t *file)
Return a file name.
V mul_dir(const V &src, const M &m)
A faster alternative to multiply a direction by a 4x4 matrix, ignoring the homogeneous normalization...
Definition: Utils.h:41
MAQUINA_EXPORT bool same_file(std::string a, std::string b)
Return true if the two document paths are pointing the same filesystem file.
MAQUINA_EXPORT std::vector< uint8_t > inflate(const uint8_t *data, size_t size)
Uncompress a bunch of binary data with zlib.
MAQUINA_EXPORT std::vector< uint8_t > deflate(const uint8_t *data, size_t size)
Compress a bunch of binary data with zlib.
MAQUINA_EXPORT std::shared_ptr< LazySceneChildResult > lazy_scene_child(const SceneConst &scene, const std::string &path, bool shapes_only=false)
Return the child scene node matching the path or if not found the only one matching the final path na...
Definition: ImathFrame.h:42
TagsIteration tags(const std::string_view &tags_list)
Return a tag iteration from a string with comma, semi-column or space separated tokens.
MAQUINA_EXPORT Plug setting_plug(const std::string_view &path)
Get a setting plug.
Definition: ImathFrame.h:43
MAQUINA_EXPORT Imath::V3f closest_point_segment_to_segment(const Imath::V3f *s1, const Imath::V3f *s2)
MAQUINA_EXPORT void ik_3_joints(const Imath::V3d &p0, const Imath::V3d &p1, const Imath::V3d &p2, const Imath::V3d &goal, const Imath::V3d &normal, Imath::Quatd &r0, double &a1, Imath::V3d &axis1, bool negate_normal=false)
Imath::M44d world_matrix
The path of the child.
Definition: Utils.h:375
MAQUINA_EXPORT std::wstring project_directory()
Return the project directory.
A mutable scene node value.
Definition: Scene.h:292
std::string path
The found scene child.
Definition: Utils.h:374
MAQUINA_EXPORT std::string system_path_local(const wchar_t *path)
Expand a document file path in a file system path.
MAQUINA_EXPORT int solve_cubic(float a, float b, float c, float d, float *roots)
Solve a cubic equation.
MAQUINA_EXPORT std::string wstring_to_local(const wchar_t *str)
Convert a std::wstring into a string in the default system charset.
MAQUINA_EXPORT std::wstring system_path(const wchar_t *path)
Expand a document file path in a file system path.
V mul_pos(const V &src, const M &m)
A faster alternative to multiply a position by a 4x4 matrix, ignoring the homogeneous normalization...
Definition: Utils.h:30
MAQUINA_EXPORT bool file_exists(const wchar_t *file)
Return true if a file exist.
MAQUINA_EXPORT Imath::M44f lerp(const Imath::M44f &a, const Imath::M44f &b, float w)
Interplate two matrices.
MAQUINA_EXPORT std::pair< bool, std::string > drm_status()
Return the drm status.
MAQUINA_EXPORT std::string comparable_path(std::string s)
Normalize and return a path in order to be comparaded to another comparable path. ...
MAQUINA_EXPORT Imath::Box3f compute_aabb(const gsl::span< const Imath::V3f > &points)
Compute a bounding box.
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
MAQUINA_EXPORT std::string to_log(const std::wstring &s)
Convert a wide string in string to use in the logger functions.
MAQUINA_EXPORT void set_setting(const char *path, const Value &value)
Set a setting value.
MAQUINA_EXPORT void parallel_for(uint32_t first, uint32_t last, uint32_t batch_size, const std::function< void(uint32_t first, uint32_t last)> &function)
Perform a for loop using threads.
MAQUINA_EXPORT int intersect_ray_sphere(const Imath::V3d &o, const Imath::V3d &d, const Imath::V3d &c, float r, float &t0, float &t1)
Compute the intersections between an infinit ray and a sphere.
MAQUINA_EXPORT std::wstring parent_path(const wchar_t *file)
Return a file parent path.
MAQUINA_EXPORT std::string drm_hostid()
Return the system host id.
MAQUINA_EXPORT std::string add_tag(const std::string &tags, const char *tag)
Add a tag to a tag string.
MAQUINA_EXPORT std::string join(const std::vector< std::string > &strings, const StringView &sep)
Return the concatenation of the strings separated by the optional sep string.
Definition: ImathQuat.h:71
MAQUINA_EXPORT Node reference(Node &root, const std::wstring &filepath, const std::string &reference_root_name="", const ProgressCallback &progress={})
Reference the content of a file into the project.
#define MAQUINA_EXPORT
Definition: Export.h:31
bool is_identity(const Imath::Matrix44< T > &m)
Returns true if the matrix is the identity.
Definition: Utils.h:52
A node plug.
Definition: Plug.h:59
MAQUINA_EXPORT Scene remap_attribute(const SceneConst &new_scene, const SceneConst &old_scene, const SceneConst &old_attribute, const std::string &attribute_name, const Shape::Topology &attribute_topology, bool interpolate_vertex)
Remaps an attribute from a deprecated Scene version to a new one.
MAQUINA_EXPORT std::wstring project_path(const wchar_t *system_path)
Converts a file system path to a project-relative path.
MAQUINA_EXPORT const std::vector< std::pair< std::string, std::wstring > > & path_variables()
Return the currently registered path variables.
MAQUINA_EXPORT void set_project_directory(const wchar_t *path)
Set the project directory.
MAQUINA_EXPORT std::vector< std::string > split(const StringView &s, const StringView &sep)
Return a list of the words in the string, using the sep string as delimiter.
An immutable scene node value.
Definition: Scene.h:35
MAQUINA_EXPORT Imath::M44f blend_to_identity(const Imath::M44f &a, float w)
Blend a matrix to identity.
bool operator!=(const C *str, const StringViewBase< C, STDS > &sv) noexcept
Definition: StringView.h:306
MAQUINA_EXPORT Imath::V3d closest_point_to_line(const Imath::V3d &o, const Imath::V3d &d, const Imath::V3d &p)
Compute the closest point to p on a line.
MAQUINA_EXPORT bool list_directory_files(const wchar_t *directory, std::vector< std::wstring > &files, bool relative=false)
bool operator==(const C *str, const StringViewBase< C, STDS > &sv) noexcept
Definition: StringView.h:274
MAQUINA_EXPORT std::wstring utf8_to_wstring(const char *uft8)
Convert an utf-8 string into a std::wstring.
MAQUINA_EXPORT std::string file_extension(const wchar_t *file)
Return a file extension.
MAQUINA_EXPORT void set_path_variables(const std::vector< std::pair< std::string, std::wstring >> &path_vars)
Register the path variables.
MAQUINA_EXPORT void closest_point_between_lines(const Imath::V3f &o0, const Imath::V3f &d0, const Imath::V3f &o1, const Imath::V3f &d1, float &t0, float &t1)
Compute the closest point between two lines.
MAQUINA_EXPORT Imath::V3f closest_point_on_triangle(const Imath::V3f *triangle, const Imath::V3f &p, float *s_out=nullptr, float *t_out=nullptr)
MAQUINA_EXPORT std::string wstring_to_utf8(const wchar_t *str)
Convert a std::wstring into an utf-8 string.
MAQUINA_EXPORT std::wstring getenv_w(const char *name)
Return the content of an environment variable.
MAQUINA_EXPORT void get_orthogonal_vectors(const Imath::V3d &fx, Imath::V3d &fy, Imath::V3d &fz)
MAQUINA_EXPORT std::vector< uint8_t > base64_decode(const char *text, size_t size)
Decode a bunch of binary data from a base64 text.
MAQUINA_EXPORT Value setting(const char *path)
Get a setting value.
MAQUINA_EXPORT Imath::V3f compute_average(const gsl::span< const Imath::V3f > &points, const gsl::span< const uint32_t > &indices)
Compute the average of indexed points.
MAQUINA_EXPORT std::wstring expand_string(const wchar_t *path)
Expand a string containing
Color4< T > operator*(S a, const Color4< T > &v)
Definition: ImathColor.h:727
MAQUINA_EXPORT void drm_release()
Release the drm.
MAQUINA_EXPORT Plug add_setting(const std::string_view &path, const Value &value, std::string description="")
Creates a new setting.
MAQUINA_EXPORT std::wstring local_to_wstring(const char *str)
Convert a string in the default system charset into a std::wstring.
T x[4][4]
Definition: ImathMatrix.h:404
SceneConst scene
Definition: Utils.h:373
Base class of all Rumba nodes.
Definition: Node.h:37
Base class of all Rumba values.
Definition: Value.h:34
MAQUINA_EXPORT bool has_tag(const std::string &tags, const char *tag)
Check a tag exist in a comma separate tag list.