diff options
author | sanine <sanine.not@pm.me> | 2022-03-04 10:47:15 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-03-04 10:47:15 -0600 |
commit | 058f98a63658dc1a2579826ba167fd61bed1e21f (patch) | |
tree | bcba07a1615a14d943f3af3f815a42f3be86b2f3 /src/mesh/assimp-master/samples/SimpleAssimpViewX/MyDocument.h | |
parent | 2f8028ac9e0812cb6f3cbb08f0f419e4e717bd22 (diff) |
add assimp submodule
Diffstat (limited to 'src/mesh/assimp-master/samples/SimpleAssimpViewX/MyDocument.h')
-rw-r--r-- | src/mesh/assimp-master/samples/SimpleAssimpViewX/MyDocument.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/mesh/assimp-master/samples/SimpleAssimpViewX/MyDocument.h b/src/mesh/assimp-master/samples/SimpleAssimpViewX/MyDocument.h new file mode 100644 index 0000000..a9c5a36 --- /dev/null +++ b/src/mesh/assimp-master/samples/SimpleAssimpViewX/MyDocument.h @@ -0,0 +1,60 @@ +// +// MyDocument.h +// DisplayLinkAsyncMoviePlayer +// +// Created by vade on 10/26/10. +// Copyright __MyCompanyName__ 2010 . All rights reserved. +// + + +#import "ModelLoaderHelperClasses.h" + +// assimp include files. These three are usually needed. +#import "cimport.h" +#import "postprocess.h" +#import "scene.h" +#import "types.h" + +#import <Cocoa/Cocoa.h> +#import <OpenGL/OpenGL.h> +#import <Quartz/Quartz.h> + + +@interface MyDocument : NSPersistentDocument +{ + CVDisplayLinkRef _displayLink; + NSOpenGLContext* _glContext; + NSOpenGLPixelFormat* _glPixelFormat; + + NSView* _view; + + // Assimp Stuff + aiScene* _scene; + aiVector3D scene_min, scene_max, scene_center; + double normalizedScale; + + // Our array of textures. + GLuint *textureIds; + + // only used if we use + NSMutableArray* modelMeshes; + BOOL builtBuffers; + + NSMutableDictionary* textureDictionary; // Array of Dictionaries that map image filenames to textureIds +} + +@property (retain) IBOutlet NSView* _view; + + +- (CVReturn)displayLinkRenderCallback:(const CVTimeStamp *)timeStamp; +- (void) render; + +- (void) drawMeshesInContext:(CGLContextObj)cgl_ctx; +- (void) createGLResourcesInContext:(CGLContextObj)cgl_ctx; +- (void) deleteGLResourcesInContext:(CGLContextObj)cgl_ctx; + +- (void) loadTexturesInContext:(CGLContextObj)cgl_ctx withModelPath:(NSString*) modelPath; +- (void) getBoundingBoxWithMinVector:(aiVector3D*) min maxVectr:(aiVector3D*) max; +- (void) getBoundingBoxForNode:(const aiNode*)nd minVector:(aiVector3D*) min maxVector:(aiVector3D*) max matrix:(aiMatrix4x4*) trafo; + +@end |