├── .gitattributes ├── .gitignore ├── DreamEditor ├── AboutPopupScreen.cpp ├── AboutPopupScreen.h ├── AnywhereDoor.cpp ├── AnywhereDoor.h ├── Attribute.cpp ├── Attribute.h ├── BoxCollision.h ├── Button.cpp ├── Button.h ├── CameraNode.cpp ├── CameraNode.h ├── Canvas.cpp ├── Canvas.h ├── CanvasNode.cpp ├── CanvasNode.h ├── CanvasNodeSortedLinkedList.cpp ├── CanvasNodeSortedLinkedList.h ├── CanvasNodes.h ├── ClassDiagram.cd ├── Colors.cpp ├── Colors.h ├── Constants.cpp ├── Constants.h ├── DevNotes.h ├── DivisionLine.h ├── DocumentPropertyPanel.cpp ├── DocumentPropertyPanel.h ├── DreamEditor.aps ├── DreamEditor.rc ├── DreamEditor.vcxproj ├── DreamEditor.vcxproj.filters ├── DreamEditor.vcxproj.user ├── DropDownButton.h ├── FileMenuPopupMenu.cpp ├── FileMenuPopupMenu.h ├── FontChar.h ├── FontCommon.h ├── FontInfo.cpp ├── FontInfo.h ├── FontManager.cpp ├── FontManager.h ├── GlobalMacros.h ├── GraphManager.cpp ├── GraphManager.h ├── GridLayout.cpp ├── GridLayout.h ├── Hash.cpp ├── Hash.h ├── HelpMenuPopupMenu.cpp ├── HelpMenuPopupMenu.h ├── ImageData.cpp ├── ImageData.h ├── ImageNode.cpp ├── ImageNode.h ├── ImageNodePropertyPanel.cpp ├── ImageNodePropertyPanel.h ├── ImageResource.cpp ├── ImageResource.h ├── Interface.cpp ├── Interface.h ├── InterfaceElement.cpp ├── InterfaceElement.h ├── Interfaces.h ├── LineLayout.h ├── LinkedList.cpp ├── LinkedList.h ├── Locales.h ├── MainMenu.cpp ├── MainMenu.h ├── MapEditor.cpp ├── MapEditor.h ├── Material.cpp ├── Material.h ├── MaterialTextures.cpp ├── MaterialTextures.h ├── MathElegent.cpp ├── MathElegent.h ├── MeshCreationPopupMenu - Old.cpp ├── MeshCreationPopupMenu.cpp ├── MeshCreationPopupMenu.h ├── MeshData - Copy.cpp ├── MeshData - Copy.h ├── MeshNode.cpp ├── MeshNode.h ├── MeshNodePropertyPanel.cpp ├── MeshNodePropertyPanel.h ├── MeshResource.cpp ├── MeshResource.h ├── MeshSpec.cpp ├── MeshSpec.h ├── Panel - Copy.cpp ├── Panel.cpp ├── Panel.h ├── Polysoup.cpp ├── Polysoup.h ├── PopupMenu.cpp ├── PopupMenu.h ├── ProeprtyPanel.cpp ├── PropertyPanel.h ├── Renderable.cpp ├── Renderable.h ├── Renderable3DMesh.cpp ├── Renderable3DMesh.h ├── Renderable3DQuoteFrame.cpp ├── Renderable3DQuoteFrame.h ├── Renderable3DRegionalMark.h ├── Renderable3DTerrain.cpp ├── Renderable3DTerrain.h ├── RenderableBase.cpp ├── RenderableBase.h ├── RenderableCirclesInstance.cpp ├── RenderableCirclesInstance.h ├── RenderableCursorHighlight.cpp ├── RenderableCursorHighlight.h ├── RenderableDebugRay.cpp ├── RenderableDebugRay.h ├── RenderableImageIcon.cpp ├── RenderableImageIcon.h ├── RenderableImageRect.cpp ├── RenderableImageRect.h ├── RenderableLine.cpp ├── RenderableLine.h ├── RenderableRoundCornerFrame.cpp ├── RenderableRoundCornerFrame.h ├── RenderableRoundCornerQuad.cpp ├── RenderableRoundCornerQuad.h ├── RenderableRoundSidesQuad.cpp ├── RenderableRoundSidesQuad.h ├── RenderableString.cpp ├── RenderableString.h ├── SearchField.cpp ├── SearchField.h ├── ShaderResource.cpp ├── ShaderResource.h ├── Shaders - copy.cpp ├── Shaders.cpp ├── Shaders.h ├── ShortcutsPopupScreen.cpp ├── ShortcutsPopupScreen.h ├── SingleImage.cpp ├── SingleImage.h ├── StaticShape.cpp ├── StaticShape.h ├── StringData.cpp ├── StringData.h ├── Sun.cpp ├── Sun.h ├── SystemWrapper.cpp ├── SystemWrapper.h ├── TerrainNode.cpp ├── TerrainNode.h ├── TestSource.cpp ├── TextArea.cpp ├── TextArea.h ├── TextArea3D.h ├── TextBox.cpp ├── TextBox.h ├── TextBox3D.h ├── TextContainer.cpp ├── TextContainer.h ├── TextEditor.cpp ├── TextEditor.h ├── TextField3D.h ├── TextLabel.cpp ├── TextLabel.h ├── TextNode.cpp ├── TextNode.h ├── TextNodePropertyPanel.cpp ├── TextNodePropertyPanel.h ├── TextSpecParser - Copy.cpp ├── TextSpecParser.cpp ├── TextSpecParser.h ├── Time.cpp ├── Time.h ├── WindowMenuPopupMenu.cpp ├── WindowMenuPopupMenu.h ├── World.cpp ├── World.h ├── WorldMap.h ├── icon1.ico ├── icon1_Back.ico ├── main.cpp └── resource.h ├── Execution Environment ├── Assimp32.dll ├── Data │ ├── CanvasFrame.png │ ├── CharMap.fnt │ ├── CharMap_0.png │ ├── CharMap_1.png │ ├── DefaultColorTextureMask.png │ ├── DefaultEmissiveTextureMask.png │ ├── DefaultEnvBase.jpg │ ├── DefaultMeshTexture.png │ ├── DefaultNormalTexture.png │ ├── DefaultSpecularTextureMask.png │ ├── Interface_Chn.png │ ├── Interface_Eng.png │ ├── Reference │ │ ├── Terrain_AO.jpg │ │ ├── Terrain_DISP.jpg │ │ └── Terrain_SPEC.jpg │ ├── Shaders │ │ ├── InstancedCirclesFragment.shader │ │ ├── InstancedCirclesVertex.shader │ │ ├── Not Used.txt │ │ ├── PhongShadingProgramFragment - Comments.shader │ │ ├── PhongShadingProgramFragment - StandardPhong.shader │ │ ├── PhongShadingProgramFragment.shader │ │ ├── PhongShadingProgramVertex - StandardPhong.shader │ │ ├── PhongShadingProgramVertex.shader │ │ ├── SEMRoughSpecularFragment.shader │ │ ├── SEMRoughSpecularVertex.shader │ │ ├── ShapeProgramFragment.shader │ │ ├── ShapeProgramVertex.shader │ │ ├── SimpleTextureProgramFragment.shader │ │ ├── SimpleTextureProgramVertex.shader │ │ ├── TextProgramFragment.shader │ │ └── TextProgramVertex.shader │ ├── Terrain.obj │ ├── Terrain.spec │ ├── TerrainD.jpg │ ├── TerrainN.jpg │ └── TerrainS.jpg ├── DevIL.dll ├── Documentation │ ├── English │ │ ├── Mesh Spec Documentation.pdf │ │ └── User Manual.pdf │ └── 中文 │ │ ├── 用户手册.pdf │ │ └── 网格物体配置文件说明文档.pdf ├── ILU.dll ├── Note (Folders are Trivial Copy of Debug Version)(Deletable).txt ├── Test_InstallAssoc(Not Working).bat ├── glew32.dll ├── glfw3.dll ├── log.txt └── 梦境编辑器.exe ├── Include ├── GL │ ├── glew.h │ ├── glxew.h │ └── wglew.h ├── GLFW │ ├── glfw3.h │ └── glfw3native.h ├── IL │ ├── config.h │ ├── config.h.win │ ├── devil_internal_exports.h │ ├── il.h │ ├── il_wrap.h │ ├── ilu.h │ ├── ilu_region.h │ ├── ilut.h │ └── ilut_config.h ├── assimp │ ├── Compiler │ │ ├── poppack1.h │ │ ├── pstdint.h │ │ └── pushpack1.h │ ├── DefaultLogger.hpp │ ├── Exporter.hpp │ ├── IOStream.hpp │ ├── IOSystem.hpp │ ├── Importer.hpp │ ├── LogStream.hpp │ ├── Logger.hpp │ ├── NullLogger.hpp │ ├── ProgressHandler.hpp │ ├── ai_assert.h │ ├── anim.h │ ├── camera.h │ ├── cexport.h │ ├── cfileio.h │ ├── cimport.h │ ├── color4.h │ ├── color4.inl │ ├── config.h │ ├── defs.h │ ├── importerdesc.h │ ├── light.h │ ├── material.h │ ├── material.inl │ ├── matrix3x3.h │ ├── matrix3x3.inl │ ├── matrix4x4.h │ ├── matrix4x4.inl │ ├── mesh.h │ ├── metadata.h │ ├── postprocess.h │ ├── quaternion.h │ ├── quaternion.inl │ ├── scene.h │ ├── texture.h │ ├── types.h │ ├── vector2.h │ ├── vector2.inl │ ├── vector3.h │ ├── vector3.inl │ └── version.h └── glm │ ├── CMakeLists.txt │ ├── common.hpp │ ├── detail │ ├── _features.hpp │ ├── _fixes.hpp │ ├── _noise.hpp │ ├── _swizzle.hpp │ ├── _swizzle_func.hpp │ ├── _vectorize.hpp │ ├── dummy.cpp │ ├── func_common.hpp │ ├── func_common.inl │ ├── func_exponential.hpp │ ├── func_exponential.inl │ ├── func_geometric.hpp │ ├── func_geometric.inl │ ├── func_integer.hpp │ ├── func_integer.inl │ ├── func_matrix.hpp │ ├── func_matrix.inl │ ├── func_noise.hpp │ ├── func_noise.inl │ ├── func_packing.hpp │ ├── func_packing.inl │ ├── func_trigonometric.hpp │ ├── func_trigonometric.inl │ ├── func_vector_relational.hpp │ ├── func_vector_relational.inl │ ├── glm.cpp │ ├── intrinsic_common.hpp │ ├── intrinsic_common.inl │ ├── intrinsic_exponential.hpp │ ├── intrinsic_exponential.inl │ ├── intrinsic_geometric.hpp │ ├── intrinsic_geometric.inl │ ├── intrinsic_integer.hpp │ ├── intrinsic_integer.inl │ ├── intrinsic_matrix.hpp │ ├── intrinsic_matrix.inl │ ├── intrinsic_trigonometric.hpp │ ├── intrinsic_trigonometric.inl │ ├── intrinsic_vector_relational.hpp │ ├── intrinsic_vector_relational.inl │ ├── precision.hpp │ ├── setup.hpp │ ├── type_float.hpp │ ├── type_gentype.hpp │ ├── type_gentype.inl │ ├── type_half.hpp │ ├── type_half.inl │ ├── type_int.hpp │ ├── type_mat.hpp │ ├── type_mat.inl │ ├── type_mat2x2.hpp │ ├── type_mat2x2.inl │ ├── type_mat2x3.hpp │ ├── type_mat2x3.inl │ ├── type_mat2x4.hpp │ ├── type_mat2x4.inl │ ├── type_mat3x2.hpp │ ├── type_mat3x2.inl │ ├── type_mat3x3.hpp │ ├── type_mat3x3.inl │ ├── type_mat3x4.hpp │ ├── type_mat3x4.inl │ ├── type_mat4x2.hpp │ ├── type_mat4x2.inl │ ├── type_mat4x3.hpp │ ├── type_mat4x3.inl │ ├── type_mat4x4.hpp │ ├── type_mat4x4.inl │ ├── type_vec.hpp │ ├── type_vec.inl │ ├── type_vec1.hpp │ ├── type_vec1.inl │ ├── type_vec2.hpp │ ├── type_vec2.inl │ ├── type_vec3.hpp │ ├── type_vec3.inl │ ├── type_vec4.hpp │ ├── type_vec4.inl │ ├── type_vec4_avx.inl │ ├── type_vec4_avx2.inl │ └── type_vec4_sse2.inl │ ├── exponential.hpp │ ├── ext.hpp │ ├── fwd.hpp │ ├── geometric.hpp │ ├── glm.hpp │ ├── gtc │ ├── bitfield.hpp │ ├── bitfield.inl │ ├── constants.hpp │ ├── constants.inl │ ├── epsilon.hpp │ ├── epsilon.inl │ ├── integer.hpp │ ├── integer.inl │ ├── matrix_access.hpp │ ├── matrix_access.inl │ ├── matrix_integer.hpp │ ├── matrix_inverse.hpp │ ├── matrix_inverse.inl │ ├── matrix_transform.hpp │ ├── matrix_transform.inl │ ├── noise.hpp │ ├── noise.inl │ ├── packing.hpp │ ├── packing.inl │ ├── quaternion.hpp │ ├── quaternion.inl │ ├── random.hpp │ ├── random.inl │ ├── reciprocal.hpp │ ├── reciprocal.inl │ ├── round.hpp │ ├── round.inl │ ├── type_precision.hpp │ ├── type_precision.inl │ ├── type_ptr.hpp │ ├── type_ptr.inl │ ├── ulp.hpp │ ├── ulp.inl │ ├── vec1.hpp │ └── vec1.inl │ ├── gtx │ ├── associated_min_max.hpp │ ├── associated_min_max.inl │ ├── bit.hpp │ ├── bit.inl │ ├── closest_point.hpp │ ├── closest_point.inl │ ├── color_space.hpp │ ├── color_space.inl │ ├── color_space_YCoCg.hpp │ ├── color_space_YCoCg.inl │ ├── common.hpp │ ├── common.inl │ ├── compatibility.hpp │ ├── compatibility.inl │ ├── component_wise.hpp │ ├── component_wise.inl │ ├── dual_quaternion.hpp │ ├── dual_quaternion.inl │ ├── euler_angles.hpp │ ├── euler_angles.inl │ ├── extend.hpp │ ├── extend.inl │ ├── extented_min_max.hpp │ ├── extented_min_max.inl │ ├── fast_exponential.hpp │ ├── fast_exponential.inl │ ├── fast_square_root.hpp │ ├── fast_square_root.inl │ ├── fast_trigonometry.hpp │ ├── fast_trigonometry.inl │ ├── gradient_paint.hpp │ ├── gradient_paint.inl │ ├── handed_coordinate_space.hpp │ ├── handed_coordinate_space.inl │ ├── integer.hpp │ ├── integer.inl │ ├── intersect.hpp │ ├── intersect.inl │ ├── io.hpp │ ├── io.inl │ ├── log_base.hpp │ ├── log_base.inl │ ├── matrix_cross_product.hpp │ ├── matrix_cross_product.inl │ ├── matrix_decompose.hpp │ ├── matrix_decompose.inl │ ├── matrix_interpolation.hpp │ ├── matrix_interpolation.inl │ ├── matrix_major_storage.hpp │ ├── matrix_major_storage.inl │ ├── matrix_operation.hpp │ ├── matrix_operation.inl │ ├── matrix_query.hpp │ ├── matrix_query.inl │ ├── matrix_transform_2d.hpp │ ├── matrix_transform_2d.inl │ ├── mixed_product.hpp │ ├── mixed_product.inl │ ├── multiple.hpp │ ├── multiple.inl │ ├── norm.hpp │ ├── norm.inl │ ├── normal.hpp │ ├── normal.inl │ ├── normalize_dot.hpp │ ├── normalize_dot.inl │ ├── number_precision.hpp │ ├── number_precision.inl │ ├── optimum_pow.hpp │ ├── optimum_pow.inl │ ├── orthonormalize.hpp │ ├── orthonormalize.inl │ ├── perpendicular.hpp │ ├── perpendicular.inl │ ├── polar_coordinates.hpp │ ├── polar_coordinates.inl │ ├── projection.hpp │ ├── projection.inl │ ├── quaternion.hpp │ ├── quaternion.inl │ ├── range.hpp │ ├── raw_data.hpp │ ├── raw_data.inl │ ├── rotate_normalized_axis.hpp │ ├── rotate_normalized_axis.inl │ ├── rotate_vector.hpp │ ├── rotate_vector.inl │ ├── scalar_multiplication.hpp │ ├── scalar_relational.hpp │ ├── scalar_relational.inl │ ├── simd_mat4.hpp │ ├── simd_mat4.inl │ ├── simd_quat.hpp │ ├── simd_quat.inl │ ├── simd_vec4.hpp │ ├── simd_vec4.inl │ ├── spline.hpp │ ├── spline.inl │ ├── std_based_type.hpp │ ├── std_based_type.inl │ ├── string_cast.hpp │ ├── string_cast.inl │ ├── transform.hpp │ ├── transform.inl │ ├── transform2.hpp │ ├── transform2.inl │ ├── type_aligned.hpp │ ├── type_aligned.inl │ ├── vector_angle.hpp │ ├── vector_angle.inl │ ├── vector_query.hpp │ ├── vector_query.inl │ ├── wrap.hpp │ └── wrap.inl │ ├── integer.hpp │ ├── mat2x2.hpp │ ├── mat2x3.hpp │ ├── mat2x4.hpp │ ├── mat3x2.hpp │ ├── mat3x3.hpp │ ├── mat3x4.hpp │ ├── mat4x2.hpp │ ├── mat4x3.hpp │ ├── mat4x4.hpp │ ├── matrix.hpp │ ├── packing.hpp │ ├── trigonometric.hpp │ ├── vec2.hpp │ ├── vec3.hpp │ ├── vec4.hpp │ └── vector_relational.hpp ├── Library ├── DevIL.lib ├── ILU.lib ├── assimp.lib ├── glew32.lib └── glfw3dll.lib ├── NodeEditor.VC.db ├── NodeEditor.sln ├── NodeEditor.v12.suo └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | # *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | # *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | # *.lib 28 | 29 | # Executables 30 | #*.exe 31 | *.out 32 | *.app 33 | 34 | # Further Exclusions 35 | .vs/ 36 | DreamEditor/Debug/ 37 | DreamEditor/Release/ 38 | Execution Environment/*.ilk 39 | Execution Environment/*.exe 40 | Execution Environment/*.pdb 41 | Execution Environment/*.ipdb 42 | Execution Environment/*.iobj 43 | Execution Environment/Data/Shaders.program 44 | Execution Environment/Data/default.dream -------------------------------------------------------------------------------- /DreamEditor/AboutPopupScreen.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PopupMenu.h" 3 | #include "Panel.h" 4 | #include "GridLayout.h" 5 | #include "TextLabel.h" 6 | #include "LinkedList.h" 7 | 8 | /*Popup menu is special in that its viewport with change dynamically depending on where it's summoned*/ 9 | class AboutPopupScreen : public PopupMenu 10 | { 11 | public: 12 | AboutPopupScreen(); // Set Up all element: the actual extent of the Popup menu will be bigger than display are, so that we can have a tolerance mouse cursor distance: This is now done by Graphmanager 13 | ~AboutPopupScreen(); // Destroy all Elements 14 | 15 | // Render 16 | void Render(); 17 | 18 | private: 19 | // Interface Elements 20 | // All are informative elements 21 | TextLabel* original; 22 | TextLabel* contact; 23 | 24 | // Background 25 | static unsigned int areaWidth; 26 | static unsigned int areaHeight; 27 | static float screenTexCoords[8]; 28 | static GLuint screenTexImage; 29 | Panel* backgroundImage; 30 | 31 | private: 32 | // Use a linked list to help managing 33 | LinkedList labels; 34 | }; -------------------------------------------------------------------------------- /DreamEditor/AnywhereDoor.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/AnywhereDoor.cpp -------------------------------------------------------------------------------- /DreamEditor/AnywhereDoor.h: -------------------------------------------------------------------------------- 1 | // Might want to Create as a new CanvasNode type, with most of the codes alike MeshNode 2 | // Or might be implemented as a children of MeshNode for its waking/fallasleep functionality 3 | // The only complexity if we need a new MeshProperty Panel for interacting with Anywhere door -------------------------------------------------------------------------------- /DreamEditor/Attribute.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | enum ElementType 3 | { 4 | Integer, 5 | Float, 6 | Boolean, 7 | String 8 | }; 9 | 10 | 11 | /* This class is used by TextSpecParser, in order to properly store an attribute*/ 12 | class Attribute 13 | { 14 | public: 15 | Attribute(unsigned int count, ElementType type, unsigned int stringContentSize); // Initialize to default in case some elements are not assigned 16 | // stringContentSize should be the number of characters in total 17 | ~Attribute(); 18 | 19 | void AssignAttributeName(char* name, unsigned int size); 20 | void AddElement(char* value, unsigned int size); 21 | const char* GetName(); 22 | ElementType GetType(); 23 | unsigned int GetArrayLength(); 24 | char* GetValues(); 25 | 26 | // Debug Use 27 | void Print(); 28 | 29 | private: 30 | int StringToInt(char* string, unsigned int size); 31 | float StringToFloat(char* string, unsigned int size); 32 | bool StringToBool(char* string, unsigned int size); 33 | 34 | private: 35 | // Every thing is a first class array 36 | char* attributeName = 0; 37 | unsigned int arrayLength = 0; // The total number expected to be add in 38 | char* values; 39 | ElementType elementType; 40 | 41 | // bookkeeper 42 | unsigned int elementsSize = 0; // Those already added in, in bytes, not the number of elements 43 | }; 44 | 45 | // I did discover it is a much easier process to TI when conceptualize things along the way, since notes really helps, compared with 46 | // a blank head which cannot keep temporary data long. 47 | // For this reason, faster iteration really matters and one must be able to add, and delete things violently in order to make progress. -------------------------------------------------------------------------------- /DreamEditor/BoxCollision.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "MathElegent.h" 3 | 4 | class MeshCollision 5 | { 6 | public: 7 | MeshCollision(void* collisionMeshData, void* collissionMeshIndex); 8 | ~MeshCollision(); // Deallocate data 9 | bool DetectRayCollision(Vector3f rayOrigin, Vector3f rayDirection); // In world Space 10 | private: 11 | void * collisionMesh; 12 | void * meshIndex; 13 | }; -------------------------------------------------------------------------------- /DreamEditor/CameraNode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "CanvasNode.h" 4 | class Canvas; 5 | 6 | class CameraNode : public CanvasNode 7 | { 8 | public: 9 | // Object Construction 10 | CameraNode(); // Give it a default world location, used for loading blank DreamMap files 11 | // CameraNode(float x, float y, float z, glm::mat4x4* rotation); // Initial location; Notice here we DOES have a fixed z location; Used for default creation, but not as "default as the above one; I found thid could be useful for LandMark cameras 12 | CameraNode(FILE* file); // Used for loading 13 | 14 | // INterface Initialization 15 | virtual void Render(){} 16 | virtual void OnClick(int button, int action, int mods, float rx, float ry){}; // Not used 17 | virtual void OnKey(int key, int mod){}; // Camera Navigation is done by canvas 18 | virtual void OnChar(unsigned short c){}; // NU(Not Used) 19 | virtual void OnMouse(int button, int action, int mods, float rx, float ry){} 20 | // Serialization 21 | virtual void SaveData(FILE* f); 22 | // Dynamic Streaming 23 | virtual void WakeUp(){}; // NU 24 | virtual void FallAsleep(){}; // NU 25 | 26 | // Overwrite Rotate 27 | virtual void Rotate(float rotdx, float rotdy, float rotdz); 28 | virtual void Rotation(float x, float y, float z); 29 | // Used By Canvas 30 | void UpdateMatrix(); // Update View and Project Matrix 31 | 32 | // Utility, used by Canvas 33 | float GetRotationY(){ return Ry; } 34 | 35 | public: 36 | // Configurations 37 | static float CameraHeight; 38 | 39 | public: 40 | // Camera Node will keep a global View Matrix for every other node 41 | glm::mat4x4 view, project, rotation; // Camera Doesn't necessarily need a rotation matrix because there is no gimbol lock in this case 42 | Canvas* canvas; // quick access 43 | }; -------------------------------------------------------------------------------- /DreamEditor/CanvasNodeSortedLinkedList.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class CanvasNode; 4 | class Canvas; 5 | 6 | // A Clean, C Style Linked List Specifically for CanvasNodes; Sorted Using Distance From Far to Close 7 | // Usage: During Each Sorted update, the Canvas will first clear out everything, and add in the things that need to be sorted and rendered 8 | 9 | class CanvasNodeSortedLinkedListNode 10 | { 11 | public: 12 | CanvasNodeSortedLinkedListNode(CanvasNodeSortedLinkedListNode* inPrev, CanvasNode* in, float inIistance); // Data Reference Only, we are not manageing their lifetime 13 | 14 | CanvasNode* data = NULL; 15 | CanvasNodeSortedLinkedListNode* prev = NULL; 16 | CanvasNodeSortedLinkedListNode* next = NULL; 17 | float currentDistance = 0.f; 18 | }; 19 | 20 | class CanvasNodeSortedLinkedList 21 | { 22 | friend class Canvas; 23 | public: 24 | ~CanvasNodeSortedLinkedList(); // Release the space allocated by the listnodes 25 | 26 | void Add(CanvasNode* data, float distance); // Allocate space for the nodes; also put current to the first if its NULL 27 | unsigned int Length(); // Return total length of list 28 | void Clear(); // Clear all existing nodes 29 | 30 | // Selection Related Functions: return the data pointer 31 | // Order Traversal 32 | CanvasNode* First(); // Select First Node, return data in first node 33 | CanvasNode* Next(); // Move selection; Return Next 34 | // Reverse Order Traversal 35 | CanvasNode* Last(); 36 | CanvasNode* Prev(); // Return NULL if we have no more to return 37 | 38 | protected: 39 | unsigned int length = 0; // Current Number of elements 40 | CanvasNodeSortedLinkedListNode* first = NULL; 41 | CanvasNodeSortedLinkedListNode* current = NULL; // Current Selection 42 | CanvasNodeSortedLinkedListNode* last = NULL; // Used in reverse order traversal 43 | }; -------------------------------------------------------------------------------- /DreamEditor/CanvasNodes.h: -------------------------------------------------------------------------------- 1 | // For Easy access 2 | #include "CanvasNode.h" 3 | #include "CameraNode.h" 4 | #include "MeshNode.h" 5 | #include "ImageNode.h" 6 | #include "TextNode.h" -------------------------------------------------------------------------------- /DreamEditor/ClassDiagram.cd: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /DreamEditor/Colors.cpp: -------------------------------------------------------------------------------- 1 | #include "Colors.h" 2 | 3 | // Color Definitions 4 | float Color::DefaultRoundCornerQuadBoarderColor[3] = { 0.407f, 0.407f, 0.407f }; 5 | float Color::DefaultRoundCornerQuadSurfaceColor[3] = { 0.788f, 0.788f, 0.788f }; 6 | float Color::TerrainColor[3] = {0.398, 0.199, 0}; 7 | float Color::DefaultTextColor[3] = { 0.784f, 0.784f, 0.784f }; 8 | float Color::LightGreyTextColor[3] = { 0.754f, 0.754f, 0.754f }; 9 | float Color::DimDarkTextColor[3] = {0.125f , 0.125f, 0.125f}; 10 | float Color::DebugColor_Red[3] = { 1.f, 0.f, 0.f }; 11 | float Color::DebugColor_Yel[3] = { 1.f, 1.f, 0.f }; -------------------------------------------------------------------------------- /DreamEditor/Colors.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Define all cool interface colors 4 | class Color 5 | { 6 | public: 7 | // Default Colors 8 | static float DefaultRoundCornerQuadBoarderColor[3]; 9 | static float DefaultRoundCornerQuadSurfaceColor[3]; 10 | static float TerrainColor[3]; 11 | 12 | // Specific Interface/Interface Elements Colors 13 | static float DefaultTextColor[3]; 14 | static float LightGreyTextColor[3]; 15 | static float DimDarkTextColor[3]; 16 | 17 | // Programming Usage 18 | static float DebugColor_Red[3]; 19 | static float DebugColor_Yel[3]; 20 | }; -------------------------------------------------------------------------------- /DreamEditor/Constants.cpp: -------------------------------------------------------------------------------- 1 | #include "Constants.h" 2 | #include "Locales.h" 3 | 4 | unsigned int InterfaceConstant::DefaultFontSize = 16U; 5 | unsigned int InterfaceConstant::DefaultPixelBorderSize = 1U; 6 | unsigned int InterfaceConstant::DefaultTextFieldPixelWidth = 160U; 7 | unsigned int InterfaceConstant::DefaultTextAreaPixelHeight = 64U; 8 | float InterfaceConstant::PixelToMeterScaleFactor = (float)1 / 256; // Emperical Value; Mathematical should be 1024 9 | 10 | char* ApplicationPath::CanvasFrameImagePath = "Data\\CanvasFrame.png"; // For ".\\Data\\CanvasFrame.png", since GetExecutablePath will not return with a \ symbol 11 | //char* ApplicationPath::MainMenuFrameImagePath = "Data\\MainMenuFrame.png"; 12 | //char* ApplicationPath::PropertyFrameImagePath = "Data\\PropertyFrame.png"; 13 | #if defined(Locale_Eng) 14 | char* ApplicationPath::IconImageFilePath = "Data\\Interface_Eng.png"; 15 | #elif defined(Locale_Chn) 16 | char* ApplicationPath::IconImageFilePath = "Data\\Interface_Chn.png"; 17 | #endif 18 | char* ApplicationPath::PrecompiledProgramFilePath = "Data\\Shaders.program"; 19 | char* ApplicationPath::CharMapPath = "Data\\CharMap.fnt"; // File name cannot be casually changed since char map file name are encoded inside .fnt binary 20 | char* ApplicationPath::DocumentationManualPath = "Documentation"; 21 | 22 | // Application Data: Mesh Related Resource do not need to be in specific directory since they will be searched in Executable and Document Data dir 23 | char* ApplicationPath::TerrainMeshSpecMath = "Terrain.spec"; 24 | char* ApplicationPath::AnywhereDoorMeshSpecMath = "AnywhereDoor.spec"; 25 | 26 | // Textures 27 | char* ApplicationPath::DefaultColorTextureMaskPath = "DefaultColorTextureMask.png"; 28 | char* ApplicationPath::DefaultSpecularTextureMaskPath = "DefaultSpecularTextureMask.png"; 29 | char* ApplicationPath::DefaultEmissiveTextureMaskPath = "DefaultEmissiveTextureMask.png"; 30 | char* ApplicationPath::DefaultNormalTexturePath = "DefaultNormalTexture.png"; 31 | char* ApplicationPath::DefaultEnvTexturePath= "DefaultEnvBase.jpg"; -------------------------------------------------------------------------------- /DreamEditor/Constants.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class InterfaceConstant 4 | { 5 | public: 6 | static unsigned int DefaultFontSize; 7 | static unsigned int DefaultPixelBorderSize; 8 | static unsigned int DefaultTextFieldPixelWidth; 9 | static unsigned int DefaultTextAreaPixelHeight; 10 | static float PixelToMeterScaleFactor; 11 | }; 12 | 13 | class ApplicationPath 14 | { 15 | public: 16 | static char* CanvasFrameImagePath; 17 | //static char* MainMenuFrameImagePath; // Deprecated 18 | //static char* PropertyFrameImagePath; 19 | static char* IconImageFilePath; 20 | static char* PrecompiledProgramFilePath; 21 | static char* CharMapPath; 22 | static char* DocumentationManualPath; 23 | 24 | // Application Data 25 | static char* TerrainMeshSpecMath; 26 | static char* AnywhereDoorMeshSpecMath; 27 | 28 | // Textures 29 | static char* DefaultColorTextureMaskPath; 30 | static char* DefaultSpecularTextureMaskPath; 31 | static char* DefaultEmissiveTextureMaskPath; 32 | static char* DefaultNormalTexturePath; 33 | static char* DefaultEnvTexturePath; 34 | }; 35 | 36 | -------------------------------------------------------------------------------- /DreamEditor/DivisionLine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "InterfaceElement.h" 3 | 4 | /* 5 | // This object might not be so efficient to draw 6 | class DivisionLine : public InterfaceElement 7 | { 8 | 9 | };*/ -------------------------------------------------------------------------------- /DreamEditor/DocumentPropertyPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PropertyPanel.h" 3 | #include "TextLabel.h" 4 | #include "Panel.h" 5 | #include "Button.h" 6 | 7 | class GraphManager; 8 | 9 | /* Property panel is responsible for displaying and editing the properties of: Graph Document itself, and The nodes in Canvas; 10 | - For the nodes in canvas, some properties, e.g. Transformation and Texts, will be directly editable interacting with the canvas and node themselves, 11 | some properties, are only viewable and editable from inside the property panels. Others are viewable and maybe interactble in both property panel and ndoe themselves, 12 | but may have different presentations. 13 | */ 14 | 15 | class DocumentPropertyPanel : public PropertyPanel 16 | { 17 | public: 18 | DocumentPropertyPanel(GraphManager* g); // Initialize Its elements 19 | ~DocumentPropertyPanel(); // Destroy its elements 20 | 21 | // INterface 22 | // Render Request 23 | virtual void Render(); 24 | virtual void OnElementMouseButton(InterfaceElement* element, int button, int action, int mods); // Action handling: Call GraphManager export function 25 | 26 | private: 27 | static float TextureCoords[8]; 28 | 29 | private: 30 | // Interface Elements 31 | TextLabel* labelDocument; // "Document:" 32 | TextLabel* labelCreation; // "Creation Time:" 33 | TextLabel* labelCreationTime; // "2015-08-30" 34 | TextLabel* labelEdit; // "Edit Time" 35 | TextLabel* labelEditTime; // "2015-08-30" 36 | 37 | // If we really need Pan functionality, then we need some variables like interfaceElementsWidth, and interfaceElmentsHeight, which might differ from viewport width and height so that we could pan things. 38 | // However, I highly doubt whether it is necessary to do that. Since we might not even need the ability to resize property panels 39 | 40 | Button* exportButton; 41 | 42 | // Important Reference Object 43 | GraphManager* graph; 44 | }; -------------------------------------------------------------------------------- /DreamEditor/DreamEditor.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/DreamEditor.aps -------------------------------------------------------------------------------- /DreamEditor/DreamEditor.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/DreamEditor.rc -------------------------------------------------------------------------------- /DreamEditor/DreamEditor.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | WindowsLocalDebugger 7 | $(SolutionDir)Execution Environment 8 | 9 | 10 | 11 | 12 | WindowsLocalDebugger 13 | $(SolutionDir)Execution Environment 14 | 15 | -------------------------------------------------------------------------------- /DreamEditor/DropDownButton.h: -------------------------------------------------------------------------------- 1 | #include "Button.h" 2 | 3 | // __Pending 4 | /* 5 | 6 | // This is an extension of BUtton into a drop down menu 7 | // We do not have side-pop style buttons in our application, and not intent to provide one 8 | class DropDownButton : public Button 9 | { 10 | public: 11 | DropDownButton(DropDownPopupMenu* menu); 12 | ~DropDownButton(); 13 | 14 | 15 | private: 16 | DropDownPopupMenu* dropDownMenu; 17 | Renderable2DImageQuad* secondaryIcon = NULL; // Useful for landmark drop down menu on the Canvas 18 | Renderable2DImageRect* background = NULL; // Make a modern frame for Drop Down button 19 | }; 20 | */ -------------------------------------------------------------------------------- /DreamEditor/FileMenuPopupMenu.cpp: -------------------------------------------------------------------------------- 1 | #include "FileMenuPopupMenu.h" 2 | #include "GraphManager.h" 3 | #include "Colors.h" 4 | 5 | FileMenuPopupMenu::FileMenuPopupMenu(GraphManager* g) 6 | :graph(g) 7 | { 8 | // Create Interface Elements 9 | save = new Button((unsigned short*)Interface_PopupMenu_Save, this, false, 0, ColorScheme::PopupButton); 10 | exit = new Button((unsigned short*)Interface_PopupMenu_Exit, this, false, 0, ColorScheme::PopupButton); 11 | 12 | // Use a layout 13 | AutoExpandGridLayout layout(LayoutBeginPositionX, LayoutBeginPositionY, LayoutRowPadding, LayoutColumnPadding); 14 | layout.AddToNewRow(save); 15 | layout.AddToNewRow(exit); 16 | layout.Dispatch(); 17 | 18 | // Set up a background shape 19 | backgroundRect = new StaticShape(this, ShapeType::Shape_BorderedSquare, layout.layoutWidth, layout.layoutHeight); // Cool: TYPE< WIDTH: HEIGHT 20 | 21 | // Offset Z Height abit to avoid being overlaped by other interfaces. 22 | backgroundRect->OffsetPosition(0, 0, 0.2); // This this value shouldn't beyond ORTHOCAMERADISTANCE 23 | save->OffsetPosition(0, 0, 0.4); 24 | exit->OffsetPosition(0, 0, 0.4); 25 | 26 | // Set up correct viewport size 27 | viewportW = layout.layoutWidth + LayoutBeginPositionX; 28 | viewportH = layout.layoutHeight - LayoutBeginPositionY; 29 | 30 | // Setup Interaction Callbacks 31 | GraphManager::RegisterPopupMenuElements(save); 32 | GraphManager::RegisterPopupMenuElements(exit); 33 | 34 | // Update Projection and View 35 | UpdateProjection(); 36 | } 37 | 38 | FileMenuPopupMenu::~FileMenuPopupMenu() 39 | { 40 | delete backgroundRect; 41 | delete save; 42 | delete exit; 43 | } 44 | 45 | // Interface Implementation 46 | // Render 47 | void FileMenuPopupMenu::Render() 48 | { 49 | backgroundRect->Render(); 50 | save->Render(); 51 | exit->Render(); 52 | } 53 | 54 | void FileMenuPopupMenu::OnElementMouseButton(InterfaceElement* element, int button, int action, int mods) 55 | { 56 | if (element == save) 57 | { 58 | graph->Save(); 59 | } 60 | 61 | if (element == exit) 62 | { 63 | graph->Close(); 64 | } 65 | } -------------------------------------------------------------------------------- /DreamEditor/FileMenuPopupMenu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PopupMenu.h" 3 | #include "Button.h" 4 | #include "StaticShape.h" 5 | #include "GridLayout.h" 6 | 7 | // Avoid Circular Dependancy 8 | class GraphManager; 9 | 10 | /*Popup menu is special in that its viewport with change dynamically depending on where it's summoned*/ 11 | class FileMenuPopupMenu : public PopupMenu 12 | { 13 | public: 14 | FileMenuPopupMenu(GraphManager* g); // Set Up all elements 15 | ~FileMenuPopupMenu(); // Destroy all Elements 16 | 17 | // Interface 18 | virtual void Render(); 19 | virtual void OnElementMouseButton(InterfaceElement* element, int button, int action, int mods); 20 | 21 | private: 22 | // Interface Elements 23 | Button* save; 24 | // Button* exportDocument; // I assure myself will never need this 25 | Button* exit; 26 | StaticShape* backgroundRect; 27 | 28 | // Important Reference Functions 29 | GraphManager* graph; 30 | }; -------------------------------------------------------------------------------- /DreamEditor/FontChar.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class FontChar 3 | { 4 | public: 5 | unsigned int id; 6 | unsigned short x; 7 | unsigned short y; 8 | unsigned short width; 9 | unsigned short height; 10 | short xoffset; 11 | short yoffset; 12 | unsigned short xadvance; 13 | unsigned char page; 14 | unsigned char channel; 15 | }; -------------------------------------------------------------------------------- /DreamEditor/FontCommon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class FontCommon 3 | { 4 | public: 5 | unsigned short lineHeight; 6 | unsigned short base; 7 | unsigned short scaleW; 8 | unsigned short scaleH; 9 | unsigned short pages; 10 | unsigned char bitField; 11 | unsigned char alphaChannel; 12 | unsigned char redChannel; 13 | unsigned char greenChannel; 14 | unsigned char blueChannel; 15 | }; -------------------------------------------------------------------------------- /DreamEditor/FontInfo.cpp: -------------------------------------------------------------------------------- 1 | #include "FontInfo.h" 2 | 3 | FontInfo::FontInfo(int blockSize) 4 | { 5 | fontName = (char*)malloc(blockSize - 14); 6 | } 7 | 8 | FontInfo::~FontInfo() 9 | { 10 | free(fontName); 11 | } -------------------------------------------------------------------------------- /DreamEditor/FontInfo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | class FontInfo 4 | { 5 | public: 6 | FontInfo(int blockSize); // Use blockSize to allocate char* 7 | ~FontInfo(); // Free the memory allocated for char* 8 | public: 9 | short fontSize; 10 | char bitField; 11 | unsigned char charSet; 12 | unsigned short stretchH; 13 | unsigned char aa; 14 | unsigned char paddingUp; 15 | unsigned char paddingRight; 16 | unsigned char paddingDown; 17 | unsigned char paddingLeft; 18 | unsigned char spacingHoriz; 19 | unsigned char spaceVert; 20 | unsigned char outline; 21 | char* fontName; // Terminate will null 22 | }; -------------------------------------------------------------------------------- /DreamEditor/FontManager.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/FontManager.cpp -------------------------------------------------------------------------------- /DreamEditor/FontManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "FontInfo.h" 4 | #include "FontChar.h" 5 | #include "FontCommon.h" 6 | 7 | /*Font Manger is the central management class for loading and keeping all information about the font 8 | we support and related font atlas*/ 9 | class FontManager 10 | { 11 | public: 12 | // Load and initialize font information 13 | FontManager(); 14 | ~FontManager(); // Free allocated memory 15 | 16 | char* GetPageFileName(int pageIndex); // Not used by no one actually 17 | FontChar* GetChar(unsigned int charCode); 18 | GLuint GetCharMap(unsigned int index); 19 | 20 | void GenerateCharMaps(); 21 | 22 | public: 23 | // Public access type for easier access 24 | FontInfo* info; 25 | FontCommon* common; 26 | FontChar* chars; // Array of chars 27 | 28 | private: 29 | // Not used 30 | int fileIdentifier; 31 | char version; 32 | 33 | // Pages 34 | int pageNameLength = 0; 35 | char* pageNames = 0; // An array of pageNames, used as a void* 36 | 37 | // Characters 38 | int numCharacters = 0; 39 | static FontChar* charCodes[65536]; // ID range might not be complete so this way we do not need to guess the location of FontChar 40 | GLuint* textures; // Array of textures 41 | }; -------------------------------------------------------------------------------- /DreamEditor/GlobalMacros.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | // Application Meta Information 3 | #define FORMAT_IDENTIFIER "DNE" 4 | #define FORMAT_VERSION 1 5 | #define GENERAL_BLOCK_TAG 1 // Use a macro to make it more obvious in the code 6 | #define IMAGE_DATA_BLOCK_TAG 2 7 | #define MESH_DATA_BLOCK_TAG 3 8 | #define CAMERA_NODE_BLOCK_TAG 4 9 | #define IMAGE_NODE_BLOCK_TAG 5 10 | #define TEXT_NODE_BLOCK_TAG 6 11 | #define MESH_NODE_BLOCK_TAG 7 12 | #define APPLICATION_LOG_FILE "log.txt" 13 | #ifdef _DEBUG // Visual Studio Debug Switch 14 | #define OPENGL_DEBUG 15 | #endif 16 | 17 | // Global Debug Switch, since we do not know and do not want to depend on VisualStudio specific Solution Configuration Macros _DEBUG and _RELEASE 18 | // Notice this switch is indepent on Visual Studio Configuration Mode since we might want to include some application specific debug outputs in even the release version Solution Configuration 19 | // #define APPLICATION_DEBUG 20 | // For final release, just comment the above line 21 | /*Application Debug Features: 22 | 1. Console is displayed 23 | */ 24 | -------------------------------------------------------------------------------- /DreamEditor/Hash.cpp: -------------------------------------------------------------------------------- 1 | #include "Hash.h" 2 | 3 | unsigned int 4 | Hash::HashID(const unsigned char* string, unsigned int hashRange) 5 | { 6 | unsigned long hash = 5381; 7 | int c; 8 | 9 | while (c = *string++) 10 | hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ 11 | 12 | return hash % hashRange; 13 | } 14 | -------------------------------------------------------------------------------- /DreamEditor/Hash.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | // Hash only, no table storage 3 | // Internally treat everything as ANSI 4 | class Hash 5 | { 6 | public: 7 | static unsigned int HashID(const unsigned char* string, unsigned int hashRange); 8 | 9 | private: 10 | }; 11 | 12 | // References: The Purpose Is To Write a Clean Function Rather Than Use A Library Which Hides Everything 13 | // And We Care Only Practical Usage, Not Academical Value 14 | /* General Introduction 15 | https://en.wikipedia.org/wiki/Cyclic_redundancy_check 16 | https://en.wikipedia.org/wiki/Hash_table 17 | https://en.wikipedia.org/wiki/Birthday_problem 18 | https://en.wikipedia.org/wiki/Birthday_attack 19 | 20 | Technical Introduction and Implementation 21 | https://en.wikipedia.org/wiki/Computation_of_cyclic_redundancy_checks 22 | http://www.ti.com/lit/an/spra530/spra530.pdf 23 | 24 | Implementation Examples 26 | http://www.cse.yorku.ca/~oz/hash.html 27 | 28 | Discussions and Implementations 29 | http://stackoverflow.com/questions/8317508/hash-function-for-a-string 30 | http://stackoverflow.com/questions/6072174/how-large-should-a-hashtable-be-initialized-related-to-the-entries-count 31 | http://stackoverflow.com/questions/628790/have-a-good-hash-function-for-a-c-hash-table 32 | 33 | - People are saying that CRC32 works best, but since it is too troublesome to find some practical reference, we will stick with djb2 for now 34 | */ -------------------------------------------------------------------------------- /DreamEditor/HelpMenuPopupMenu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PopupMenu.h" 3 | #include "StaticShape.h" 4 | #include "ShortcutsPopupScreen.h" 5 | #include "AboutPopupScreen.h" 6 | #include "Button.h" 7 | #include "GridLayout.h" 8 | class GraphManager; 9 | 10 | /*Popup menu is special in that its viewport with change dynamically depending on where it's summoned*/ 11 | class HelpMenuPopupMenu : public PopupMenu 12 | { 13 | public: 14 | HelpMenuPopupMenu(GraphManager* g); // Set Up all element 15 | ~HelpMenuPopupMenu(); // Destroy all Elements 16 | 17 | // Render 18 | virtual void Render(); 19 | virtual void OnElementMouseButton(InterfaceElement* element, int button, int action, int mods); 20 | 21 | private: 22 | // Interface Elements 23 | Button* shortcuts; 24 | Button* manual; 25 | Button* about; 26 | StaticShape* backgroundRect; 27 | 28 | // Important Reference Objects 29 | GraphManager* graph; 30 | }; -------------------------------------------------------------------------------- /DreamEditor/ImageNodePropertyPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PropertyPanel.h" 3 | #include "Button.h" 4 | #include "TextLabel.h" 5 | #include "TextArea.h" 6 | #include "Panel.h" 7 | 8 | // Avoid Circular Dependancy 9 | class ImageNode; 10 | 11 | class ImageNodePropertyPanel : public PropertyPanel 12 | { 13 | public: 14 | ImageNodePropertyPanel(); // Initialize Interface Elements 15 | ~ImageNodePropertyPanel(); 16 | 17 | // Interface 18 | // Render Request 19 | virtual void Render(); 20 | 21 | // SPecific Image Node Function 22 | virtual void OnElementMouseButton(InterfaceElement* element, int button, int action, int mods); // Action handling: Call ImageNode Export 23 | 24 | // Node Association 25 | // void AssociateNode(ImageNode* in); 26 | void Show(ImageNode* node); 27 | void UpdateTransformInfo(); // When an imagenode has been moved it will call this function 28 | 29 | private: 30 | static float TextureCoords[8]; 31 | 32 | private: 33 | // Interface Elmeents 34 | TextLabel* labelImage; // "Image:" 35 | TextLabel* labelCreation; // "Creation Time:" 36 | TextLabel* labelCreationTime; // "2015-08-30" 37 | TextLabel* labelEdit; // "Edit Time" 38 | TextLabel* labelEditTime; // "2015-08-30" 39 | 40 | Button* exportButton; 41 | 42 | //TextLabel* labelComment; 43 | //TextArea* textComment; 44 | 45 | // Important Referenced Object 46 | ImageNode* currentAssociation; 47 | }; -------------------------------------------------------------------------------- /DreamEditor/ImageResource.cpp: -------------------------------------------------------------------------------- 1 | #include "ImageResource.h" 2 | 3 | ImageResource::~ImageResource() 4 | { 5 | ImageData* data = (ImageData*)images.First(); 6 | 7 | while (data != NULL) 8 | { 9 | delete data; 10 | data = (ImageData*)images.Next(); 11 | } 12 | } 13 | 14 | void ImageResource::Save(FILE* file) 15 | { 16 | ImageData* data = (ImageData*)images.First(); 17 | 18 | unsigned int imageSlot = 0; 19 | while (data != NULL) 20 | { 21 | if (data->Save(file, imageSlot)) 22 | { 23 | imageSlot++; 24 | } 25 | data = (ImageData*)images.Next(); 26 | } 27 | } 28 | 29 | ImageData* ImageResource::GetImageData(unsigned int index) 30 | { 31 | ImageData* image = (ImageData*)(images.Select(index)); 32 | image->RegisterUsage(); 33 | return image; 34 | } 35 | 36 | void ImageResource::AddImage(ImageData* image) 37 | { 38 | images.Add(image); 39 | } 40 | 41 | //unsigned int ImageResource::AddImage(char* filename) 42 | //{ 43 | // images.Add(new ImageData(filename)); 44 | // return images.Length(); // Why Not -1? 45 | //} -------------------------------------------------------------------------------- /DreamEditor/ImageResource.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ImageData.h" 3 | #include "LinkedList.h" 4 | 5 | // Keep track of all the imageData in the map so we know which to save when a file is saved 6 | class ImageResource 7 | { 8 | public: 9 | ~ImageResource(); // Delete all ImageData 10 | void Save(FILE* file); // Find those whose reference count isn't 0, Reorder and Save 11 | 12 | ImageData* GetImageData(unsigned int index); 13 | 14 | void AddImage(ImageData* image); // ImageLoading performed by the Node, or MapLoader when loading them; Require Abs filepath 15 | // unsigned int AddImage(char* filename); // Used in run-time, return image index 16 | // Notice that there could be the case when user drag and drop the same file instead of using copy imageNode functions, in that case, it will expectedly cause the the image file to be stored multiple 17 | // times since our imageData object doesn't differentiate themselves. 18 | // This is by design acceptable, since we are not storing original imageNames with our imageData, even if we avoid loading the same file in run-time, we cannot make sure the loaded file doesn't collide wit 19 | // existing saved imageNodes 20 | 21 | private: 22 | LinkedList images; 23 | }; -------------------------------------------------------------------------------- /DreamEditor/Interface.cpp: -------------------------------------------------------------------------------- 1 | #include "Interface.h" 2 | #include "GraphManager.h" 3 | 4 | #define ORTHOCAMERADISTANCE 1 5 | 6 | bool Interface::CheckFallIn(double x, double y) 7 | { 8 | if (x >= 0 && x <= viewportW && y <= 0 && y >= -(int)viewportH) 9 | { 10 | return true; 11 | } 12 | return false; 13 | } 14 | 15 | void Interface::UpdateProjection() 16 | { 17 | view2D = glm::inverse(glm::translate(glm::mat4(1), glm::vec3(0, 0, ORTHOCAMERADISTANCE))); 18 | project2D = glm::ortho(0.f, (float)viewportW, -(float)viewportH, 0.f, 0.f, 100.f); // Notice that we need to use otherwise it can cause problem when passing integers as parameters: the output will be nothing 19 | } 20 | 21 | glm::mat4x4& Interface::GetViewMatrix() 22 | { 23 | return view2D; 24 | } 25 | 26 | glm::mat4x4& Interface::GetProjectMatrix() 27 | { 28 | return project2D; 29 | } 30 | 31 | void* Interface::operator new (size_t size) 32 | { 33 | // __Debug__: Might not be portable 34 | return _aligned_malloc(size, 16); 35 | } 36 | 37 | void Interface::operator delete (void *p) 38 | { 39 | _aligned_free(p); 40 | } -------------------------------------------------------------------------------- /DreamEditor/Interface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "InterfaceElement.h" 8 | #include "Locales.h" // I would like to use "Locale.h" but VS already got a header with that name 9 | 10 | // VERY IMPORTANT: EACH VIEWPORT SPECIFY A NEW OPENGL SPACE FOR ITS INTERFACE ELEMENTS TO FOLLOW. 11 | // Every coordinate input should be in Viewport relative OpenGL Second Quad. 12 | 13 | class Interface 14 | { 15 | public: 16 | // Render Request 17 | virtual void Render() = 0; 18 | virtual void OnElementMouseButton(InterfaceElement* element, int button, int action, int mods){}; 19 | virtual void OnResizeFramebuffer(int width, int height) = 0; // Children Override to implement their own functionalities 20 | 21 | // Utility 22 | bool CheckFallIn(double x, double y); 23 | void UpdateProjection(); 24 | 25 | // Can be overriden by Canvas to provide 3D datas 26 | virtual glm::mat4x4& GetViewMatrix(); 27 | virtual glm::mat4x4& GetProjectMatrix(); 28 | 29 | // alignment 30 | static void* operator new (size_t size); 31 | static void operator delete (void *p); 32 | 33 | public: 34 | bool bHidden = false; 35 | 36 | public: // Public for Easy Access 37 | // Interface Only draw relative to its viewport area 38 | unsigned int viewportX, viewportY, viewportW, viewportH; // Notice viewport is specified in first quadrant, and begin at Lower-Left corner of window 39 | 40 | protected: 41 | glm::mat4x4 project2D; 42 | glm::mat4x4 view2D; // Define Fundamental View Distance for 2D Interface 43 | }; -------------------------------------------------------------------------------- /DreamEditor/InterfaceElement.cpp: -------------------------------------------------------------------------------- 1 | #include "InterfaceElement.h" 2 | bool InterfaceElement::CheckFallIn(double px, double py) // Abs OpenGL Second Quadrant Relative to interface viewport 3 | { 4 | // Debug 5 | //printf("[Debug]IE %i->%i, %i->%i Check Fall in: %f, %f\n", x, width + x, y, y-height, px, py); 6 | 7 | if (px >= x && px <= x + width && py <= y && py >= y - (int)height) // Notice width and height are positive numbers 8 | { 9 | return true; 10 | } 11 | 12 | return false; 13 | } 14 | 15 | unsigned int InterfaceElement::GetDimensionX() 16 | { 17 | return width; 18 | } 19 | 20 | unsigned int InterfaceElement::GetDimensionY() 21 | { 22 | return height; 23 | } 24 | 25 | int InterfaceElement::GetLocationX() 26 | { 27 | return x; 28 | } 29 | 30 | int InterfaceElement::GetLocationY() 31 | { 32 | return y; 33 | } -------------------------------------------------------------------------------- /DreamEditor/Interfaces.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "MainMenu.h" 3 | #include "Canvas.h" 4 | #include "DocumentPropertyPanel.h" 5 | #include "ImageNodePropertyPanel.h" 6 | #include "MeshNodePropertyPanel.h" 7 | #include "TextNodePropertyPanel.h" 8 | #include "FileMenuPopupMenu.h" 9 | #include "HelpMenuPopupMenu.h" 10 | #include "MeshCreationPopupMenu.h" 11 | #include "WindowMenuPopupMenu.h" 12 | #include "AboutPopupScreen.h" 13 | #include "ShortcutsPopupScreen.h" -------------------------------------------------------------------------------- /DreamEditor/LineLayout.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interface.h" 3 | #include "InterfaceElement.h" 4 | // DEPRECATED-------------------------------------------------- 5 | /* A linear layout is responsible for transforming zero-positioned interface elements to the places they need to be*/ 6 | // Interface elements are created within Interface obejct but maintained inside layout object, thus destoryed when the layout is destroyed 7 | // Linelayout doens't received events, but contain MovePosition() for positioning 8 | class LineLayout 9 | { 10 | public: 11 | LineLayout(int inX, int inY, Interface* parent); 12 | ~LineLayout(); // Responsible for deleting interface elements 13 | void AddElement(InterfaceElement* element); // Beside add to Layout list, also responsible for updating element posiions 14 | 15 | void MovePosition(int dx, int dy); // A line layout might be panned, it will be responsible for updating all containted interface elements 16 | 17 | // Get Elements Routines 18 | void GetElement(int index); 19 | void GetElementByPosition(double xpos, double ypos); // Abs OGL Sec Quad Coord 20 | private: 21 | // Also managed/contained within an interface area, its coordinates are specified in opeNGL Second Quadrant Absolute 22 | int x, y; 23 | int heightSpec; // A layout with have a Specified height, but its width is calculated based on content(elements within) 24 | // Height is used such that, giving the height of an element, it will be positioned in the center; 25 | // THe height of the elements are not controlled, but specified at creation by Interface object itself 26 | private: 27 | int widthOccupy; // Make it a member variable here only for bookkeeping 28 | int numElements; 29 | InterfaceElement* elements; 30 | Interface* parentInterface; // Useful for extracting Viewport dimension data 31 | }; -------------------------------------------------------------------------------- /DreamEditor/LinkedList.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | // A Clean, C Style Linked List 5 | 6 | class ListNode 7 | { 8 | public: 9 | ListNode(void* in); // Keep Data reference 10 | // The linklist, hense the listNode, doesn't and never destroy the actual data 11 | 12 | void* data = NULL; 13 | ListNode* next = NULL; 14 | }; 15 | 16 | class LinkedList 17 | { 18 | public: 19 | ~LinkedList(); // Release the space allocated by the listnodes 20 | 21 | void Add(void* data); // Allocate space for the nodes; also put current to the first if its NULL 22 | unsigned int Length(); // Return total length of list 23 | void Clear(); // Clear all existing nodes 24 | // unsigned int Index(); // Count the index of current pointer 25 | 26 | // Selection Related Functions: return the data pointer 27 | void* First(); // Select First Node, return data in first node 28 | void* Last();// Select Last Node, return data in last node 29 | void* Next(); // Move selection; Return Next 30 | void* Select(unsigned int index); // Directly select a node using index, also return the node being selected 31 | // The return value can be NULL, if the List doesn't have any element yet 32 | void* Delete(unsigned int index); // Delete the node, return the data the node was holding, notice we do not delete the data, just the node 33 | // If index doesn't exist, return NULL 34 | 35 | // Utilities 36 | // void DeleteDatas(); // User can delete data themselves, or call this function to save typing time 37 | // Not safe to delete a void pointer since destructor won't be called 38 | protected: 39 | unsigned int length = 0; // Current Number of elements 40 | ListNode* first = NULL; 41 | ListNode* current = NULL; // Current Selection 42 | ListNode* last = NULL; 43 | }; 44 | 45 | // Usage Tip: The user of the linked list first create a list, most of the time statically. Then whenever he needs to add an element to it, 46 | // he first allocate space manually for the element, then call list.Add(), and so on. 47 | // When he is ready to dispose the list, he shall call list.Next() untill he gets NULL, and release all the data there manually. 48 | // Finally when the list itself is deleted, the list only release the space occupied by the list object, since all data now are already released by the user. -------------------------------------------------------------------------------- /DreamEditor/Locales.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/Locales.h -------------------------------------------------------------------------------- /DreamEditor/MapEditor.h: -------------------------------------------------------------------------------- 1 | //#pragma once 2 | //#include "Interface.h" 3 | //#include "Canvas.h" 4 | //#include "MaterialTextures.h" 5 | //#include "WorldMap.h" 6 | // 7 | //class MapEditor : public Interface 8 | //{ 9 | //public: 10 | // // Constructor 11 | // MapEditor(); 12 | // ~MapEditor(); 13 | // 14 | // // Interface Implementation 15 | // virtual void Render(); 16 | // virtual void OnElementMouseButton(InterfaceElement* element, int button, int action, int mods); 17 | // virtual void OnResizeFramebuffer(int width, int height); 18 | // 19 | //private: 20 | // // Configurations 21 | // static const unsigned int MapEditorWidth; 22 | // static const unsigned int MapEditorHeight; 23 | // static const unsigned int HorizontalMargin; 24 | // static const unsigned int VerticalMargin; 25 | // static const float MapEditorTexCoord[8]; 26 | // 27 | //private: 28 | // // Interface Elements 29 | // WorldMap* map = NULL; 30 | // Button* exportMap = NULL; 31 | // Panel* background = NULL; 32 | // 33 | //private: 34 | // // Important Reference 35 | // Canvas* canvas = NULL; 36 | // 37 | // // BookKeeping 38 | // int currentLocationX; // Implementation of movable MapEditor window 39 | // int currentLocationY; // In viewport space, i.e. relative to lower-left corner of window 40 | //}; -------------------------------------------------------------------------------- /DreamEditor/MaterialTextures.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | struct TextureSlot // Used for Quadratic Probing 6 | { 7 | // Data Info: Initialized to be 0 8 | GLuint textureObject = 0; // Store GLuint texture objects 9 | unsigned int referenceCount = 0; // 0 indicate not used yet, i.e. an empty slot 10 | 11 | // MetaInfo 12 | char* originalPath = NULL; // Unique Copy of orignal file path 13 | 14 | // Hash Table Flags 15 | }; 16 | 17 | // MaterialTextures provide a way to manage all textures used by materials, since we are using Texts to refer to specific materials 18 | // The Class is used for easier and efficient memory access and loading and deloading textures used by different materials 19 | // The Textures Here include those for meshes and application Icons 20 | // ImageNodes have their own management system 21 | class MaterialTextures 22 | { 23 | public: 24 | static void DeleteTextureResources(); // Destroty OpenGL Texture Objects in the array members if not used 25 | // Location Should be relative to cwd or abs // The user is reponsible for converting all the path to abs before calling this function(CWD or Program Dir or other external ones) 26 | static GLuint GetTexture(const char* texturePath); // Always return the correct value for the texture 27 | // Input can be relative or abs path, but should be a functioning path, i.e. we are not responsible for dereferencing the path 28 | // ALL USERS OF THIS FUNCTION MUSTEN'T RELEASE THE OPENGL TEXTURE OBJECT 29 | static void ReturnTexture(const char* texturePath); 30 | 31 | private: 32 | // Index is hashed SID 33 | static TextureSlot textureSlots[1000]; // For a 4Gb GPU, we can only store 256 textures, thus 1000 would be a 1:4 density for our hash table 34 | }; 35 | 36 | // Logic: The Object is static and called upon DeleteTextureResources() when the application ends // -------------------------------------------------------------------------------- /DreamEditor/MathElegent.cpp: -------------------------------------------------------------------------------- 1 | #include "MathElegent.h" 2 | 3 | // Minimum-Sized Small Math utilities; Named so to avoid collision with standard libraris 4 | int Maxi(int a, int b) 5 | { 6 | return a > b ? a : b; 7 | } 8 | int Mini(int a, int b) 9 | { 10 | return a < b ? a : b; 11 | } 12 | 13 | float Maxf(float a, float b) 14 | { 15 | return a > b ? a : b; 16 | } 17 | float Minf(float a, float b) 18 | { 19 | return a < b ? a : b; 20 | } 21 | 22 | // Return the length of string, dosn't include NULL character 23 | // The complete storage space for a string should be GetStringLength(string)*2 + 2 24 | unsigned int GetStringLength(unsigned short* string) 25 | { 26 | if (string) 27 | { 28 | unsigned int length = 0; 29 | 30 | // Read a unsigned short character untill we meet NULL 31 | unsigned short* oneChar = string; 32 | while (*oneChar != 0) // Equivalent as (oneChar != 0) 33 | { 34 | oneChar++; 35 | length++; 36 | } 37 | 38 | return length; 39 | } 40 | else 41 | { 42 | return 0; 43 | } 44 | 45 | } 46 | 47 | 48 | //bool CompareStrings(unsigned short* string1, unsigned short* string2) 49 | //{ 50 | // if (string1 == string2) 51 | // { 52 | // return true; 53 | // } 54 | // 55 | // unsigned int stringLength = GetStringLength(string1); 56 | // if (stringLength != GetStringLength(string2)) 57 | // { 58 | // return false; 59 | // } 60 | // 61 | // for (unsigned int i = 0; i < stringLength; i++) 62 | // { 63 | // if (string1[i] != string2[i]) 64 | // { 65 | // return false; 66 | // } 67 | // } 68 | //} -------------------------------------------------------------------------------- /DreamEditor/MathElegent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Minimum-Sized Small Math utilities; Named so to avoid collision with standard libraris 4 | int Maxi(int a, int b); 5 | 6 | int Mini(int a, int b); 7 | 8 | float Maxf(float a, float b); 9 | 10 | float Minf(float a, float b); 11 | 12 | // Aloso provide some useful data structures 13 | struct Vector3f 14 | { 15 | float x; 16 | float y; 17 | float z; 18 | }; 19 | 20 | // Return the length of string, dosn't include NULL character 21 | // The complete storage space for a string should be GetStringLength(string)*2 + 2 22 | unsigned int GetStringLength(unsigned short* string); 23 | 24 | // bool CompareStrings(unsigned short* string1, unsigned short* string2); // Compare U16 Strings, equal return true, assume NULL terminated -------------------------------------------------------------------------------- /DreamEditor/MeshCreationPopupMenu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "LinkedList.h" 3 | #include "PopupMenu.h" 4 | #include "Canvas.h" 5 | #include "MeshResource.h" 6 | #include "TextLabel.h" 7 | #include "Button.h" 8 | #include "StaticShape.h" 9 | #include "DivisionLine.h" 10 | class GraphManager; 11 | 12 | class MeshCreationPopupMenu : public PopupMenu 13 | { 14 | public: 15 | MeshCreationPopupMenu(GraphManager* g); // Set Up all Elements 16 | ~MeshCreationPopupMenu(); // Destroy all Elements 17 | 18 | // Render 19 | virtual void Render(); 20 | virtual void OnElementMouseButton(InterfaceElement* element, int button, int action, int mods); 21 | 22 | private: 23 | // Interface Elements 24 | TextLabel* addMeshLabel; // "Add MeshNode" 25 | // __Pending DoubleDivisionLine* divisionLine; // Make things more organized looking 26 | Button* rotatingCube; 27 | Button* anywhereDoor; // To be differentiated from "dimension door", which leads to a pocket dimension, not another part of the world 28 | StaticShape* backgroundRect; 29 | 30 | private: 31 | // Use a linked list to help managing 32 | LinkedList buttons; 33 | 34 | // Important Referenced Object 35 | GraphManager* graph; 36 | }; -------------------------------------------------------------------------------- /DreamEditor/MeshNodePropertyPanel.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/MeshNodePropertyPanel.cpp -------------------------------------------------------------------------------- /DreamEditor/MeshNodePropertyPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PropertyPanel.h" 3 | #include "TextLabel.h" 4 | #include "TextArea.h" 5 | #include "Panel.h" 6 | 7 | class MeshNode; 8 | 9 | class MeshNodePropertyPanel : public PropertyPanel 10 | { 11 | public: 12 | MeshNodePropertyPanel(); // Initialize Interface Elements 13 | ~MeshNodePropertyPanel(); 14 | 15 | // Interface 16 | // Render Request 17 | virtual void Render(); 18 | 19 | // Node Association 20 | // void AssociateNode(MeshNode* in); 21 | void Show(MeshNode* node); 22 | void UpdateTransformInfo(); // When an meshNode has been moved it will call this function 23 | 24 | private: 25 | static float TextureCoords[8]; 26 | 27 | private: 28 | // Interface Elmeents 29 | TextLabel* labelMesh; // "MeshNode:" 30 | TextLabel* labelCreation; // "Creation Time:" 31 | TextLabel* labelCreationTime; // "2015-08-30" 32 | TextLabel* labelEdit; // "Edit Time" 33 | TextLabel* labelEditTime; // "2015-08-30" 34 | 35 | TextLabel* labelMeshName; // "Mesh Name:" 36 | TextLabel* labelMeshNameValue; // "A lovely beautiful box" 37 | 38 | TextLabel* labelComment; // "Commen:" 39 | // TextField* textComment; 40 | TextArea* textComment; 41 | 42 | // Important Referenced Object 43 | MeshNode* currentAssociation; 44 | }; -------------------------------------------------------------------------------- /DreamEditor/MeshResource.cpp: -------------------------------------------------------------------------------- 1 | #include "MeshResource.h" 2 | #include "GlobalMacros.h" 3 | 4 | MeshResource::~MeshResource() 5 | { 6 | MeshSpec* mesh = (MeshSpec*)meshes.First(); 7 | while (mesh) 8 | { 9 | delete mesh; 10 | mesh = (MeshSpec*)meshes.Next(); 11 | } 12 | } 13 | 14 | void MeshResource::AddMesh(MeshSpec* mesh) 15 | { 16 | meshes.Add(mesh); 17 | } 18 | 19 | void MeshResource::Save(FILE* file) 20 | { 21 | MeshSpec* mesh = (MeshSpec*)meshes.First(); 22 | unsigned short savingSlot = 0; // savingSlot indexing 23 | while (mesh) 24 | { 25 | if (mesh->GetReferenceCount() > 0) 26 | { 27 | // Tag a Block 28 | unsigned char tag = MESH_DATA_BLOCK_TAG; 29 | fwrite(&tag, sizeof(unsigned char), 1, file); 30 | 31 | // Save Filename Length 32 | const char* fileName = mesh->GetSpecFileLocation(); 33 | unsigned int nameLength = strlen(fileName); 34 | fwrite(&nameLength, sizeof(unsigned int), 1, file); 35 | 36 | // Save Filename 37 | fwrite(fileName, nameLength, 1, file); 38 | 39 | // Record the index of saving slot 40 | mesh->SetSavingSlot(savingSlot); 41 | 42 | // Increament saving slot if we saved a mesh resource 43 | savingSlot++; 44 | } 45 | 46 | mesh = (MeshSpec*)meshes.Next(); 47 | } 48 | } 49 | 50 | MeshSpec* MeshResource::GetMesh(unsigned int index) 51 | { 52 | return (MeshSpec*)(meshes.Select(index)); 53 | } -------------------------------------------------------------------------------- /DreamEditor/MeshResource.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "MeshSpec.h" 3 | #include "LinkedList.h" 4 | 5 | class MeshResource 6 | { 7 | public: 8 | ~MeshResource(); // Destory all MeshSpec 9 | 10 | void AddMesh(MeshSpec* mesh); // Used when loading 11 | void Save(FILE* file); // Find those whose reference count isn't 0, Reorder and Save 12 | 13 | MeshSpec* GetMesh(unsigned int index); // Used for loading 14 | 15 | private: 16 | LinkedList meshes; 17 | }; -------------------------------------------------------------------------------- /DreamEditor/Panel - Copy.cpp: -------------------------------------------------------------------------------- 1 | #include "Panel.h" 2 | #include "GraphManager.h" 3 | #include "Interface.h" 4 | 5 | Panel::Panel(unsigned int inWidth, unsigned int inHeight, float imageCoords[8], GLuint panelTexture, Interface* inParent, 6 | unsigned int segmentWidth = 0, unsigned int segmentHeight = 0) 7 | { 8 | parent = inParent; 9 | 10 | background = new RenderableImageRect(inParent, inWidth, inHeight, imageCoords, panelTexture); 11 | 12 | width = inWidth; 13 | height = inHeight; 14 | } 15 | 16 | //Panel::Panel(float imageCoords[8], GLuint panelTexture, Interface* inParent) 17 | //{ 18 | // parent = inParent; // __Debug__ We might want to do this in base constructor, becasue doing it here in every child class really isn't intuitive 19 | // 20 | // // Set bRelative 21 | // bRelative = true; 22 | // 23 | // background = new RenderableImageRect(inParent, imageCoords, panelTexture, inParent); 24 | // 25 | // width = 0; // trvially Assigned 26 | // height = 0; 27 | //} 28 | 29 | Panel::~Panel() 30 | { 31 | delete background; 32 | } 33 | 34 | // Interface Implementation 35 | void Panel::UpdatePosition(int newx, int newy) 36 | { 37 | InterfaceElement::UpdatePosition(newx, newy); 38 | 39 | background->Translate((float)x, (float)y, -0.01); 40 | } 41 | 42 | // The order of rendering, taking transparancy into consideration is done by The Interface Using this panel object 43 | void Panel::Render() 44 | { 45 | if (bRelative) 46 | { 47 | //// Disable Pixel Perfect Rendering 48 | //// Hack Renderbale View Matrix 49 | //glm::mat4x4 temp = parent->project2DView; // Keep a backup 50 | //parent->project2DView = glm::ortho(0.f, 1.f, -1.f, 0.f, 0.f, 100.f) * GraphManager::View2D; 51 | //// Do the render 52 | //background->Render(); 53 | //// Set Hacking Back 54 | //parent->project2DView = temp; 55 | } 56 | else 57 | { 58 | background->Render(); 59 | } 60 | } -------------------------------------------------------------------------------- /DreamEditor/Panel.cpp: -------------------------------------------------------------------------------- 1 | #include "Panel.h" 2 | #include "GraphManager.h" 3 | #include "Interface.h" 4 | 5 | Panel::Panel(unsigned int inWidth, unsigned int inHeight, const float imageCoords[16 * 2], GLuint panelTexture, Interface* inParent) 6 | { 7 | parent = inParent; 8 | 9 | background = new RenderableImageRect(inParent, inWidth, inHeight, imageCoords, panelTexture); 10 | 11 | width = inWidth; 12 | height = inHeight; 13 | } 14 | 15 | Panel::~Panel() 16 | { 17 | delete background; 18 | } 19 | 20 | // Interface Implementation 21 | void Panel::UpdatePosition(int newx, int newy) 22 | { 23 | InterfaceElement::UpdatePosition(newx, newy); 24 | 25 | background->Translate((float)x, (float)y, -0.01); 26 | } 27 | 28 | void Panel::Render() 29 | { 30 | background->Render(); 31 | } 32 | 33 | void Panel::RotateU(float angle) 34 | { 35 | currentRotation += angle; 36 | 37 | background->TextureRotationU(currentRotation); 38 | } -------------------------------------------------------------------------------- /DreamEditor/Panel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "InterfaceElement.h" 3 | #include "RenderableImageRect.h" 4 | class Interface; 5 | 6 | class Panel : public InterfaceElement 7 | { 8 | public: 9 | Panel(unsigned int inWidth, unsigned int inHeight, const float imageCoords[16 * 2], GLuint panelTexture, Interface* inParent); 10 | ~Panel(); // Delete Allocated Memory 11 | 12 | // Transformation Update 13 | virtual void UpdatePosition(int newx, int newy); // Need to update all sub-renderable objects' transformations 14 | // Render 15 | virtual void Render(); 16 | // Not used 17 | virtual void OnMouseOver(double xpos, double ypos){}; 18 | virtual void OnMouseButton(int button, int action, int mods, double xpos, double ypos){}; 19 | virtual void OnMouseLeave(){}; 20 | virtual void OnKeyboardButton(int key, int scancode, int action, int mods){}; 21 | virtual void OnTextInput(unsigned short* text, unsigned int numChars){}; 22 | virtual void OnDropWindow(int count, const char** paths){}; 23 | 24 | // Extra Function 25 | void RotateU(float angle); 26 | void SetTransparency(float scale){ background->SetTransparency(scale); }; 27 | 28 | private: 29 | // Renderables 30 | RenderableImageRect* background; 31 | 32 | // Bookkeeping 33 | float currentRotation = 0; 34 | }; -------------------------------------------------------------------------------- /DreamEditor/Polysoup.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | class Polysoup 6 | { 7 | public: 8 | // Expect Triangulated Faces 9 | // Specify SimpleBounding to indicate that input verts isn't used for bounding, but for construction only 10 | // DO NOT create any rendering related stuff during constructor because it is created in a working thread 11 | Polysoup(unsigned int inIndexCount, unsigned int* inIndices, unsigned int inNumVerts, float* inVerts, bool simpleBounding = false); 12 | ~Polysoup(); 13 | 14 | // Check Collision using ray in Object Space 15 | // @rayDir should be normalized 16 | bool CheckRayCollision(const glm::vec3& rayDir, const glm::vec3& rayLoc); 17 | 18 | // Check Closest Distance to location, in Object Space; Can be used to check distance to camera 19 | // @location should be in object space 20 | float ApproxNearestDistanceTo(const glm::vec3& location); 21 | float GetDomainRadius(); 22 | 23 | private: 24 | unsigned int indexCount; // numFaces = indexCount / 3; 25 | unsigned int* indices; // Dynamically allocated 26 | 27 | unsigned int numVerts; 28 | float* verts; // Dynamically allocated 29 | 30 | // Simple Box Boundary, rotate and translate with world matrix. 31 | glm::vec3 XYZ; 32 | glm::vec3 nXYZ; 33 | glm::vec3 center; 34 | }; -------------------------------------------------------------------------------- /DreamEditor/PopupMenu.cpp: -------------------------------------------------------------------------------- 1 | #include "PopupMenu.h" 2 | #include "GraphManager.h" 3 | 4 | int PopupMenu::LayoutBeginPositionX = 2U; 5 | int PopupMenu::LayoutBeginPositionY = -2; 6 | unsigned int PopupMenu::LayoutRowPadding = 6U; 7 | unsigned int PopupMenu::LayoutColumnPadding = 2U; 8 | 9 | void PopupMenu::Show(unsigned int viewX, unsigned int viewY) 10 | { 11 | viewportX = viewX; 12 | viewportY = viewY; 13 | GraphManager::currentPopup = this; 14 | } 15 | 16 | void PopupMenu::Hide() 17 | { 18 | GraphManager::currentPopup = NULL; 19 | } -------------------------------------------------------------------------------- /DreamEditor/PopupMenu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Interface.h" 3 | 4 | /*Popup menu is special in that its viewport location will change dynamically depending on where it's summoned*/ 5 | class PopupMenu : public Interface 6 | { 7 | public: 8 | // Partial Interface Implementation 9 | virtual void OnResizeFramebuffer(int width, int height){}; // Do not care: Viewport size determined at creation time, location determined when Show() 10 | 11 | // PopupMenu useful Public Interactions 12 | void Show(unsigned int viewX, unsigned int viewY); // Viewport Location 13 | void Hide(); 14 | 15 | protected: 16 | // Static Variables 17 | static int LayoutBeginPositionX; 18 | static int LayoutBeginPositionY; 19 | static unsigned int LayoutRowPadding; 20 | static unsigned int LayoutColumnPadding; 21 | }; -------------------------------------------------------------------------------- /DreamEditor/ProeprtyPanel.cpp: -------------------------------------------------------------------------------- 1 | #include "PropertyPanel.h" 2 | #include "GraphManager.h" 3 | #include "Constants.h" 4 | #include "MaterialTextures.h" 5 | 6 | //int PropertyPanel::LayoutBeginPositionX = 8; 7 | //int PropertyPanel::LayoutBeginPositionY = -8; 8 | int PropertyPanel::LayoutBeginPositionX = 32; 9 | int PropertyPanel::LayoutBeginPositionY = -24; 10 | unsigned int PropertyPanel::LayoutRowPadding = 8U; 11 | unsigned int PropertyPanel::LayoutColumnPadding = 4U; 12 | unsigned int PropertyPanel::TextContainerWidth = 280U; 13 | //float PropertyPanel::PropertyPanelTexCoords[8] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f }; // Debug_Temp: Pending Definition // Defined by Childrean Classes 14 | GLuint PropertyPanel::PropertyPanelTexImage = NULL; 15 | unsigned int PropertyPanel::PanelWidth = 384U; // The original design size 512x801 is too big on screen 16 | unsigned int PropertyPanel::PanelHeight = 600U; 17 | 18 | PropertyPanel::PropertyPanel(float* textureCoordinates) 19 | { 20 | // Set Viewport Dimensions 21 | OnResizeFramebuffer(GraphManager::windowWidth, GraphManager::windowHeight); 22 | 23 | char pathBuffer[MAX_PATH]; 24 | PropertyPanelTexImage = MaterialTextures::GetTexture(SystemFunctions::GetExecutableDirectoryPath(ApplicationPath::IconImageFilePath, pathBuffer)); 25 | 26 | // Scale Default panel size for smaller screens 27 | if (GraphManager::windowWidth < 1920) 28 | { 29 | PanelWidth = 315U; 30 | PanelHeight = 491U; 31 | } 32 | 33 | // Create a background iamge 34 | backgroundImage = new Panel(PanelWidth, PanelHeight, textureCoordinates, PropertyPanelTexImage, this); 35 | } 36 | 37 | PropertyPanel::~PropertyPanel() 38 | { 39 | delete backgroundImage; 40 | } 41 | 42 | void PropertyPanel::Hide() 43 | { 44 | GraphManager::currentPropertyPanel = NULL; 45 | } 46 | 47 | void PropertyPanel::Show() 48 | { 49 | GraphManager::currentPropertyPanel = this; 50 | } 51 | 52 | // Partial Interface Implementation 53 | void PropertyPanel::OnResizeFramebuffer(int width, int height) 54 | { 55 | // Define its viewport 56 | // Notice these are relative to Lower-Left corner of the window 57 | viewportX = 25U; 58 | viewportY = GraphManager::windowHeight / 2 - PanelHeight / 3; 59 | viewportW = PanelWidth; 60 | //viewportH = height - MainMenu::MainMenuHeight; 61 | viewportH = PanelHeight; 62 | 63 | // Update Projection and View 64 | UpdateProjection(); 65 | } -------------------------------------------------------------------------------- /DreamEditor/PropertyPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "Interface.h" 4 | #include "Panel.h" 5 | 6 | class PropertyPanel : public Interface 7 | { 8 | public: 9 | PropertyPanel(float* textureCoordinates); 10 | ~PropertyPanel(); 11 | 12 | // Partial Interface Implementation 13 | // Framebuffer and Window handler: By design we just change the viewport of each Interface, but mostly only horizontal direction, but anyway it doesn't matter 14 | // even if we change vertical viewport size, since by design Interface Elements(e.g. those are Side Panel) are drawn using abs perfect drawing relative to upper 15 | // left corner <--- NO Idea what's that talking about 16 | virtual void OnResizeFramebuffer(int width, int height); 17 | virtual void Render(){ backgroundImage->Render(); }; 18 | 19 | // Property Panel Display 20 | void Show(); 21 | void Hide(); 22 | void Transparency(float value){ backgroundImage->SetTransparency(value); }; 23 | 24 | protected: 25 | static int LayoutBeginPositionX; 26 | static int LayoutBeginPositionY; 27 | static unsigned int LayoutRowPadding; 28 | static unsigned int LayoutColumnPadding; 29 | static unsigned int TextContainerWidth; // If Any 30 | //static float PropertyPanelTexCoords[8]; 31 | static GLuint PropertyPanelTexImage; 32 | 33 | // Floating Panel Definition 34 | static unsigned int PanelWidth; 35 | static unsigned int PanelHeight; 36 | 37 | private: 38 | Panel* backgroundImage; 39 | }; -------------------------------------------------------------------------------- /DreamEditor/Renderable.cpp: -------------------------------------------------------------------------------- 1 | #include "Renderable.h" 2 | #include "GraphManager.h" 3 | 4 | Renderable::Renderable(Programs inProgram, Interface* parent) 5 | :parentInterface(parent) 6 | { 7 | // Create OpenGL Objects for the Renderable 8 | glGenVertexArrays(1, &VAO); 9 | glGenBuffers(1, &vBuffer); 10 | 11 | program = GraphManager::shaderResource->GetShader(inProgram); 12 | } 13 | 14 | Renderable::~Renderable() 15 | { 16 | glDeleteVertexArrays(1, &VAO); 17 | glDeleteBuffers(1, &vBuffer); 18 | 19 | // Program is not managed by us, borrowed from ShaderResource 20 | } 21 | 22 | // Interfaces 23 | //void Renderable::Transformation(float x, float y, float z = 0, float rx = 0, float ry = 0, float rz = 0, float sx = 0, float sy = 0, float sz = 0) 24 | //{ 25 | // // Update Properties 26 | // translation = glm::vec3(x, y, z); 27 | // rotation = glm::rotate(glm::mat4(1), rx, glm::vec3(1, 0, 0)); 28 | // rotation = glm::rotate(rotation, ry, glm::vec3(0, 1, 0)); 29 | // rotation = glm::rotate(rotation, rz, glm::vec3(0, 0, 1)); 30 | // scaling = glm::vec3(sx, sy, sz); 31 | // 32 | // // Update Transformation 33 | // UpdateMatrix(); 34 | //} 35 | 36 | void* Renderable::operator new (size_t size) 37 | { 38 | // __Debug__: Might not be portable 39 | return _aligned_malloc(size, 16); 40 | } 41 | 42 | void Renderable::operator delete (void *p) 43 | { 44 | _aligned_free(p); 45 | } 46 | // Reference: http://stackoverflow.com/questions/20104815/warning-c4316-object-allocated-on-the-heap-may-not-be-aligned-16 -------------------------------------------------------------------------------- /DreamEditor/Renderable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "RenderableBase.h" 3 | #include "Shaders.h" 4 | 5 | class Interface; 6 | 7 | // Derived Renderable can have their own member vairables, but notice that we want to only keep those that are used to change openGL states or shader uniforms 8 | // __Debug__ In the future, to make things faster and more patchable, we might provide a RenderResource Manager to do all those things in a more optimized way: e.g. generate a bunch of VAOs instead of each one, and render in batch 9 | class Renderable: public RenderableBase 10 | { 11 | public: 12 | Renderable(Programs inProgram, Interface* parent); // Require Nothing as input 13 | ~Renderable(); 14 | 15 | // Interfaces: Only render is mandatory to implement by children 16 | // If a derived class would require more variables to define render states, it should define member variables and use member functions to set up those variables 17 | virtual void Render() = 0; 18 | 19 | // For Transformable and Dynamic Objects, they will provide their own updateBUffer 20 | // For configurable objects, they will provide updateProperty functions 21 | // The usage case of those are specific so no need to provide generic interface requirement 22 | 23 | // alignment 24 | static void* operator new (size_t size); 25 | static void operator delete (void *p); 26 | 27 | protected: 28 | GLuint VAO; 29 | GLuint vBuffer; 30 | GLuint program; // Each Derived Class constructor will specify their required program, of course also overwrite their appropriate Render() routine 31 | 32 | protected: 33 | Interface* parentInterface; 34 | }; -------------------------------------------------------------------------------- /DreamEditor/Renderable3DMesh.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/Renderable3DMesh.cpp -------------------------------------------------------------------------------- /DreamEditor/Renderable3DMesh.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "MathElegent.h" 3 | #include "Material.h" 4 | #include "RenderableBase.h" 5 | 6 | // A Renderable3D Mesh is an abstract of an OpenGL object draw call to represent an rendered mesh 7 | // A single Renderble3D Mesh might be used by multiple MeshNodes 8 | class Renderable3DMesh 9 | { 10 | public: 11 | // Location in meters 12 | Renderable3DMesh(void* vertexData, unsigned int vertexSize, void* indexData, unsigned int indexSize, void* texcoordData, unsigned int texcoordSize 13 | , Material* inMaterial); // Simple Shaders 14 | Renderable3DMesh(void* vertexData, unsigned int vertexSize, void* normalData, void* tangetData, 15 | void* indexData, unsigned int indexSize, void* texcoordData, unsigned int texcoordSize, Material* inMaterial); // Phone Shader 16 | ~Renderable3DMesh(); // Release OpenGL Objects 17 | 18 | void Render(glm::mat4& world, glm::mat4& view, glm::mat4& projection); // SetUp States Using The Material and Vertex Information, Then Render 19 | 20 | private: 21 | // Mesh Vertex Information 22 | GLuint VAO; 23 | GLuint buffers[5]; 24 | unsigned int indexCount; 25 | 26 | // Material Information 27 | Material* material = NULL; 28 | 29 | // Bookeeping 30 | short bufferUsed; 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /DreamEditor/Renderable3DQuoteFrame.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Renderable.h" 3 | 4 | /* Provides an ideal Quote Frame with an narrow head, border is always rendered, round corner using unified radius*/ 5 | class Renderable3DQuoteFrame : public Renderable 6 | { 7 | public: 8 | Renderable3DQuoteFrame(float width, float height, bool border, float* bcolor, float* acolor, float cornersize, bool d, float inOpacity = 1.0f); 9 | 10 | virtual void Render(); 11 | void UpdateBuffer(float width, float height, float cornersize); 12 | void UpdateProperty(bool border, float* bcolor, float* acolor, float inOpacity = 1.0f); 13 | 14 | private: 15 | float opacity = 1.0f; 16 | bool bBorder = true; 17 | bool bDynamic; 18 | float borderColor[3]; // Border color 19 | float areaColor[3]; // Interior color 20 | 21 | glm::mat4x4 modelResize; 22 | }; -------------------------------------------------------------------------------- /DreamEditor/Renderable3DRegionalMark.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* Regional Mark provides a way to circle certain areas to notify the user when step in*/ -------------------------------------------------------------------------------- /DreamEditor/Renderable3DTerrain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/Renderable3DTerrain.cpp -------------------------------------------------------------------------------- /DreamEditor/Renderable3DTerrain.h: -------------------------------------------------------------------------------- 1 | //#pragma once 2 | //#include "Renderable.h" 3 | // 4 | //class Renderable3DTerrain :public Renderable 5 | //{ 6 | //public: 7 | // // Location in meters 8 | // Renderable3DTerrain(); 9 | // 10 | // virtual void Render(); 11 | //}; -------------------------------------------------------------------------------- /DreamEditor/RenderableBase.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | // RenderableBase provides basic definitions for an renderable, namely, transformations. Its children include Renderable only for now. Renderable3DMesh doesn't need a transformation since it is shared 7 | class RenderableBase 8 | { 9 | public: 10 | RenderableBase(); 11 | 12 | // Common Functions: Location in world coordinate 13 | // void Transformation(float x, float y, float z = 0, float rx = 0, float ry = 0, float rz = 0, float sx = 1, float sy = 1, float sz = 1); // All are absolute 14 | void Translation(float x, float y, float z = 0); 15 | void Rotation(float x, float y, float z = 0); 16 | void Scaling(float x, float y, float z = 1); 17 | void Translate(float dx, float dy, float dz = 0); 18 | void Rotate(float dx, float dy, float dz = 0); 19 | void Scale(float dx, float dy, float dz = 1); 20 | // Notice Translate is relative to current position, and subject to rotation and scaling; while translation is relative to object itself, i.e. in object space 21 | 22 | protected: 23 | // Renderable Property 24 | glm::mat4x4 world; 25 | // Keep Track of specific properties in order to do things correctly 26 | glm::vec3 translation; 27 | glm::mat4x4 rotation; 28 | glm::vec3 scaling; 29 | 30 | void UpdateMatrix(); 31 | }; -------------------------------------------------------------------------------- /DreamEditor/RenderableCirclesInstance.h: -------------------------------------------------------------------------------- 1 | //#pragma once 2 | //#include "Renderable.h" 3 | // 4 | //// Provided Functions: Instanced rendering of many circles with different location, color, ... 5 | //class RenderableCirclesInstance : public Renderable 6 | //{ 7 | //public: 8 | // RenderableCirclesInstance(float inRadius); 9 | // 10 | // // Instancing 11 | // void DataSetup(unsigned int inNmInstances, float* locations, float* colors); // location and color are 3 component vectors 12 | // // Notice contrarary to what we normally assign as renderale coordinate, in this case the origin of the renderable is the geometric center, not the bounding box upper left corner 13 | // void HighlightSelection(unsigned int instanceID, float* inHighlightColor ); // The user need to know which instance he is trying to highlight; 14 | // // This make this class not so portable, but well customed to this application 15 | // 16 | // virtual void Render(); 17 | // 18 | //private: 19 | // float numInstances = 0; 20 | // float radius = 0; 21 | // float* highlightColor = NULL; 22 | //}; -------------------------------------------------------------------------------- /DreamEditor/RenderableCursorHighlight.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Renderable.h" 3 | class Interface; 4 | 5 | /* Provide a irregular text highlight shape*/ 6 | class RenderableCursorHighlight : public Renderable 7 | { 8 | public: 9 | RenderableCursorHighlight(Interface* parent, float color[3]); // Always dynamic; And considering the actual usage of this object, no need for initial parameters 10 | 11 | virtual void Render(); 12 | // For single line, spanWidth is the actual width; For multiLine, spanWidth is the boundWidth 13 | // Forward and backward only used for multiline, as offset for the first and last rectangle 14 | // And that is an awkward design: since they are so specialzed, why not just use different functions? 15 | //void UpdateBuffer(float forward, float backward, float spanWidth, unsigned int numLines, float lineHeight); 16 | void UpdateBuffer_SingleLine(float spanWidth, float lineHeight); 17 | void UpdateBuffer_MultiLine(float forward, float backward, float spanWidth, unsigned int numLines, float lineHeight); 18 | void UpdateProperty(float trans, float* color = NULL); // NULL indicate keep current 19 | 20 | private: 21 | bool bSingleLine = true; 22 | float transparancy = 1; 23 | float highlightColor[3]; 24 | }; -------------------------------------------------------------------------------- /DreamEditor/RenderableDebugRay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Renderable.h" 3 | 4 | /* Provides an ideal Quote Frame with an narrow head, border is always rendered, round corner using unified radius*/ 5 | class RenderableDebugRay : public Renderable 6 | { 7 | public: 8 | RenderableDebugRay(glm::vec3 origin, glm::vec3 direction, float length); // In World Space, i.e. Not in Object Space 9 | 10 | virtual void Render(); 11 | void UpdateBuffer(glm::vec3 origin, glm::vec3 direction, float length); // In World Space, i.e. Not in Object Space; Generate a ray 12 | void UpdateBuffer_Line(glm::vec3 origin, glm::vec3 endPoint); // In World Space; Generate a Line 13 | 14 | static float color[3]; 15 | }; -------------------------------------------------------------------------------- /DreamEditor/RenderableImageIcon.cpp: -------------------------------------------------------------------------------- 1 | #include "RenderableImageIcon.h" 2 | #include "GraphManager.h" 3 | 4 | RenderableImageIcon::RenderableImageIcon(Interface* parent, float size, float coords[8], GLuint inTexture) 5 | :texture(inTexture), Renderable(Programs::SimpleTextureProgram, parent) 6 | { 7 | // Generate OpenGL Object 8 | glGenBuffers(1, &tBuffer); 9 | 10 | // Prepare Data, CW 11 | float vertexData[4*3] = 12 | { 13 | 0, 0, 0.f, 14 | size, 0, 0.f, 15 | size, -size, 0.f, 16 | 0, -size, 0.f 17 | }; 18 | 19 | // Initialize OpenGL obejcts 20 | glBindVertexArray(VAO); 21 | // Generate Vertex Buffer 22 | glBindBuffer(GL_ARRAY_BUFFER, vBuffer); 23 | glBufferData(GL_ARRAY_BUFFER, 4 * 3 * sizeof(float), vertexData, GL_STATIC_DRAW); // Image Icons are always static 24 | glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0); // Adhering to SimpleTextureProgram 25 | glEnableVertexAttribArray(0); 26 | // Feed texture coordinate Data to openGL 27 | glBindBuffer(GL_ARRAY_BUFFER, tBuffer); 28 | glBufferData(GL_ARRAY_BUFFER, 8 * sizeof(float), coords, GL_STATIC_DRAW); 29 | glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 0, 0); 30 | glEnableVertexAttribArray(1); 31 | } 32 | 33 | RenderableImageIcon::~RenderableImageIcon() 34 | { 35 | // Delete buffer 36 | glDeleteBuffers(1, &tBuffer); 37 | // Texture is not managed by us, so do not delete 38 | } 39 | 40 | void RenderableImageIcon::Render() 41 | { 42 | // Set up states 43 | glBindVertexArray(VAO); 44 | GraphManager::UseNewProgram(program); 45 | GraphManager::UseNewTexture0(texture); 46 | // Bind Data, parameters already using openGL coordinates 47 | glUniformMatrix4fv(2, 1, GL_FALSE, glm::value_ptr((parentInterface->GetProjectMatrix())*(parentInterface->GetViewMatrix())*world)); // MVP 48 | // Feed in Texture Rotation 49 | glUniform1f(3, 0.f); 50 | glUniform1f(4, 1.f); 51 | 52 | // Render the image quad 53 | glDrawArrays(GL_TRIANGLE_FAN, 0, 4); 54 | } -------------------------------------------------------------------------------- /DreamEditor/RenderableImageIcon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Renderable.h" 3 | 4 | class Interface; 5 | /* Provide a image square to serve as interface ioons 6 | - This kind of obejcts doesn't provide dynamic/transformable behaviros 7 | */ 8 | class RenderableImageIcon : public Renderable 9 | { 10 | public: 11 | // Manually feed texture coords so that we can combine different icons in a single map 12 | RenderableImageIcon(Interface* parent, float size, float coords[8], GLuint inTexture); // openGL Second Quadrant 13 | ~RenderableImageIcon(); 14 | 15 | virtual void Render(); 16 | 17 | private: 18 | // Extended openGL objects 19 | GLuint tBuffer; 20 | GLuint texture; 21 | }; -------------------------------------------------------------------------------- /DreamEditor/RenderableImageRect.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Renderable.h" 3 | class Interface; 4 | 5 | /* Provide a image rect 6 | - This kind of obejcts doesn't provide dynamic/transformable behaviros 7 | */ 8 | class RenderableImageRect : public Renderable 9 | { 10 | public: 11 | // Manually feed texture coords so that we can combine different icons in a single map <-- No idea what its talking about 12 | RenderableImageRect(Interface* parent, float width, float height, const float coords[8], GLuint inTexture); 13 | //RenderableImageRect(Interface* parent, float coords[8], GLuint inTexture); // For Canvas Interface Full Area Quad// Maight want to seperately implement this 14 | ~RenderableImageRect(); 15 | 16 | virtual void Render(); 17 | void UpdateTexture(GLuint inTexture); 18 | void TextureRotationU(float angle); 19 | void SetTransparency(float value) { transparency = value; }; 20 | 21 | private: 22 | // Extended openGL objects 23 | GLuint tBuffer; 24 | GLuint texture; 25 | 26 | // Bookkeeping 27 | float textureRotation = 0.f; 28 | float transparency = 1.f; 29 | }; -------------------------------------------------------------------------------- /DreamEditor/RenderableLine.cpp: -------------------------------------------------------------------------------- 1 | #include "RenderableLine.h" 2 | #include "GraphManager.h" 3 | #include "MathElegent.h" 4 | #include 5 | 6 | RenderableLine::RenderableLine(Interface* parent, float width, float height, float color[3], bool d) 7 | :Renderable(Programs::ShapeProgram, parent), bDynamic(d) 8 | { 9 | // Save Data 10 | memcpy(lineColor, color, sizeof(float) * 3); 11 | 12 | UpdateBuffer(width, height); 13 | } 14 | 15 | void RenderableLine::Render() 16 | { 17 | // Set up states 18 | glBindVertexArray(VAO); 19 | GraphManager::UseNewProgram(program); 20 | timeScale = glm::mod((float)GraphManager::systemTime, 1.f) > 0.5 ? 1.f : 0.f; 21 | // Set uniforms 22 | glUniform1f(3, timeScale); // time scale 23 | 24 | // Draw Face 25 | glUniformMatrix4fv(1, 1, GL_FALSE, glm::value_ptr((parentInterface->GetProjectMatrix())*(parentInterface->GetViewMatrix())*world)); // MVP 26 | glUniform3fv(2, 1, lineColor); // color 27 | // Render the quad 28 | glDrawArrays(GL_TRIANGLE_FAN, 0, 4); 29 | } 30 | 31 | void RenderableLine::UpdateBuffer(float width, float height) 32 | { 33 | // Prepare Data, CW 34 | float vertexData[4 * 3] = 35 | { 36 | 0, 0, 0.f, 37 | width, 0, 0.f, 38 | width, -height, 0.f, 39 | 0, -height, 0.f 40 | }; 41 | 42 | // Initialize OpenGL obejcts 43 | glBindVertexArray(VAO); 44 | // Generate Vertex Buffer 45 | glBindBuffer(GL_ARRAY_BUFFER, vBuffer); 46 | glBufferData(GL_ARRAY_BUFFER, 4 * 3 * sizeof(float), vertexData, bDynamic ? GL_DYNAMIC_DRAW : GL_STATIC_DRAW); // Might by dynamic 47 | glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0); // Adhering to ShapeProgram 48 | glEnableVertexAttribArray(0); 49 | } 50 | void RenderableLine::UpdateProperty(float* color) 51 | { 52 | memcpy(lineColor, color, sizeof(float) * 3); 53 | } -------------------------------------------------------------------------------- /DreamEditor/RenderableLine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Renderable.h" 3 | class Interface; 4 | /* Provide a line shape*/ 5 | class RenderableLine : public Renderable 6 | { 7 | public: 8 | RenderableLine(Interface* parent, float width, float height, float color[3], bool d); 9 | 10 | virtual void Render(); 11 | void UpdateBuffer(float width, float height); // Assume dynamic 12 | void UpdateProperty(float* color); 13 | 14 | float timeScale = 1; // Used for easy change of Transparancy 15 | 16 | private: 17 | bool bDynamic; // Useful for validating UpdateBuffer() operation legitity 18 | float lineColor[3]; 19 | }; -------------------------------------------------------------------------------- /DreamEditor/RenderableRoundCornerFrame.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Renderable.h" 3 | 4 | /* Provide a round cornerd Frame(Border Only) with many configurations*/ 5 | class RenderableRoundCornerFrame : public Renderable 6 | { 7 | public: 8 | // When cornersize is zero, it indicated a rectangluar shape 9 | RenderableRoundCornerFrame(float width, float height, float* bcolor, float cornersize, bool d, bool render = true, float inOpacity = 1.0f); 10 | 11 | virtual void Render(); 12 | void UpdateBuffer(float width, float height, float cornersize); 13 | void UpdateProperty(float* bcolor, bool render = true, float inOpacity = 1.0f); 14 | 15 | private: 16 | bool bRender = true; // Can be toggled not to render 17 | bool bDynamic; 18 | float opacity = 1.0f; 19 | float borderColor[3]; // Border color 20 | }; -------------------------------------------------------------------------------- /DreamEditor/RenderableRoundCornerQuad.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Renderable.h" 3 | class Interface; 4 | /* Provide a round cornerd quad with many configurations*/ 5 | // Caution this type is not directly compatible with 3D use, since border genration is using pixel size 6 | class RenderableRoundCornerQuad : public Renderable 7 | { 8 | public: 9 | // Argument named y2 insead of yoff to emphasis it should be an absolute value, i.e. negative in most cases, rather than an offset 10 | // When cornersize is zero, it indicated a rectangluar shape 11 | RenderableRoundCornerQuad(Interface* parent, float width, float height, bool border, float* bcolor, float* acolor, float cornersize, bool d, bool d3, float inOpacity = 1.0f); 12 | 13 | virtual void Render(); 14 | void UpdateBuffer(float width, float height, float cornersize); 15 | void UpdateProperty(bool border, float* bcolor, float* acolor, float inOpacity = 1.0f); 16 | 17 | private: 18 | // Primitive Specific Parameters, used for rendering configuration 19 | float opacity = 1.0f; 20 | bool bBorder = true; 21 | bool bDynamic; 22 | float borderColor[3]; // Border color 23 | float areaColor[3]; // Interior color 24 | 25 | glm::mat4x4 modelResize; 26 | }; -------------------------------------------------------------------------------- /DreamEditor/RenderableRoundSidesQuad.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Renderable.h" 3 | 4 | class Interface; 5 | /* Provide a round left and right sides quad with not many configurations 6 | - Doesn't need a round(corner) size, since it will be a semi-circle 7 | */ 8 | class RenderableRoundSidesQuad : public Renderable 9 | { 10 | public: 11 | RenderableRoundSidesQuad(Interface* parent, float width, float height, bool border, float* bcolor, float* acolor, bool dynamic, bool d3); 12 | 13 | virtual void Render(); 14 | // Support for dynamic and cinematic Interaction 15 | void UpdateBuffer(float width, float height); 16 | void UpdateProperty(bool border, float* bcolor, float* acolor); 17 | 18 | private: 19 | // Primitive Specific Parameters, used for rendering configuration 20 | bool bBorder = true; 21 | bool bDynamic; 22 | float borderColor[3]; // Border color 23 | float areaColor[3]; // Interior color 24 | 25 | glm::mat4x4 modelResize; 26 | }; -------------------------------------------------------------------------------- /DreamEditor/SearchField.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "TextEditor.h" 3 | #include "TextContainer.h" 4 | #include "RenderableImageIcon.h" 5 | #include "RenderableRoundSidesQuad.h" 6 | 7 | // A Text Field with a search icon, and a cornered box frame 8 | class SearchField : public TextEditor 9 | { 10 | public: 11 | SearchField(unsigned short* initialString, unsigned int numChars, Interface* inParent); 12 | ~SearchField(); // Destroy Memory 13 | 14 | // Interface Modification 15 | virtual void UpdatePosition(int newx, int newy); 16 | virtual void Render(); 17 | virtual void OnMouseOver(double xpos, double ypos); 18 | virtual void OnMouseLeave(); 19 | 20 | // Interface Extension 21 | virtual void OnTextInput(unsigned short* string, unsigned int numChars); 22 | 23 | private: 24 | static int CornerSize; 25 | static int IconSize; 26 | static float FrameColor[3]; 27 | static float FrameHoverColor[3]; 28 | static float BackGroundColor[3]; 29 | static float SearchIconCoords[8]; 30 | 31 | private: 32 | // Renderables 33 | RenderableImageIcon* icon; 34 | RenderableRoundSidesQuad* frame; 35 | }; 36 | 37 | /* Unfinished: 38 | Search Field Interaction with Canvas to actually do some search 39 | */ 40 | 41 | /* Pending: 42 | 1. Search Field Expansion Animaion when mouse clicked on it to begin enter 43 | */ -------------------------------------------------------------------------------- /DreamEditor/ShaderResource.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "Shaders.h" 4 | #include "Constants.h" 5 | #include 6 | 7 | /* ShaderResource will be resopnsible for compiling and storing all the shaders that will be used in the program 8 | If a shader is already compiled and stored in binary form, ShaderResource will be responsible for loading it 9 | */ 10 | class ShaderResource 11 | { 12 | public: 13 | ShaderResource(); // Call CompileShader() to compile programs 14 | ~ShaderResource(); // Delete Programs 15 | 16 | GLuint GetShader(Programs program); 17 | GLuint GetAppIconMap(); 18 | 19 | private: 20 | unsigned int GetShaderSource(unsigned int index, unsigned int tempSlot); // After call this function we need to delete the tempBuffer; 21 | char* tempBuffers[2]; 22 | 23 | private: 24 | bool bCached = false; 25 | GLuint shaders[NumberOfPrograms]; 26 | 27 | // Incidentally, we may as well take care of the Icon map 28 | GLuint iconMap; 29 | }; 30 | 31 | // Shader Binary File Format Specification: since to make things compact we will store into only one file 32 | // - Size, FormatToken, Binary, and repeat. We know how programs are stored there so no need to bother their order. -------------------------------------------------------------------------------- /DreamEditor/Shaders.cpp: -------------------------------------------------------------------------------- 1 | #include "Shaders.h" 2 | 3 | char* ShaderPath::Programs[NumberOfPrograms * 2] = 4 | { 5 | // Vertex Shaders 6 | "Data\\Shaders\\TextProgramVertex.shader", 7 | "Data\\Shaders\\ShapeProgramVertex.shader", 8 | "Data\\Shaders\\SimpleTextureProgramVertex.shader", 9 | "Data\\Shaders\\PhongShadingProgramVertex.shader", 10 | "Data\\Shaders\\SEMRoughSpecularVertex.shader", 11 | //"Data\\Shaders\\InstancedCirclesVertex.shader", 12 | 13 | // Fragment Shaders 14 | "Data\\Shaders\\TextProgramFragment.shader", 15 | "Data\\Shaders\\ShapeProgramFragment.shader", 16 | "Data\\Shaders\\SimpleTextureProgramFragment.shader", 17 | "Data\\Shaders\\PhongShadingProgramFragment.shader", 18 | "Data\\Shaders\\SEMRoughSpecularFragment.shader", 19 | //"Data\\Shaders\\InstancedCirclesFragment.shader" 20 | }; -------------------------------------------------------------------------------- /DreamEditor/ShortcutsPopupScreen.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PopupMenu.h" 3 | #include "GridLayout.h" 4 | #include "Panel.h" 5 | #include "TextLabel.h" 6 | 7 | /*Popup menu is special in that its viewport with change dynamically depending on where it's summoned*/ 8 | class ShortcutsPopupScreen : public PopupMenu 9 | { 10 | public: 11 | ShortcutsPopupScreen(); 12 | ~ShortcutsPopupScreen(); // Destroy all Elements 13 | 14 | // Render 15 | void Render(); 16 | 17 | private: 18 | // Interface Elements 19 | // All are informative elements 20 | //TextLabel* line1; 21 | //TextLabel* line2; 22 | //TextLabel* line3; 23 | 24 | // Background 25 | static unsigned int areaWidth; 26 | static unsigned int areaHeight; 27 | static float screenTexCoords[8]; 28 | static GLuint screenTexImage; 29 | Panel* backgroundImage; 30 | 31 | private: 32 | // Use a linked list to help managing 33 | // LinkedList labels; 34 | }; -------------------------------------------------------------------------------- /DreamEditor/SingleImage.cpp: -------------------------------------------------------------------------------- 1 | //#include "SingleImage.h" 2 | //#include "GraphManager.h" 3 | //#include "MathElegent.h" 4 | //#include "Interface.h" 5 | // 6 | //float SingleImage::imageCoords[8] = { 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0 }; 7 | // 8 | //SingleImage::SingleImage(float width, float height, GLuint texture, Interface* inParent) 9 | //{ 10 | // parent = inParent; 11 | // 12 | // image = new RenderableImageRect(parent, width, height, imageCoords, texture); 13 | // 14 | // // Set Width and Height 15 | // width = width; 16 | // height = height; 17 | //} 18 | // 19 | //SingleImage::~SingleImage() 20 | //{ 21 | // delete image; 22 | //} 23 | // 24 | //// Interface Implementation 25 | //void SingleImage::UpdatePosition(int newx, int newy) 26 | //{ 27 | // InterfaceElement::UpdatePosition(newx, newy); 28 | // 29 | // image->Translation(x, y, 0.1); 30 | //} 31 | // 32 | // 33 | //void SingleImage::OffsetPosition(int dx, int dy, float dz) 34 | //{ 35 | // InterfaceElement::OffsetPosition((float)dx, (float)dy, dz); 36 | // 37 | // image->Translate(dx, dy, dz); 38 | //} 39 | // 40 | //void SingleImage::Render() 41 | //{ 42 | // image->Render(); 43 | //} -------------------------------------------------------------------------------- /DreamEditor/SingleImage.h: -------------------------------------------------------------------------------- 1 | //#pragma once 2 | //#include "InterfaceElement.h" 3 | //#include "RenderableImageRect.h" 4 | //class Interface; 5 | // 6 | //class SingleImage : public InterfaceElement 7 | //{ 8 | //public: 9 | // SingleImage(float width, float height, GLuint texture, Interface* inParent); 10 | // ~SingleImage(); // Delete Allocated Memory 11 | // 12 | // // Transformation Update 13 | // virtual void UpdatePosition(int newx, int newy); 14 | // virtual void OffsetPosition(int dx, int dy, float dz); 15 | // // Render 16 | // virtual void Render(); 17 | // virtual void OnMouseOver(double xpos, double ypos){} 18 | // virtual void OnMouseSingleImage(int SingleImage, int action, int mods, double xpos, double ypos){} 19 | // virtual void OnMouseLeave(){} 20 | // // Not used 21 | // virtual void OnKeyboardSingleImage(int key, int scancode, int action, int mods){}; 22 | // virtual void OnTextInput(unsigned short* text, unsigned int numChars){}; 23 | // virtual void OnDropWindow(int count, const char** paths){}; 24 | // 25 | //protected: 26 | // // Renderables 27 | // RenderableImageRect* image = NULL; 28 | // static float imageCoords[8]; 29 | //}; -------------------------------------------------------------------------------- /DreamEditor/StaticShape.cpp: -------------------------------------------------------------------------------- 1 | #include "StaticShape.h" 2 | #include "RenderableRoundCornerQuad.h" 3 | #include "Colors.h" 4 | 5 | StaticShape::StaticShape(Interface* inParent, ShapeType type, unsigned int w, unsigned int h) 6 | { 7 | parent = inParent; 8 | 9 | // Set Up Parameters 10 | width = w, height = h; 11 | 12 | // Create the Shape 13 | switch (type) 14 | { 15 | case Shape_BorderedSquare: 16 | shape = new RenderableRoundCornerQuad(parent, width, height, true, Color::DefaultRoundCornerQuadBoarderColor, Color::DefaultRoundCornerQuadSurfaceColor, 0, false, false); 17 | break; 18 | case Shape_Star: 19 | shape = NULL; 20 | break; 21 | default: 22 | break; 23 | } 24 | } 25 | 26 | StaticShape::~StaticShape() 27 | { 28 | delete shape; 29 | } 30 | 31 | // Interface Implementation 32 | void StaticShape::Render() 33 | { 34 | shape->Render(); 35 | } 36 | 37 | void StaticShape::UpdatePosition(int newx, int newy) 38 | { 39 | InterfaceElement::UpdatePosition(newx, newy); 40 | 41 | shape->Translation(x, y, 0); 42 | } 43 | 44 | void StaticShape::OffsetPosition(int dx, int dy, float dz) 45 | { 46 | InterfaceElement::OffsetPosition((float)dx, (float)dy, dz); 47 | 48 | shape->Translate((float)dx, (float)dy, dz); 49 | } -------------------------------------------------------------------------------- /DreamEditor/StaticShape.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "InterfaceElement.h" 3 | #include "Renderable.h" 4 | enum ShapeType 5 | { 6 | Shape_BorderedSquare, 7 | Shape_Star // .... 8 | }; 9 | 10 | /* Static Shape provides creation of different static shapes, which can be used eiher as background or decoration, 11 | since Static Shapes are not counted for collision detection or an other interaction*/ 12 | // All shapes renderables, of course, are created procedurally 13 | class StaticShape :public InterfaceElement 14 | { 15 | public: 16 | StaticShape(Interface* inParent, ShapeType type, unsigned int w = 0, unsigned int h = 0); // Windt hand Height represent the shape's realm 17 | ~StaticShape(); 18 | 19 | // Interface Implementation 20 | virtual void Render(); 21 | virtual void UpdatePosition(int newx, int newy); 22 | virtual void OffsetPosition(int dx, int dy, float dz); 23 | // Not Used 24 | virtual void OnMouseOver(double xpos, double ypos){} 25 | virtual void OnMouseButton(int button, int action, int mods, double xpos, double ypos){} 26 | virtual void OnKeyboardButton(int key, int scancode, int action, int mods){} 27 | virtual void OnTextInput(unsigned short* text, unsigned int numChars){} 28 | virtual void OnDropWindow(int count, const char** paths){} 29 | 30 | private: 31 | Renderable* shape; // Generic pointer to an renderable 32 | }; -------------------------------------------------------------------------------- /DreamEditor/Sun.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #define ShadowMapWidth 2048 10 | #define ShadowMapHeight 2048 11 | class Canvas; 12 | 13 | class Sun 14 | { 15 | public: 16 | Sun(Canvas* c); 17 | ~Sun(); 18 | 19 | GLuint GetMap(); 20 | void UseFBO(); 21 | 22 | float* GetColor(){ return sunColor; } 23 | float* GetSky(){ return skyFillColor; } 24 | float* GetDirection() { return sunLocation; } 25 | GLuint GetShadowMap(){ return shadowTexture; } 26 | //GLuint GetShadowFrameBuffer(){ return shadowFBO; } 27 | 28 | // Debug Use: Check Sun View 29 | glm::mat4& GetView() { return sunView; } 30 | glm::mat4& GetProjection() { return sunProjection; } 31 | 32 | // Sun Function 33 | void UpdateSun(float sunTiming); // Timing in degrees ranging [0, 360], indicating SE->NW movement 34 | 35 | // alignment 36 | static void* operator new (size_t size); 37 | static void operator delete (void *p); 38 | 39 | private: 40 | GLuint shadowFBO; 41 | GLuint shadowTexture; 42 | Canvas* canvas; // Quick Access 43 | 44 | // Sun Property 45 | float sunColor[3]; 46 | float sunLocation[3]; // In world space 47 | //float sunDirection[3]; // The direction of the sun in world space is the inverse of the location // But due to the way our shader work, we no need to inverse that 48 | float skyFillColor[3]; 49 | 50 | glm::mat4 sunProjection; 51 | glm::mat4 sunView; 52 | }; -------------------------------------------------------------------------------- /DreamEditor/TerrainNode.cpp: -------------------------------------------------------------------------------- 1 | #include "TerrainNode.h" 2 | #include "SystemWrapper.h" 3 | #include "Constants.h" 4 | #include "GraphManager.h" 5 | 6 | Terrain::Terrain() 7 | { 8 | // Create a mesh data 9 | meshSpec = new MeshSpec(ApplicationPath::TerrainMeshSpecMath); 10 | meshSpec->RequireReference(); 11 | 12 | // Try to wake up the mesh spec 13 | terrain = meshSpec->RequireMeshUsage(); 14 | while (!terrain) 15 | { 16 | terrain = meshSpec->RequireMeshUsage(); 17 | } 18 | 19 | // Update Matrix 20 | world = glm::translate(glm::mat4(1), glm::vec3(0, 0, 0)); 21 | } 22 | 23 | Terrain::~Terrain() 24 | { 25 | meshSpec->ReleaseMeshUsage(); 26 | meshSpec->ReleaseReference(); 27 | } 28 | 29 | void Terrain::Render() 30 | { 31 | // Render the mesh 32 | Canvas* canvas = GraphManager::canvas; 33 | terrain->Render(world, canvas->GetViewMatrix(), canvas->GetProjectMatrix()); 34 | } 35 | -------------------------------------------------------------------------------- /DreamEditor/TerrainNode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "CanvasNode.h" 3 | #include "Renderable3DMesh.h" 4 | #include "MeshSpec.h" 5 | 6 | class Terrain :public CanvasNode 7 | { 8 | public: 9 | // Constructors 10 | Terrain(); 11 | ~Terrain(); 12 | 13 | // Interface 14 | // Not Used 15 | virtual void SaveData(FILE* f){}; 16 | virtual void WakeUp(){}; 17 | virtual void FallAsleep(){}; 18 | // Override Base render 19 | virtual void Render(); 20 | 21 | private: 22 | // Data 23 | MeshSpec* meshSpec; 24 | // Renderable 25 | Renderable3DMesh* terrain; 26 | 27 | glm::mat4x4 world; 28 | }; -------------------------------------------------------------------------------- /DreamEditor/TextArea.cpp: -------------------------------------------------------------------------------- 1 | #include "TextArea.h" 2 | #include "Constants.h" 3 | #include "Colors.h" 4 | 5 | int TextArea::CornerSize = 2; 6 | float TextArea::FrameColor[3] = { 0.408, 0.408, 0.408}; 7 | //float TextArea::FrameHoverColor[3] = { 0.619, 0.619, 0.619}; 8 | float TextArea::FrameHoverColor[3] = { 0.445, 0.339, 0.769}; 9 | float TextArea::BackGroundColor[3] = { 0.243, 0.243, 0.243}; 10 | 11 | TextArea::TextArea(float w, float h, unsigned short* initialText, unsigned int numChars, Interface* inParent, bool useReference) 12 | :TextEditor(w, h, initialText, numChars, InterfaceConstant::DefaultFontSize, Color::DefaultTextColor, 13 | inParent, false, true, true, useReference) 14 | { 15 | XPadding = 4; 16 | YPadding = 4; 17 | 18 | width = w + XPadding * 2; 19 | height = h + YPadding * 2; 20 | 21 | background = new RenderableRoundCornerQuad(inParent, width, height, true, FrameColor, BackGroundColor, CornerSize, false, false); 22 | } 23 | 24 | TextArea::~TextArea() 25 | { 26 | delete background; 27 | } 28 | 29 | // Interface Implmentation 30 | void TextArea::UpdatePosition(int newx, int newy) 31 | { 32 | TextEditor::UpdatePosition(newx, newy); 33 | background->Translate(newx, newy, 0.01); 34 | } 35 | 36 | void TextArea::Render() 37 | { 38 | background->Render(); 39 | TextEditor::Render(); 40 | } 41 | 42 | void TextArea::OnMouseOver(double xpos, double ypos) 43 | { 44 | TextEditor::OnMouseOver(xpos, ypos); 45 | background->UpdateProperty(true, FrameHoverColor, BackGroundColor); 46 | } 47 | 48 | void TextArea::OnMouseLeave() 49 | { 50 | TextEditor::OnMouseLeave(); 51 | background->UpdateProperty(true, FrameColor, BackGroundColor); 52 | } -------------------------------------------------------------------------------- /DreamEditor/TextArea.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "TextEditor.h" 3 | #include "TextContainer.h" 4 | #include "RenderableRoundCornerQuad.h" 5 | 6 | // NOtice InterfaceElement is 2D, so TextArea is 2D 7 | class TextArea : public TextEditor 8 | { 9 | public: 10 | TextArea(float w, float h, unsigned short* initialText, unsigned int numChars, Interface* inParent, bool useReference); 11 | ~TextArea(); 12 | 13 | // Interface Implmentation 14 | virtual void UpdatePosition(int newx, int newy); 15 | virtual void Render(); 16 | virtual void OnMouseOver(double xpos, double ypos); 17 | virtual void OnMouseLeave(); 18 | 19 | private: 20 | // Configurations 21 | static int CornerSize; 22 | static float FrameColor[3]; 23 | static float FrameHoverColor[3]; 24 | static float BackGroundColor[3]; 25 | 26 | private: 27 | // Renderable Objects 28 | RenderableRoundCornerQuad* background; 29 | }; -------------------------------------------------------------------------------- /DreamEditor/TextArea3D.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/TextArea3D.h -------------------------------------------------------------------------------- /DreamEditor/TextBox.h: -------------------------------------------------------------------------------- 1 | //#pragma once 2 | //#include "InterfaceElement.h" 3 | //#include "TextContainer.h" 4 | //#include "Renderable2DRoundCornerQuad.h" 5 | // 6 | //// A Text Field with single line cornered box frame 7 | //class TextBox : public InterfaceElement 8 | //{ 9 | //public: 10 | // TextBox(Interface* inParent, unsigned short* initialString, unsigned int numChars); // Override width and height property 11 | // ~TextBox(); // Destroy allocated memory 12 | // 13 | // // Interface Modification 14 | // virtual void UpdatePosition(int newx, int newy); 15 | // virtual void Render(); 16 | // virtual void OnMouseOver(double xpos, double ypos); 17 | // virtual void OnMouseLeave(); 18 | // 19 | //private: 20 | // // Static Variables 21 | // static int CornerSize; 22 | // static unsigned int XPadding; 23 | // static unsigned int YPadding; 24 | // static float FrameColor[3]; 25 | // static float FrameHoverColor[3]; 26 | // static float BackGroundColor[3]; 27 | // 28 | //private: 29 | // // Renderables 30 | // TextContainer* fieldText; 31 | // Renderable2DRoundCornerQuad* frame; 32 | //}; -------------------------------------------------------------------------------- /DreamEditor/TextBox3D.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/TextBox3D.h -------------------------------------------------------------------------------- /DreamEditor/TextEditor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "TextContainer.h" 3 | #include "InterfaceElement.h" 4 | 5 | // A base abstraction for SearchField and TextArea and TextField (All 2D, so Not for TextNode) 6 | class TextEditor : public InterfaceElement 7 | { 8 | public: 9 | TextEditor(float w, float h, unsigned short* initialText, unsigned int numChars, unsigned int fSize, float inColor[3], Interface* inParent, bool singleLine, bool fixWidth, bool fixHeight, bool useReference); 10 | ~TextEditor(); 11 | 12 | // Base Interface Implementation 13 | virtual void UpdatePosition(int newx, int newy); 14 | virtual void Render(); 15 | virtual void OnMouseOver(double xpos, double ypos); 16 | virtual void OnMouseButton(int button, int action, int mods, double xpos, double ypos); 17 | virtual void OnKeyboardButton(int key, int scancode, int action, int mods); 18 | virtual void OnTextInput(unsigned short* string, unsigned int numChars); 19 | virtual void OnDropWindow(int count, const char** paths); 20 | virtual void OnMouseLeave(); 21 | 22 | // Text Update Facility 23 | //void UpdateContent(unsigned short* newText, unsigned int numChars); 24 | void AssociateStringData(StringData* newString); 25 | 26 | protected: 27 | // Children May change value 28 | static unsigned int XPadding; 29 | static unsigned int YPadding; 30 | 31 | // Children may query 32 | unsigned int GetTextHeight(); 33 | 34 | private: 35 | TextContainer* text; 36 | }; -------------------------------------------------------------------------------- /DreamEditor/TextField3D.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/TextField3D.h -------------------------------------------------------------------------------- /DreamEditor/TextLabel.cpp: -------------------------------------------------------------------------------- 1 | #include "TextLabel.h" 2 | #include "Constants.h" 3 | #include "Colors.h" 4 | #include "MathElegent.h" 5 | 6 | TextLabel::TextLabel(unsigned short* initialText, bool dynamic, Interface* inParent) 7 | { 8 | text = new RenderableString(inParent, initialText, GetStringLength(initialText), 9 | Color::DefaultTextColor, InterfaceConstant::DefaultFontSize, dynamic, false); 10 | 11 | width = text->GetStringWidth(); 12 | height = text->GetStringHeight(); 13 | parent = inParent; 14 | } 15 | 16 | TextLabel::TextLabel(unsigned short* initialText, bool dynamic, float inColor[3], Interface* inParent) 17 | { 18 | text = new RenderableString(inParent, initialText, GetStringLength(initialText), 19 | inColor, InterfaceConstant::DefaultFontSize, dynamic, false); 20 | 21 | width = text->GetStringWidth(); 22 | height = text->GetStringHeight(); 23 | parent = inParent; 24 | } 25 | 26 | TextLabel::~TextLabel() 27 | { 28 | delete text; 29 | } 30 | 31 | // Interface Implmentation 32 | void TextLabel::UpdatePosition(int newx, int newy) 33 | { 34 | InterfaceElement::UpdatePosition(newx, newy); 35 | text->Translation(newx, newy, 0.1); 36 | } 37 | 38 | void TextLabel::OffsetPosition(int dx, int dy, float dz) 39 | { 40 | InterfaceElement::OffsetPosition(dx, dy, dz); 41 | text->Translate((float)dx, (float)dy, dz); 42 | } 43 | 44 | void TextLabel::Render() 45 | { 46 | text->Render(); 47 | } 48 | 49 | void TextLabel::UpdateContent(unsigned short* newText, float inColor[3]) 50 | { 51 | text->UpdateBuffers_Line(newText, GetStringLength(newText), InterfaceConstant::DefaultFontSize); 52 | 53 | width = text->GetStringWidth(); 54 | height = text->GetStringHeight(); 55 | } 56 | 57 | void TextLabel::UpdateTransparancy(float value) 58 | { 59 | text->UpdateTransparancy(value); 60 | } -------------------------------------------------------------------------------- /DreamEditor/TextLabel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "InterfaceElement.h" 3 | #include "RenderableString.h" 4 | 5 | class TextLabel : public InterfaceElement 6 | { 7 | public: 8 | TextLabel(unsigned short* initialText, bool dynamic, Interface* inParent); 9 | TextLabel(unsigned short* initialText, bool dynamic, float inColor[3], Interface* inParent); 10 | ~TextLabel(); 11 | 12 | // Interface Implmentation 13 | virtual void UpdatePosition(int newx, int newy); 14 | virtual void OffsetPosition(int dx, int dy, float dz); 15 | virtual void Render(); 16 | virtual void OnMouseOver(double xpos, double ypos){}; 17 | virtual void OnMouseButton(int button, int action, int mods, double xpos, double ypos){}; 18 | virtual void OnKeyboardButton(int key, int scancode, int action, int mods){}; 19 | virtual void OnTextInput(unsigned short* text, unsigned int numChars){}; 20 | virtual void OnDropWindow(int count, const char** paths){}; 21 | 22 | // Update Facility 23 | void UpdateContent(unsigned short* newText, float inColor[3] = NULL); 24 | void UpdateTransparancy(float value); // Animations can use this 25 | 26 | private: 27 | // Renderable Objects 28 | RenderableString* text; 29 | }; -------------------------------------------------------------------------------- /DreamEditor/TextNode.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/TextNode.cpp -------------------------------------------------------------------------------- /DreamEditor/TextNodePropertyPanel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PropertyPanel.h" 3 | #include "Button.h" 4 | #include "TextLabel.h" 5 | #include "Panel.h" 6 | 7 | class TextNode; 8 | 9 | /* Provide Access to TextNode properties*/ 10 | /* Apply Change to TextNode: None(Transformation Information are not directly Editable since not needed, the only one that needs to be editable is for MeshNode, scale property); 11 | Exposed Fields of TextNode: Tranformation Information, Export Button; 12 | */ 13 | class TextNodePropertyPanel : public PropertyPanel 14 | { 15 | public: 16 | TextNodePropertyPanel(); 17 | ~TextNodePropertyPanel(); 18 | 19 | // Interface Implementation 20 | // Render Request 21 | virtual void Render(); 22 | 23 | // Specific TextNode interactions 24 | virtual void OnElementMouseButton(InterfaceElement* element, int button, int action, int mods); // Action handling: Call TextNode Export() 25 | 26 | // Node Association 27 | // void AssociateNode(TextNode* in); // Change focus from current associated node the newly selected one, update Interface Elements Accordingly 28 | void Show(TextNode* node); 29 | void UpdateTransformInfo(); // When an text node has been moved it will call this function 30 | // Acess TextNode, get TransformData, and updata Interface Elements 31 | 32 | private: 33 | static float TextureCoords[8]; 34 | 35 | private: 36 | // Interface Elements: Specific to interactions with TextNode 37 | TextLabel* labelText; // "Image:" 38 | TextLabel* labelCreation; // "Creation Time:" 39 | TextLabel* labelCreationTime; // "2015-08-30" 40 | 41 | TextLabel* labelEdit; // "Edit Time" 42 | TextLabel* labelEditTime; // "2015-08-30" 43 | 44 | //// __Debug For purely experimental purpose, final release doesn't need 45 | //TextLabel* labelTransformation; // "Transformation:" 46 | //TextLabel* labelX; // "X" 47 | //TextLabel* labelY; // "Y" 48 | //TextLabel* labelZ; // "Z" 49 | 50 | //TextLabel* labelXValue; // "0.1256" 51 | //TextLabel* labelYValue; // "0.3578" 52 | //TextLabel* labelZValue; // "0.3684" 53 | 54 | Button* exportButton; 55 | 56 | // Important Referenced Object 57 | TextNode* currentAssociation = NULL; 58 | }; -------------------------------------------------------------------------------- /DreamEditor/TextSpecParser.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "LinkedList.h" 4 | using std::string; 5 | class Attribute; 6 | 7 | /* TextSpecParser is used to read in general purpose Text Files following the format 8 | attribute = value in each line. 9 | - Each text parser is associated with a file, and contain the dissected values of the file. 10 | - ANSI only 11 | */ 12 | /* The parser isn't aware of the underlying file content or order, but just organize things in a structure pending retriving 13 | - When same parameters are repeted, fire a warning and ignore the second declaration 14 | - When retriving, user has expetecd type, when type doesn't match, return NULL 15 | */ 16 | class TextSpecParser 17 | { 18 | public: 19 | TextSpecParser(const char* filePath); // Expect Abs or cwd relative file path 20 | ~TextSpecParser(); 21 | 22 | public: 23 | // Retrieve functions: Return the value if type matches, input expect NULL terminated 24 | // Return NULL if cannot find 25 | const int* GetInt(char* attributeName); 26 | const float* GetFloat(char* attributeName); 27 | const bool* GetBool(char* attributeName); 28 | const float* GetFloatArray(char* attributeName, unsigned int size); 29 | const char* GetString(char* attributeName); // NULL terminated ANSI/ASCII/UTF-8 ASCII Page 30 | 31 | // Debug Use 32 | void PrintAttributeStructure(); 33 | 34 | private: 35 | // Parsing Function 36 | void ParseLine(char* data, unsigned int size); // And in the end it turns out I am more comfortable with bytes 37 | 38 | // Search Function, used internally, so name is not NULL terminated 39 | Attribute* FindAttribute(char* name, unsigned int length); 40 | // Helper Function 41 | bool StringEqual(const char* str1, const char* str2, unsigned int bytes); // Return true if equal 42 | 43 | private: 44 | // Datas 45 | LinkedList attributes; 46 | }; 47 | 48 | // Pending: Thorough Logic Check; Deallocation; Ignore Attributes that already appeared; Adding Gettting methods -------------------------------------------------------------------------------- /DreamEditor/Time.cpp: -------------------------------------------------------------------------------- 1 | #include "Time.h" 2 | #include 3 | #include // Warning Portability since we are using unsigned short* 4 | 5 | unsigned short Time::timeString[20] = {}; 6 | 7 | unsigned short* Time::GetString() 8 | { 9 | //swprintf((wchar_t*)timeString, 19+1, L"%0.4u-%02.2u-%02.2u %02.2u:%02.2u:%02.2u", 10 | swprintf((wchar_t*)timeString, 16 + 1, L"%0.4u-%02.2u-%02.2u %02.2u:%02.2u", 11 | (unsigned int)year, (unsigned int)month, (unsigned int)day, 12 | (unsigned int)hour, (unsigned int)minute, (unsigned int)second); // Automatically append a NULL 13 | return timeString; 14 | } 15 | 16 | unsigned int Time::GetStringLength() 17 | { 18 | return 16 + 1; 19 | } -------------------------------------------------------------------------------- /DreamEditor/Time.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | // Notice: when later modify this class, if needed, notice do not casually change class size and organization since loadgin and saving depends on it 3 | class Time 4 | { 5 | public: 6 | unsigned short year; 7 | unsigned char day; 8 | unsigned char month; 9 | unsigned char hour; 10 | unsigned char minute; 11 | unsigned char second; 12 | 13 | public: 14 | unsigned short* GetString(); // Used for label elements; Caller is responsible for releasing memory 15 | unsigned int GetStringLength(); // In case the user is interested in serialize our output and would like to know how long a string we are generating; Doesn't include NULL terminating character 16 | 17 | private: 18 | static unsigned short timeString[20]; // Shared Internal Time String 19 | // Format: "2015-09-07 05:03:29", total 19 chars + 1 NUll char 20 | }; -------------------------------------------------------------------------------- /DreamEditor/WindowMenuPopupMenu.cpp: -------------------------------------------------------------------------------- 1 | #include "WindowMenuPopupMenu.h" 2 | #include "GraphManager.h" 3 | #include "Colors.h" 4 | 5 | WindowMenuPopupMenu::WindowMenuPopupMenu(GraphManager* g) 6 | :graph(g) 7 | { 8 | // Create Interface Elements 9 | fullscreen = new Button((unsigned short*)Interface_PopupMenu_Fullscreen, this, false, 0, ColorScheme::PopupButton); 10 | 11 | // Use a layout 12 | AutoExpandGridLayout layout(LayoutBeginPositionX, LayoutBeginPositionY, LayoutRowPadding, LayoutColumnPadding); 13 | layout.AddToNewRow(fullscreen); 14 | layout.Dispatch(); 15 | 16 | // Set up a background shape 17 | backgroundRect = new StaticShape(this, ShapeType::Shape_BorderedSquare, layout.layoutWidth, layout.layoutHeight); 18 | 19 | // Offset Z Height abit to avoid being overlaped by others. 20 | backgroundRect->OffsetPosition(0, 0, 0.2f); 21 | fullscreen->OffsetPosition(0, 0, 0.4f); 22 | 23 | // Set up correct viewport size, adhering to WindowMenu button position 24 | viewportW = layout.layoutWidth + LayoutBeginPositionX; 25 | viewportH = layout.layoutHeight - LayoutBeginPositionY; // LayoutBeginPositionY would normally be negative 26 | 27 | // Setup Interaction Callbacks 28 | GraphManager::RegisterPopupMenuElements(fullscreen); 29 | 30 | // Update Projection and View 31 | UpdateProjection(); 32 | } 33 | 34 | WindowMenuPopupMenu::~WindowMenuPopupMenu() 35 | { 36 | delete backgroundRect; 37 | delete fullscreen; 38 | } 39 | 40 | // Interface Implementation 41 | void WindowMenuPopupMenu::Render() 42 | { 43 | backgroundRect->Render(); 44 | fullscreen->Render(); 45 | } 46 | 47 | void WindowMenuPopupMenu::OnElementMouseButton(InterfaceElement* element, int button, int action, int mods) // When Interface Element is selected, call relavent functionality 48 | { 49 | if (element == fullscreen && action == GLFW_PRESS) 50 | { 51 | graph->SwitchFullScreen(); 52 | } 53 | } -------------------------------------------------------------------------------- /DreamEditor/WindowMenuPopupMenu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PopupMenu.h" 3 | #include "Button.h" 4 | #include "GridLayout.h" 5 | #include "StaticShape.h" 6 | 7 | // Avoid Circular Dependancy 8 | class MainMenu; 9 | class GraphManager; 10 | 11 | /*Popup menu is special in that its viewport with change dynamically depending on where it's summoned*/ 12 | class WindowMenuPopupMenu : public PopupMenu 13 | { 14 | public: 15 | WindowMenuPopupMenu(GraphManager* g); // Set Up all elements 16 | ~WindowMenuPopupMenu(); // Destroy all Elements 17 | 18 | // Render 19 | virtual void Render(); 20 | virtual void OnElementMouseButton(InterfaceElement* element, int button, int action, int mods); 21 | 22 | private: 23 | // Interface Elements 24 | Button* fullscreen; 25 | StaticShape* backgroundRect; 26 | 27 | // Important referenced Object 28 | GraphManager* graph; 29 | }; -------------------------------------------------------------------------------- /DreamEditor/World.cpp: -------------------------------------------------------------------------------- 1 | #include "World.h" 2 | 3 | float World::DefaultFogDepth = 25; 4 | glm::vec3 World::DefaultSunDirection = glm::vec3(63.449, -12.359, 17.615); 5 | 6 | World::World() 7 | { 8 | // Properties Initialization 9 | fogDepth = DefaultFogDepth; 10 | } 11 | 12 | World::~World() 13 | { 14 | 15 | } -------------------------------------------------------------------------------- /DreamEditor/World.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | // A Class Describes the World 8 | class World 9 | { 10 | public: 11 | // World Interface 12 | World(); 13 | ~World(); 14 | 15 | float GetSightDepth() { return fogDepth; } 16 | 17 | protected: 18 | // World Properties; Directly Accessible for Child Class 19 | float fogDepth; // In meters 20 | glm::vec3 sunDirection; // In Degress 21 | 22 | private: 23 | // Default World Configurations; Provides a way to retrieve it back if undergoes dynamic changing 24 | static float DefaultFogDepth; 25 | static glm::vec3 DefaultSunDirection; 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /DreamEditor/WorldMap.h: -------------------------------------------------------------------------------- 1 | //#pragma once 2 | //#include "InterfaceElement.h" 3 | //#include "RenderableString.h" 4 | //#include "RenderableRoundCornerFrame.h" 5 | //#include "RenderableImageRect.h" 6 | //#include "RenderableCirclesInstance.h" 7 | // 8 | //class WorldMap : public InterfaceElement 9 | //{ 10 | //public: 11 | // WorldMap(unsigned int width, unsigned int height, Interface* parent); 12 | // ~WorldMap(); 13 | // 14 | // // Interface Implementation 15 | // virtual void UpdatePosition(int newx, int newy); 16 | // virtual void Render(); 17 | // virtual void OnMouseOver(double xpos, double ypos); 18 | // virtual void OnMouseButton(int button, int action, int mods, double xpos, double ypos); 19 | // virtual void OnKeyboardButton(int key, int scancode, int action, int mods); 20 | // virtual void OnTextInput(unsigned short* string, unsigned int numChars); 21 | // virtual void OnDropWindow(int count, const char** paths); 22 | // virtual void OnMouseLeave(); 23 | // 24 | //private: 25 | // // Bookeeping 26 | // 27 | //private: 28 | // // Renderables: A Map editor will show one major section, and fractions of other smaller sections, so a total of 9 sections at a time 29 | // // ----------- Horizontal Marks 30 | // RenderableString* horiMark1; 31 | // RenderableString* horiMark2; 32 | // RenderableString* horiMark3; 33 | // RenderableRoundCornerFrame* horiSqaure; 34 | // // ----------- Vertical Marks 35 | // RenderableString* vertMark1; 36 | // RenderableString* vertMark2; 37 | // RenderableString* vertMark3; 38 | // RenderableRoundCornerFrame* vertSquare; 39 | // // ----------- Map View 40 | // RenderableImageRect* section1; 41 | // RenderableImageRect* section2; 42 | // RenderableImageRect* section3; 43 | // RenderableImageRect* section4; 44 | // RenderableImageRect* section5; 45 | // RenderableImageRect* section6; 46 | // RenderableImageRect* section7; 47 | // RenderableImageRect* section8; 48 | // RenderableImageRect* section9; 49 | // RenderableRoundCornerFrame* mapSquare; 50 | // // ----------- Indicator Batch 51 | // RenderableCirclesInstance* indicators; 52 | //}; -------------------------------------------------------------------------------- /DreamEditor/icon1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/icon1.ico -------------------------------------------------------------------------------- /DreamEditor/icon1_Back.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/icon1_Back.ico -------------------------------------------------------------------------------- /DreamEditor/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/DreamEditor/resource.h -------------------------------------------------------------------------------- /Execution Environment/Assimp32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Assimp32.dll -------------------------------------------------------------------------------- /Execution Environment/Data/CanvasFrame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/CanvasFrame.png -------------------------------------------------------------------------------- /Execution Environment/Data/CharMap.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/CharMap.fnt -------------------------------------------------------------------------------- /Execution Environment/Data/CharMap_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/CharMap_0.png -------------------------------------------------------------------------------- /Execution Environment/Data/CharMap_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/CharMap_1.png -------------------------------------------------------------------------------- /Execution Environment/Data/DefaultColorTextureMask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/DefaultColorTextureMask.png -------------------------------------------------------------------------------- /Execution Environment/Data/DefaultEmissiveTextureMask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/DefaultEmissiveTextureMask.png -------------------------------------------------------------------------------- /Execution Environment/Data/DefaultEnvBase.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/DefaultEnvBase.jpg -------------------------------------------------------------------------------- /Execution Environment/Data/DefaultMeshTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/DefaultMeshTexture.png -------------------------------------------------------------------------------- /Execution Environment/Data/DefaultNormalTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/DefaultNormalTexture.png -------------------------------------------------------------------------------- /Execution Environment/Data/DefaultSpecularTextureMask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/DefaultSpecularTextureMask.png -------------------------------------------------------------------------------- /Execution Environment/Data/Interface_Chn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/Interface_Chn.png -------------------------------------------------------------------------------- /Execution Environment/Data/Interface_Eng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/Interface_Eng.png -------------------------------------------------------------------------------- /Execution Environment/Data/Reference/Terrain_AO.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/Reference/Terrain_AO.jpg -------------------------------------------------------------------------------- /Execution Environment/Data/Reference/Terrain_DISP.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/Reference/Terrain_DISP.jpg -------------------------------------------------------------------------------- /Execution Environment/Data/Reference/Terrain_SPEC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/Reference/Terrain_SPEC.jpg -------------------------------------------------------------------------------- /Execution Environment/Data/Shaders/InstancedCirclesFragment.shader: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | in vec3 color; 4 | out vec4 fcolor; 5 | 6 | void main() 7 | { 8 | fcolor = vec4(color.rgb, 1.0); 9 | } -------------------------------------------------------------------------------- /Execution Environment/Data/Shaders/InstancedCirclesVertex.shader: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout(location = 0) in vec3 vertPosition; 4 | layout(location = 1) in vec3 shapePosition; 5 | layout(location = 2) in vec3 shapeColor; 6 | 7 | layout(location = 3) uniform mat4x4 VP; 8 | layout(location = 4) uniform vec3 highlightColor; 9 | layout(location = 5) uniform unsigned int highlightID; 10 | 11 | out vec3 color; 12 | 13 | void main() 14 | { 15 | if(highlightID == instanceID) 16 | { 17 | color = highlightColor; 18 | } 19 | else 20 | { 21 | color = shapeColor; 22 | } 23 | gl_Position = VP * vec4(vertPosition + shapePosition, 1); 24 | } -------------------------------------------------------------------------------- /Execution Environment/Data/Shaders/PhongShadingProgramVertex - StandardPhong.shader: -------------------------------------------------------------------------------- 1 | //(RendeableMesh Property) 2 | //v: loc0 vec3 position 3 | // loc1 vec3 normal 4 | // loc2 vec3 tangent 5 | // loc3 vec2 texCoord 6 | // loc4 mat4x4 Model 7 | // loc14 mat4x4 View 8 | // loc15 mat4x4 Projection 9 | // 10 | // loc12 vec3 directionalLightDir - from canvas, dynamic 11 | // loc13 vec3 pointLightLocation 12 | #version 430 core 13 | 14 | // Per-Vetex Inputs 15 | layout (location = 0) in vec3 position; 16 | layout (location = 1) in vec3 normal; 17 | layout (location = 2) in vec3 tangent; 18 | layout (location = 3) in vec2 texCoord; 19 | 20 | // Per Mesh Uniform 21 | layout (location = 4) uniform mat4x4 Model; 22 | layout (location = 14) uniform mat4x4 View; 23 | layout (location = 15) uniform mat4x4 Projection; 24 | layout (location = 12) uniform vec3 directionalLightDir; 25 | layout (location = 13) uniform vec3 pointLightLocation; 26 | 27 | // Outputs 28 | out VertexOut 29 | { 30 | vec3 Normal; 31 | vec3 PointLightVector; 32 | vec3 DirectionalLightVector; 33 | vec3 View; 34 | } vertexData; 35 | 36 | // Main Program 37 | void main(void) 38 | { 39 | mat4x4 ModelView = View * Model; 40 | 41 | // Calculate view-space coordinate 42 | vec4 P = ModelView * vec4(position, 1); 43 | 44 | // Calculate view-space normal 45 | vertexData.Normal = mat3(ModelView) * normal; 46 | 47 | // Calculate light vector 48 | vertexData.PointLightVector = vec3(ModelView * vec4(pointLightLocation, 1)) - P.xyz; 49 | vertexData.DirectionalLightVector = mat3(View) * directionalLightDir; 50 | 51 | // Calculate view vector(simply the negative of the view-space position) 52 | vertexData.View = -P.xyz; 53 | 54 | // Calculate the clip-space position of each vertex 55 | gl_Position = Projection * P; 56 | } -------------------------------------------------------------------------------- /Execution Environment/Data/Shaders/SEMRoughSpecularFragment.shader: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | layout (binding = 0) uniform sampler2D environmentBase; // Environment of Mat 3 | layout (binding = 1) uniform sampler2D environmentTop; // Blurred EnvironmentMap 4 | layout (binding = 2) uniform sampler2D glossMap; // Roughness 5 | 6 | in VertexData 7 | { 8 | vec3 normal; 9 | vec3 view; 10 | vec2 texCoord; 11 | } vertexData; 12 | 13 | layout (location = 0) out vec4 color; 14 | 15 | void main(void) 16 | { 17 | // Normalize view vector 18 | vec3 v = normalize(vertexData.view); 19 | 20 | // Reflect v about the plane defined by the normal at the fragment 21 | vec3 r = reflect(v, normalize(vertexData.normal)); 22 | 23 | // Compute scale factor 24 | float m = 2. * sqrt( pow( r.x, 2. ) + pow( r.y, 2. ) + pow( r.z + 1., 2. ) ); 25 | vec2 envCoord = r.xy / m + .5; 26 | 27 | // Sample gloss factor from glossmap texture 28 | float gloss = texture(glossMap, vertexData.texCoord).r; 29 | 30 | // Sample from environment maps 31 | vec3 base = texture2D( environmentBase, envCoord ).rgb; 32 | vec3 topping = texture2D( environmentTop, envCoord ).rgb; 33 | vec3 combine = mix(topping, base, gloss); // Gloss defined the amout of base 34 | 35 | // Output Color 36 | color = vec4(combine, 1.0); 37 | //color = vec4(texture(glossMap, vertexData.texCoord).rgb, 1.0); // Debug GlossMap 38 | //color = vec4(vertexData.texCoord.y, vertexData.texCoord.y, vertexData.texCoord.y, 1.0); // Test Texture Coordinate 39 | } -------------------------------------------------------------------------------- /Execution Environment/Data/Shaders/SEMRoughSpecularVertex.shader: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout (location = 0) in vec3 position; 4 | layout (location = 1) in vec3 normal; 5 | layout (location = 3) in vec2 texCoord; // Same as Phong, because this is implemented in REnderable3DMesh object Vertex Array Obejct 6 | 7 | layout (location = 3) uniform mat4x4 Model; 8 | layout (location = 4) uniform mat4x4 View; 9 | layout (location = 5) uniform mat4x4 Projection; 10 | 11 | out VertexData 12 | { 13 | vec3 normal; 14 | vec3 view; 15 | vec2 texCoord; 16 | } vertexData; 17 | 18 | void main(void) 19 | { 20 | // Temp 21 | mat4 modelView = View * Model; 22 | vec4 posView = modelView * vec4(position, 1); 23 | 24 | // Pass Data 25 | vertexData.normal = mat3(modelView) * normal; 26 | vertexData.view = posView.xyz; 27 | vertexData.texCoord = texCoord; 28 | 29 | // Output Vertex 30 | gl_Position = Projection * posView; 31 | } -------------------------------------------------------------------------------- /Execution Environment/Data/Shaders/ShapeProgramFragment.shader: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout(location = 2) uniform vec3 color; 4 | layout(location = 3) uniform float timeScale; 5 | 6 | out vec4 fcolor; 7 | 8 | void main() 9 | { 10 | fcolor = vec4(color.rgb, timeScale); 11 | } -------------------------------------------------------------------------------- /Execution Environment/Data/Shaders/ShapeProgramVertex.shader: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout(location = 0) in vec3 position; 4 | layout(location = 1) uniform mat4x4 MVP; 5 | void main() 6 | { 7 | gl_Position = MVP * vec4(position, 1); 8 | } -------------------------------------------------------------------------------- /Execution Environment/Data/Shaders/SimpleTextureProgramFragment.shader: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | // Provide 1 texture bindings 4 | layout(binding = 0) uniform sampler2D texture0; 5 | layout(location = 3) uniform float rotationU; 6 | layout(location = 4) uniform float transparency; 7 | 8 | in vec2 tc; 9 | out vec4 fcolor; 10 | 11 | void main() 12 | { 13 | vec4 color = texture(texture0,vec2(tc.x+rotationU, tc.y)); // color.a is a valid componnet 14 | fcolor = vec4(color.rgb, color.a * transparency); 15 | //fcolor = vec4(tc.y, tc.y, tc.y , 1); // Debug TC 16 | //float value = texture(texture0,tc); fcolor = vec4(value, value, value , 1); // Debug ShadowMap 17 | } -------------------------------------------------------------------------------- /Execution Environment/Data/Shaders/SimpleTextureProgramVertex.shader: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | // 3D position is necessary since we will use it in 3D space as well 4 | layout(location = 0) in vec3 position; 5 | layout(location = 1) in vec2 texCoord; 6 | layout(location = 2) uniform mat4x4 MVP; 7 | 8 | out vec2 tc; 9 | 10 | void main() 11 | { 12 | gl_Position = MVP * vec4(position, 1); 13 | tc = texCoord; 14 | } -------------------------------------------------------------------------------- /Execution Environment/Data/Shaders/TextProgramFragment.shader: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout(location = 4) uniform vec3 color; 4 | layout(location = 5) uniform float trans; 5 | // Provide Upto 2 texture bindings 6 | layout(binding = 0) uniform sampler2D texture0; 7 | layout(binding = 1) uniform sampler2D texture1; 8 | 9 | flat in int id; 10 | in vec2 tc; 11 | out vec4 fcolor; 12 | 13 | void main() 14 | { 15 | switch(id) 16 | { 17 | case 0: 18 | fcolor = vec4(color.rgb,trans) * texture(texture0,tc).r; 19 | break; 20 | case 1: 21 | fcolor = vec4(color.rgb,trans) * texture(texture1,tc).r; 22 | break; 23 | default: 24 | fcolor = vec4(color.rgb,trans); 25 | break; 26 | } 27 | } -------------------------------------------------------------------------------- /Execution Environment/Data/Shaders/TextProgramVertex.shader: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | // 3D position is necessary since we will use it in 3D space as well 4 | layout(location = 0) in vec3 position; 5 | layout(location = 1) in vec2 textureCoord; 6 | layout(location = 2) in int mapID; 7 | layout(location = 3) uniform mat4x4 MVP; 8 | 9 | out vec2 tc; 10 | flat out int id; 11 | 12 | void main() 13 | { 14 | gl_Position = MVP * vec4(position, 1); 15 | tc = textureCoord; 16 | id = mapID; 17 | } -------------------------------------------------------------------------------- /Execution Environment/Data/Terrain.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.76 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | mtllib Terrain.mtl 4 | o Plane 5 | v -100000.000000 0.000000 100000.000000 6 | v 100000.000000 0.000000 100000.000000 7 | v -100000.000000 0.000000 -100000.000000 8 | v 100000.000000 0.000000 -100000.000000 9 | vt 21596.181641 -21595.181641 10 | vt 21596.181641 21596.181641 11 | vt -21595.181641 21596.181641 12 | vt -21595.181641 -21595.181641 13 | vn 0.000000 1.000000 0.000000 14 | usemtl None 15 | s off 16 | f 2/1/1 4/2/1 3/3/1 17 | f 1/4/1 2/1/1 3/3/1 18 | -------------------------------------------------------------------------------- /Execution Environment/Data/Terrain.spec: -------------------------------------------------------------------------------- 1 | Shader = 3 2 | ShapeMesh = "Terrain.obj" 3 | 4 | GroundColor={0.1, 0.1, 0.1} 5 | 6 | PointLightColor = {0.25, 0.25, 0.25} 7 | PointLightLocation = {0.0, 10.0, 0.0} 8 | 9 | DiffuseColor = {1.0, 1.0, 1.0} 10 | DiffuseTexture = "TerrainD.jpg" 11 | 12 | SpecularPower = 32.0 // Not useful since we have specular texture -> Actually we used this to control the Maximum Multiply value 13 | //SpecularPower = 0.f 14 | SpecularTexture = "TerrainS.jpg" // Currently our scene is too bright thus Specular look overbright when specularity is 0 15 | // Or actually it is because this specualr map isn't well tunned 16 | 17 | EmissiveColor = {0.0, 0.0, 0.0} 18 | NormalTexture = "TerrainN.jpg" 19 | 20 | // We cannot embed a sky dome in the object because of clipping distance, and we shouldn't make that too high -------------------------------------------------------------------------------- /Execution Environment/Data/TerrainD.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/TerrainD.jpg -------------------------------------------------------------------------------- /Execution Environment/Data/TerrainN.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/TerrainN.jpg -------------------------------------------------------------------------------- /Execution Environment/Data/TerrainS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Data/TerrainS.jpg -------------------------------------------------------------------------------- /Execution Environment/DevIL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/DevIL.dll -------------------------------------------------------------------------------- /Execution Environment/Documentation/English/Mesh Spec Documentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Documentation/English/Mesh Spec Documentation.pdf -------------------------------------------------------------------------------- /Execution Environment/Documentation/English/User Manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Documentation/English/User Manual.pdf -------------------------------------------------------------------------------- /Execution Environment/Documentation/中文/用户手册.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Documentation/中文/用户手册.pdf -------------------------------------------------------------------------------- /Execution Environment/Documentation/中文/网格物体配置文件说明文档.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Documentation/中文/网格物体配置文件说明文档.pdf -------------------------------------------------------------------------------- /Execution Environment/ILU.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/ILU.dll -------------------------------------------------------------------------------- /Execution Environment/Note (Folders are Trivial Copy of Debug Version)(Deletable).txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/Note (Folders are Trivial Copy of Debug Version)(Deletable).txt -------------------------------------------------------------------------------- /Execution Environment/Test_InstallAssoc(Not Working).bat: -------------------------------------------------------------------------------- 1 | rem reference: http://commandwindows.com/assoc.htm 2 | assoc .dream=dreamfile 3 | ftype dreamfile="DreamEditor.exe" "%1" 4 | -------------------------------------------------------------------------------- /Execution Environment/glew32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/glew32.dll -------------------------------------------------------------------------------- /Execution Environment/glfw3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/glfw3.dll -------------------------------------------------------------------------------- /Execution Environment/log.txt: -------------------------------------------------------------------------------- 1 | Dream Editor Application Log: 2 | -------------------------------------------------------------------------------- /Execution Environment/梦境编辑器.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Execution Environment/梦境编辑器.exe -------------------------------------------------------------------------------- /Include/IL/config.h.win: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_H__ 2 | #define __CONFIG_H__ 3 | 4 | #define IL_USE_PRAGMA_LIBS // Links to only the libraries that are requested. 5 | #define IL_INLINE_ASM 1 // Define if you can support at least some ASM 6 | 7 | // Supported images formats (IL) 8 | 9 | // #define IL_NO_BLP 10 | // #define IL_NO_BMP 11 | // #define IL_NO_CUT 12 | // #define IL_NO_CHEAD 13 | // #define IL_NO_DCX 14 | // #define IL_NO_DDS 15 | // #define IL_NO_DICOM 16 | // #define IL_NO_DOOM 17 | // #define IL_NO_EXR 18 | // #define IL_NO_FITS 19 | // #define IL_NO_FTX 20 | // #define IL_NO_GIF 21 | // #define IL_NO_HDR 22 | // #define IL_NO_ICO 23 | // #define IL_NO_ICNS 24 | // #define IL_NO_IWI 25 | // #define IL_NO_JP2 26 | // #define IL_NO_JPG 27 | // #define IL_NO_LCMS 28 | // #define IL_NO_LIF 29 | // #define IL_NO_MDL 30 | // #define IL_NO_MNG 31 | // #define IL_NO_PCD 32 | // #define IL_NO_PCX 33 | // #define IL_NO_PIC 34 | // #define IL_NO_PIX 35 | // #define IL_NO_PNG 36 | // #define IL_NO_PNM 37 | // #define IL_NO_PSD 38 | // #define IL_NO_PSP 39 | // #define IL_NO_PXR 40 | // #define IL_NO_RAW 41 | // #define IL_NO_ROT 42 | // #define IL_NO_SGI 43 | // #define IL_NO_SUN 44 | // #define IL_NO_TGA 45 | // #define IL_NO_TIF 46 | // #define IL_NO_TPL 47 | // #define IL_NO_WAL 48 | // #define IL_NO_WDP 49 | // #define IL_NO_XPM 50 | 51 | #define IL_USE_JPEGLIB_UNMODIFIED 1 52 | #define IL_USE_DXTC_NVIDIA 53 | #define IL_USE_DXTC_SQUISH 54 | 55 | //#define IL_NO_GAMES 56 | 57 | /* Supported api (ilut) */ 58 | 59 | 60 | // 61 | // sorry just 62 | // cant get this one to work under windows 63 | // have disabled for the now 64 | // 65 | // will look at it some more later 66 | // 67 | // Kriss 68 | // 69 | #undef ILUT_USE_ALLEGRO 70 | 71 | #undef ILUT_USE_DIRECTX8 72 | #define ILUT_USE_DIRECTX9 73 | #define ILUT_USE_DIRECTX10 74 | #define ILUT_USE_OPENGL 75 | #define ILUT_USE_SDL 76 | #define ILUT_USE_WIN32 77 | 78 | 79 | #endif /* __CONFIG_H__ */ 80 | -------------------------------------------------------------------------------- /Include/IL/ilu_region.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // ImageLib Utility Sources 4 | // Copyright (C) 2000-2002 by Denton Woods 5 | // Last modified: 07/09/2002 <--Y2K Compliant! =] 6 | // 7 | // Filename: src-ILU/src/ilu_region.h 8 | // 9 | // Description: Creates an image region. 10 | // 11 | //----------------------------------------------------------------------------- 12 | 13 | #ifndef ILU_REGION_H 14 | #define ILU_REGION_H 15 | 16 | typedef struct Edge 17 | { 18 | ILint yUpper; 19 | ILfloat xIntersect, dxPerScan; 20 | struct Edge *next; 21 | } Edge; 22 | 23 | 24 | #endif//ILU_REGION_H 25 | 26 | -------------------------------------------------------------------------------- /Include/IL/ilut_config.h: -------------------------------------------------------------------------------- 1 | #ifndef __ILUT_CONFIG_H__ 2 | #define __ILUT_CONFIG_H__ 3 | 4 | #define IL_USE_PRAGMA_LIBS 5 | 6 | // Supported APIs (ILUT) 7 | 8 | // 9 | // sorry just 10 | // cant get this one to work under windows 11 | // have disabled for the now 12 | // 13 | // will look at it some more later 14 | // 15 | // Kriss 16 | // 17 | #undef ILUT_USE_ALLEGRO 18 | 19 | #undef ILUT_USE_DIRECTX8 20 | //#define ILUT_USE_DIRECTX9 21 | //#define ILUT_USE_DIRECTX10 22 | #define ILUT_USE_OPENGL 23 | //#define ILUT_USE_SDL 24 | #define ILUT_USE_WIN32 25 | 26 | #endif//__ILUT_CONFIG_H__ 27 | -------------------------------------------------------------------------------- /Include/assimp/Compiler/poppack1.h: -------------------------------------------------------------------------------- 1 | 2 | // =============================================================================== 3 | // May be included multiple times - resets structure packing to the defaults 4 | // for all supported compilers. Reverts the changes made by #include 5 | // 6 | // Currently this works on the following compilers: 7 | // MSVC 7,8,9 8 | // GCC 9 | // BORLAND (complains about 'pack state changed but not reverted', but works) 10 | // =============================================================================== 11 | 12 | #ifndef AI_PUSHPACK_IS_DEFINED 13 | # error pushpack1.h must be included after poppack1.h 14 | #endif 15 | 16 | // reset packing to the original value 17 | #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) 18 | # pragma pack( pop ) 19 | #endif 20 | #undef PACK_STRUCT 21 | 22 | #undef AI_PUSHPACK_IS_DEFINED 23 | -------------------------------------------------------------------------------- /Include/assimp/Compiler/pushpack1.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | // =============================================================================== 4 | // May be included multiple times - sets structure packing to 1 5 | // for all supported compilers. #include reverts the changes. 6 | // 7 | // Currently this works on the following compilers: 8 | // MSVC 7,8,9 9 | // GCC 10 | // BORLAND (complains about 'pack state changed but not reverted', but works) 11 | // Clang 12 | // 13 | // 14 | // USAGE: 15 | // 16 | // struct StructToBePacked { 17 | // } PACK_STRUCT; 18 | // 19 | // =============================================================================== 20 | 21 | #ifdef AI_PUSHPACK_IS_DEFINED 22 | # error poppack1.h must be included after pushpack1.h 23 | #endif 24 | 25 | #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) 26 | # pragma pack(push,1) 27 | # define PACK_STRUCT 28 | #elif defined( __GNUC__ ) 29 | # if defined(__clang__) 30 | # define PACK_STRUCT __attribute__((__packed__)) 31 | # else 32 | # define PACK_STRUCT __attribute__((gcc_struct, __packed__)) 33 | # endif 34 | #else 35 | # error Compiler not supported 36 | #endif 37 | 38 | #if defined(_MSC_VER) 39 | 40 | // C4103: Packing was changed after the inclusion of the header, propably missing #pragma pop 41 | # pragma warning (disable : 4103) 42 | #endif 43 | 44 | #define AI_PUSHPACK_IS_DEFINED 45 | 46 | 47 | -------------------------------------------------------------------------------- /Include/assimp/ai_assert.h: -------------------------------------------------------------------------------- 1 | /** @file assert.h 2 | */ 3 | #ifndef AI_DEBUG_H_INC 4 | #define AI_DEBUG_H_INC 5 | 6 | #ifdef ASSIMP_BUILD_DEBUG 7 | # include 8 | # define ai_assert(expression) assert(expression) 9 | #else 10 | # define ai_assert(expression) 11 | #endif 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /Include/assimp/defs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Include/assimp/defs.h -------------------------------------------------------------------------------- /Include/assimp/matrix3x3.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Include/assimp/matrix3x3.h -------------------------------------------------------------------------------- /Include/assimp/matrix3x3.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Include/assimp/matrix3x3.inl -------------------------------------------------------------------------------- /Include/assimp/matrix4x4.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Include/assimp/matrix4x4.h -------------------------------------------------------------------------------- /Include/assimp/matrix4x4.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Include/assimp/matrix4x4.inl -------------------------------------------------------------------------------- /Include/glm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(NAME glm_dummy) 2 | 3 | file(GLOB ROOT_SOURCE *.cpp) 4 | file(GLOB ROOT_INLINE *.inl) 5 | file(GLOB ROOT_HEADER *.hpp) 6 | file(GLOB ROOT_TEXT ../*.txt) 7 | file(GLOB ROOT_NAT ../util/glm.natvis) 8 | 9 | file(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp) 10 | file(GLOB_RECURSE CORE_INLINE ./detail/*.inl) 11 | file(GLOB_RECURSE CORE_HEADER ./detail/*.hpp) 12 | 13 | file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp) 14 | file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl) 15 | file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp) 16 | 17 | file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) 18 | file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) 19 | file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) 20 | 21 | source_group("Text Files" FILES ${ROOT_TEXT}) 22 | source_group("Core Files" FILES ${CORE_SOURCE}) 23 | source_group("Core Files" FILES ${CORE_INLINE}) 24 | source_group("Core Files" FILES ${CORE_HEADER}) 25 | source_group("GTC Files" FILES ${GTC_SOURCE}) 26 | source_group("GTC Files" FILES ${GTC_INLINE}) 27 | source_group("GTC Files" FILES ${GTC_HEADER}) 28 | source_group("GTX Files" FILES ${GTX_SOURCE}) 29 | source_group("GTX Files" FILES ${GTX_INLINE}) 30 | source_group("GTX Files" FILES ${GTX_HEADER}) 31 | 32 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) 33 | 34 | if(GLM_TEST_ENABLE) 35 | add_executable(${NAME} ${ROOT_TEXT} ${ROOT_NAT} 36 | ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} 37 | ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} 38 | ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} 39 | ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER}) 40 | endif(GLM_TEST_ENABLE) 41 | 42 | #add_library(glm STATIC glm.cpp) 43 | #add_library(glm_shared SHARED glm.cpp) 44 | -------------------------------------------------------------------------------- /Include/glm/common.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/common.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_common.hpp" 36 | -------------------------------------------------------------------------------- /Include/glm/detail/_fixes.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/_fixes.hpp 29 | /// @date 2011-02-21 / 2011-11-22 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #include 34 | 35 | //! Workaround for compatibility with other libraries 36 | #ifdef max 37 | #undef max 38 | #endif 39 | 40 | //! Workaround for compatibility with other libraries 41 | #ifdef min 42 | #undef min 43 | #endif 44 | 45 | //! Workaround for Android 46 | #ifdef isnan 47 | #undef isnan 48 | #endif 49 | 50 | //! Workaround for Android 51 | #ifdef isinf 52 | #undef isinf 53 | #endif 54 | 55 | //! Workaround for Chrone Native Client 56 | #ifdef log2 57 | #undef log2 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /Include/glm/detail/intrinsic_exponential.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/detail/intrinsic_exponential.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /Include/glm/detail/intrinsic_integer.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/detail/intrinsic_integer.hpp 25 | /// @date 2009-05-11 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #pragma once 30 | 31 | #include "glm/glm.hpp" 32 | 33 | #if(!(GLM_ARCH & GLM_ARCH_SSE2)) 34 | # error "SSE2 instructions not supported or enabled" 35 | #else 36 | 37 | namespace glm{ 38 | namespace detail 39 | { 40 | __m128i _mm_bit_interleave_si128(__m128i x); 41 | __m128i _mm_bit_interleave_si128(__m128i x, __m128i y); 42 | 43 | }//namespace detail 44 | }//namespace glm 45 | 46 | #include "intrinsic_integer.inl" 47 | 48 | #endif//GLM_ARCH 49 | -------------------------------------------------------------------------------- /Include/glm/detail/intrinsic_trigonometric.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/detail/intrinsic_trigonometric.hpp 25 | /// @date 2009-06-09 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #pragma once 30 | 31 | #include "setup.hpp" 32 | 33 | #if(!(GLM_ARCH & GLM_ARCH_SSE2)) 34 | # error "SSE2 instructions not supported or enabled" 35 | #else 36 | 37 | namespace glm{ 38 | namespace detail 39 | { 40 | 41 | }//namespace detail 42 | }//namespace glm 43 | 44 | #include "intrinsic_trigonometric.inl" 45 | 46 | #endif//GLM_ARCH 47 | -------------------------------------------------------------------------------- /Include/glm/detail/intrinsic_trigonometric.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/detail/intrinsic_trigonometric.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /Include/glm/detail/intrinsic_vector_relational.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/detail/intrinsic_vector_relational.hpp 25 | /// @date 2009-06-09 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #pragma once 30 | 31 | #include "setup.hpp" 32 | 33 | #if(!(GLM_ARCH & GLM_ARCH_SSE2)) 34 | # error "SSE2 instructions not supported or enabled" 35 | #else 36 | 37 | namespace glm{ 38 | namespace detail 39 | { 40 | 41 | }//namespace detail 42 | }//namespace glm 43 | 44 | #include "intrinsic_vector_relational.inl" 45 | 46 | #endif//GLM_ARCH 47 | -------------------------------------------------------------------------------- /Include/glm/detail/precision.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/precision.hpp 29 | /// @date 2013-04-01 / 2013-04-01 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | namespace glm 36 | { 37 | enum precision 38 | { 39 | highp, 40 | mediump, 41 | lowp, 42 | defaultp = highp 43 | }; 44 | }//namespace glm 45 | -------------------------------------------------------------------------------- /Include/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/type_half.hpp 29 | /// @date 2008-08-17 / 2011-09-20 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "setup.hpp" 36 | 37 | namespace glm{ 38 | namespace detail 39 | { 40 | typedef short hdata; 41 | 42 | GLM_FUNC_DECL float toFloat32(hdata value); 43 | GLM_FUNC_DECL hdata toFloat16(float const & value); 44 | 45 | }//namespace detail 46 | }//namespace glm 47 | 48 | #include "type_half.inl" 49 | -------------------------------------------------------------------------------- /Include/glm/detail/type_mat.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/type_mat.inl 29 | /// @date 2011-06-15 / 2011-06-15 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | -------------------------------------------------------------------------------- /Include/glm/detail/type_vec.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/type_vec.inl 29 | /// @date 2011-06-15 / 2011-06-15 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | -------------------------------------------------------------------------------- /Include/glm/detail/type_vec4_avx.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/type_tvec4_avx.inl 29 | /// @date 2014-12-01 / 2014-12-01 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm{ 34 | namespace detail 35 | { 36 | 37 | }//namespace detail 38 | 39 | 40 | 41 | }//namespace glm 42 | -------------------------------------------------------------------------------- /Include/glm/detail/type_vec4_avx2.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/detail/type_tvec4_avx2.inl 29 | /// @date 2014-12-01 / 2014-12-01 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm{ 34 | namespace detail 35 | { 36 | 37 | }//namespace detail 38 | 39 | 40 | 41 | }//namespace glm 42 | -------------------------------------------------------------------------------- /Include/glm/exponential.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/exponential.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_exponential.hpp" 36 | -------------------------------------------------------------------------------- /Include/glm/geometric.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/geometric.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_geometric.hpp" 36 | -------------------------------------------------------------------------------- /Include/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtc_swizzle 28 | /// @file glm/gtc/swizzle.inl 29 | /// @date 2009-06-14 / 2011-06-15 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Include/glm/gtc/vec1.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtc_vec1 28 | /// @file glm/gtc/vec1.inl 29 | /// @date 2013-03-16 / 2013-03-16 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | -------------------------------------------------------------------------------- /Include/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_log_base 28 | /// @file glm/gtx/log_base.inl 29 | /// @date 2008-10-24 / 2014-11-25 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | template 36 | GLM_FUNC_QUALIFIER genType log(genType const & x, genType const & base) 37 | { 38 | assert(x != genType(0)); 39 | return glm::log(x) / glm::log(base); 40 | } 41 | 42 | template class vecType> 43 | GLM_FUNC_QUALIFIER vecType log(vecType const & x, vecType const & base) 44 | { 45 | return glm::log(x) / glm::log(base); 46 | } 47 | }//namespace glm 48 | -------------------------------------------------------------------------------- /Include/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_mixed_product 28 | /// @file glm/gtx/mixed_product.inl 29 | /// @date 2007-04-03 / 2008-09-17 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | template 36 | GLM_FUNC_QUALIFIER T mixedProduct 37 | ( 38 | tvec3 const & v1, 39 | tvec3 const & v2, 40 | tvec3 const & v3 41 | ) 42 | { 43 | return dot(cross(v1, v2), v3); 44 | } 45 | }//namespace glm 46 | -------------------------------------------------------------------------------- /Include/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_normal 28 | /// @file glm/gtx/normal.inl 29 | /// @date 2005-12-21 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | template 36 | GLM_FUNC_QUALIFIER tvec3 triangleNormal 37 | ( 38 | tvec3 const & p1, 39 | tvec3 const & p2, 40 | tvec3 const & p3 41 | ) 42 | { 43 | return normalize(cross(p1 - p2, p1 - p3)); 44 | } 45 | }//namespace glm 46 | -------------------------------------------------------------------------------- /Include/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_normalize_dot 28 | /// @file glm/gtx/normalize_dot.inl 29 | /// @date 2007-09-28 / 2008-10-07 30 | /// @author Christophe Riccio 31 | ////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | template class vecType> 36 | GLM_FUNC_QUALIFIER T normalizeDot(vecType const & x, vecType const & y) 37 | { 38 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 39 | } 40 | 41 | template class vecType> 42 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vecType const & x, vecType const & y) 43 | { 44 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 45 | } 46 | }//namespace glm 47 | -------------------------------------------------------------------------------- /Include/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_number_precision 28 | /// @file glm/gtx/number_precision.inl 29 | /// @date 2007-05-10 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Include/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_optimum_pow 28 | /// @file glm/gtx/optimum_pow.inl 29 | /// @date 2005-12-21 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | template 36 | GLM_FUNC_QUALIFIER genType pow2(genType const & x) 37 | { 38 | return x * x; 39 | } 40 | 41 | template 42 | GLM_FUNC_QUALIFIER genType pow3(genType const & x) 43 | { 44 | return x * x * x; 45 | } 46 | 47 | template 48 | GLM_FUNC_QUALIFIER genType pow4(genType const & x) 49 | { 50 | return (x * x) * (x * x); 51 | } 52 | }//namespace glm 53 | -------------------------------------------------------------------------------- /Include/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_perpendicular 28 | /// @file glm/gtx/perpendicular.inl 29 | /// @date 2005-12-21 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | template 36 | GLM_FUNC_QUALIFIER vecType perp 37 | ( 38 | vecType const & x, 39 | vecType const & Normal 40 | ) 41 | { 42 | return x - proj(x, Normal); 43 | } 44 | }//namespace glm 45 | -------------------------------------------------------------------------------- /Include/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_projection 28 | /// @file glm/gtx/projection.inl 29 | /// @date 2005-12-21 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | template 36 | GLM_FUNC_QUALIFIER vecType proj(vecType const & x, vecType const & Normal) 37 | { 38 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 39 | } 40 | }//namespace glm 41 | -------------------------------------------------------------------------------- /Include/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_raw_data 28 | /// @file glm/gtx/raw_data.inl 29 | /// @date 2008-11-19 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | -------------------------------------------------------------------------------- /Include/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_std_based_type 28 | /// @file glm/gtx/std_based_type.inl 29 | /// @date 2008-06-08 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Include/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtx_transform 28 | /// @file glm/gtx/transform.inl 29 | /// @date 2005-12-21 / 2011-06-07 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | template 36 | GLM_FUNC_QUALIFIER tmat4x4 translate( 37 | tvec3 const & v) 38 | { 39 | return translate( 40 | tmat4x4(1.0f), v); 41 | } 42 | 43 | template 44 | GLM_FUNC_QUALIFIER tmat4x4 rotate( 45 | T angle, 46 | tvec3 const & v) 47 | { 48 | return rotate( 49 | tmat4x4(1), angle, v); 50 | } 51 | 52 | template 53 | GLM_FUNC_QUALIFIER tmat4x4 scale( 54 | tvec3 const & v) 55 | { 56 | return scale( 57 | tmat4x4(1.0f), v); 58 | } 59 | 60 | }//namespace glm 61 | -------------------------------------------------------------------------------- /Include/glm/gtx/type_aligned.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref gtc_type_aligned 28 | /// @file glm/gtc/type_aligned.inl 29 | /// @date 2014-11-23 / 2014-11-23 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | namespace glm 34 | { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Include/glm/integer.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/integer.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_integer.hpp" 36 | -------------------------------------------------------------------------------- /Include/glm/matrix.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/matrix.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_matrix.hpp" 36 | -------------------------------------------------------------------------------- /Include/glm/packing.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/packing.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_packing.hpp" 36 | -------------------------------------------------------------------------------- /Include/glm/trigonometric.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/trigonometric.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_trigonometric.hpp" 36 | -------------------------------------------------------------------------------- /Include/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/vec2.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/type_vec2.hpp" 36 | -------------------------------------------------------------------------------- /Include/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/vec3.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/type_vec3.hpp" 36 | -------------------------------------------------------------------------------- /Include/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/vec4.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/type_vec4.hpp" 36 | -------------------------------------------------------------------------------- /Include/glm/vector_relational.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// Restrictions: 16 | /// By making use of the Software for military purposes, you choose to make 17 | /// a Bunny unhappy. 18 | /// 19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | /// THE SOFTWARE. 26 | /// 27 | /// @ref core 28 | /// @file glm/vector_relational.hpp 29 | /// @date 2013-12-24 / 2013-12-24 30 | /// @author Christophe Riccio 31 | /////////////////////////////////////////////////////////////////////////////////// 32 | 33 | #pragma once 34 | 35 | #include "detail/func_vector_relational.hpp" 36 | -------------------------------------------------------------------------------- /Library/DevIL.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Library/DevIL.lib -------------------------------------------------------------------------------- /Library/ILU.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Library/ILU.lib -------------------------------------------------------------------------------- /Library/assimp.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Library/assimp.lib -------------------------------------------------------------------------------- /Library/glew32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Library/glew32.lib -------------------------------------------------------------------------------- /Library/glfw3dll.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/Library/glfw3dll.lib -------------------------------------------------------------------------------- /NodeEditor.VC.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/NodeEditor.VC.db -------------------------------------------------------------------------------- /NodeEditor.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.30501.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DreamEditor", "DreamEditor\DreamEditor.vcxproj", "{D6A95CEB-9B79-411E-A273-BAC31D00D296}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Release|Win32 = Release|Win32 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {D6A95CEB-9B79-411E-A273-BAC31D00D296}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {D6A95CEB-9B79-411E-A273-BAC31D00D296}.Debug|Win32.Build.0 = Debug|Win32 16 | {D6A95CEB-9B79-411E-A273-BAC31D00D296}.Release|Win32.ActiveCfg = Release|Win32 17 | {D6A95CEB-9B79-411E-A273-BAC31D00D296}.Release|Win32.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /NodeEditor.v12.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chaojian-zhang/NodeEditor/13e4ee52343d5307c4f780e8f661543d45994b41/NodeEditor.v12.suo --------------------------------------------------------------------------------