MeshLib C Docs
Loading...
Searching...
No Matches
MRObjectMesh.h File Reference
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef struct MR_FaceBitSet MR_FaceBitSet
 
typedef struct MR_Line3f MR_Line3f
 
typedef struct MR_MeshIntersectionResult MR_MeshIntersectionResult
 
typedef struct MR_Object MR_Object
 
typedef struct MR_ObjectChildrenHolder MR_ObjectChildrenHolder
 
typedef struct MR_ObjectMeshHolder MR_ObjectMeshHolder
 
typedef struct MR_VisualObject MR_VisualObject
 
typedef struct MR_std_shared_ptr_MR_Mesh MR_std_shared_ptr_MR_Mesh
 
typedef struct MR_std_shared_ptr_MR_Object MR_std_shared_ptr_MR_Object
 
typedef struct MR_std_shared_ptr_MR_ObjectMesh MR_std_shared_ptr_MR_ObjectMesh
 
typedef struct MR_std_string MR_std_string
 
typedef struct MR_std_vector_std_shared_ptr_MR_ObjectMesh MR_std_vector_std_shared_ptr_MR_ObjectMesh
 
typedef struct MR_std_vector_std_string MR_std_vector_std_string
 
typedef struct MR_ObjectMesh MR_ObjectMesh
 

Functions

MRC_API MR_ObjectMeshMR_ObjectMesh_DefaultConstruct (void)
 
MRC_API MR_ObjectMeshMR_ObjectMesh_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_ObjectMeshMR_ObjectMesh_OffsetPtr (const MR_ObjectMesh *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_ObjectMeshMR_ObjectMesh_OffsetMutablePtr (MR_ObjectMesh *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API const MR_ObjectMR_ObjectMesh_UpcastTo_MR_Object (const MR_ObjectMesh *object)
 
MRC_API MR_ObjectMR_ObjectMesh_MutableUpcastTo_MR_Object (MR_ObjectMesh *object)
 Upcasts an instance of MR::ObjectMesh to its base class MR::Object.
 
MRC_API const MR_ObjectChildrenHolderMR_ObjectMesh_UpcastTo_MR_ObjectChildrenHolder (const MR_ObjectMesh *object)
 
MRC_API MR_ObjectChildrenHolderMR_ObjectMesh_MutableUpcastTo_MR_ObjectChildrenHolder (MR_ObjectMesh *object)
 Upcasts an instance of MR::ObjectMesh to its base class MR::ObjectChildrenHolder.
 
MRC_API const MR_ObjectMeshHolderMR_ObjectMesh_UpcastTo_MR_ObjectMeshHolder (const MR_ObjectMesh *object)
 
MRC_API MR_ObjectMeshHolderMR_ObjectMesh_MutableUpcastTo_MR_ObjectMeshHolder (MR_ObjectMesh *object)
 Upcasts an instance of MR::ObjectMesh to its base class MR::ObjectMeshHolder.
 
MRC_API const MR_VisualObjectMR_ObjectMesh_UpcastTo_MR_VisualObject (const MR_ObjectMesh *object)
 
MRC_API MR_VisualObjectMR_ObjectMesh_MutableUpcastTo_MR_VisualObject (MR_ObjectMesh *object)
 Upcasts an instance of MR::ObjectMesh to its base class MR::VisualObject.
 
MRC_API MR_ObjectMeshMR_ObjectMesh_ConstructFromAnother (MR_PassBy _other_pass_by, MR_ObjectMesh *_other)
 
MRC_API void MR_ObjectMesh_Destroy (const MR_ObjectMesh *_this)
 Destroys a heap-allocated instance of MR_ObjectMesh. Does nothing if the pointer is null.
 
MRC_API void MR_ObjectMesh_DestroyArray (const MR_ObjectMesh *_this)
 Destroys a heap-allocated array of MR_ObjectMesh. Does nothing if the pointer is null.
 
MRC_API MR_ObjectMeshMR_ObjectMesh_AssignFromAnother (MR_ObjectMesh *_this, MR_PassBy _other_pass_by, MR_ObjectMesh *_other)
 
MRC_API const char * MR_ObjectMesh_TypeName (void)
 Generated from a method of class MR::ObjectMesh named TypeName.
 
MRC_API const char * MR_ObjectMesh_typeName (const MR_ObjectMesh *_this)
 
MRC_API const MR_std_shared_ptr_MR_MeshMR_ObjectMesh_varMesh (MR_ObjectMesh *_this)
 
MRC_API void MR_ObjectMesh_setMesh (MR_ObjectMesh *_this, MR_PassBy mesh_pass_by, MR_std_shared_ptr_MR_Mesh *mesh)
 
MRC_API MR_std_shared_ptr_MR_MeshMR_ObjectMesh_updateMesh (MR_ObjectMesh *_this, MR_PassBy mesh_pass_by, MR_std_shared_ptr_MR_Mesh *mesh)
 
MRC_API MR_std_vector_std_stringMR_ObjectMesh_getInfoLines (const MR_ObjectMesh *_this)
 
MRC_API MR_std_stringMR_ObjectMesh_getClassName (const MR_ObjectMesh *_this)
 
MRC_API MR_std_stringMR_ObjectMesh_getClassNameInPlural (const MR_ObjectMesh *_this)
 
MRC_API MR_std_shared_ptr_MR_ObjectMR_ObjectMesh_clone (const MR_ObjectMesh *_this)
 
MRC_API MR_std_shared_ptr_MR_ObjectMR_ObjectMesh_shallowClone (const MR_ObjectMesh *_this)
 
MRC_API void MR_ObjectMesh_setDirtyFlags (MR_ObjectMesh *_this, uint32_t mask, const bool *invalidateCaches)
 
MRC_API MR_MeshIntersectionResultMR_ObjectMesh_worldRayIntersection (const MR_ObjectMesh *_this, const MR_Line3f *worldRay, const MR_FaceBitSet *region)
 
MRC_API MR_std_shared_ptr_MR_ObjectMeshMR_merge_std_vector_std_shared_ptr_MR_ObjectMesh (const MR_std_vector_std_shared_ptr_MR_ObjectMesh *objsMesh)
 
MRC_API MR_std_shared_ptr_MR_ObjectMeshMR_cloneRegion_3 (const MR_std_shared_ptr_MR_ObjectMesh *objMesh, const MR_FaceBitSet *region, const bool *copyTexture)
 

Typedef Documentation

◆ MR_FaceBitSet

typedef struct MR_FaceBitSet MR_FaceBitSet

◆ MR_Line3f

typedef struct MR_Line3f MR_Line3f

◆ MR_MeshIntersectionResult

◆ MR_Object

typedef struct MR_Object MR_Object

◆ MR_ObjectChildrenHolder

◆ MR_ObjectMesh

typedef struct MR_ObjectMesh MR_ObjectMesh

an object that stores a mesh Generated from class MR::ObjectMesh. Base classes: Direct: (non-virtual) MR::ObjectMeshHolder Indirect: (non-virtual) MR::Object MR::ObjectChildrenHolder MR::VisualObject

◆ MR_ObjectMeshHolder

◆ MR_std_shared_ptr_MR_Mesh

◆ MR_std_shared_ptr_MR_Object

◆ MR_std_shared_ptr_MR_ObjectMesh

◆ MR_std_string

typedef struct MR_std_string MR_std_string

◆ MR_std_vector_std_shared_ptr_MR_ObjectMesh

◆ MR_std_vector_std_string

◆ MR_VisualObject

Function Documentation

◆ MR_cloneRegion_3()

MRC_API MR_std_shared_ptr_MR_ObjectMesh * MR_cloneRegion_3 ( const MR_std_shared_ptr_MR_ObjectMesh * objMesh,
const MR_FaceBitSet * region,
const bool * copyTexture )

constructs new ObjectMesh containing the region of data from input object does not copy selection Generated from function MR::cloneRegion. Parameter objMesh can not be null. It is a single object. Parameter region can not be null. It is a single object. Parameter copyTexture has a default argument: true, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_std_shared_ptr_MR_ObjectMesh_Destroy() to free it when you're done using it.

◆ MR_merge_std_vector_std_shared_ptr_MR_ObjectMesh()

MRC_API MR_std_shared_ptr_MR_ObjectMesh * MR_merge_std_vector_std_shared_ptr_MR_ObjectMesh ( const MR_std_vector_std_shared_ptr_MR_ObjectMesh * objsMesh)

constructs new ObjectMesh containing the union of valid data from all input objects Generated from function MR::merge. Parameter objsMesh can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_shared_ptr_MR_ObjectMesh_Destroy() to free it when you're done using it.

◆ MR_ObjectMesh_AssignFromAnother()

MRC_API MR_ObjectMesh * MR_ObjectMesh_AssignFromAnother ( MR_ObjectMesh * _this,
MR_PassBy _other_pass_by,
MR_ObjectMesh * _other )

Generated from a method of class MR::ObjectMesh named operator=. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_ObjectMesh_clone()

MRC_API MR_std_shared_ptr_MR_Object * MR_ObjectMesh_clone ( const MR_ObjectMesh * _this)

Generated from a method of class MR::ObjectMesh named clone. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_shared_ptr_MR_Object_Destroy() to free it when you're done using it.

◆ MR_ObjectMesh_ConstructFromAnother()

MRC_API MR_ObjectMesh * MR_ObjectMesh_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_ObjectMesh * _other )

Generated from a constructor of class MR::ObjectMesh. Never returns null. Returns an instance allocated on the heap! Must call MR_ObjectMesh_Destroy() to free it when you're done using it.

◆ MR_ObjectMesh_DefaultConstruct()

MRC_API MR_ObjectMesh * MR_ObjectMesh_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_ObjectMesh_Destroy() to free it when you're done using it.

◆ MR_ObjectMesh_DefaultConstructArray()

MRC_API MR_ObjectMesh * MR_ObjectMesh_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_ObjectMesh_DestroyArray(). Use MR_ObjectMesh_OffsetMutablePtr() and MR_ObjectMesh_OffsetPtr() to access the array elements.

◆ MR_ObjectMesh_Destroy()

MRC_API void MR_ObjectMesh_Destroy ( const MR_ObjectMesh * _this)

Destroys a heap-allocated instance of MR_ObjectMesh. Does nothing if the pointer is null.

◆ MR_ObjectMesh_DestroyArray()

MRC_API void MR_ObjectMesh_DestroyArray ( const MR_ObjectMesh * _this)

Destroys a heap-allocated array of MR_ObjectMesh. Does nothing if the pointer is null.

◆ MR_ObjectMesh_getClassName()

MRC_API MR_std_string * MR_ObjectMesh_getClassName ( const MR_ObjectMesh * _this)

Generated from a method of class MR::ObjectMesh named getClassName. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_string_Destroy() to free it when you're done using it.

◆ MR_ObjectMesh_getClassNameInPlural()

MRC_API MR_std_string * MR_ObjectMesh_getClassNameInPlural ( const MR_ObjectMesh * _this)

Generated from a method of class MR::ObjectMesh named getClassNameInPlural. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_string_Destroy() to free it when you're done using it.

◆ MR_ObjectMesh_getInfoLines()

MRC_API MR_std_vector_std_string * MR_ObjectMesh_getInfoLines ( const MR_ObjectMesh * _this)

Generated from a method of class MR::ObjectMesh named getInfoLines. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_vector_std_string_Destroy() to free it when you're done using it.

◆ MR_ObjectMesh_MutableUpcastTo_MR_Object()

MRC_API MR_Object * MR_ObjectMesh_MutableUpcastTo_MR_Object ( MR_ObjectMesh * object)

Upcasts an instance of MR::ObjectMesh to its base class MR::Object.

◆ MR_ObjectMesh_MutableUpcastTo_MR_ObjectChildrenHolder()

MRC_API MR_ObjectChildrenHolder * MR_ObjectMesh_MutableUpcastTo_MR_ObjectChildrenHolder ( MR_ObjectMesh * object)

Upcasts an instance of MR::ObjectMesh to its base class MR::ObjectChildrenHolder.

◆ MR_ObjectMesh_MutableUpcastTo_MR_ObjectMeshHolder()

MRC_API MR_ObjectMeshHolder * MR_ObjectMesh_MutableUpcastTo_MR_ObjectMeshHolder ( MR_ObjectMesh * object)

Upcasts an instance of MR::ObjectMesh to its base class MR::ObjectMeshHolder.

◆ MR_ObjectMesh_MutableUpcastTo_MR_VisualObject()

MRC_API MR_VisualObject * MR_ObjectMesh_MutableUpcastTo_MR_VisualObject ( MR_ObjectMesh * object)

Upcasts an instance of MR::ObjectMesh to its base class MR::VisualObject.

◆ MR_ObjectMesh_OffsetMutablePtr()

MRC_API MR_ObjectMesh * MR_ObjectMesh_OffsetMutablePtr ( MR_ObjectMesh * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_ObjectMesh_OffsetPtr()

MRC_API const MR_ObjectMesh * MR_ObjectMesh_OffsetPtr ( const MR_ObjectMesh * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_ObjectMesh_setDirtyFlags()

MRC_API void MR_ObjectMesh_setDirtyFlags ( MR_ObjectMesh * _this,
uint32_t mask,
const bool * invalidateCaches )

Generated from a method of class MR::ObjectMesh named setDirtyFlags. Parameter _this can not be null. It is a single object. Parameter invalidateCaches has a default argument: true, pass a null pointer to use it.

◆ MR_ObjectMesh_setMesh()

MRC_API void MR_ObjectMesh_setMesh ( MR_ObjectMesh * _this,
MR_PassBy mesh_pass_by,
MR_std_shared_ptr_MR_Mesh * mesh )

sets given mesh to this, resets selection and creases Generated from a method of class MR::ObjectMesh named setMesh. Parameter _this can not be null. It is a single object.

◆ MR_ObjectMesh_shallowClone()

MRC_API MR_std_shared_ptr_MR_Object * MR_ObjectMesh_shallowClone ( const MR_ObjectMesh * _this)

Generated from a method of class MR::ObjectMesh named shallowClone. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_shared_ptr_MR_Object_Destroy() to free it when you're done using it.

◆ MR_ObjectMesh_TypeName()

MRC_API const char * MR_ObjectMesh_TypeName ( void )

Generated from a method of class MR::ObjectMesh named TypeName.

◆ MR_ObjectMesh_typeName()

MRC_API const char * MR_ObjectMesh_typeName ( const MR_ObjectMesh * _this)

Generated from a method of class MR::ObjectMesh named typeName. Parameter _this can not be null. It is a single object.

◆ MR_ObjectMesh_UpcastTo_MR_Object()

MRC_API const MR_Object * MR_ObjectMesh_UpcastTo_MR_Object ( const MR_ObjectMesh * object)

Upcasts an instance of MR::ObjectMesh to its base class MR::Object. This version is acting on mutable pointers.

◆ MR_ObjectMesh_UpcastTo_MR_ObjectChildrenHolder()

MRC_API const MR_ObjectChildrenHolder * MR_ObjectMesh_UpcastTo_MR_ObjectChildrenHolder ( const MR_ObjectMesh * object)

Upcasts an instance of MR::ObjectMesh to its base class MR::ObjectChildrenHolder. This version is acting on mutable pointers.

◆ MR_ObjectMesh_UpcastTo_MR_ObjectMeshHolder()

MRC_API const MR_ObjectMeshHolder * MR_ObjectMesh_UpcastTo_MR_ObjectMeshHolder ( const MR_ObjectMesh * object)

Upcasts an instance of MR::ObjectMesh to its base class MR::ObjectMeshHolder. This version is acting on mutable pointers.

◆ MR_ObjectMesh_UpcastTo_MR_VisualObject()

MRC_API const MR_VisualObject * MR_ObjectMesh_UpcastTo_MR_VisualObject ( const MR_ObjectMesh * object)

Upcasts an instance of MR::ObjectMesh to its base class MR::VisualObject. This version is acting on mutable pointers.

◆ MR_ObjectMesh_updateMesh()

MRC_API MR_std_shared_ptr_MR_Mesh * MR_ObjectMesh_updateMesh ( MR_ObjectMesh * _this,
MR_PassBy mesh_pass_by,
MR_std_shared_ptr_MR_Mesh * mesh )

sets given mesh to this, and returns back previous mesh of this; does not touch selection or creases Generated from a method of class MR::ObjectMesh named updateMesh. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_shared_ptr_MR_Mesh_Destroy() to free it when you're done using it.

◆ MR_ObjectMesh_varMesh()

MRC_API const MR_std_shared_ptr_MR_Mesh * MR_ObjectMesh_varMesh ( MR_ObjectMesh * _this)

returns variable mesh, if const mesh is needed use mesh() instead Generated from a method of class MR::ObjectMesh named varMesh. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_ObjectMesh_worldRayIntersection()

MRC_API MR_MeshIntersectionResult * MR_ObjectMesh_worldRayIntersection ( const MR_ObjectMesh * _this,
const MR_Line3f * worldRay,
const MR_FaceBitSet * region )

given ray in world coordinates, e.g. obtained from Viewport::unprojectPixelRay; finds its intersection with the mesh of this object considering its transformation relative to the world; it is inefficient to call this function for many rays, because it computes world-to-local xf every time Generated from a method of class MR::ObjectMesh named worldRayIntersection. Parameter _this can not be null. It is a single object. Parameter worldRay can not be null. It is a single object. Parameter region defaults to a null pointer in C++. Never returns null. Returns an instance allocated on the heap! Must call MR_MeshIntersectionResult_Destroy() to free it when you're done using it.