MeshLib Documentation
Loading...
Searching...
No Matches
MRMeshC/MRVector.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#include "MRAffineXf.h"
5#include "MRId.h"
6
8
10#define MR_VECTOR_CONCAT( a, b ) MR_VECTOR_CONCAT_( a, b )
11#define MR_VECTOR_CONCAT_( a, b ) a ## b
12
16// to deallocate it manually
19#define MR_VECTOR_LIKE_DECL( ClassName, Type ) \
20typedef struct MR_VECTOR_CONCAT( MR, ClassName ) \
21{ \
22 MR_VECTOR_CONCAT( MR, Type )* data; \
23 size_t size; \
24 void* reserved1; \
25} MR_VECTOR_CONCAT( MR, ClassName ); \
26MRMESHC_API void MR_VECTOR_CONCAT( MR_VECTOR_CONCAT( mr, ClassName ), Invalidate )( MR_VECTOR_CONCAT( MR, ClassName )* ); \
27MRMESHC_API void MR_VECTOR_CONCAT( MR_VECTOR_CONCAT( mr, ClassName ), Free )( MR_VECTOR_CONCAT( MR, ClassName )* ); \
28MRMESHC_API MR_VECTOR_CONCAT( MR, ClassName )* MR_VECTOR_CONCAT( MR_VECTOR_CONCAT( mr, ClassName ), New )(void);
29
30#define MR_VECTOR_DECL( Type ) MR_VECTOR_LIKE_DECL( MR_VECTOR_CONCAT( Vector, Type ), Type )
31
32MR_VECTOR_DECL( AffineXf3f )
33MR_VECTOR_DECL( Vector3f )
34
35MR_VECTOR_LIKE_DECL( FaceMap, FaceId )
36MR_VECTOR_LIKE_DECL( WholeEdgeMap, EdgeId )
37MR_VECTOR_LIKE_DECL( VertMap, VertId )
38
#define MR_EXTERN_C_BEGIN
Definition MRMeshC/MRMeshFwd.h:26
#define MR_EXTERN_C_END
Definition MRMeshC/MRMeshFwd.h:27
#define MR_VECTOR_DECL(Type)
Definition MRMeshC/MRVector.h:30
#define MR_VECTOR_LIKE_DECL(ClassName, Type)
Definition MRMeshC/MRVector.h:19