Nebula
Loading...
Searching...
No Matches
im3d_config.h File Reference
#include "render/stdneb.h"
#include "core/config.h"
#include "memory/memory.h"
#include "math/vec4.h"
#include "math/vec2.h"
#include "math/mat4.h"

Go to the source code of this file.

Macros

#define im3d_config_h
 
#define IM3D_ASSERT(e)
 
#define IM3D_MALLOC(size)
 
#define IM3D_FREE(ptr)
 
#define IM3D_VERTEX_ALIGNMENT   4
 
#define IM3D_VEC2_APP
 
#define IM3D_VEC3_APP
 
#define IM3D_VEC4_APP
 
#define IM3D_MAT3_APP
 
#define IM3D_MAT4_APP
 

Macro Definition Documentation

◆ IM3D_ASSERT

#define IM3D_ASSERT ( e)
Value:
#define n_assert(exp)
Definition debug.h:50

◆ im3d_config_h

#define im3d_config_h

◆ IM3D_FREE

#define IM3D_FREE ( ptr)
Value:
void Free(HeapType heapType, void *ptr)
Free a block of memory.
Definition osxmemory.cc:136
@ DefaultHeap
Definition osxmemoryconfig.h:26

◆ IM3D_MALLOC

#define IM3D_MALLOC ( size)
Value:
void * Alloc(HeapType heapType, size_t size, size_t alignment)
Allocate a block of memory from one of the global heaps.
Definition osxmemory.cc:56

◆ IM3D_MAT3_APP

#define IM3D_MAT3_APP
Value:
Mat3(const Math::mat4& _m) { float b[16]; _m.storeu(b); for(int j = 0 ; j < 3;++j) for (int i = 0; i < 3; ++i) m[i+j*3] = b[i + j*4]; } \
operator Math::mat4() const { Math::mat4 ret; float b[16]; ret.storeu(b); int k = 0; for(int j = 0 ; j < 3;++j) for (int i = 0; i < 3; ++i) b[i+4*j] = m[i+j*3]; ret.loadu(b); return ret; }
A 4x4 single point precision float matrix.
Definition mat4.h:49
void loadu(const scalar *ptr)
load content from unaligned memory
Definition mat4.h:215
void storeu(scalar *ptr) const
write content to unaligned memory through the write cache
Definition mat4.h:250

◆ IM3D_MAT4_APP

#define IM3D_MAT4_APP
Value:
Mat4(const Math::mat4& _m) { _m.storeu(m);} \
operator Math::mat4() const { Math::mat4 ret; ret.loadu(m); return ret; }

◆ IM3D_VEC2_APP

#define IM3D_VEC2_APP
Value:
Vec2(const Math::vec2& _v) { x = _v.x; y = _v.y; } \
operator Math::vec2() const { return Math::vec2(x, y); }
A 2-component float vector class.
Definition vec2.h:21
scalar x
Definition vec2.h:86
scalar y
Definition vec2.h:87

◆ IM3D_VEC3_APP

#define IM3D_VEC3_APP
Value:
Vec3(const Math::point& _v) { x = _v.x; y = _v.y; z = _v.z; } \
operator Math::point() const { return Math::point(x, y, z); } \
Vec3(const Math::vector& _v) { x = _v.x; y = _v.y; z = _v.z; } \
operator Math::vector() const { return Math::vector(x, y, z); } \
Vec3(const Math::vec3& _v) { x = _v.x; y = _v.y; z = _v.z; } \
operator Math::vec3() const { return Math::vec3(x, y, z); }
Represents a 3D point in space.
Definition point.h:22
float z
Definition point.h:78
float x
Definition point.h:78
float y
Definition point.h:78
A 3D vector.
Definition vec3.h:40
float x
Definition vec3.h:94
float z
Definition vec3.h:94
float y
Definition vec3.h:94
A vector is a 3D direction in space.
Definition vector.h:22
float z
Definition vector.h:85
float x
Definition vector.h:85
float y
Definition vector.h:85

◆ IM3D_VEC4_APP

#define IM3D_VEC4_APP
Value:
Vec4(const Math::point& _v) { x = _v.x; y = _v.y; z = _v.z; w = 1.0f; } \
operator Math::point() const { return Math::point(x, y, z); } \
Vec4(const Math::vec4& _v) { x = _v.x; y = _v.y; z = _v.z; w = _v.w; } \
operator Math::vec4() const { return Math::vec4(x, y, z, w); }
A 4D vector.
Definition vec4.h:24
float y
Definition vec4.h:93
float z
Definition vec4.h:93
float w
Definition vec4.h:93
float x
Definition vec4.h:93

◆ IM3D_VERTEX_ALIGNMENT

#define IM3D_VERTEX_ALIGNMENT   4