├── .gitattributes ├── .gitignore ├── JanuaEngine ├── Core │ ├── AABB.cpp │ ├── AABB.h │ ├── Cell.cpp │ ├── Cell.h │ ├── CollisionUtils.cpp │ ├── CollisionUtils.h │ ├── Core.vcxproj │ ├── LineSegment.cpp │ ├── LineSegment.h │ ├── Matrix4x4.cpp │ ├── Matrix4x4.h │ ├── PendingThings.txt │ ├── Plane.cpp │ ├── Plane.h │ ├── Point3i.cpp │ ├── Point3i.h │ ├── Portal.cpp │ ├── Portal.h │ ├── PortalQuad.cpp │ ├── PortalQuad.h │ ├── Ray.cpp │ ├── Ray.h │ ├── StabbingLine.cpp │ ├── StabbingLine.h │ ├── Triangle.cpp │ ├── Triangle.h │ ├── Utils.h │ ├── Vector3f.cpp │ ├── Vector3f.h │ ├── Voxel.cpp │ ├── Voxel.h │ ├── VoxelContainer.cpp │ ├── VoxelContainer.h │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── Janua.sln ├── JanuaEngine │ ├── JanuaEngine.cpp │ ├── JanuaEngine.vcxproj │ ├── JanuaEngineLib.h │ ├── Logger.cpp │ ├── Logger.h │ ├── Model.cpp │ ├── Model.h │ ├── ModelInstance.cpp │ ├── ModelInstance.h │ ├── PVSDatabase.cpp │ ├── PVSDatabase.h │ ├── PVSDatabaseExporter.cpp │ ├── PVSDatabaseExporter.h │ ├── PVSDatabaseImporter.cpp │ ├── PVSDatabaseImporter.h │ ├── PVSGenerator.cpp │ ├── PVSGenerator.h │ ├── PVSPreprocessor.cpp │ ├── PVSPreprocessor.h │ ├── Query.cpp │ ├── Query.h │ ├── QueryResult.cpp │ ├── QueryResult.h │ ├── ReadMe.txt │ ├── Scene.cpp │ ├── Scene.h │ ├── SceneObjectType.h │ ├── SceneOptions.cpp │ ├── SceneOptions.h │ ├── SceneTile.cpp │ ├── SceneTile.h │ ├── TrianglesOctree.cpp │ ├── TrianglesOctree.h │ ├── Utilities.h │ ├── dllmain.cpp │ ├── pugiconfig.hpp │ ├── pugixml.cpp │ ├── pugixml.hpp │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── JanuaRuntime │ ├── JanuaRuntime.c │ ├── JanuaRuntime.h │ └── JanuaRuntime.vcxproj ├── PVSPreprocessor │ ├── PVSPreprocessor.vcxproj │ ├── PVSPreprocessor.vcxproj.filters │ └── main.cpp └── tgcviewer-cpp │ ├── Examples │ ├── Example1 │ │ ├── Example1.cpp │ │ └── Example1.h │ ├── ExampleEditor │ │ ├── BorderBox.cpp │ │ ├── BorderBox.h │ │ ├── EditorBox.cpp │ │ ├── EditorBox.h │ │ ├── ExampleEditor.cpp │ │ ├── ExampleEditor.h │ │ ├── Grid.cpp │ │ └── Grid.h │ ├── ExampleOCEngine1 │ │ ├── ExampleCreateRawSceneXML.cpp │ │ ├── ExampleCreateRawSceneXML.h │ │ ├── ExampleOCEngine1.cpp │ │ ├── ExampleOCEngine1.h │ │ ├── ExampleOCEngineFPSView.cpp │ │ ├── ExampleOCEngineFPSView.h │ │ ├── Voxel.cpp │ │ └── Voxel.h │ ├── ExampleSprite │ │ ├── ExampleSprite.cpp │ │ └── ExampleSprite.h │ ├── ExampleTgcBox │ │ ├── ExampleTgcBox.cpp │ │ └── ExampleTgcBox.h │ ├── ExampleVB │ │ ├── ExampleVB.cpp │ │ └── ExampleVB.h │ ├── ExampleVoxel │ │ ├── ExampleVoxel.cpp │ │ ├── ExampleVoxel.h │ │ ├── TgcVoxel.cpp │ │ └── TgcVoxel.h │ ├── ExamplesUI │ │ ├── ExampleModifier.cpp │ │ ├── ExampleModifier.h │ │ ├── ExampleUI.cpp │ │ └── ExampleUI.h │ └── TgcViewerIncludes.h │ ├── Media │ ├── Examples │ │ └── TgcModels │ │ │ ├── Box │ │ │ ├── Box-TgcScene.xml │ │ │ └── Textures │ │ │ │ └── granito.jpg │ │ │ ├── CamionCemento │ │ │ ├── CamionCemento-TgcScene.xml │ │ │ └── Textures │ │ │ │ ├── Truc.jpg │ │ │ │ └── cement_trailer.jpg │ │ │ ├── Deposito │ │ │ ├── Deposito-TgcScene.xml │ │ │ └── Textures │ │ │ │ ├── box1.jpg │ │ │ │ ├── box2.jpg │ │ │ │ ├── box3.jpg │ │ │ │ ├── box4.jpg │ │ │ │ ├── boxMetal.jpg │ │ │ │ ├── floor1.jpg │ │ │ │ ├── wall2.jpg │ │ │ │ └── wood_door_12.jpg │ │ │ ├── EscenarioPortal │ │ │ ├── EscenarioPortal-TgcScene.xml │ │ │ └── Textures │ │ │ │ ├── F_tapis_carre_outgame.png │ │ │ │ ├── FumDallage02_outgame.png │ │ │ │ ├── FumDallage05_outgame.png │ │ │ │ ├── FumGridDark_outgame.png │ │ │ │ ├── FyAccCaisse_outgame.png │ │ │ │ ├── MetalMech1.jpg │ │ │ │ ├── RippleDRelief.png │ │ │ │ ├── brick3_5.jpg │ │ │ │ ├── concrete1_2.jpg │ │ │ │ ├── floor1_4.jpg │ │ │ │ ├── floor2_3.jpg │ │ │ │ ├── gunpowder.bmp │ │ │ │ ├── lite1.jpg │ │ │ │ ├── q1comp4.jpg │ │ │ │ ├── stair1.jpg │ │ │ │ └── wastelt1glow.jpg │ │ │ ├── NormalMapRoom │ │ │ ├── NormalMapRoom-TgcScene.xml │ │ │ └── Textures │ │ │ │ ├── Granito.png │ │ │ │ ├── Granito_NormalMap.png │ │ │ │ ├── Medievil Stonework.png │ │ │ │ ├── Medievil Stonework_NormalMap.png │ │ │ │ ├── Slate Tiles.png │ │ │ │ ├── Slate Tiles_NormalMap.png │ │ │ │ ├── Stones.png │ │ │ │ ├── Stones2.png │ │ │ │ ├── Stones2_NormalMap.png │ │ │ │ ├── Stones_NormalMap.png │ │ │ │ ├── Tech Plate 2.png │ │ │ │ ├── Tech Plate 2_NormalMap.png │ │ │ │ ├── Tech Plate 3.png │ │ │ │ ├── Tech Plate 3_NormalMap.png │ │ │ │ ├── Tech Plate 4.png │ │ │ │ ├── Tech Plate 4_NormalMap.png │ │ │ │ ├── Tundra.png │ │ │ │ ├── Tundra_NormalMap.png │ │ │ │ ├── Well Preserved Chesterfield.png │ │ │ │ ├── Well Preserved Chesterfield_NormalMap.png │ │ │ │ ├── Worn Temple Wall.png │ │ │ │ ├── Worn Temple Wall_NormalMap.png │ │ │ │ └── wastelt1glow.jpg │ │ │ ├── NormalMapRoom2 │ │ │ ├── NormalMapRoom2-TgcScene.xml │ │ │ └── Textures │ │ │ │ ├── Granito.png │ │ │ │ ├── Medievil Stonework.png │ │ │ │ ├── Slate Tiles.png │ │ │ │ ├── Stones.png │ │ │ │ ├── Stones2.png │ │ │ │ ├── Tech Plate 2.png │ │ │ │ ├── Tech Plate 3.png │ │ │ │ ├── Tech Plate 4.png │ │ │ │ ├── Tundra.png │ │ │ │ ├── Well Preserved Chesterfield.png │ │ │ │ ├── auvBG.jpg │ │ │ │ ├── bench.jpg │ │ │ │ └── closet.jpg │ │ │ ├── NormalMapRoomObstaculos │ │ │ ├── NormalMapRoomObstaculos-TgcScene.xml │ │ │ └── Textures │ │ │ │ ├── Granito.png │ │ │ │ ├── Medievil Stonework.png │ │ │ │ ├── Slate Tiles.png │ │ │ │ ├── Stones.png │ │ │ │ ├── Stones2.png │ │ │ │ ├── Tech Plate 2.png │ │ │ │ ├── Tech Plate 3.png │ │ │ │ ├── Tech Plate 4.png │ │ │ │ ├── Tundra.png │ │ │ │ ├── Well Preserved Chesterfield.png │ │ │ │ └── woodceiling1a.jpg │ │ │ ├── NormalMapRoomSimple │ │ │ ├── NormalMapRoomSimple-TgcScene.xml │ │ │ └── Textures │ │ │ │ ├── Granito.png │ │ │ │ ├── Medievil Stonework.png │ │ │ │ ├── Slate Tiles.png │ │ │ │ ├── Stones.png │ │ │ │ ├── Stones2.png │ │ │ │ ├── Tech Plate 2.png │ │ │ │ ├── Tech Plate 3.png │ │ │ │ ├── Tech Plate 4.png │ │ │ │ ├── Tundra.png │ │ │ │ ├── Well Preserved Chesterfield.png │ │ │ │ └── woodceiling1a.jpg │ │ │ ├── QuakeRoom1 │ │ │ ├── LightMaps │ │ │ │ ├── emptyLightMap.jpg │ │ │ │ ├── qlight0.jpg │ │ │ │ ├── qlight1.jpg │ │ │ │ ├── qlight2.jpg │ │ │ │ ├── qlight3.jpg │ │ │ │ ├── qlight4.jpg │ │ │ │ ├── qlight5.jpg │ │ │ │ ├── qlight6.jpg │ │ │ │ ├── qlight7.jpg │ │ │ │ └── qlight8.jpg │ │ │ ├── QuakeMap-TgcScene.xml │ │ │ └── Textures │ │ │ │ ├── baseboard04.jpg │ │ │ │ ├── baseboard09_c3.jpg │ │ │ │ ├── baseboard09_e.jpg │ │ │ │ ├── baseboard09_e2.jpg │ │ │ │ ├── baseboard09_l2.jpg │ │ │ │ ├── baseboard09_o3.jpg │ │ │ │ ├── blocks11b.jpg │ │ │ │ ├── blocks11bbroke3.jpg │ │ │ │ ├── blocks15.jpg │ │ │ │ ├── blocks17.jpg │ │ │ │ ├── blocks17floor2.jpg │ │ │ │ ├── blocks18b.jpg │ │ │ │ ├── blocks18c.jpg │ │ │ │ ├── blocks18c_3.jpg │ │ │ │ ├── ceilingtechplain.jpg │ │ │ │ ├── center2trn.JPG │ │ │ │ ├── chapthroat.jpg │ │ │ │ ├── chapthroat2.jpg │ │ │ │ ├── chapthroatooz.JPG │ │ │ │ ├── computer_blocks17.jpg │ │ │ │ ├── demon_block15fx.JPG │ │ │ │ ├── dirt2.jpg │ │ │ │ ├── flame1.jpg │ │ │ │ ├── flame2.jpg │ │ │ │ ├── gratetorch2.jpg │ │ │ │ ├── gratetorch2b.JPG │ │ │ │ ├── inteldimclouds.jpg │ │ │ │ ├── iron01_e.jpg │ │ │ │ ├── iron01_ntech3.jpg │ │ │ │ ├── killblock.jpg │ │ │ │ ├── killblock_i.jpg │ │ │ │ ├── killblock_i4.jpg │ │ │ │ ├── killblockgeomtrn.JPG │ │ │ │ ├── killsky_1.jpg │ │ │ │ ├── km_arena1archfinalc_top.jpg │ │ │ │ ├── km_arena1archfinald_bot.jpg │ │ │ │ ├── km_arena1archfinald_mid.jpg │ │ │ │ ├── km_arena1columna2R.jpg │ │ │ │ ├── km_arena1tower4.jpg │ │ │ │ ├── km_arena1tower4_a.jpg │ │ │ │ ├── km_arena1tower_short.JPG │ │ │ │ ├── largeblock3b3broke.jpg │ │ │ │ ├── largerblock3b.jpg │ │ │ │ ├── largerblock3b_ow.JPG │ │ │ │ ├── largerblock3blood.JPG │ │ │ │ ├── lavahell.jpg │ │ │ │ ├── lion.jpg │ │ │ │ ├── lion_m.JPG │ │ │ │ ├── major_h_st.jpg │ │ │ │ ├── major_st.jpg │ │ │ │ ├── metalbridge06.jpg │ │ │ │ ├── metalbridge06broke.jpg │ │ │ │ ├── metaldemonkillblock.jpg │ │ │ │ ├── metalsupport4b.jpg │ │ │ │ ├── metalsupsolid.jpg │ │ │ │ ├── pentagram_light1.jpg │ │ │ │ ├── pitted_rust.jpg │ │ │ │ ├── pitted_rust2.jpg │ │ │ │ ├── pitted_rust3.jpg │ │ │ │ ├── protobanner.JPG │ │ │ │ ├── skin6.jpg │ │ │ │ ├── skull4.jpg │ │ │ │ ├── skull_door_a.JPG │ │ │ │ ├── skull_door_b.JPG │ │ │ │ ├── skull_door_c.JPG │ │ │ │ ├── skull_door_d.JPG │ │ │ │ ├── skull_door_e.JPG │ │ │ │ ├── skull_door_f.JPG │ │ │ │ ├── skullarch_a.JPG │ │ │ │ ├── skullarch_b.JPG │ │ │ │ ├── skullarch_c.jpg │ │ │ │ ├── skullsvertgray02b.jpg │ │ │ │ ├── slateroofc.jpg │ │ │ │ ├── storch_tall.jpg │ │ │ │ ├── supportborder_blue_b.jpg │ │ │ │ ├── supportborder_blue_c.jpg │ │ │ │ ├── surface8.jpg │ │ │ │ ├── tongue.jpg │ │ │ │ ├── visor_st.jpg │ │ │ │ ├── wallhead02.jpg │ │ │ │ ├── woodceiling1a.jpg │ │ │ │ ├── woodceiling1b_dark.jpg │ │ │ │ ├── xian_tourneyarch_inside2.jpg │ │ │ │ ├── xstairtop4.jpg │ │ │ │ ├── xstairtop4bbrn.jpg │ │ │ │ ├── xstepborder3.jpg │ │ │ │ └── xstepborder3brn.jpg │ │ │ └── Triangle │ │ │ ├── Textures │ │ │ └── granito.jpg │ │ │ └── Triangle-TgcScene.xml │ └── TgcViewer │ │ ├── Fonts │ │ ├── Microsoft_Sans_Serif_12.bmp │ │ ├── Microsoft_Sans_Serif_12.csv │ │ ├── Microsoft_Sans_Serif_16.bmp │ │ ├── Microsoft_Sans_Serif_16.csv │ │ ├── Microsoft_Sans_Serif_20.bmp │ │ ├── Microsoft_Sans_Serif_20.csv │ │ ├── Microsoft_Sans_Serif_26.bmp │ │ └── Microsoft_Sans_Serif_26.csv │ │ ├── Shaders │ │ ├── DirectX10 │ │ │ ├── GeneralShaders.hlsl │ │ │ ├── Text2dShader.hlsl │ │ │ └── TgcMeshShader.hlsl │ │ ├── DirectX11 │ │ │ ├── GeneralShaders.hlsl │ │ │ ├── Text2dShader.hlsl │ │ │ └── TgcMeshShader.hlsl │ │ └── OpenGL │ │ │ ├── TgcMeshShader_DiffuseMap.ps │ │ │ ├── TgcMeshShader_DiffuseMap.vs │ │ │ ├── TgcMeshShader_DiffuseMapAndLightmap.ps │ │ │ ├── TgcMeshShader_DiffuseMapAndLightmap.vs │ │ │ ├── TgcMeshShader_VertexColor.ps │ │ │ └── TgcMeshShader_VertexColor.vs │ │ └── Ui │ │ ├── checkbox_checked.png │ │ ├── checkbox_unchecked.png │ │ └── gui_palette.png │ ├── TgcViewer │ ├── 2D │ │ ├── TgcAnimatedSprite.cpp │ │ ├── TgcAnimatedSprite.h │ │ ├── TgcFont.cpp │ │ ├── TgcFont.h │ │ ├── TgcFontRenderer.cpp │ │ ├── TgcFontRenderer.h │ │ ├── TgcSprite.cpp │ │ ├── TgcSprite.h │ │ ├── TgcText2d.cpp │ │ └── TgcText2d.h │ ├── Example │ │ ├── TgcExample.cpp │ │ └── TgcExample.h │ ├── GuiController.cpp │ ├── GuiController.h │ ├── Input │ │ ├── TgcFpsCamera.cpp │ │ ├── TgcFpsCamera.h │ │ ├── TgcInput.cpp │ │ └── TgcInput.h │ ├── Math │ │ ├── Color.cpp │ │ ├── Color.h │ │ ├── FastMath.cpp │ │ ├── FastMath.h │ │ ├── Matrix4.cpp │ │ ├── Matrix4.h │ │ ├── Vector2.cpp │ │ ├── Vector2.h │ │ ├── Vector3.cpp │ │ ├── Vector3.h │ │ ├── Vector4.cpp │ │ └── Vector4.h │ ├── Renderer │ │ ├── DirectX10 │ │ │ ├── TgcDX10Effect.cpp │ │ │ ├── TgcDX10Effect.h │ │ │ ├── TgcDX10IndexBuffer.cpp │ │ │ ├── TgcDX10IndexBuffer.h │ │ │ ├── TgcDX10InputLayout.cpp │ │ │ ├── TgcDX10InputLayout.h │ │ │ ├── TgcDX10Renderer.cpp │ │ │ ├── TgcDX10Renderer.h │ │ │ ├── TgcDX10Shaders.cpp │ │ │ ├── TgcDX10Shaders.h │ │ │ ├── TgcDX10Texture.cpp │ │ │ ├── TgcDX10Texture.h │ │ │ ├── TgcDX10VertexBuffer.cpp │ │ │ └── TgcDX10VertexBuffer.h │ │ ├── DirectX11 │ │ │ ├── TgcDX11Effect.cpp │ │ │ ├── TgcDX11Effect.h │ │ │ ├── TgcDX11IndexBuffer.cpp │ │ │ ├── TgcDX11IndexBuffer.h │ │ │ ├── TgcDX11InputLayout.cpp │ │ │ ├── TgcDX11InputLayout.h │ │ │ ├── TgcDX11Renderer.cpp │ │ │ ├── TgcDX11Renderer.h │ │ │ ├── TgcDX11Shaders.cpp │ │ │ ├── TgcDX11Shaders.h │ │ │ ├── TgcDX11Texture.cpp │ │ │ ├── TgcDX11Texture.h │ │ │ ├── TgcDX11VertexBuffer.cpp │ │ │ └── TgcDX11VertexBuffer.h │ │ ├── TgcEffect.cpp │ │ ├── TgcEffect.h │ │ ├── TgcIndexBuffer.cpp │ │ ├── TgcIndexBuffer.h │ │ ├── TgcInputLayout.cpp │ │ ├── TgcInputLayout.h │ │ ├── TgcRenderer.cpp │ │ ├── TgcRenderer.h │ │ ├── TgcRendererFactory.cpp │ │ ├── TgcRendererFactory.h │ │ ├── TgcRendererGlobals.h │ │ ├── TgcVertexBuffer.cpp │ │ └── TgcVertexBuffer.h │ ├── Shaders │ │ ├── TgcShaders.cpp │ │ └── TgcShaders.h │ ├── TgcGeometry │ │ ├── TgcBoundingBox.cpp │ │ ├── TgcBoundingBox.h │ │ ├── TgcBox.cpp │ │ ├── TgcBox.h │ │ ├── TgcDebugBox.cpp │ │ └── TgcDebugBox.h │ ├── TgcSceneLoader │ │ ├── TgcMesh.cpp │ │ ├── TgcMesh.h │ │ ├── TgcParserUtils.cpp │ │ ├── TgcParserUtils.h │ │ ├── TgcScene.cpp │ │ ├── TgcScene.h │ │ ├── TgcSceneData.cpp │ │ ├── TgcSceneData.h │ │ ├── TgcSceneLoader.cpp │ │ ├── TgcSceneLoader.h │ │ ├── TgcSceneParser.cpp │ │ ├── TgcSceneParser.h │ │ ├── TgcTexture.cpp │ │ └── TgcTexture.h │ ├── Ui │ │ ├── Gui │ │ │ ├── TgcGui.cpp │ │ │ ├── TgcGui.h │ │ │ ├── TgcGuiButton.cpp │ │ │ ├── TgcGuiButton.h │ │ │ ├── TgcGuiCheckBox.cpp │ │ │ ├── TgcGuiCheckBox.h │ │ │ ├── TgcGuiItem.cpp │ │ │ ├── TgcGuiItem.h │ │ │ ├── TgcGuiSlider.cpp │ │ │ └── TgcGuiSlider.h │ │ ├── Modifiers │ │ │ ├── TgcBoolModifier.cpp │ │ │ ├── TgcBoolModifier.h │ │ │ ├── TgcFloatModifier.cpp │ │ │ ├── TgcFloatModifier.h │ │ │ ├── TgcModifierItem.cpp │ │ │ ├── TgcModifierItem.h │ │ │ ├── TgcModifiers.cpp │ │ │ └── TgcModifiers.h │ │ ├── TgcLogger.cpp │ │ ├── TgcLogger.h │ │ ├── TgcUserVars.cpp │ │ └── TgcUserVars.h │ ├── Windows │ │ ├── HighResolutionTimer.cpp │ │ ├── HighResolutionTimer.h │ │ ├── WindowHandler.cpp │ │ └── WindowHandler.h │ ├── Xml │ │ ├── pugiconfig.hpp │ │ ├── pugixml.cpp │ │ └── pugixml.hpp │ ├── globals.h │ └── stdafx.h │ ├── main.cpp │ └── tgcviewer-cpp.vcxproj ├── README.md └── site └── img ├── JanuaImg1.jpg ├── JanuaImg2.jpg └── LogoJanua.png /JanuaEngine/Core/AABB.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "AABB.h" 3 | 4 | AABB::AABB() 5 | { 6 | 7 | } 8 | 9 | AABB::AABB( Vector3f pMinPoint, Vector3f pMaxPoint ) : minPoint(pMinPoint), maxPoint(pMaxPoint) 10 | { 11 | assert(pMinPoint.x <= pMaxPoint.x); 12 | assert(pMinPoint.y <= pMaxPoint.y); 13 | assert(pMinPoint.z <= pMaxPoint.z); 14 | } 15 | 16 | AABB::~AABB(void) 17 | { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /JanuaEngine/Core/AABB.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/AABB.h -------------------------------------------------------------------------------- /JanuaEngine/Core/Cell.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "Cell.h" 3 | #include 4 | 5 | #include 6 | using std::find; 7 | 8 | Cell::Cell(const Point3i p_minPoint, const Point3i p_maxPoint) : minPoint(p_minPoint), maxPoint(p_maxPoint) 9 | { 10 | 11 | } 12 | 13 | Cell::~Cell(void) 14 | { 15 | } 16 | 17 | bool operator!=( const Cell& lhs, const Cell& rhs ) 18 | { 19 | return lhs.minPoint != rhs.minPoint || lhs.maxPoint != rhs.maxPoint; 20 | } 21 | 22 | bool operator==( const Cell& lhs, const Cell& rhs ) 23 | { 24 | return lhs.minPoint == rhs.minPoint && lhs.maxPoint == rhs.maxPoint; 25 | } 26 | 27 | void Cell::addPortal(const shared_ptr val) 28 | { 29 | m_portals.push_back(val); 30 | } 31 | 32 | void Cell::addVisibleCell(const shared_ptr val) 33 | { 34 | m_visibleSetCells.push_back(val); 35 | } 36 | 37 | void Cell::getModelsIds(vector& modelIds) const 38 | { 39 | modelIds.insert(modelIds.end(), m_modelIds.begin(), m_modelIds.end()); 40 | } 41 | 42 | void Cell::addModelId(int modelId) 43 | { 44 | m_modelIds.push_back(modelId); 45 | } 46 | 47 | bool Cell::isModelIdInCell(int modelId) const 48 | { 49 | 50 | if( std::find(m_modelIds.begin(), m_modelIds.end(), modelId) == m_modelIds.end()) 51 | return false; 52 | else 53 | return true; 54 | } -------------------------------------------------------------------------------- /JanuaEngine/Core/Cell.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/Cell.h -------------------------------------------------------------------------------- /JanuaEngine/Core/CollisionUtils.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/CollisionUtils.h -------------------------------------------------------------------------------- /JanuaEngine/Core/LineSegment.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "LineSegment.h" 3 | 4 | using std::logic_error; 5 | 6 | LineSegment::LineSegment(Vector3f p_StartPoint, Vector3f p_EndPoint) : startPoint(p_StartPoint), endPoint(p_EndPoint) 7 | { 8 | if( p_StartPoint == p_EndPoint ) 9 | throw new logic_error("Invalid Line segment"); 10 | } 11 | 12 | 13 | LineSegment::~LineSegment(void) 14 | { 15 | } 16 | -------------------------------------------------------------------------------- /JanuaEngine/Core/LineSegment.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/LineSegment.h -------------------------------------------------------------------------------- /JanuaEngine/Core/Matrix4x4.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "Matrix4x4.h" 3 | 4 | 5 | Matrix4x4::Matrix4x4(void) 6 | { 7 | //TODO: Clean this up! 8 | for (int c = 0 ; c < 16;c++) 9 | { 10 | vec[c] = 0.0f; 11 | } 12 | 13 | M11 = M22 = M33 = M44 = 1.0f; 14 | } 15 | 16 | 17 | Matrix4x4::~Matrix4x4(void) 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /JanuaEngine/Core/Matrix4x4.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/Matrix4x4.h -------------------------------------------------------------------------------- /JanuaEngine/Core/PendingThings.txt: -------------------------------------------------------------------------------- 1 | 2 | Code: 3 | 4 | Must: 5 | 6 | --Logger: add timestamp 7 | --Process scene xml file. 8 | --KD tree for efficient queries to voxels and cells (query point/ aabb) 9 | --Remove recursion in findvisiblecells 10 | --Remove debug limits 11 | 12 | Nice to have: 13 | --Replace all vectors that use std::find with associative containers. 14 | --Replace Asserts and throw Logic_err to something like error enums. 15 | --Optimize Point3i ordering 16 | --Make the member variables naming consistent. 17 | 18 | 19 | Optimization: 20 | --Replace voxelization algorithm. 21 | --Simplify graph. Combine cells that have the same occlusion values. 22 | 23 | Library: 24 | --Add namespace 25 | 26 | 27 | 28 | Janua Preprocesor.exe 29 | 30 | --januaPreprocess.exe -scene scene1.rawscene.xml -output "c:\scene1_pvs.lrb" -name "scene1" -Voxelsize "10.0f; 10.0f; 10.0f" -MaxCellSize "10;5;8" 31 | 32 | 33 | Editor: 34 | --Ver el escenario como quedo dividido en celdas. Mostrar lista de celdas, con su informacion: Id, volumen, nivel de occlusion, celdas vecinas, cantidad de modelos. 35 | --Ver celdas ordenadas por cantidad de modelos, por cantidad de oclusion. 36 | --Mapa de calor con nivel de occlusion 37 | 38 | 39 | Interoperablidad: 40 | --Portar en orden: 41 | v 1: runtime: .h y .lib preprocesor: .exe (todo windows). Pruebas: Marian. 42 | v 1.1 lo mismo que 1 pero para linux. Armar makefile. 43 | v 1.2 port del runtime a android, tech demo. 44 | 45 | 46 | -------------------------------------------------------------------------------- /JanuaEngine/Core/Plane.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "Plane.h" 3 | 4 | 5 | Plane::Plane(const Vector3f p_normal, float p_d) : normal( p_normal), d(p_d) 6 | { 7 | 8 | //TODO: check the normal is a unit vector. 9 | } 10 | 11 | 12 | Plane::~Plane(void) 13 | { 14 | } 15 | -------------------------------------------------------------------------------- /JanuaEngine/Core/Plane.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/Plane.h -------------------------------------------------------------------------------- /JanuaEngine/Core/Point3i.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "Point3i.h" 3 | 4 | 5 | Point3i::Point3i(void) 6 | { 7 | x = y = z = 0; 8 | } 9 | 10 | Point3i::Point3i( int px, int py, int pz ) 11 | { 12 | x = px; 13 | y = py; 14 | z = pz; 15 | 16 | } 17 | 18 | Point3i::~Point3i(void) 19 | { 20 | } 21 | 22 | bool operator!=( const Point3i& lhs, const Point3i& rhs ) 23 | { 24 | return lhs.x != rhs.x || lhs.y != rhs.y || lhs.z != rhs.z; 25 | } 26 | 27 | bool operator==( const Point3i& lhs, const Point3i& rhs ) 28 | { 29 | return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z; 30 | } 31 | 32 | 33 | //Arbitrary ordering for points. Sort in X, Y, Z order. 34 | bool operator<( const Point3i& lhs, const Point3i& rhs ) 35 | { 36 | //TODO: Optimize to replace IFs. 37 | if( lhs.x < rhs.x) 38 | return true; 39 | else 40 | if( lhs.x == rhs.x) 41 | if(lhs.y < rhs.y) 42 | return true; 43 | else 44 | if(lhs.y == rhs.y) 45 | if(lhs.z < rhs.z) 46 | return true; 47 | 48 | return false; 49 | } 50 | 51 | Point3i Point3i::operator + (const Point3i& otherPoint) 52 | { 53 | return (Point3i(x + otherPoint.x, y + otherPoint.y, z + otherPoint.z)); 54 | } 55 | 56 | Point3i Point3i::operator - (const Point3i& otherPoint) 57 | { 58 | return (Point3i(x - otherPoint.x, y - otherPoint.y, z - otherPoint.z)); 59 | } 60 | 61 | Point3i operator + (const Point3i& lhs, const Point3i& rhs) 62 | { 63 | return Point3i( lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z); 64 | } 65 | 66 | Point3i operator - (const Point3i& lhs, const Point3i& rhs) 67 | { 68 | return Point3i( lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z); 69 | } -------------------------------------------------------------------------------- /JanuaEngine/Core/Point3i.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/Point3i.h -------------------------------------------------------------------------------- /JanuaEngine/Core/Portal.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "Portal.h" 3 | 4 | 5 | Portal::Portal( shared_ptr p_fromCell, shared_ptr p_toCell, Point3i p_minPoint, Point3i p_maxPoint, Point3i p_facingPlane ) : fromCell(p_fromCell), toCell(p_toCell), minPoint(p_minPoint), maxPoint(p_maxPoint), facingPlane(p_facingPlane) 6 | { 7 | 8 | } 9 | 10 | 11 | Portal::~Portal(void) 12 | { 13 | } 14 | -------------------------------------------------------------------------------- /JanuaEngine/Core/Portal.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/Portal.h -------------------------------------------------------------------------------- /JanuaEngine/Core/PortalQuad.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "PortalQuad.h" 3 | 4 | 5 | PortalQuad::PortalQuad(const Vector3f p_points[4]) 6 | { 7 | points[0] = p_points[0]; 8 | points[1] = p_points[1]; 9 | points[2] = p_points[2]; 10 | points[3] = p_points[3]; 11 | } 12 | 13 | 14 | PortalQuad::~PortalQuad(void) 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /JanuaEngine/Core/PortalQuad.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/PortalQuad.h -------------------------------------------------------------------------------- /JanuaEngine/Core/Ray.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "Ray.h" 3 | 4 | using std::logic_error; 5 | 6 | Ray::Ray(void) 7 | { 8 | origin = Vector3f::Zero; 9 | direction.x = 1; 10 | direction.y = 0; 11 | direction.z = 0; 12 | } 13 | 14 | Ray::Ray(const Vector3f p_origin, const Vector3f p_direction) 15 | { 16 | origin = p_origin; 17 | direction = p_direction; 18 | 19 | if( origin == direction) 20 | throw logic_error("Invalid Ray."); 21 | } 22 | 23 | Ray::~Ray(void) 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /JanuaEngine/Core/Ray.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/Ray.h -------------------------------------------------------------------------------- /JanuaEngine/Core/StabbingLine.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/StabbingLine.h -------------------------------------------------------------------------------- /JanuaEngine/Core/Triangle.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "Triangle.h" 3 | #include "Vector3f.h" 4 | #include "Matrix4x4.h" 5 | 6 | Triangle::Triangle( const Vector3f& pA, const Vector3f& pB, const Vector3f& pC ) : a(pA), b(pB), c(pC) 7 | { 8 | 9 | } 10 | 11 | Triangle::~Triangle(void) 12 | { 13 | } 14 | 15 | Triangle Triangle::Transform( const Triangle pOriginalTriangle, const Matrix4x4& pTransformMatrix ) 16 | { 17 | return Triangle( 18 | Vector3f::Transform(pOriginalTriangle.a, pTransformMatrix), 19 | Vector3f::Transform(pOriginalTriangle.b, pTransformMatrix), 20 | Vector3f::Transform(pOriginalTriangle.c, pTransformMatrix) 21 | ); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /JanuaEngine/Core/Triangle.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/Triangle.h -------------------------------------------------------------------------------- /JanuaEngine/Core/Utils.h: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | //void check( _Expression exp, string message ) 4 | //{ 5 | // if ( exp != 0 ) 6 | // throw new std::logic_error(message); 7 | //} 8 | 9 | -------------------------------------------------------------------------------- /JanuaEngine/Core/Vector3f.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/Vector3f.h -------------------------------------------------------------------------------- /JanuaEngine/Core/Voxel.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "Voxel.h" 3 | 4 | Voxel::Voxel( void ) 5 | { 6 | status = EMPTY; 7 | } 8 | 9 | Voxel::Voxel( VoxelStatus voxelStatus) 10 | { 11 | status = voxelStatus; 12 | } 13 | 14 | 15 | Voxel::~Voxel( void ) 16 | { 17 | 18 | } 19 | -------------------------------------------------------------------------------- /JanuaEngine/Core/Voxel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/Voxel.h -------------------------------------------------------------------------------- /JanuaEngine/Core/VoxelContainer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/VoxelContainer.h -------------------------------------------------------------------------------- /JanuaEngine/Core/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // Core.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /JanuaEngine/Core/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/stdafx.h -------------------------------------------------------------------------------- /JanuaEngine/Core/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/Core/targetver.h -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/JanuaEngine.cpp: -------------------------------------------------------------------------------- 1 | // JanuaEngine.cpp : Defines the exported functions for the DLL application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | 7 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/JanuaEngineLib.h: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Model.h" 3 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/Logger.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "Logger.h" 3 | #include 4 | 5 | #define LOG_FILE "log.txt" 6 | 7 | Logger::Logger(void) 8 | { 9 | 10 | } 11 | 12 | void Logger::Log( const std::string &text ) 13 | { 14 | 15 | 16 | std::ofstream log_file(LOG_FILE, std::ios_base::out | std::ios_base::app); 17 | log_file << text.c_str(); 18 | log_file << std::endl; 19 | log_file.close(); 20 | } 21 | 22 | void Logger::Flush() 23 | { 24 | 25 | } 26 | 27 | Logger::~Logger(void) 28 | { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/Logger.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class Logger 6 | { 7 | public: 8 | Logger(void); 9 | 10 | static void Log(const std::string & ); 11 | 12 | static void Flush(); 13 | 14 | virtual ~Logger(void); 15 | 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/Model.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaEngine/Model.h -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/ModelInstance.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaEngine/ModelInstance.h -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/PVSDatabase.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "PVSDatabase.h" 3 | #include "..\Core\VoxelContainer.h" 4 | #include 5 | 6 | 7 | PVSDatabase::PVSDatabase( vector> cells, const AABB sceneAABB, const Vector3f voxelSize ) 8 | : m_cells(cells), m_sceneAABB(sceneAABB), m_voxelSize(voxelSize) 9 | { 10 | 11 | } 12 | 13 | PVSDatabase::~PVSDatabase(void) 14 | { 15 | } 16 | 17 | vector> PVSDatabase::getNeighbourCells(const Cell& cell) 18 | { 19 | 20 | vector> neigbourCells; 21 | 22 | for(vector>::size_type c = 0 ; c < cell.getPortals().size(); ++c) 23 | { 24 | 25 | shared_ptr p(cell.getPortals().at(c)->toCell); 26 | 27 | 28 | neigbourCells.push_back( p ); 29 | } 30 | 31 | return neigbourCells; 32 | } 33 | 34 | void PVSDatabase::getAllCells(vector>& cells) const 35 | { 36 | cells.insert(cells.end(), m_cells.begin(), m_cells.end()); 37 | } 38 | 39 | 40 | void PVSDatabase::getAllPortals(vector>& p_portals) const 41 | { 42 | vector< shared_ptr > portals; 43 | 44 | 45 | for( unsigned int c = 0 ; c < m_cells.size() ; c++ ) 46 | { 47 | 48 | const vector< shared_ptr >& cellPortals = m_cells[c]->getPortals(); 49 | 50 | portals.insert( portals.end(), cellPortals.begin(), cellPortals.end() ); 51 | } 52 | 53 | //Erase duplicates 54 | std::sort( portals.begin(), portals.end() ); 55 | portals.erase( std::unique( portals.begin(), portals.end() ), portals.end() ); 56 | 57 | p_portals.insert( p_portals.end(), portals.begin(), portals.end() ); 58 | } -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/PVSDatabase.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaEngine/PVSDatabase.h -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/PVSDatabaseExporter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PVSDatabase.h" 3 | 4 | /** 5 | * Exports a PVSDatabase to a buffer. 6 | */ 7 | class PVSDatabaseExporter 8 | { 9 | public: 10 | 11 | /** 12 | * Creates a PVSDatabaseExporter from PVSDatabase 13 | */ 14 | PVSDatabaseExporter(const PVSDatabase& pvsDatabase); 15 | 16 | /** 17 | * Saves the PVS Database into the given buffer. 18 | * The buffer must have enough allocated memory to store it. 19 | * @param buffer The buffer to store the database. 20 | */ 21 | void saveToBuffer( char* buffer); 22 | 23 | /** 24 | * Returns the size in bytes that a buffer would need to store the PVS Database. 25 | * @return The size in bytes. 26 | */ 27 | int getBufferSize() const; 28 | 29 | virtual ~PVSDatabaseExporter(void); 30 | 31 | private: 32 | 33 | void save( char* buffer, int& allocatedSize, bool saveToBufferEnabled) const; 34 | 35 | const PVSDatabase& m_pvsDatabase; 36 | }; 37 | 38 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/PVSDatabaseImporter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "PVSDatabase.h" 3 | 4 | /** 5 | * Imports the PVS from a buffer. 6 | */ 7 | class PVSDatabaseImporter 8 | { 9 | public: 10 | PVSDatabaseImporter(void); 11 | 12 | /** 13 | * Loads a PVS Database from a buffer. 14 | * @return A pointer to the PVSDatabase loaded. 15 | */ 16 | shared_ptr load(char* buffer); 17 | 18 | virtual ~PVSDatabaseImporter(void); 19 | }; 20 | 21 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/PVSGenerator.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaEngine/PVSGenerator.cpp -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/PVSGenerator.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaEngine/PVSGenerator.h -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/PVSPreprocessor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | using namespace std; 8 | 9 | #include "PVSDatabase.h" 10 | #include "..\Core\Vector3f.h" 11 | #include "SceneObjectType.h" 12 | #include "SceneOptions.h" 13 | #include "Scene.h" 14 | #include "PVSGenerator.h" 15 | #include "PVSDatabaseExporter.h" 16 | #include "pugixml.hpp" 17 | using namespace pugi; 18 | 19 | 20 | /** 21 | * Tool to create the PVS from an input XML file with the raw scene data 22 | */ 23 | class PVSPreprocessor 24 | { 25 | 26 | public: 27 | 28 | /** 29 | * Raw-data for a mesh 30 | */ 31 | struct MeshData 32 | { 33 | /** 34 | * A unique identifier for the mesh 35 | */ 36 | unsigned int id; 37 | 38 | /** 39 | * Occludee or Occluder 40 | */ 41 | SceneObjectType type; 42 | 43 | /** 44 | * Number of triangles for the mesh 45 | */ 46 | unsigned int trianglesCount; 47 | 48 | /** 49 | * Vertex values (x, y z) for each triangle (the vertices are not indexed) 50 | */ 51 | float* vertexData; 52 | }; 53 | 54 | 55 | 56 | /** 57 | * Constructor 58 | */ 59 | PVSPreprocessor(); 60 | 61 | /** 62 | * Import meshes from the XML raw format file 63 | */ 64 | bool addMeshesFromXmlFile(const string inputPath); 65 | 66 | 67 | /** 68 | * Do the PVS building 69 | */ 70 | void buildPVS(); 71 | 72 | /** 73 | * Free resources 74 | */ 75 | void dispose(); 76 | 77 | /** 78 | * Retrieve error messages 79 | */ 80 | string getErrors(); 81 | 82 | /** 83 | * Split string 84 | */ 85 | static vector split(const string &text, char sep); 86 | 87 | private: 88 | 89 | vector meshes; 90 | 91 | vector errorMessages; 92 | 93 | public: 94 | 95 | /** 96 | * The name of the scene 97 | */ 98 | string sceneName; 99 | 100 | /** 101 | * The path where the PVS file will be saved 102 | */ 103 | string outputPath; 104 | 105 | /** 106 | * The size of each voxel 107 | */ 108 | Vector3f voxelSize; 109 | 110 | /** 111 | * The max size a cell can achieve 112 | */ 113 | Vector3f maxCellSize; 114 | 115 | private: 116 | 117 | string PVSPreprocessor::toString(const int n); 118 | 119 | }; 120 | 121 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/Query.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "PVSDatabase.h" 4 | #include "QueryResult.h" 5 | 6 | /** 7 | * A Query is used to determine the Potentially Visible Set using the given PVSDatabase. 8 | * It returns a QueryResult containing the visible Model Ids. 9 | */ 10 | class Query 11 | { 12 | public: 13 | 14 | /** 15 | * Creates a Query based on the given PVS Database 16 | * @param pvsDatabase The PVSDatabase. 17 | */ 18 | Query(const PVSDatabase& pvsDatabase); 19 | virtual ~Query(void); 20 | 21 | /** 22 | * Gets the PVS from a point in space. It doesn't take into account the frustum. 23 | * Retrieves the PVS that corresponds to the cell region where the position is contained. 24 | * If the position given is not inside any cell, then it returns zero model Ids. 25 | * @param position The vector3f position in world space. 26 | */ 27 | const QueryResult getPotentiallyVisibleObjectsFromRegion( const Vector3f position ); 28 | 29 | private: 30 | const PVSDatabase& m_pvsDatabase; 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/QueryResult.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "QueryResult.h" 3 | 4 | 5 | QueryResult::QueryResult(const vector getVisibleModelIds) : m_VisibleModelIds(getVisibleModelIds) 6 | { 7 | 8 | } 9 | 10 | const vector QueryResult::getVisibleModelIds() const 11 | { 12 | return m_VisibleModelIds; 13 | } 14 | 15 | QueryResult::~QueryResult(void) 16 | { 17 | } 18 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/QueryResult.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | using std::vector; 6 | 7 | /** 8 | * A QueryResult contains the visible model Ids. 9 | */ 10 | class QueryResult 11 | { 12 | public: 13 | 14 | /** 15 | * Creates a QueryResult containing the collection of given Model Ids. 16 | * @param getVisibleModelIds The vector of model Ids. 17 | */ 18 | QueryResult(const vector getVisibleModelIds); 19 | 20 | 21 | const vector getVisibleModelIds() const; 22 | virtual ~QueryResult(void); 23 | 24 | private: 25 | vector m_VisibleModelIds; 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaEngine/ReadMe.txt -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/Scene.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Scene.h" 3 | 4 | using std::logic_error; 5 | 6 | Scene::Scene(const SceneOptions& pOptions): options(pOptions), name("") 7 | { 8 | 9 | } 10 | 11 | Scene::Scene(const SceneOptions& pOptions, const string& pName) : options(pOptions), name(pName) 12 | { 13 | 14 | } 15 | 16 | 17 | Scene::~Scene(void) 18 | { 19 | } 20 | 21 | void Scene::addModelInstance(const Model& model, int modelId, const Matrix4x4& transformMatrix, SceneObjectType type ) 22 | { 23 | const ModelInstance& modelInstance = ModelInstance(model, modelId, transformMatrix, type); 24 | 25 | //TODO: replace by another more efficient find 26 | for(unsigned int c = 0 ; c < modelInstances.size() ; c++ ) 27 | { 28 | if( modelInstances[c].getModelId() == modelId ) 29 | throw new logic_error("Model id already exists"); 30 | } 31 | 32 | modelInstances.push_back(modelInstance); 33 | } 34 | 35 | int Scene::getModelInstancesCount() const 36 | { 37 | return modelInstances.size(); 38 | } 39 | 40 | const ModelInstance& Scene::getModelInstance( int index ) const 41 | { 42 | assert(index < getModelInstancesCount()); 43 | assert(index >= 0); 44 | 45 | return modelInstances[index]; 46 | } 47 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/Scene.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaEngine/Scene.h -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/SceneObjectType.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaEngine/SceneObjectType.h -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/SceneOptions.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | #include "SceneOptions.h" 4 | 5 | using std::logic_error; 6 | 7 | #define DEFAULT_TILE_SIZE 10 8 | 9 | SceneOptions::SceneOptions( ) 10 | { 11 | m_voxelSize = Vector3f(DEFAULT_TILE_SIZE/10, DEFAULT_TILE_SIZE/10, DEFAULT_TILE_SIZE/10); 12 | m_maxCellSize = Point3i(INT_MAX, INT_MAX, INT_MAX); 13 | m_sceneTileSize = Point3i(DEFAULT_TILE_SIZE, DEFAULT_TILE_SIZE, DEFAULT_TILE_SIZE); 14 | } 15 | 16 | 17 | void SceneOptions::setVoxelSize(float sizeX, float sizeY, float sizeZ) 18 | { 19 | if( sizeX <= 0 && sizeY <= 0 && sizeZ <= 0 ) 20 | throw new std::invalid_argument("Max cell size cannot be zero or less in any dimension"); 21 | 22 | m_voxelSize = Vector3f(sizeX, sizeY, sizeZ); 23 | } 24 | 25 | void SceneOptions::setMaxCellSize(int sizeX, int sizeY, int sizeZ) 26 | { 27 | if( sizeX <= 0 && sizeY <= 0 && sizeZ <= 0 ) 28 | throw new logic_error("Max cell size cannot be zero or less in any dimension"); 29 | 30 | m_maxCellSize = Point3i(sizeX, sizeY, sizeZ); 31 | } 32 | 33 | void SceneOptions::setSceneTileSize(int sizeX, int sizeY, int sizeZ) 34 | { 35 | if( sizeX <= 0 && sizeY <= 0 && sizeZ <= 0 ) 36 | throw new logic_error("The scene tile size cannot be zero or less in any dimension"); 37 | 38 | m_sceneTileSize = Point3i(sizeX, sizeY, sizeZ); 39 | } 40 | 41 | SceneOptions::~SceneOptions(void) 42 | { 43 | } 44 | 45 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/SceneOptions.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaEngine/SceneOptions.h -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/SceneTile.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "SceneTile.h" 3 | 4 | using std::logic_error; 5 | 6 | SceneTile::SceneTile(const Point3i fromVoxelIndex, const Point3i toVoxelIndex) 7 | { 8 | m_fromVoxelIndex = fromVoxelIndex; 9 | m_toVoxelIndex = toVoxelIndex; 10 | 11 | } 12 | 13 | 14 | SceneTile::~SceneTile(void) 15 | { 16 | } 17 | 18 | 19 | void SceneTile::addCell(const shared_ptr cell) 20 | { 21 | 22 | m_cells.push_back(cell); 23 | 24 | } 25 | 26 | void SceneTile::setNumberOfSolidVoxelsInside(int numberOfSolidVoxels) 27 | { 28 | if( numberOfSolidVoxels < 0 ) 29 | throw new logic_error("Number of solid voxels cannot be negative"); 30 | 31 | m_numberOfVoxels = numberOfSolidVoxels; 32 | 33 | } 34 | 35 | int SceneTile::getNumberOfVoxelsInside() const 36 | { 37 | return (m_toVoxelIndex.x - m_fromVoxelIndex.x + 1) * (m_toVoxelIndex.y - m_fromVoxelIndex.y + 1) * (m_toVoxelIndex.z - m_fromVoxelIndex.z + 1); 38 | } -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/SceneTile.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaEngine/SceneTile.h -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/TrianglesOctree.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaEngine/TrianglesOctree.h -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/Utilities.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | using std::string; 7 | using std::ostringstream; 8 | 9 | string NumberToString(int pNumber) 10 | { 11 | ostringstream oOStrStream; 12 | oOStrStream << pNumber; 13 | return oOStrStream.str(); 14 | } -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/dllmain.cpp: -------------------------------------------------------------------------------- 1 | // dllmain.cpp : Defines the entry point for the DLL application. 2 | #include "stdafx.h" 3 | 4 | BOOL APIENTRY DllMain( HMODULE hModule, 5 | DWORD ul_reason_for_call, 6 | LPVOID lpReserved 7 | ) 8 | { 9 | switch (ul_reason_for_call) 10 | { 11 | case DLL_PROCESS_ATTACH: 12 | case DLL_THREAD_ATTACH: 13 | case DLL_THREAD_DETACH: 14 | case DLL_PROCESS_DETACH: 15 | break; 16 | } 17 | return TRUE; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // JanuaEngine.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #define WIN32_LEAN_AND_MEAN 11 | 12 | 13 | 14 | #if defined DLL_EXPORT 15 | #define DllExport __declspec(dllexport) 16 | #else 17 | #define DllExport __declspec(dllimport) 18 | #endif 19 | 20 | #define ALIGNED16 __declspec( align( 16 ) ) 21 | #define EXTERN_C extern "C" 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include 39 | -------------------------------------------------------------------------------- /JanuaEngine/JanuaEngine/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaEngine/targetver.h -------------------------------------------------------------------------------- /JanuaEngine/JanuaRuntime/JanuaRuntime.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/JanuaRuntime/JanuaRuntime.h -------------------------------------------------------------------------------- /JanuaEngine/PVSPreprocessor/PVSPreprocessor.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/Example1/Example1.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | #include "Examples/Example1/Example1.h" 10 | using namespace Examples; 11 | 12 | 13 | string Example1::getCategory() 14 | { 15 | return "Category"; 16 | } 17 | 18 | string Example1::getName() 19 | { 20 | return "Example1"; 21 | } 22 | 23 | string Example1::getDescription() 24 | { 25 | return "Example1"; 26 | } 27 | 28 | void Example1::init() 29 | { 30 | camera = new TgcFpsCamera(); 31 | 32 | TgcSceneLoader loader; 33 | scene = loader.loadSceneFromFile(GuiController::Instance->examplesMediaPath + "TgcModels\\Deposito\\Deposito-TgcScene.xml"); 34 | //scene = loader.loadSceneFromFile(GuiController::Instance->examplesMediaPath + "TgcModels\\CamionCemento\\CamionCemento-TgcScene.xml"); 35 | //scene = loader.loadSceneFromFile(GuiController::Instance->examplesMediaPath + "TgcModels\\Box\\Box-TgcScene.xml"); 36 | //scene = loader.loadSceneFromFile(GuiController::Instance->examplesMediaPath + "TgcModels\\Triangle\\Triangle-TgcScene.xml"); 37 | } 38 | 39 | void Example1::render(float elapsedTime) 40 | { 41 | camera->updateCamera(); 42 | camera->updateViewMatrix(); 43 | 44 | scene->renderAll(true); 45 | } 46 | 47 | void Example1::close() 48 | { 49 | scene->disposeAll(); 50 | delete scene; 51 | } 52 | 53 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/Example1/Example1.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "Examples/TgcViewerIncludes.h" 15 | 16 | 17 | 18 | namespace Examples 19 | { 20 | 21 | 22 | /** 23 | * Example 1 24 | */ 25 | class Example1 : public TgcExample 26 | { 27 | 28 | public: 29 | 30 | //Virtual members 31 | string getCategory(); 32 | string getName(); 33 | string getDescription(); 34 | void init(); 35 | void render(float elapsedTime); 36 | void close(); 37 | 38 | private: 39 | 40 | public: 41 | 42 | TgcScene* scene; 43 | TgcFpsCamera* camera; 44 | 45 | private: 46 | 47 | 48 | 49 | }; 50 | 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleEditor/BorderBox.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Examples/ExampleEditor/BorderBox.cpp -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleEditor/BorderBox.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "Examples/TgcViewerIncludes.h" 15 | #include "Examples/ExampleEditor/EditorBox.h" 16 | 17 | 18 | namespace Examples 19 | { 20 | 21 | 22 | 23 | /** 24 | * BorderBox 25 | */ 26 | class BorderBox 27 | { 28 | 29 | public: 30 | 31 | BorderBox(); 32 | BorderBox(const BorderBox&); 33 | ~BorderBox(); 34 | 35 | void create(); 36 | void updateValues(); 37 | void render(); 38 | void dispose(); 39 | 40 | 41 | Vector3 pMin; 42 | Vector3 pMax; 43 | Color color; 44 | float thickness; 45 | 46 | private: 47 | 48 | void createLineX(VertexType::VertexColor* const vertices, int idx, Color c, Vector3 min, Vector3 max); 49 | void createLineY(VertexType::VertexColor* const vertices, int idx, Color c, Vector3 min, Vector3 max); 50 | void createLineZ(VertexType::VertexColor* const vertices, int idx, Color c, Vector3 min, Vector3 max); 51 | void createLineVertices(VertexType::VertexColor* const vertices, int idx, Vector3 min, Vector3 max, Color c); 52 | 53 | void setPositionSize(Vector3 position, Vector3 size); 54 | 55 | public: 56 | 57 | static const int LINE_VERTICES_COUNT; 58 | static const int LINES_COUNT; 59 | static const int VERTICES_COUNT; 60 | static const int TRIANGLES_COUNT; 61 | 62 | private: 63 | 64 | TgcVertexBuffer* vertexBuffer; 65 | TgcIndexBuffer* indexBuffer; 66 | TgcEffect* effect; 67 | 68 | }; 69 | 70 | 71 | 72 | 73 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleEditor/ExampleEditor.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "Examples/TgcViewerIncludes.h" 15 | #include "Examples/ExampleEditor/EditorBox.h" 16 | #include "Examples/ExampleEditor/Grid.h" 17 | 18 | 19 | namespace Examples 20 | { 21 | 22 | 23 | /** 24 | * ExampleEditor 1 25 | */ 26 | class ExampleEditor : public TgcExample 27 | { 28 | 29 | public: 30 | 31 | enum EditorState 32 | { 33 | Nothing, 34 | CreatingBase, 35 | CreatingHeight, 36 | ObjectSelected, 37 | Translating, 38 | FaceSelected, 39 | Struding 40 | }; 41 | 42 | //Virtual members 43 | string getCategory(); 44 | string getName(); 45 | string getDescription(); 46 | void init(); 47 | void render(float elapsedTime); 48 | void close(); 49 | 50 | private: 51 | 52 | Vector3 MIN_BOX_SIZE; 53 | float HEIGHT_MOVE_SPEED; 54 | float STRUDE_SPEED; 55 | float PAN_SPEED; 56 | float ZOOM_SPEED; 57 | float TRANSLATE_SPEED; 58 | 59 | 60 | EditorBox* pickObject(); 61 | Vector3 groundPicking(); 62 | void strudeBox(EditorBox* box, EditorBox::BoxFace face); 63 | void updateCamera(); 64 | bool collisionWithBoxes(EditorBox* box); 65 | Vector3 vecMin(Vector3 a, Vector3 b); 66 | Vector3 vecMax(Vector3 a, Vector3 b); 67 | 68 | public: 69 | 70 | EditorState currentState; 71 | vector boxes; 72 | Grid* grid; 73 | EditorBox* selectedFaceBox; 74 | EditorBox* selectedBox; 75 | 76 | EditorBox* creatingBox; 77 | Vector3 creatingBoxMin; 78 | Vector3 creatingBoxMax; 79 | 80 | Vector3 initTranslatingPos; 81 | 82 | Vector3 cameraPos; 83 | Vector3 cameraLookAt; 84 | 85 | private: 86 | 87 | 88 | 89 | }; 90 | 91 | 92 | 93 | 94 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleEditor/Grid.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "Examples/TgcViewerIncludes.h" 15 | #include "Examples/ExampleEditor/EditorBox.h" 16 | 17 | 18 | namespace Examples 19 | { 20 | 21 | 22 | 23 | /** 24 | * Grid 25 | */ 26 | class Grid 27 | { 28 | 29 | public: 30 | 31 | Grid(); 32 | Grid(const Grid&); 33 | ~Grid(); 34 | 35 | void create(); 36 | void render(); 37 | void dispose(); 38 | 39 | 40 | private: 41 | 42 | public: 43 | 44 | static const int VERTEX_COUNT; 45 | static const int LINES_COUNT; 46 | static const float GRID_RADIUS; 47 | static const float LINE_SEPARATION; 48 | 49 | AABB aabb; 50 | 51 | private: 52 | 53 | TgcVertexBuffer* vertexBuffer; 54 | TgcIndexBuffer* indexBuffer; 55 | TgcEffect* effect; 56 | 57 | }; 58 | 59 | 60 | 61 | 62 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleOCEngine1/ExampleCreateRawSceneXML.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | //General includes 13 | #include 14 | 15 | //Project Includes: 16 | #include "Examples/TgcViewerIncludes.h" 17 | #include "Examples/ExampleOCEngine1/Voxel.h" 18 | #include "TgcViewer/Xml/pugixml.hpp" 19 | using namespace pugi; 20 | 21 | 22 | 23 | 24 | namespace Examples 25 | { 26 | 27 | 28 | /** 29 | * ExampleCreateRawSceneXML 30 | */ 31 | class ExampleCreateRawSceneXML : public TgcExample 32 | { 33 | 34 | 35 | public: 36 | 37 | //Virtual members 38 | string getCategory(); 39 | string getName(); 40 | string getDescription(); 41 | void init(); 42 | void render(float elapsedTime); 43 | void close(); 44 | 45 | private: 46 | 47 | public: 48 | 49 | private: 50 | 51 | 52 | 53 | }; 54 | 55 | 56 | 57 | 58 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleOCEngine1/ExampleOCEngine1.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | //OCEngine includes 13 | #include "JanuaEngine/Scene.h" 14 | #include "JanuaEngine/SceneOptions.h" 15 | #include "JanuaEngine/Model.h" 16 | #include "JanuaEngine/SceneObjectType.h" 17 | #include "JanuaEngine/PVSGenerator.h" 18 | #include "JanuaEngine/PVSDatabase.h" 19 | #include "Core/Matrix4x4.h" 20 | #include "Core/Vector3f.h" 21 | #include "Core/Point3i.h" 22 | 23 | 24 | //Project Includes: 25 | #include "Examples/TgcViewerIncludes.h" 26 | #include "Examples/ExampleOCEngine1/Voxel.h" 27 | 28 | 29 | 30 | 31 | 32 | namespace Examples 33 | { 34 | 35 | 36 | /** 37 | * ExampleOCEngine1 38 | */ 39 | class ExampleOCEngine1 : public TgcExample 40 | { 41 | 42 | 43 | public: 44 | 45 | struct RenderPortal 46 | { 47 | Vector3 min; 48 | Vector3 max; 49 | }; 50 | 51 | struct RenderCell 52 | { 53 | Vector3 min; 54 | Vector3 max; 55 | vector portals; 56 | }; 57 | 58 | 59 | //Virtual members 60 | string getCategory(); 61 | string getName(); 62 | string getDescription(); 63 | void init(); 64 | void render(float elapsedTime); 65 | void close(); 66 | 67 | ExampleOCEngine1::RenderCell* getCurrentCell(); 68 | 69 | private: 70 | 71 | public: 72 | 73 | const static int VOXEL_SIZE = 10; 74 | 75 | TgcFpsCamera* camera; 76 | TgcScene* scene; 77 | shared_ptr ocDatabase; 78 | VoxelGroup* voxelGroup; 79 | VoxelGroup* cellGroup; 80 | 81 | bool renderScene; 82 | bool renderVoxels; 83 | bool renderCells; 84 | bool renderPortals; 85 | 86 | TgcDebugBox* currentCellBox; 87 | vector currentPortalsBoxPool; 88 | 89 | vector ocModels; 90 | 91 | vector cells; 92 | 93 | private: 94 | 95 | 96 | 97 | }; 98 | 99 | 100 | 101 | 102 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleOCEngine1/Voxel.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "Examples/TgcViewerIncludes.h" 15 | 16 | 17 | namespace Examples 18 | { 19 | 20 | 21 | /** 22 | * Voxel 23 | */ 24 | class Voxel 25 | { 26 | 27 | public: 28 | 29 | Voxel(); 30 | Voxel(Vector3 center, Vector3 size); 31 | 32 | void setExtremes(Vector3 min, Vector3 max); 33 | 34 | private: 35 | 36 | 37 | public: 38 | 39 | Vector3 center; 40 | Vector3 size; 41 | 42 | private: 43 | 44 | 45 | }; 46 | 47 | 48 | 49 | /** 50 | * VoxelGroup 51 | */ 52 | class VoxelGroup 53 | { 54 | 55 | public: 56 | 57 | VoxelGroup(); 58 | void create(); 59 | void render(); 60 | void dispose(); 61 | 62 | static Color randomAdaptColor(const Color &c); 63 | 64 | private: 65 | 66 | public: 67 | 68 | static const int VERTEX_COUNT = 8; 69 | static const int INDEX_COUNT = 36; 70 | 71 | //Voxel list 72 | vector voxels; 73 | 74 | //Things to render 75 | bool drawVoxels; 76 | bool alphaBlendEnabled; 77 | Color color; 78 | TgcVertexBuffer* vertexBuffer; 79 | TgcIndexBuffer* indexBuffer; 80 | TgcEffect* effect; 81 | 82 | int totalVertices; 83 | int totalIndices; 84 | int totalBBIndices; 85 | 86 | //Things to render AABB 87 | static const int BB_INDEX_COUNT = 24; 88 | bool drawAABB; 89 | Color bbColor; 90 | TgcVertexBuffer* bbVertexBuffer; 91 | TgcIndexBuffer* bbIndexBuffer; 92 | 93 | 94 | private: 95 | 96 | 97 | }; 98 | 99 | 100 | 101 | 102 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleSprite/ExampleSprite.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "Examples/TgcViewerIncludes.h" 15 | 16 | 17 | 18 | namespace Examples 19 | { 20 | 21 | 22 | /** 23 | * Example Sprite 24 | */ 25 | class ExampleSprite : public TgcExample 26 | { 27 | 28 | public: 29 | 30 | //Virtual members 31 | string getCategory(); 32 | string getName(); 33 | string getDescription(); 34 | void init(); 35 | void render(float elapsedTime); 36 | void close(); 37 | 38 | private: 39 | 40 | public: 41 | 42 | TgcFpsCamera* camera; 43 | TgcSprite* sprite; 44 | TgcBox* box; 45 | TgcAnimatedSprite* animSprite; 46 | TgcText2d* text; 47 | TgcText2d* text2; 48 | 49 | private: 50 | 51 | 52 | 53 | }; 54 | 55 | 56 | 57 | 58 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleTgcBox/ExampleTgcBox.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | #include "Examples/ExampleTgcBox/ExampleTgcBox.h" 10 | using namespace Examples; 11 | 12 | 13 | string ExampleTgcBox::getCategory() 14 | { 15 | return "Category"; 16 | } 17 | 18 | string ExampleTgcBox::getName() 19 | { 20 | return "Example1"; 21 | } 22 | 23 | string ExampleTgcBox::getDescription() 24 | { 25 | return "Example1"; 26 | } 27 | 28 | void ExampleTgcBox::init() 29 | { 30 | camera = new TgcFpsCamera(); 31 | 32 | box = TgcBox::fromSize(Vector3(10, 10, 10), TgcTexture::createTexture(GuiController::Instance->examplesMediaPath + "TgcModels\\Deposito\\Textures\\box1.jpg")); 33 | //box = TgcBox::fromSize(Vector3(10, 10, 10), Color::Red); 34 | } 35 | 36 | void ExampleTgcBox::render(float elapsedTime) 37 | { 38 | camera->updateCamera(); 39 | camera->updateViewMatrix(); 40 | 41 | box->render(); 42 | } 43 | 44 | void ExampleTgcBox::close() 45 | { 46 | box->dispose(); 47 | delete box; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleTgcBox/ExampleTgcBox.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "Examples/TgcViewerIncludes.h" 15 | 16 | 17 | 18 | namespace Examples 19 | { 20 | 21 | 22 | /** 23 | * Example TgcBox 24 | */ 25 | class ExampleTgcBox : public TgcExample 26 | { 27 | 28 | public: 29 | 30 | //Virtual members 31 | string getCategory(); 32 | string getName(); 33 | string getDescription(); 34 | void init(); 35 | void render(float elapsedTime); 36 | void close(); 37 | 38 | private: 39 | 40 | public: 41 | 42 | TgcBox* box; 43 | TgcFpsCamera* camera; 44 | 45 | private: 46 | 47 | 48 | 49 | }; 50 | 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleVB/ExampleVB.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "Examples/TgcViewerIncludes.h" 15 | #include "TgcViewer/Renderer/TgcVertexBuffer.h" 16 | #include "TgcViewer/Renderer/TgcIndexBuffer.h" 17 | #include "TgcViewer/Renderer/TgcInputLayout.h" 18 | 19 | 20 | namespace Examples 21 | { 22 | 23 | 24 | /** 25 | * ExampleVB 26 | */ 27 | class ExampleVB : public TgcExample 28 | { 29 | 30 | public: 31 | 32 | //Virtual members 33 | string getCategory(); 34 | string getName(); 35 | string getDescription(); 36 | void init(); 37 | void render(float elapsedTime); 38 | void close(); 39 | 40 | private: 41 | 42 | public: 43 | 44 | 45 | TgcFpsCamera* camera; 46 | TgcVertexBuffer* vertexBuffer; 47 | TgcIndexBuffer* indexBuffer; 48 | TgcEffect* effect; 49 | TgcTexture* texture; 50 | 51 | private: 52 | 53 | 54 | 55 | }; 56 | 57 | 58 | 59 | 60 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleVoxel/ExampleVoxel.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | #include "Examples/ExampleVoxel/ExampleVoxel.h" 10 | using namespace Examples; 11 | 12 | 13 | string ExampleVoxel::getCategory() 14 | { 15 | return "Category"; 16 | } 17 | 18 | string ExampleVoxel::getName() 19 | { 20 | return "ExampleVoxel"; 21 | } 22 | 23 | string ExampleVoxel::getDescription() 24 | { 25 | return "ExampleVoxel"; 26 | } 27 | 28 | void ExampleVoxel::init() 29 | { 30 | camera = new TgcFpsCamera(); 31 | 32 | 33 | } 34 | 35 | void ExampleVoxel::render(float elapsedTime) 36 | { 37 | camera->updateCamera(); 38 | camera->updateViewMatrix(); 39 | 40 | } 41 | 42 | void ExampleVoxel::close() 43 | { 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleVoxel/ExampleVoxel.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "Examples/TgcViewerIncludes.h" 15 | 16 | 17 | 18 | namespace Examples 19 | { 20 | 21 | 22 | /** 23 | * ExampleVoxel 24 | */ 25 | class ExampleVoxel : public TgcExample 26 | { 27 | 28 | public: 29 | 30 | //Virtual members 31 | string getCategory(); 32 | string getName(); 33 | string getDescription(); 34 | void init(); 35 | void render(float elapsedTime); 36 | void close(); 37 | 38 | private: 39 | 40 | public: 41 | 42 | TgcFpsCamera* camera; 43 | 44 | private: 45 | 46 | 47 | 48 | }; 49 | 50 | 51 | 52 | 53 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExampleVoxel/TgcVoxel.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "Examples/TgcViewerIncludes.h" 15 | 16 | 17 | namespace Examples 18 | { 19 | 20 | 21 | 22 | /** 23 | * TgcVoxel 24 | */ 25 | class TgcVoxel 26 | { 27 | 28 | public: 29 | 30 | TgcVoxel(); 31 | TgcVoxel(const TgcVoxel&); 32 | ~TgcVoxel(); 33 | 34 | void create(); 35 | 36 | void render(); 37 | void dispose(); 38 | 39 | private: 40 | 41 | 42 | public: 43 | 44 | Vector3 size; 45 | Vector3 center; 46 | Color color; 47 | 48 | 49 | TgcVertexBuffer* vertexBuffer; 50 | TgcIndexBuffer* indexBuffer; 51 | TgcEffect* effect; 52 | Matrix4 transform; 53 | 54 | 55 | private: 56 | 57 | 58 | }; 59 | 60 | 61 | 62 | 63 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExamplesUI/ExampleModifier.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | #include "Examples/ExamplesUI/ExampleModifier.h" 10 | using namespace Examples; 11 | 12 | 13 | string ExampleModifier::getCategory() 14 | { 15 | return "ExamplesUI"; 16 | } 17 | 18 | string ExampleModifier::getName() 19 | { 20 | return "ExampleModifier"; 21 | } 22 | 23 | string ExampleModifier::getDescription() 24 | { 25 | return "ExampleModifier"; 26 | } 27 | 28 | void ExampleModifier::init() 29 | { 30 | camera = new TgcFpsCamera(); 31 | 32 | GuiController::Instance->modifiers->addBool("bool1", "boolean modifier 1", false); 33 | GuiController::Instance->modifiers->addFloat("float1", "float modifier 1", -10, 10, 5); 34 | GuiController::Instance->modifiers->addBool("bool2", "boolean modifier 2", true); 35 | GuiController::Instance->modifiers->addFloat("float2", "float modifier 2", 0, 100, 25); 36 | GuiController::Instance->modifiers->addBool("bool3", "boolean modifier 3", false); 37 | GuiController::Instance->modifiers->addBool("bool4", "boolean modifier 4", true); 38 | GuiController::Instance->modifiers->addFloat("float2", "float modifier 2", 0, 100, 25); 39 | GuiController::Instance->modifiers->addBool("bool5", "boolean modifier 5", false); 40 | } 41 | 42 | void ExampleModifier::render(float elapsedTime) 43 | { 44 | camera->updateCamera(); 45 | camera->updateViewMatrix(); 46 | 47 | GuiController::Instance->drawText("bool1: " + GuiController::Instance->modifiers->get("bool1")->getString(), 300, 300); 48 | GuiController::Instance->drawText("float1: " + GuiController::Instance->modifiers->get("float1")->getString(), 300, 350); 49 | 50 | } 51 | 52 | void ExampleModifier::close() 53 | { 54 | delete camera; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExamplesUI/ExampleModifier.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "Examples/TgcViewerIncludes.h" 15 | 16 | 17 | 18 | namespace Examples 19 | { 20 | 21 | 22 | /** 23 | * ExampleModifier 24 | */ 25 | class ExampleModifier : public TgcExample 26 | { 27 | 28 | public: 29 | 30 | //Virtual members 31 | string getCategory(); 32 | string getName(); 33 | string getDescription(); 34 | void init(); 35 | void render(float elapsedTime); 36 | void close(); 37 | 38 | private: 39 | 40 | public: 41 | 42 | TgcFpsCamera* camera; 43 | 44 | 45 | private: 46 | 47 | 48 | 49 | }; 50 | 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/ExamplesUI/ExampleUI.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "Examples/TgcViewerIncludes.h" 15 | 16 | 17 | 18 | namespace Examples 19 | { 20 | 21 | 22 | /** 23 | * ExampleUI 24 | */ 25 | class ExampleUI : public TgcExample 26 | { 27 | 28 | public: 29 | 30 | //Virtual members 31 | string getCategory(); 32 | string getName(); 33 | string getDescription(); 34 | void init(); 35 | void render(float elapsedTime); 36 | void close(); 37 | 38 | private: 39 | 40 | public: 41 | 42 | TgcFpsCamera* camera; 43 | 44 | TgcGuiCheckBox* checkbox1; 45 | TgcGuiCheckBox* checkbox2; 46 | TgcGuiButton* button1; 47 | TgcGuiButton* button2; 48 | TgcGuiSlider* slider1; 49 | TgcGuiSlider* slider2; 50 | TgcGuiSlider* slider3; 51 | 52 | 53 | private: 54 | 55 | 56 | 57 | }; 58 | 59 | 60 | 61 | 62 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Examples/TgcViewerIncludes.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | //STL 13 | #include 14 | #include 15 | #include 16 | #include 17 | using namespace std; 18 | 19 | //General 20 | #include "TgcViewer/globals.h" 21 | #include "TgcViewer/GuiController.h" 22 | #include "TgcViewer/Example/TgcExample.h" 23 | using namespace TgcViewer; 24 | 25 | //Input 26 | #include "TgcViewer/Input/TgcInput.h" 27 | #include "TgcViewer/Input/TgcFpsCamera.h" 28 | 29 | //Math 30 | #include "TgcViewer/Math/FastMath.h" 31 | #include "TgcViewer/Math/Vector3.h" 32 | #include "TgcViewer/Math/Vector4.h" 33 | #include "TgcViewer/Math/Vector2.h" 34 | #include "TgcViewer/Math/Color.h" 35 | 36 | //Renderer 37 | #include "TgcViewer/Renderer/TgcRenderer.h" 38 | #include "TgcViewer/Renderer/TgcRendererGlobals.h" 39 | #include "TgcViewer/Renderer/TgcEffect.h" 40 | #include "TgcViewer/Renderer/TgcVertexBuffer.h" 41 | #include "TgcViewer/Renderer/TgcIndexBuffer.h" 42 | #include "TgcViewer/Renderer/TgcInputLayout.h" 43 | 44 | //TgcSceneLoader 45 | #include "TgcViewer/TgcSceneLoader/TgcSceneLoader.h" 46 | #include "TgcViewer/TgcSceneLoader/TgcScene.h" 47 | #include "TgcViewer/TgcSceneLoader/TgcMesh.h" 48 | #include "TgcViewer/TgcSceneLoader/TgcTexture.h" 49 | 50 | //TgcGeometry 51 | #include "TgcViewer/TgcGeometry/TgcBoundingBox.h" 52 | #include "TgcViewer/TgcGeometry/TgcBox.h" 53 | #include "TgcViewer/TgcGeometry/TgcDebugBox.h" 54 | 55 | //2D 56 | #include "TgcViewer/2D/TgcSprite.h" 57 | #include "TgcViewer/2D/TgcAnimatedSprite.h" 58 | #include "TgcViewer/2D/TgcText2d.h" 59 | 60 | //Ui 61 | #include "TgcViewer/Ui/TgcUserVars.h" 62 | #include "TgcViewer/Ui/Gui/TgcGui.h" 63 | #include "TgcViewer/Ui/Gui/TgcGuiItem.h" 64 | #include "TgcViewer/Ui/Gui/TgcGuiCheckBox.h" 65 | #include "TgcViewer/Ui/Gui/TgcGuiButton.h" 66 | #include "TgcViewer/Ui/Gui/TgcGuiSlider.h" 67 | #include "TgcViewer/Ui/Modifiers/TgcModifiers.h" 68 | #include "TgcViewer/Ui/Modifiers/TgcModifierItem.h" 69 | #include "TgcViewer/Ui/Modifiers/TgcBoolModifier.h" 70 | #include "TgcViewer/Ui/Modifiers/TgcFloatModifier.h" 71 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Box/Box-TgcScene.xml: -------------------------------------------------------------------------------- 1 | 2 | Scene01 3 | 4 | 5 | 6 | 7 | [150.0,150.0,150.0,255.0] 8 | [150.0,150.0,150.0,255.0] 9 | [229.5,229.5,229.5,255.0] 10 | 100.0 11 | granito.jpg 12 | 13 | 14 | 15 | 16 | 0 2 3 3 1 0 4 5 7 7 6 4 0 1 5 5 4 0 1 3 7 7 5 1 3 2 6 6 7 3 2 0 4 4 6 2 17 | 9 11 10 10 8 9 8 9 11 11 10 8 4 5 7 7 6 4 0 1 3 3 2 0 4 5 7 7 6 4 0 1 3 3 2 0 18 | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 19 | 0 20 | -20.0107 -12.4761 -20.216 14.4465 -12.4761 -20.216 -20.0107 -12.4761 17.1393 14.4465 -12.4761 17.1393 -20.0107 15.0247 -20.216 14.4465 15.0247 -20.216 -20.0107 15.0247 17.1393 14.4465 15.0247 17.1393 21 | 0.0 0.0 -1.5708 0.0 0.0 -1.5708 0.0 0.0 -1.5708 0.0 0.0 -1.5708 0.0 0.0 1.5708 0.0 0.0 1.5708 0.0 0.0 1.5708 0.0 0.0 1.5708 22 | 0.0 0.0 1.0 0.0 0.0 -1.0 1.0 -1.0 0.0 0.0 1.0 0.0 0.0 -1.0 1.0 -1.0 0.0 0.0 1.0 0.0 0.0 -1.0 1.0 -1.0 23 | 255 255 255 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Box/Textures/granito.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Box/Textures/granito.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/CamionCemento/Textures/Truc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/CamionCemento/Textures/Truc.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/CamionCemento/Textures/cement_trailer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/CamionCemento/Textures/cement_trailer.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/box1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/box1.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/box2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/box2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/box3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/box3.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/box4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/box4.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/boxMetal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/boxMetal.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/floor1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/floor1.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/wall2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/wall2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/wood_door_12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Deposito/Textures/wood_door_12.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/F_tapis_carre_outgame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/F_tapis_carre_outgame.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/FumDallage02_outgame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/FumDallage02_outgame.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/FumDallage05_outgame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/FumDallage05_outgame.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/FumGridDark_outgame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/FumGridDark_outgame.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/FyAccCaisse_outgame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/FyAccCaisse_outgame.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/MetalMech1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/MetalMech1.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/RippleDRelief.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/RippleDRelief.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/brick3_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/brick3_5.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/concrete1_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/concrete1_2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/floor1_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/floor1_4.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/floor2_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/floor2_3.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/gunpowder.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/gunpowder.bmp -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/lite1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/lite1.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/q1comp4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/q1comp4.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/stair1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/stair1.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/wastelt1glow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/EscenarioPortal/Textures/wastelt1glow.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Granito.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Granito.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Granito_NormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Granito_NormalMap.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Medievil Stonework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Medievil Stonework.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Medievil Stonework_NormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Medievil Stonework_NormalMap.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Slate Tiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Slate Tiles.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Slate Tiles_NormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Slate Tiles_NormalMap.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Stones.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Stones.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Stones2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Stones2.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Stones2_NormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Stones2_NormalMap.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Stones_NormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Stones_NormalMap.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tech Plate 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tech Plate 2.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tech Plate 2_NormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tech Plate 2_NormalMap.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tech Plate 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tech Plate 3.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tech Plate 3_NormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tech Plate 3_NormalMap.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tech Plate 4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tech Plate 4.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tech Plate 4_NormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tech Plate 4_NormalMap.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tundra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tundra.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tundra_NormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Tundra_NormalMap.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Well Preserved Chesterfield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Well Preserved Chesterfield.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Well Preserved Chesterfield_NormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Well Preserved Chesterfield_NormalMap.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Worn Temple Wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Worn Temple Wall.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Worn Temple Wall_NormalMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/Worn Temple Wall_NormalMap.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/wastelt1glow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom/Textures/wastelt1glow.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Granito.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Granito.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Medievil Stonework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Medievil Stonework.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Slate Tiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Slate Tiles.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Stones.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Stones.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Stones2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Stones2.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Tech Plate 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Tech Plate 2.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Tech Plate 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Tech Plate 3.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Tech Plate 4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Tech Plate 4.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Tundra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Tundra.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Well Preserved Chesterfield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/Well Preserved Chesterfield.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/auvBG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/auvBG.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/bench.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/bench.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/closet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoom2/Textures/closet.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Granito.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Granito.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Medievil Stonework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Medievil Stonework.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Slate Tiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Slate Tiles.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Stones.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Stones.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Stones2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Stones2.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Tech Plate 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Tech Plate 2.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Tech Plate 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Tech Plate 3.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Tech Plate 4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Tech Plate 4.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Tundra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Tundra.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Well Preserved Chesterfield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/Well Preserved Chesterfield.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/woodceiling1a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomObstaculos/Textures/woodceiling1a.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Granito.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Granito.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Medievil Stonework.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Medievil Stonework.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Slate Tiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Slate Tiles.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Stones.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Stones.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Stones2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Stones2.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Tech Plate 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Tech Plate 2.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Tech Plate 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Tech Plate 3.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Tech Plate 4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Tech Plate 4.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Tundra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Tundra.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Well Preserved Chesterfield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/Well Preserved Chesterfield.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/woodceiling1a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/NormalMapRoomSimple/Textures/woodceiling1a.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/emptyLightMap.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/emptyLightMap.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight0.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight1.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight3.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight4.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight5.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight6.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight7.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/LightMaps/qlight8.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/baseboard04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/baseboard04.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/baseboard09_c3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/baseboard09_c3.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/baseboard09_e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/baseboard09_e.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/baseboard09_e2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/baseboard09_e2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/baseboard09_l2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/baseboard09_l2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/baseboard09_o3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/baseboard09_o3.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks11b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks11b.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks11bbroke3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks11bbroke3.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks15.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks17.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks17floor2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks17floor2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks18b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks18b.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks18c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks18c.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks18c_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/blocks18c_3.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/ceilingtechplain.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/ceilingtechplain.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/center2trn.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/center2trn.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/chapthroat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/chapthroat.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/chapthroat2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/chapthroat2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/chapthroatooz.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/chapthroatooz.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/computer_blocks17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/computer_blocks17.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/demon_block15fx.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/demon_block15fx.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/dirt2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/dirt2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/flame1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/flame1.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/flame2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/flame2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/gratetorch2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/gratetorch2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/gratetorch2b.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/gratetorch2b.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/inteldimclouds.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/inteldimclouds.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/iron01_e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/iron01_e.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/iron01_ntech3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/iron01_ntech3.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/killblock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/killblock.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/killblock_i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/killblock_i.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/killblock_i4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/killblock_i4.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/killblockgeomtrn.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/killblockgeomtrn.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/killsky_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/killsky_1.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1archfinalc_top.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1archfinalc_top.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1archfinald_bot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1archfinald_bot.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1archfinald_mid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1archfinald_mid.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1columna2R.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1columna2R.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1tower4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1tower4.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1tower4_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1tower4_a.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1tower_short.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/km_arena1tower_short.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/largeblock3b3broke.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/largeblock3b3broke.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/largerblock3b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/largerblock3b.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/largerblock3b_ow.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/largerblock3b_ow.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/largerblock3blood.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/largerblock3blood.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/lavahell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/lavahell.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/lion.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/lion.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/lion_m.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/lion_m.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/major_h_st.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/major_h_st.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/major_st.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/major_st.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/metalbridge06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/metalbridge06.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/metalbridge06broke.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/metalbridge06broke.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/metaldemonkillblock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/metaldemonkillblock.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/metalsupport4b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/metalsupport4b.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/metalsupsolid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/metalsupsolid.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/pentagram_light1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/pentagram_light1.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/pitted_rust.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/pitted_rust.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/pitted_rust2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/pitted_rust2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/pitted_rust3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/pitted_rust3.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/protobanner.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/protobanner.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skin6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skin6.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull4.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull_door_a.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull_door_a.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull_door_b.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull_door_b.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull_door_c.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull_door_c.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull_door_d.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull_door_d.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull_door_e.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull_door_e.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull_door_f.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skull_door_f.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skullarch_a.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skullarch_a.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skullarch_b.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skullarch_b.JPG -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skullarch_c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skullarch_c.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skullsvertgray02b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/skullsvertgray02b.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/slateroofc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/slateroofc.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/storch_tall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/storch_tall.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/supportborder_blue_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/supportborder_blue_b.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/supportborder_blue_c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/supportborder_blue_c.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/surface8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/surface8.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/tongue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/tongue.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/visor_st.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/visor_st.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/wallhead02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/wallhead02.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/woodceiling1a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/woodceiling1a.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/woodceiling1b_dark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/woodceiling1b_dark.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/xian_tourneyarch_inside2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/xian_tourneyarch_inside2.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/xstairtop4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/xstairtop4.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/xstairtop4bbrn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/xstairtop4bbrn.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/xstepborder3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/xstepborder3.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/xstepborder3brn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/QuakeRoom1/Textures/xstepborder3brn.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Triangle/Textures/granito.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Triangle/Textures/granito.jpg -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/Examples/TgcModels/Triangle/Triangle-TgcScene.xml: -------------------------------------------------------------------------------- 1 | 2 | TriangleScene 3 | 4 | 5 | 6 | 7 | [150.0,150.0,150.0,255.0] 8 | [150.0,150.0,150.0,255.0] 9 | [229.5,229.5,229.5,255.0] 10 | 100.0 11 | granito.jpg 12 | 13 | 14 | 15 | 16 | 0 1 2 17 | 0 1 2 18 | 0 0 0 19 | 0 20 | 0 0 0 0 100 0 100 0 0 21 | 1 0 0 22 | 0 0 0 1 1 1 23 | 255 255 255 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Fonts/Microsoft_Sans_Serif_12.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Fonts/Microsoft_Sans_Serif_12.bmp -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Fonts/Microsoft_Sans_Serif_16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Fonts/Microsoft_Sans_Serif_16.bmp -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Fonts/Microsoft_Sans_Serif_20.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Fonts/Microsoft_Sans_Serif_20.bmp -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Fonts/Microsoft_Sans_Serif_26.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Fonts/Microsoft_Sans_Serif_26.bmp -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Shaders/DirectX10/Text2dShader.hlsl: -------------------------------------------------------------------------------- 1 | /* 2 | * Text 2D shader 3 | */ 4 | 5 | /**************************************************************************************/ 6 | /* Common vars */ 7 | /**************************************************************************************/ 8 | 9 | //DiffuseMap 10 | Texture2D texDiffuseMap : register(t0); 11 | SamplerState diffuseMap : register(s0); 12 | 13 | cbuffer TextBuffer : register(b0) 14 | { 15 | float4 textColor; 16 | }; 17 | 18 | 19 | 20 | /**************************************************************************************/ 21 | /* TEXT_2D */ 22 | /**************************************************************************************/ 23 | 24 | struct VS_INPUT_TEXT_2D 25 | { 26 | float4 Position : POSITION; 27 | float2 Texcoord : TEXCOORD0; 28 | }; 29 | 30 | struct VS_OUTPUT_TEXT_2D 31 | { 32 | float2 Texcoord : TEXCOORD0; 33 | float4 Position : SV_POSITION; 34 | }; 35 | 36 | 37 | VS_OUTPUT_TEXT_2D vs_text2d(VS_INPUT_TEXT_2D input) 38 | { 39 | VS_OUTPUT_TEXT_2D output; 40 | 41 | output.Position = float4(input.Position.xy, 0, 1); 42 | output.Texcoord = input.Texcoord; 43 | 44 | return output; 45 | } 46 | 47 | struct PS_INPUT_TEXT_2D 48 | { 49 | float2 Texcoord : TEXCOORD0; 50 | }; 51 | 52 | float4 ps_text2d(PS_INPUT_TEXT_2D input) : SV_TARGET 53 | { 54 | float4 bitmapColor = texDiffuseMap.Sample(diffuseMap, input.Texcoord); 55 | 56 | if(bitmapColor.r == 1.0f) 57 | { 58 | bitmapColor = textColor; 59 | } 60 | else 61 | { 62 | bitmapColor.a = 0.0f; 63 | } 64 | return bitmapColor; 65 | } 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Shaders/DirectX11/Text2dShader.hlsl: -------------------------------------------------------------------------------- 1 | /* 2 | * Text 2D shader 3 | */ 4 | 5 | /**************************************************************************************/ 6 | /* Common vars */ 7 | /**************************************************************************************/ 8 | 9 | //DiffuseMap 10 | Texture2D texDiffuseMap : register(t0); 11 | SamplerState diffuseMap : register(s0); 12 | 13 | cbuffer TextBuffer : register(b0) 14 | { 15 | float4 textColor; 16 | }; 17 | 18 | 19 | 20 | /**************************************************************************************/ 21 | /* TEXT_2D */ 22 | /**************************************************************************************/ 23 | 24 | struct VS_INPUT_TEXT_2D 25 | { 26 | float4 Position : POSITION; 27 | float2 Texcoord : TEXCOORD0; 28 | }; 29 | 30 | struct VS_OUTPUT_TEXT_2D 31 | { 32 | float2 Texcoord : TEXCOORD0; 33 | float4 Position : SV_POSITION; 34 | }; 35 | 36 | 37 | VS_OUTPUT_TEXT_2D vs_text2d(VS_INPUT_TEXT_2D input) 38 | { 39 | VS_OUTPUT_TEXT_2D output; 40 | 41 | output.Position = float4(input.Position.xy, 0, 1); 42 | output.Texcoord = input.Texcoord; 43 | 44 | return output; 45 | } 46 | 47 | struct PS_INPUT_TEXT_2D 48 | { 49 | float2 Texcoord : TEXCOORD0; 50 | }; 51 | 52 | float4 ps_text2d(PS_INPUT_TEXT_2D input) : SV_TARGET 53 | { 54 | float4 bitmapColor = texDiffuseMap.Sample(diffuseMap, input.Texcoord); 55 | 56 | if(bitmapColor.r == 1.0f) 57 | { 58 | bitmapColor = textColor; 59 | } 60 | else 61 | { 62 | bitmapColor.a = 0.0f; 63 | } 64 | return bitmapColor; 65 | } 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Shaders/OpenGL/TgcMeshShader_DiffuseMap.ps: -------------------------------------------------------------------------------- 1 | precision mediump float; 2 | 3 | varying vec2 vTexcoord; 4 | varying vec4 vNormal; 5 | varying vec4 vColor; 6 | 7 | uniform sampler2D texDiffuseMap; 8 | 9 | void main() { 10 | 11 | //Obtener color de Texel 12 | vec4 color = texture2D(texDiffuseMap, vTexcoord); 13 | 14 | //Alpha-Test 15 | if(color.a < 0.1) { 16 | discard; 17 | } 18 | 19 | //Color final 20 | gl_FragColor = color; 21 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Shaders/OpenGL/TgcMeshShader_DiffuseMap.vs: -------------------------------------------------------------------------------- 1 | uniform MatrixBuffer { 2 | mat4 matWorld; 3 | mat4 matWorldView; 4 | mat4 matWorldViewProj; 5 | mat4 matInverseTransposeWorld; 6 | }; 7 | 8 | attribute vec4 Position; 9 | attribute vec4 Normal; 10 | attribute vec4 Color; 11 | attribute vec2 Texcoord; 12 | 13 | varying vec2 vTexcoord; 14 | varying vec4 vNormal; 15 | varying vec4 vColor; 16 | 17 | void main() { 18 | gl_Position = matWorldViewProj * Position; 19 | vNormal = matWorldViewProj * Normal; 20 | vTexcoord = Texcoord; 21 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Shaders/OpenGL/TgcMeshShader_DiffuseMapAndLightmap.ps: -------------------------------------------------------------------------------- 1 | precision mediump float; 2 | 3 | varying vec2 vTexcoord; 4 | varying vec4 vNormal; 5 | varying vec4 vColor; 6 | 7 | uniform sampler2D texDiffuseMap; 8 | 9 | void main() { 10 | 11 | //Obtener color de Texel 12 | vec4 color = texture2D(texDiffuseMap, vTexcoord); 13 | 14 | //Alpha-Test 15 | if(color.a < 0.1) { 16 | discard; 17 | } 18 | 19 | //Color final 20 | gl_FragColor = color; 21 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Shaders/OpenGL/TgcMeshShader_DiffuseMapAndLightmap.vs: -------------------------------------------------------------------------------- 1 | uniform MatrixBuffer { 2 | mat4 matWorld; 3 | mat4 matWorldView; 4 | mat4 matWorldViewProj; 5 | mat4 matInverseTransposeWorld; 6 | }; 7 | 8 | attribute vec4 Position; 9 | attribute vec4 Normal; 10 | attribute vec4 Color; 11 | attribute vec2 Texcoord; 12 | attribute vec2 TexcoordLightmap; 13 | 14 | varying vec2 vTexcoord; 15 | varying vec2 vTexcoordLightmap; 16 | varying vec4 vNormal; 17 | varying vec4 vColor; 18 | 19 | void main() { 20 | gl_Position = matWorldViewProj * Position; 21 | vNormal = matWorldViewProj * Normal; 22 | vTexcoord = Texcoord; 23 | vTexcoordLightmap = TexcoordLightmap; 24 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Shaders/OpenGL/TgcMeshShader_VertexColor.ps: -------------------------------------------------------------------------------- 1 | 2 | precision mediump float; 3 | 4 | varying vec4 vNormal; 5 | varying vec4 vColor; 6 | 7 | void main() { 8 | gl_FragColor = vColor; 9 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Shaders/OpenGL/TgcMeshShader_VertexColor.vs: -------------------------------------------------------------------------------- 1 | uniform MatrixBuffer { 2 | mat4 matWorld; 3 | mat4 matWorldView; 4 | mat4 matWorldViewProj; 5 | mat4 matInverseTransposeWorld; 6 | }; 7 | 8 | attribute vec4 Position; 9 | attribute vec4 Normal; 10 | attribute vec4 Color; 11 | 12 | varying vec4 vNormal; 13 | varying vec4 vColor; 14 | 15 | void main() { 16 | gl_Position = matWorldViewProj * Position; 17 | vNormal = matWorldViewProj * Normal; 18 | vColor = Color; 19 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Ui/checkbox_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Ui/checkbox_checked.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Ui/checkbox_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Ui/checkbox_unchecked.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Ui/gui_palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/Media/TgcViewer/Ui/gui_palette.png -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/2D/TgcText2d.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/2D/TgcText2d.h" 11 | #include "TgcViewer/GuiController.h" //required by forward declaration 12 | using namespace TgcViewer; 13 | 14 | 15 | TgcText2d::TgcText2d() 16 | { 17 | this->enabled = true; 18 | this->fontId = TgcFont::MICROSOFT_SANS_SERIF_16; 19 | this->align = TextAlign::Left; 20 | this->position = Vector2(0, 0); 21 | this->size = Vector2(1000, 20); 22 | this->color = Color::Yellow; 23 | } 24 | 25 | 26 | TgcText2d::TgcText2d(const TgcText2d& other) 27 | { 28 | } 29 | 30 | 31 | TgcText2d::~TgcText2d() 32 | { 33 | } 34 | 35 | void TgcText2d::updateValues() 36 | { 37 | GuiController::Instance->fontRenderer->loadFont(this->fontId); 38 | } 39 | 40 | void TgcText2d::render() 41 | { 42 | if(!enabled) 43 | return; 44 | 45 | GuiController::Instance->fontRenderer->render(this); 46 | } 47 | 48 | void TgcText2d::dispose() 49 | { 50 | 51 | } 52 | 53 | 54 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/2D/TgcText2d.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | using namespace std; 16 | 17 | //Project Includes: 18 | #include "TgcViewer/globals.h" 19 | #include "TgcViewer/Math/Vector2.h" 20 | #include "TgcViewer/Math/Color.h" 21 | #include "TgcViewer/Renderer/TgcRendererGlobals.h" 22 | 23 | //Forward declaration for "TgcViewer/GuiController.h" 24 | namespace TgcViewer {class GuiController;} 25 | 26 | 27 | namespace TgcViewer 28 | { 29 | 30 | 31 | 32 | /** 33 | * Tool to draw 2D text in screen 34 | */ 35 | class TgcText2d 36 | { 37 | 38 | public: 39 | 40 | TgcText2d(); 41 | TgcText2d(const TgcText2d&); 42 | ~TgcText2d(); 43 | 44 | 45 | /** 46 | * Update text values when some property is changed 47 | */ 48 | void updateValues(); 49 | 50 | /** 51 | * Render the text, if it is enabled 52 | */ 53 | void render(); 54 | 55 | /** 56 | * Free resources 57 | */ 58 | void dispose(); 59 | 60 | private: 61 | 62 | public: 63 | 64 | /** 65 | * The text to draw 66 | */ 67 | string text; 68 | 69 | /** 70 | * The font ID to use, located in Media\TgcViewer\Fonts 71 | * Example: times_new_roman_16 72 | */ 73 | string fontId; 74 | 75 | /** 76 | * Top-left position of the text 77 | */ 78 | Vector2 position; 79 | 80 | /** 81 | * Size of the text area 82 | */ 83 | Vector2 size; 84 | 85 | /** 86 | * Texto align. 87 | * Left by default 88 | */ 89 | TextAlign::Align align; 90 | 91 | /** 92 | * Enabled for render 93 | */ 94 | bool enabled; 95 | 96 | /** 97 | * Color to render the text 98 | */ 99 | Color color; 100 | 101 | private: 102 | 103 | 104 | }; 105 | 106 | 107 | 108 | 109 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Example/TgcExample.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Example/TgcExample.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | TgcExample::TgcExample() 15 | { 16 | } 17 | 18 | 19 | TgcExample::TgcExample(const TgcExample& other) 20 | { 21 | } 22 | 23 | 24 | TgcExample::~TgcExample() 25 | { 26 | } 27 | 28 | 29 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Example/TgcExample.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | #pragma once 10 | 11 | 12 | //General Includes: 13 | #include 14 | using namespace std; 15 | 16 | 17 | namespace TgcViewer 18 | { 19 | 20 | 21 | /** 22 | * Abstract interface for a example to be executed by the engine 23 | */ 24 | class TgcExample 25 | { 26 | 27 | public: 28 | 29 | TgcExample(); 30 | TgcExample(const TgcExample&); 31 | ~TgcExample(); 32 | 33 | 34 | /** 35 | * Category of the example 36 | */ 37 | virtual string getCategory() = 0; 38 | 39 | /** 40 | * Name of the example 41 | */ 42 | virtual string getName() = 0; 43 | 44 | /** 45 | * Description of the sample 46 | */ 47 | virtual string getDescription() = 0; 48 | 49 | /** 50 | * Creates here all the resources requires by the example 51 | */ 52 | virtual void init() = 0; 53 | 54 | /** 55 | * Render loop call 56 | * @param elapsedTime seconds from the last frame 57 | */ 58 | virtual void render(float elapsedTime) = 0; 59 | 60 | /** 61 | * Free all the resources of the example 62 | */ 63 | virtual void close() = 0; 64 | 65 | }; 66 | 67 | 68 | 69 | 70 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Input/TgcFpsCamera.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | //#include 15 | 16 | //Project Includes: 17 | #include "TgcViewer/globals.h" 18 | #include "TgcViewer/GuiController.h" 19 | #include "TgcViewer/Input/TgcInput.h" 20 | #include "TgcViewer/Math/FastMath.h" 21 | #include "TgcViewer/Math/Vector3.h" 22 | #include "TgcViewer/Math/Matrix4.h" 23 | 24 | 25 | namespace TgcViewer 26 | { 27 | 28 | 29 | 30 | /** 31 | * Description of the class 32 | */ 33 | class TgcFpsCamera 34 | { 35 | 36 | public: 37 | 38 | static const float DEFAULT_ROTATION_SPEED; 39 | static const float DEFAULT_MOVEMENT_SPEED; 40 | static const float DEFAULT_JUMP_SPEED; 41 | 42 | 43 | TgcFpsCamera(); 44 | TgcFpsCamera(const TgcFpsCamera&); 45 | ~TgcFpsCamera(); 46 | 47 | /** 48 | * Upadte camera position 49 | */ 50 | void updateCamera(); 51 | 52 | /** 53 | * Upadte view matrix 54 | */ 55 | void updateViewMatrix(); 56 | 57 | 58 | private: 59 | 60 | public: 61 | 62 | 63 | /** 64 | * Camera rotation speed, in radians 65 | */ 66 | float rotationSpeed; 67 | 68 | /** 69 | * Camera movement speed in XZ axis 70 | */ 71 | float movementSpeed; 72 | 73 | /** 74 | * Camera movement speed in Y axis 75 | */ 76 | float jumpSpeed; 77 | 78 | /** 79 | * Current camera position 80 | */ 81 | Vector3 position; 82 | 83 | /** 84 | * Current camera look at 85 | */ 86 | Vector3 lookAt; 87 | 88 | /** 89 | * Current y axis rotation 90 | */ 91 | float currentRotY; 92 | 93 | /** 94 | * Current XZ axis rotation 95 | */ 96 | float currentRotXZ; 97 | 98 | 99 | private: 100 | 101 | 102 | }; 103 | 104 | 105 | 106 | 107 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Math/FastMath.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Math/FastMath.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | const float FastMath::PI = 3.14159265358979323846f; 15 | const float FastMath::HALF_PI = FastMath::PI / 2; 16 | const float FastMath::TWO_PI = FastMath::PI * 2; 17 | const float FastMath::QUARTER_PI = FastMath::PI / 4; 18 | const float FastMath::INV_PI = 1 / FastMath::PI; 19 | const float FastMath::INV_TWO_PI = 1 / FastMath::TWO_PI; 20 | const float FastMath::TO_DEG = 180.0f / FastMath::PI; 21 | const float FastMath::TO_RAD = FastMath::PI / 180.0f; 22 | 23 | const float FastMath::MAX_FLOAT = 1E+37f; 24 | const float FastMath::MIN_FLOAT = 1E-37f; 25 | 26 | 27 | FastMath::FastMath() 28 | { 29 | } 30 | 31 | void FastMath::init() 32 | { 33 | //initialize random seed 34 | srand ((unsigned int)time(NULL)); 35 | } 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Math/Vector2.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Math/Vector2.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Math/Vector3.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Math/Vector3.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Math/Vector4.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | 16 | //Project Includes: 17 | #include "TgcViewer/globals.h" 18 | #include "TgcViewer/Math/FastMath.h" 19 | #include "TgcViewer/Math/Matrix4.h" 20 | 21 | 22 | namespace TgcViewer 23 | { 24 | 25 | 26 | 27 | /** 28 | * A Vector 4: (x, y, z, w) 29 | */ 30 | struct Vector4 31 | { 32 | union 33 | { 34 | struct 35 | { 36 | float X,Y,Z,W; 37 | }; 38 | float v[4]; 39 | }; 40 | 41 | Vector4(); 42 | ~Vector4(); 43 | Vector4( float x, float y, float z, float w ); 44 | 45 | // casting 46 | operator float* (); 47 | operator const float* () const; 48 | 49 | // assignment operators 50 | Vector4& operator += ( const Vector4& v2); 51 | Vector4& operator -= ( const Vector4& v2); 52 | Vector4& operator *= ( float val); 53 | Vector4& operator /= ( float val); 54 | 55 | // unary operators 56 | Vector4 operator + () const; 57 | Vector4 operator - () const; 58 | 59 | // binary operators 60 | Vector4 operator + ( const Vector4& v2) const; 61 | Vector4 operator - ( const Vector4& v2) const; 62 | Vector4 operator * ( float val) const; 63 | Vector4 operator / ( float val) const; 64 | 65 | friend Vector4 operator * ( float, const Vector4& ); 66 | 67 | bool operator == ( const Vector4& v2) const; 68 | bool operator != ( const Vector4& v2) const; 69 | 70 | //statics 71 | static Vector4 Transform( const Vector4& v2, const Matrix4 &mat); 72 | 73 | }; 74 | 75 | 76 | 77 | 78 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX10/TgcDX10Effect.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | #include 16 | #include 17 | using namespace std; 18 | 19 | //Project Includes: 20 | #include "TgcViewer/globals.h" 21 | #include "TgcViewer/GuiController.h" 22 | #include "TgcViewer/Renderer/TgcEffect.h" 23 | 24 | 25 | namespace TgcViewer 26 | { 27 | 28 | 29 | 30 | /** 31 | * DirectX 10 Effect 32 | */ 33 | class TgcDX10Effect : public TgcEffect 34 | { 35 | 36 | public: 37 | 38 | 39 | //Virtual members 40 | void internalCreate(); 41 | void internalAddSampler(TgcEffectValues::Sampler sampler); 42 | void internalAddConstantBuffer(TgcEffectValues::ConstantBuffer constantBuffer); 43 | void init(const TgcVertexBuffer* vertexBuffer); 44 | void begin(); 45 | void setTexture(string name, const TgcTexture* texture); 46 | void setConstantBuffer(string name, const void* bufferData); 47 | void end(); 48 | void dispose(); 49 | 50 | 51 | 52 | string getErrorMessage(ID3D10Blob* dxErrorMessage); 53 | D3D10_FILTER TgcDX10Effect::getFilter(TgcEffectValues::Filter filter); 54 | D3D10_TEXTURE_ADDRESS_MODE TgcDX10Effect::getAddressMode(TgcEffectValues::AddressMode addressMode); 55 | 56 | 57 | private: 58 | 59 | 60 | public: 61 | 62 | /** 63 | * Shader targets to compile 64 | */ 65 | static const LPCSTR VS_SHADER_TARGET; 66 | static const LPCSTR PS_SHADER_TARGET; 67 | 68 | /** 69 | * Buffer to the vertex shader 70 | */ 71 | ID3D10Blob* vertexShaderBuffer; 72 | 73 | /** 74 | * Vertex shader program 75 | */ 76 | ID3D10VertexShader* vertexShader; 77 | 78 | /** 79 | * Pixel shader program 80 | */ 81 | ID3D10PixelShader* pixelShader; 82 | 83 | /** 84 | * Sampler states map 85 | */ 86 | unordered_map dxSampleStates; 87 | 88 | /** 89 | * Constant buffers map 90 | */ 91 | unordered_map dxConstantBuffers; 92 | 93 | private: 94 | 95 | 96 | }; 97 | 98 | 99 | 100 | 101 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX10/TgcDX10IndexBuffer.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Renderer/DirectX10/TgcDX10IndexBuffer.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | 15 | bool TgcDX10IndexBuffer::internalCreate(const void* data) 16 | { 17 | ID3D10Device* device = ((TgcDX10Renderer*)GuiController::Instance->renderer)->device; 18 | 19 | //DX10 usage 20 | D3D10_USAGE d3dUsage; 21 | switch(this->usage) 22 | { 23 | case BufferUsage::Default: 24 | d3dUsage = D3D10_USAGE_DEFAULT; 25 | break; 26 | case BufferUsage::Dynamic: 27 | d3dUsage = D3D10_USAGE_DYNAMIC; 28 | break; 29 | case BufferUsage::Immutable: 30 | d3dUsage = D3D10_USAGE_IMMUTABLE; 31 | break; 32 | case BufferUsage::Staging: 33 | d3dUsage = D3D10_USAGE_STAGING; 34 | break; 35 | } 36 | 37 | //Buffer description 38 | D3D10_BUFFER_DESC indexBufferDesc; 39 | indexBufferDesc.Usage = d3dUsage; 40 | indexBufferDesc.ByteWidth = sizeof(unsigned long) * this->numIndices; 41 | indexBufferDesc.BindFlags = D3D10_BIND_INDEX_BUFFER; 42 | indexBufferDesc.CPUAccessFlags = 0; 43 | indexBufferDesc.MiscFlags = 0; 44 | 45 | //Buffer data 46 | D3D10_SUBRESOURCE_DATA indexData; 47 | indexData.pSysMem = data; 48 | indexData.SysMemPitch = 0; 49 | indexData.SysMemSlicePitch = 0; 50 | 51 | //Create buffer 52 | HRESULT result = device->CreateBuffer(&indexBufferDesc, &indexData, &this->buffer); 53 | if(FAILED(result)) 54 | { 55 | GuiController::Instance->logger->logError("Could not create IndexBuffer"); 56 | } 57 | 58 | return !FAILED(result); 59 | } 60 | 61 | 62 | void TgcDX10IndexBuffer::internalDispose() 63 | { 64 | // Release the vertex buffer. 65 | if(this->buffer) 66 | { 67 | this->buffer->Release(); 68 | this->buffer = NULL; 69 | } 70 | } 71 | 72 | 73 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX10/TgcDX10IndexBuffer.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | 16 | //Project Includes: 17 | #include "TgcViewer/globals.h" 18 | #include "TgcViewer/GuiController.h" 19 | #include "TgcViewer/Renderer/TgcIndexBuffer.h" 20 | 21 | 22 | namespace TgcViewer 23 | { 24 | 25 | 26 | 27 | /** 28 | * DirectX 10 Index Buffer 29 | */ 30 | class TgcDX10IndexBuffer : public TgcIndexBuffer 31 | { 32 | 33 | public: 34 | 35 | //Virtual members 36 | bool internalCreate(const void* data); 37 | void internalDispose(); 38 | 39 | private: 40 | 41 | 42 | public: 43 | 44 | /** 45 | * DirectX buffer 46 | */ 47 | ID3D10Buffer* buffer; 48 | 49 | private: 50 | 51 | 52 | }; 53 | 54 | 55 | 56 | 57 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX10/TgcDX10InputLayout.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | 16 | //Project Includes: 17 | #include "TgcViewer/globals.h" 18 | #include "TgcViewer/GuiController.h" 19 | #include "TgcViewer/Renderer/TgcInputLayout.h" 20 | #include "TgcViewer/Renderer/DirectX10/TgcDX10Renderer.h" 21 | 22 | 23 | namespace TgcViewer 24 | { 25 | 26 | 27 | 28 | /** 29 | * DirectX 10 Input layout 30 | */ 31 | class TgcDX10InputLayout : public TgcInputLayout 32 | { 33 | 34 | public: 35 | 36 | //Virtual members 37 | void internalCreate(); 38 | void dispose(); 39 | 40 | private: 41 | 42 | LPCSTR getSemantic(InputElement::Semantic semantic); 43 | DXGI_FORMAT getFormat(InputElement::Type type); 44 | 45 | 46 | public: 47 | 48 | /** 49 | * Input layout 50 | */ 51 | ID3D10InputLayout* layout; 52 | 53 | /** 54 | * Aux layout desc array used to create ID3D11InputLayout 55 | */ 56 | D3D10_INPUT_ELEMENT_DESC* layoutDesc; 57 | 58 | private: 59 | 60 | 61 | }; 62 | 63 | 64 | 65 | 66 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX10/TgcDX10Shaders.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | 15 | //Project Includes: 16 | #include "TgcViewer/globals.h" 17 | #include "TgcViewer/Shaders/TgcShaders.h" 18 | #include "TgcViewer/GuiController.h" 19 | 20 | 21 | namespace TgcViewer 22 | { 23 | 24 | 25 | 26 | /** 27 | * DirectX 10 common engine shader effects 28 | */ 29 | class TgcDX10Shaders : public TgcShaders 30 | { 31 | 32 | public: 33 | 34 | 35 | //Virtual members 36 | void loadCommonShaders(); 37 | void dispose(); 38 | void adaptMatrix(Matrix4 &mat); 39 | 40 | 41 | private: 42 | 43 | public: 44 | 45 | 46 | private: 47 | 48 | 49 | }; 50 | 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX10/TgcDX10Texture.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | #include 16 | 17 | //Project Includes: 18 | #include "TgcViewer/globals.h" 19 | #include "TgcViewer/GuiController.h" 20 | #include "TgcViewer/TgcSceneLoader/TgcTexture.h" 21 | 22 | 23 | namespace TgcViewer 24 | { 25 | 26 | 27 | 28 | /** 29 | * A DirectX 10 Texture 30 | */ 31 | class TgcDX10Texture : public TgcTexture 32 | { 33 | 34 | public: 35 | 36 | //Virtual members 37 | void internalCreateFromFile(); 38 | void internalDispose(); 39 | 40 | 41 | 42 | private: 43 | 44 | 45 | public: 46 | 47 | /** 48 | * DirectX texture 49 | */ 50 | ID3D10ShaderResourceView* dxTexture; 51 | 52 | private: 53 | 54 | TextureFormat::Format getTextureFormat(DXGI_FORMAT dxFormat); 55 | 56 | }; 57 | 58 | 59 | 60 | 61 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX10/TgcDX10VertexBuffer.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | 16 | 17 | //Project Includes: 18 | #include "TgcViewer/globals.h" 19 | #include "TgcViewer/GuiController.h" 20 | #include "TgcViewer/Renderer/TgcVertexBuffer.h" 21 | 22 | 23 | namespace TgcViewer 24 | { 25 | 26 | 27 | 28 | /** 29 | * A DirectX 10 vertex buffer 30 | */ 31 | class TgcDX10VertexBuffer : public TgcVertexBuffer 32 | { 33 | 34 | public: 35 | 36 | //Virtual members 37 | bool internalCreate(const void* data); 38 | void internalDispose(); 39 | void* map(BufferMap::Map mapOption); 40 | void unmap(); 41 | void update(const void* data); 42 | 43 | private: 44 | 45 | 46 | public: 47 | 48 | /** 49 | * DirectX buffer 50 | */ 51 | ID3D10Buffer* buffer; 52 | 53 | private: 54 | 55 | 56 | 57 | }; 58 | 59 | 60 | 61 | 62 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX11/TgcDX11Effect.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | #include 16 | #include 17 | using namespace std; 18 | 19 | //Project Includes: 20 | #include "TgcViewer/globals.h" 21 | #include "TgcViewer/GuiController.h" 22 | #include "TgcViewer/Renderer/TgcEffect.h" 23 | 24 | 25 | namespace TgcViewer 26 | { 27 | 28 | 29 | 30 | /** 31 | * DirectX 11 Effect 32 | */ 33 | class TgcDX11Effect : public TgcEffect 34 | { 35 | 36 | public: 37 | 38 | 39 | //Virtual members 40 | void internalCreate(); 41 | void internalAddSampler(TgcEffectValues::Sampler sampler); 42 | void internalAddConstantBuffer(TgcEffectValues::ConstantBuffer constantBuffer); 43 | void init(const TgcVertexBuffer* vertexBuffer); 44 | void begin(); 45 | void setTexture(string name, const TgcTexture* texture); 46 | void setConstantBuffer(string name, const void* bufferData); 47 | void end(); 48 | void dispose(); 49 | 50 | 51 | 52 | string getErrorMessage(ID3D10Blob* dxErrorMessage); 53 | D3D11_FILTER TgcDX11Effect::getFilter(TgcEffectValues::Filter filter); 54 | D3D11_TEXTURE_ADDRESS_MODE TgcDX11Effect::getAddressMode(TgcEffectValues::AddressMode addressMode); 55 | 56 | 57 | private: 58 | 59 | 60 | public: 61 | 62 | /** 63 | * Shader targets to compile 64 | */ 65 | static const LPCSTR VS_SHADER_TARGET; 66 | static const LPCSTR PS_SHADER_TARGET; 67 | 68 | 69 | /** 70 | * Buffer to the vertex shader 71 | */ 72 | ID3D10Blob* vertexShaderBuffer; 73 | 74 | /** 75 | * Vertex shader program 76 | */ 77 | ID3D11VertexShader* vertexShader; 78 | 79 | /** 80 | * Pixel shader program 81 | */ 82 | ID3D11PixelShader* pixelShader; 83 | 84 | /** 85 | * Sampler states map 86 | */ 87 | unordered_map dxSampleStates; 88 | 89 | /** 90 | * Constant buffers map 91 | */ 92 | unordered_map dxConstantBuffers; 93 | 94 | private: 95 | 96 | 97 | }; 98 | 99 | 100 | 101 | 102 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX11/TgcDX11IndexBuffer.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Renderer/DirectX11/TgcDX11IndexBuffer.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | 15 | bool TgcDX11IndexBuffer::internalCreate(const void* data) 16 | { 17 | ID3D11Device* device = ((TgcDX11Renderer*)GuiController::Instance->renderer)->device; 18 | 19 | //DX11 usage 20 | D3D11_USAGE d3dUsage; 21 | switch(this->usage) 22 | { 23 | case BufferUsage::Default: 24 | d3dUsage = D3D11_USAGE_DEFAULT; 25 | break; 26 | case BufferUsage::Dynamic: 27 | d3dUsage = D3D11_USAGE_DYNAMIC; 28 | break; 29 | case BufferUsage::Immutable: 30 | d3dUsage = D3D11_USAGE_IMMUTABLE; 31 | break; 32 | case BufferUsage::Staging: 33 | d3dUsage = D3D11_USAGE_STAGING; 34 | break; 35 | } 36 | 37 | //Buffer description 38 | D3D11_BUFFER_DESC indexBufferDesc; 39 | indexBufferDesc.Usage = d3dUsage; 40 | indexBufferDesc.ByteWidth = sizeof(unsigned long) * this->numIndices; 41 | indexBufferDesc.BindFlags = D3D11_BIND_INDEX_BUFFER; 42 | indexBufferDesc.CPUAccessFlags = 0; 43 | indexBufferDesc.MiscFlags = 0; 44 | indexBufferDesc.StructureByteStride = 0; 45 | 46 | //Buffer data 47 | D3D11_SUBRESOURCE_DATA indexData; 48 | indexData.pSysMem = data; 49 | indexData.SysMemPitch = 0; 50 | indexData.SysMemSlicePitch = 0; 51 | 52 | //Create buffer 53 | HRESULT result = device->CreateBuffer(&indexBufferDesc, &indexData, &this->buffer); 54 | if(FAILED(result)) 55 | { 56 | GuiController::Instance->logger->logError("Could not create IndexBuffer"); 57 | } 58 | 59 | return !FAILED(result); 60 | } 61 | 62 | 63 | void TgcDX11IndexBuffer::internalDispose() 64 | { 65 | // Release the vertex buffer. 66 | if(this->buffer) 67 | { 68 | this->buffer->Release(); 69 | this->buffer = NULL; 70 | } 71 | } 72 | 73 | 74 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX11/TgcDX11IndexBuffer.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | 16 | //Project Includes: 17 | #include "TgcViewer/globals.h" 18 | #include "TgcViewer/GuiController.h" 19 | #include "TgcViewer/Renderer/TgcIndexBuffer.h" 20 | 21 | 22 | namespace TgcViewer 23 | { 24 | 25 | 26 | 27 | /** 28 | * DirectX 11 Index Buffer 29 | */ 30 | class TgcDX11IndexBuffer : public TgcIndexBuffer 31 | { 32 | 33 | public: 34 | 35 | //Virtual members 36 | bool internalCreate(const void* data); 37 | void internalDispose(); 38 | 39 | private: 40 | 41 | 42 | public: 43 | 44 | /** 45 | * DirectX buffer 46 | */ 47 | ID3D11Buffer* buffer; 48 | 49 | private: 50 | 51 | 52 | }; 53 | 54 | 55 | 56 | 57 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX11/TgcDX11InputLayout.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | 16 | //Project Includes: 17 | #include "TgcViewer/globals.h" 18 | #include "TgcViewer/GuiController.h" 19 | #include "TgcViewer/Renderer/TgcInputLayout.h" 20 | #include "TgcViewer/Renderer/DirectX11/TgcDX11Renderer.h" 21 | 22 | 23 | namespace TgcViewer 24 | { 25 | 26 | 27 | 28 | /** 29 | * DirectX 11 Input layout 30 | */ 31 | class TgcDX11InputLayout : public TgcInputLayout 32 | { 33 | 34 | public: 35 | 36 | //Virtual members 37 | void internalCreate(); 38 | void dispose(); 39 | 40 | private: 41 | 42 | LPCSTR getSemantic(InputElement::Semantic semantic); 43 | DXGI_FORMAT getFormat(InputElement::Type type); 44 | 45 | 46 | public: 47 | 48 | /** 49 | * Input layout 50 | */ 51 | ID3D11InputLayout* layout; 52 | 53 | /** 54 | * Aux layout desc array used to create ID3D11InputLayout 55 | */ 56 | D3D11_INPUT_ELEMENT_DESC* layoutDesc; 57 | 58 | private: 59 | 60 | 61 | }; 62 | 63 | 64 | 65 | 66 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX11/TgcDX11Shaders.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | 15 | //Project Includes: 16 | #include "TgcViewer/globals.h" 17 | #include "TgcViewer/Shaders/TgcShaders.h" 18 | #include "TgcViewer/GuiController.h" 19 | 20 | 21 | namespace TgcViewer 22 | { 23 | 24 | 25 | 26 | /** 27 | * DirectX 11 common engine shader effects 28 | */ 29 | class TgcDX11Shaders : public TgcShaders 30 | { 31 | 32 | public: 33 | 34 | 35 | //Virtual members 36 | void loadCommonShaders(); 37 | void dispose(); 38 | void adaptMatrix(Matrix4 &mat); 39 | 40 | 41 | private: 42 | 43 | public: 44 | 45 | 46 | private: 47 | 48 | 49 | }; 50 | 51 | 52 | 53 | 54 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX11/TgcDX11Texture.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | #include 16 | 17 | //Project Includes: 18 | #include "TgcViewer/globals.h" 19 | #include "TgcViewer/GuiController.h" 20 | #include "TgcViewer/TgcSceneLoader/TgcTexture.h" 21 | 22 | 23 | namespace TgcViewer 24 | { 25 | 26 | 27 | 28 | /** 29 | * A DirectX 11 Texture 30 | */ 31 | class TgcDX11Texture : public TgcTexture 32 | { 33 | 34 | public: 35 | 36 | //Virtual members 37 | void internalCreateFromFile(); 38 | void internalDispose(); 39 | 40 | 41 | 42 | private: 43 | 44 | TextureFormat::Format getTextureFormat(DXGI_FORMAT dxFormat); 45 | 46 | public: 47 | 48 | /** 49 | * DirectX texture 50 | */ 51 | ID3D11ShaderResourceView* dxTexture; 52 | 53 | private: 54 | 55 | 56 | 57 | }; 58 | 59 | 60 | 61 | 62 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/DirectX11/TgcDX11VertexBuffer.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | 16 | 17 | //Project Includes: 18 | #include "TgcViewer/globals.h" 19 | #include "TgcViewer/GuiController.h" 20 | #include "TgcViewer/Renderer/TgcVertexBuffer.h" 21 | 22 | 23 | namespace TgcViewer 24 | { 25 | 26 | 27 | 28 | /** 29 | * A DirectX 11 vertex buffer 30 | */ 31 | class TgcDX11VertexBuffer : public TgcVertexBuffer 32 | { 33 | 34 | public: 35 | 36 | //Virtual members 37 | bool internalCreate(const void* data); 38 | void internalDispose(); 39 | void* map(BufferMap::Map mapOption); 40 | void unmap(); 41 | void update(const void* data); 42 | 43 | private: 44 | 45 | 46 | public: 47 | 48 | /** 49 | * DirectX buffer 50 | */ 51 | ID3D11Buffer* buffer; 52 | 53 | private: 54 | 55 | 56 | 57 | }; 58 | 59 | 60 | 61 | 62 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/TgcEffect.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Renderer/TgcEffect.h" 11 | #include "TgcViewer/GuiController.h" //required by forward declaration 12 | using namespace TgcViewer; 13 | 14 | 15 | TgcEffect::TgcEffect() 16 | { 17 | } 18 | 19 | 20 | TgcEffect::TgcEffect(const TgcEffect& other) 21 | { 22 | } 23 | 24 | 25 | TgcEffect::~TgcEffect() 26 | { 27 | } 28 | 29 | 30 | TgcEffect* TgcEffect::createFromFile(string filePath, string vsFunctionName, string psFunctionName) 31 | { 32 | TgcEffect* effect = GuiController::Instance->renderer->createTgcEffectInstance(); 33 | TgcEffectValues::Description desc; 34 | desc.vsFunctionName = vsFunctionName; 35 | desc.psFunctionName = psFunctionName; 36 | effect->create(filePath, desc); 37 | return effect; 38 | return NULL; 39 | } 40 | 41 | 42 | void TgcEffect::create(string filePath, TgcEffectValues::Description desc) 43 | { 44 | this->filePath = filePath; 45 | this->description = desc; 46 | this->internalCreate(); 47 | } 48 | 49 | void TgcEffect::addSampler(TgcEffectValues::Sampler sampler) 50 | { 51 | this->samplers[sampler.textureName] = sampler; 52 | this->internalAddSampler(sampler); 53 | } 54 | 55 | void TgcEffect::addConstantBuffer(TgcEffectValues::ConstantBuffer constantBuffer) 56 | { 57 | this->constantBuffers[constantBuffer.name] = constantBuffer; 58 | this->internalAddConstantBuffer(constantBuffer); 59 | } 60 | 61 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/TgcIndexBuffer.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Renderer/TgcIndexBuffer.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | TgcIndexBuffer::TgcIndexBuffer() 15 | { 16 | 17 | } 18 | 19 | 20 | TgcIndexBuffer::TgcIndexBuffer(const TgcIndexBuffer& other) 21 | { 22 | } 23 | 24 | 25 | TgcIndexBuffer::~TgcIndexBuffer() 26 | { 27 | } 28 | 29 | 30 | void TgcIndexBuffer::create(int numIndices, const void* data, BufferUsage::Usage usage) 31 | { 32 | this->numIndices = numIndices; 33 | this->usage = usage; 34 | 35 | this->internalCreate(data); 36 | } 37 | 38 | void TgcIndexBuffer::dispose() 39 | { 40 | this->internalDispose(); 41 | } 42 | 43 | 44 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/TgcIndexBuffer.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | 15 | 16 | //Project Includes: 17 | #include "TgcViewer/globals.h" 18 | #include "TgcViewer/Renderer/TgcRendererGlobals.h" 19 | 20 | 21 | namespace TgcViewer 22 | { 23 | 24 | 25 | 26 | /** 27 | * An abstract Index Buffer. 28 | * Each renderer implement the concrete class 29 | */ 30 | class TgcIndexBuffer 31 | { 32 | 33 | public: 34 | 35 | TgcIndexBuffer(); 36 | TgcIndexBuffer(const TgcIndexBuffer&); 37 | ~TgcIndexBuffer(); 38 | 39 | /** 40 | * Creates a new vertex buffer and fills its data 41 | * @param numIndices the number of indices in the buffer 42 | * @param data the index array to fill in the index buffer 43 | * @param usage the usage mode of the index buffer 44 | */ 45 | void create(int numIndices, const void* data, BufferUsage::Usage usage = BufferUsage::Default); 46 | 47 | /** 48 | * Destroy the index buffer 49 | */ 50 | void dispose(); 51 | 52 | /** 53 | * {Renderer-dependent} 54 | * Creates a new index buffer 55 | * @param the index array to fill in the index buffer 56 | */ 57 | virtual bool internalCreate(const void* data) = 0; 58 | 59 | /** 60 | * {Renderer-dependent} 61 | * Destroys the index buffer 62 | */ 63 | virtual void internalDispose() = 0; 64 | 65 | private: 66 | 67 | 68 | public: 69 | 70 | /** 71 | * Number of indices 72 | */ 73 | int numIndices; 74 | 75 | /** 76 | * Usage of the buffer 77 | */ 78 | BufferUsage::Usage usage; 79 | 80 | 81 | private: 82 | 83 | 84 | }; 85 | 86 | 87 | 88 | 89 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/TgcInputLayout.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Renderer/TgcInputLayout.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | TgcInputLayout::TgcInputLayout() 15 | { 16 | } 17 | 18 | 19 | TgcInputLayout::TgcInputLayout(const TgcInputLayout& other) 20 | { 21 | } 22 | 23 | 24 | TgcInputLayout::~TgcInputLayout() 25 | { 26 | } 27 | 28 | void TgcInputLayout::create() 29 | { 30 | //Compute size and offsets 31 | this->size = 0; 32 | unsigned int lastOffset = 0; 33 | unsigned int elementSize; 34 | for(unsigned int i = 0; i < this->elements.size(); i++) 35 | { 36 | elementSize = this->elements[i].size(); 37 | this->size += elementSize; 38 | this->offsets.push_back(lastOffset); 39 | lastOffset += elementSize; 40 | } 41 | 42 | 43 | this->internalCreate(); 44 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/TgcInputLayout.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | #include 16 | using namespace std; 17 | 18 | //Project Includes: 19 | #include "TgcViewer/globals.h" 20 | #include "TgcViewer/Renderer/TgcRendererGlobals.h" 21 | 22 | 23 | namespace TgcViewer 24 | { 25 | 26 | /** 27 | * Vertex format description, with its components, sizes and offsets. 28 | * Each renderer implements the concret class 29 | */ 30 | class TgcInputLayout 31 | { 32 | 33 | public: 34 | 35 | TgcInputLayout(); 36 | TgcInputLayout(const TgcInputLayout&); 37 | ~TgcInputLayout(); 38 | 39 | /** 40 | * Create the input layout. 41 | * The elements array must be previously filled. 42 | */ 43 | void create(); 44 | 45 | /** 46 | * Free resources 47 | */ 48 | virtual void dispose() = 0; 49 | 50 | 51 | /** 52 | * {Renderer-dependent} 53 | * Create the internal structures of the input layout required by the renderer. 54 | */ 55 | virtual void internalCreate() = 0; 56 | 57 | 58 | private: 59 | 60 | public: 61 | 62 | /** 63 | * Array of elements that must be filled 64 | */ 65 | vector elements; 66 | 67 | /** 68 | * Total size of the vertex layout 69 | */ 70 | unsigned int size; 71 | 72 | /** 73 | * Offset for each element of the layout 74 | */ 75 | vector offsets; 76 | 77 | private: 78 | 79 | 80 | }; 81 | 82 | 83 | 84 | 85 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/TgcRenderer.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Renderer/TgcRenderer.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | TgcRenderer::TgcRenderer() 15 | { 16 | this->vsync = true; 17 | this->screenFarDistance = 1000.0f; 18 | this->screenNearDistance = 0.1f; 19 | this->backgroundColor = Color::Blue; 20 | } 21 | 22 | 23 | TgcRenderer::TgcRenderer(const TgcRenderer& other) 24 | { 25 | } 26 | 27 | 28 | TgcRenderer::~TgcRenderer() 29 | { 30 | } 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/TgcRendererFactory.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | #include "TgcViewer/Renderer/TgcRendererFactory.h" 10 | using namespace TgcViewer; 11 | 12 | 13 | TgcRendererFactory::TgcRendererFactory() 14 | { 15 | } 16 | 17 | TgcRenderer* TgcRendererFactory::createRenderer() 18 | { 19 | //Creates a renderer instance based on TGC_CURRENT_RENDERER value 20 | return new TGC_CURRENT_RENDERER; 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/TgcRendererFactory.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | #pragma once 10 | 11 | 12 | 13 | //Project Includes: 14 | #include "TgcViewer/globals.h" 15 | #include "TgcViewer/Renderer/TgcRenderer.h" 16 | 17 | 18 | 19 | //All avaliable renderers 20 | #define TGC_DX11_RENDERER TgcDX11Renderer 21 | #define TGC_DX10_RENDERER TgcDX10Renderer 22 | #define TGC_OPENGL_RENDERER TgcOpenGLRenderer 23 | #define TGC_DX9_RENDERER TgcDX9Renderer 24 | 25 | 26 | //Renderer to be used by the engine (change this to select another renderer) 27 | //#define TGC_CURRENT_RENDERER TGC_DX11_RENDERER 28 | #define TGC_CURRENT_RENDERER TGC_DX10_RENDERER 29 | 30 | 31 | //DX11 Renderer conditional include 32 | #if TGC_CURRENT_RENDERER == TGC_DX11_RENDERER 33 | #include "TgcViewer/Renderer/DirectX11/TgcDX11Renderer.h" 34 | #endif 35 | 36 | 37 | //DX10 Renderer conditional include 38 | #if TGC_CURRENT_RENDERER == TGC_DX10_RENDERER 39 | #include "TgcViewer/Renderer/DirectX10/TgcDX10Renderer.h" 40 | #endif 41 | 42 | /* 43 | //OpenGL Renderer conditional include 44 | #if TGC_CURRENT_RENDERER == TGC_OPENGL_RENDERER 45 | #include "TgcViewer/Renderer/OpenGL/TgcOpenGLRenderer.h" 46 | #endif 47 | */ 48 | 49 | /* 50 | //DX9 Renderer conditional include 51 | #if TGC_CURRENT_RENDERER == TGC_DX9_RENDERER 52 | #include "TgcViewer/Renderer/DirectX9/TgcDX9Renderer.h" 53 | #endif 54 | */ 55 | 56 | 57 | 58 | namespace TgcViewer 59 | { 60 | 61 | 62 | /** 63 | * Factory for instancing all renderer-dependent objects 64 | */ 65 | class TgcRendererFactory 66 | { 67 | 68 | public: 69 | 70 | /** 71 | * Creates a new TgcRenderer using the value set in TGC_CURRENT_RENDERER 72 | */ 73 | static TgcRenderer* createRenderer(); 74 | 75 | private: 76 | 77 | TgcRendererFactory(); 78 | 79 | }; 80 | 81 | 82 | 83 | 84 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Renderer/TgcVertexBuffer.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Renderer/TgcVertexBuffer.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | TgcVertexBuffer::TgcVertexBuffer() 15 | { 16 | 17 | } 18 | 19 | 20 | TgcVertexBuffer::TgcVertexBuffer(const TgcVertexBuffer& other) 21 | { 22 | } 23 | 24 | 25 | TgcVertexBuffer::~TgcVertexBuffer() 26 | { 27 | } 28 | 29 | 30 | void TgcVertexBuffer::create(int numVertices, TgcInputLayout* inputLayout, const void* data, BufferUsage::Usage usage) 31 | { 32 | this->numVertices = numVertices; 33 | this->inputLayout = inputLayout; 34 | this->vertexSize = inputLayout->size;; 35 | this->usage = usage; 36 | 37 | this->internalCreate(data); 38 | } 39 | 40 | void TgcVertexBuffer::dispose() 41 | { 42 | this->inputLayout->dispose(); 43 | this->internalDispose(); 44 | } 45 | 46 | 47 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/TgcGeometry/TgcDebugBox.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/JanuaEngine/tgcviewer-cpp/TgcViewer/TgcGeometry/TgcDebugBox.cpp -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/TgcGeometry/TgcDebugBox.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //Project Includes: 14 | #include "TgcViewer/globals.h" 15 | #include "TgcViewer/GuiController.h" 16 | #include "TgcViewer/Math/FastMath.h" 17 | #include "TgcViewer/Math/Vector3.h" 18 | #include "TgcViewer/Math/Vector2.h" 19 | #include "TgcViewer/Math/Color.h" 20 | #include "TgcViewer/Math/Matrix4.h" 21 | #include "TgcViewer/Renderer/TgcEffect.h" 22 | #include "TgcViewer/Renderer/TgcVertexBuffer.h" 23 | #include "TgcViewer/Renderer/TgcIndexBuffer.h" 24 | #include "TgcViewer/Renderer/TgcInputLayout.h" 25 | #include "TgcViewer/Renderer/TgcRendererGlobals.h" 26 | #include "TgcViewer/TgcGeometry/TgcBoundingBox.h" 27 | 28 | 29 | namespace TgcViewer 30 | { 31 | 32 | 33 | 34 | /** 35 | * A 3D Box that only renders it edges with a custom thickness and color 36 | */ 37 | class TgcDebugBox 38 | { 39 | 40 | public: 41 | 42 | TgcDebugBox(); 43 | TgcDebugBox(const TgcDebugBox&); 44 | ~TgcDebugBox(); 45 | 46 | void create(); 47 | void updateValues(); 48 | void render(); 49 | void dispose(); 50 | 51 | void setPositionSize(Vector3 position, Vector3 size); 52 | 53 | 54 | private: 55 | 56 | void createLineX(VertexFormat::PositionColor* const vertices, int idx, Color c, Vector3 min, Vector3 max); 57 | void createLineY(VertexFormat::PositionColor* const vertices, int idx, Color c, Vector3 min, Vector3 max); 58 | void createLineZ(VertexFormat::PositionColor* const vertices, int idx, Color c, Vector3 min, Vector3 max); 59 | void createLineVertices(VertexFormat::PositionColor* const vertices, int idx, Vector3 min, Vector3 max, Color c); 60 | 61 | 62 | 63 | public: 64 | 65 | static const int LINE_VERTICES_COUNT; 66 | static const int LINES_COUNT; 67 | static const int VERTICES_COUNT; 68 | static const int TRIANGLES_COUNT; 69 | 70 | Vector3 pMin; 71 | Vector3 pMax; 72 | Color color; 73 | float thickness; 74 | 75 | TgcVertexBuffer* vertexBuffer; 76 | TgcIndexBuffer* indexBuffer; 77 | TgcEffect* effect; 78 | 79 | private: 80 | 81 | 82 | 83 | }; 84 | 85 | 86 | 87 | 88 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/TgcSceneLoader/TgcScene.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/TgcSceneLoader/TgcScene.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | TgcScene::TgcScene(string sceneName, string filePath) 15 | { 16 | this->sceneName = sceneName; 17 | this->filePath = filePath; 18 | } 19 | 20 | 21 | TgcScene::TgcScene(const TgcScene& other) 22 | { 23 | } 24 | 25 | 26 | TgcScene::~TgcScene() 27 | { 28 | } 29 | 30 | void TgcScene::renderAll() 31 | { 32 | for(unsigned int i = 0; i < this->meshes.size(); i++) 33 | { 34 | this->meshes[i]->render(); 35 | } 36 | } 37 | 38 | void TgcScene::renderAll(bool showBoundingBox) 39 | { 40 | for(unsigned int i = 0; i < this->meshes.size(); i++) 41 | { 42 | this->meshes[i]->render(); 43 | this->meshes[i]->boundingBox->render(); 44 | } 45 | } 46 | 47 | void TgcScene::disposeAll() 48 | { 49 | for(unsigned int i = 0; i < this->meshes.size(); i++) 50 | { 51 | this->meshes[i]->dispose(); 52 | } 53 | } 54 | 55 | void TgcScene::setMeshesEnabled(bool flag) 56 | { 57 | for(unsigned int i = 0; i < this->meshes.size(); i++) 58 | { 59 | this->meshes[i]->enabled = flag; 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/TgcSceneLoader/TgcScene.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | #include 16 | using namespace std; 17 | 18 | //Project Includes: 19 | #include "TgcViewer/globals.h" 20 | #include "TgcViewer/TgcSceneLoader/TgcMesh.h" 21 | #include "TgcViewer/TgcGeometry/TgcBoundingBox.h" 22 | 23 | 24 | namespace TgcViewer 25 | { 26 | 27 | 28 | 29 | /** 30 | * Scene composed of many static meshes 31 | */ 32 | class TgcScene 33 | { 34 | 35 | public: 36 | 37 | /** 38 | * Creates a new scene 39 | */ 40 | TgcScene(string sceneName, string filePath); 41 | 42 | TgcScene(const TgcScene&); 43 | ~TgcScene(); 44 | 45 | /** 46 | * Render all meshes of the scene 47 | */ 48 | void renderAll(); 49 | 50 | /** 51 | * Render all meshes of the scene 52 | * @param showBoundingBox true to show the boundingBox of each mesh 53 | */ 54 | void renderAll(bool showBoundingBox); 55 | 56 | /** 57 | * Free all meshes 58 | */ 59 | void disposeAll(); 60 | 61 | /** 62 | * Enable or disable all meshes 63 | */ 64 | void setMeshesEnabled(bool flag); 65 | 66 | private: 67 | 68 | public: 69 | 70 | string sceneName; 71 | string filePath; 72 | vector meshes; 73 | TgcBoundingBox* boundingBox; 74 | 75 | private: 76 | 77 | 78 | 79 | }; 80 | 81 | 82 | 83 | 84 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/TgcSceneLoader/TgcSceneData.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/TgcSceneLoader/TgcSceneData.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | //Material Types 15 | const string TgcMaterialData::StandardMaterial = "Standardmaterial"; 16 | const string TgcMaterialData::MultiMaterial = "Multimaterial"; 17 | 18 | 19 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/TgcSceneLoader/TgcSceneParser.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | #pragma once 10 | 11 | 12 | //General Includes: 13 | #include 14 | #include 15 | using namespace std; 16 | 17 | 18 | //Project Includes: 19 | #include "TgcViewer/globals.h" 20 | #include "TgcViewer/GuiController.h" 21 | #include "TgcViewer/TgcSceneLoader/TgcSceneData.h" 22 | #include "TgcViewer/TgcSceneLoader/TgcParserUtils.h" 23 | #include "TgcViewer/Xml/pugixml.hpp" 24 | using namespace pugi; 25 | 26 | namespace TgcViewer 27 | { 28 | 29 | 30 | /** 31 | * Parse an XML scene file of format tgcScene.xml. 32 | * Retrieves an object representation of the scene. 33 | */ 34 | class TgcSceneParser 35 | { 36 | 37 | public: 38 | 39 | TgcSceneParser(); 40 | TgcSceneParser(const TgcSceneParser&); 41 | ~TgcSceneParser(); 42 | 43 | 44 | /** 45 | * Loads a tgcScene.xml file into TgcSceneData object structure 46 | * @param filePath absolute file path 47 | * @return the structure of the scene 48 | */ 49 | TgcSceneData* TgcSceneParser::parseSceneFromFile(string filePath); 50 | 51 | 52 | private: 53 | 54 | /** 55 | * Loads a Standard Material from an xml node 56 | */ 57 | void parseStandardMaterial(TgcMaterialData* material, const xml_node &matNode); 58 | 59 | 60 | private: 61 | 62 | 63 | 64 | }; 65 | 66 | 67 | 68 | 69 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Ui/Gui/TgcGuiButton.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | 16 | //Project Includes: 17 | #include "TgcViewer/globals.h" 18 | #include "TgcViewer/Ui/Gui/TgcGuiItem.h" 19 | #include "TgcViewer/2D/TgcSprite.h" 20 | #include "TgcViewer/2D/TgcText2d.h" 21 | #include "TgcViewer/TgcSceneLoader/TgcTexture.h" 22 | #include "TgcViewer/Math/Color.h" 23 | 24 | //Forward declaration for "TgcViewer/GuiController.h" 25 | namespace TgcViewer {class GuiController;} 26 | 27 | 28 | namespace TgcViewer 29 | { 30 | 31 | 32 | 33 | /** 34 | * A GUI button widget 35 | */ 36 | class TgcGuiButton : public TgcGuiItem 37 | { 38 | public: 39 | 40 | TgcGuiButton(const string id, string label); 41 | TgcGuiButton(const TgcGuiButton&); 42 | ~TgcGuiButton(); 43 | 44 | //Virtual members 45 | void render(); 46 | void dispose(); 47 | virtual void onClick(int button, const Vector2 pos); 48 | virtual void onMouseDown(int button, const Vector2 pos); 49 | virtual void onMouseUp(int button, const Vector2 pos); 50 | virtual void onMouseOver(); 51 | virtual void onMouseOut(); 52 | 53 | 54 | private: 55 | 56 | 57 | 58 | public: 59 | 60 | /** 61 | * Text for the button 62 | */ 63 | string label; 64 | 65 | 66 | /** 67 | * Text element 68 | */ 69 | TgcText2d* labelText; 70 | 71 | /** 72 | * Button sprite 73 | */ 74 | TgcSprite* sprite; 75 | 76 | 77 | bool mouseOver; 78 | bool pressed; 79 | 80 | private: 81 | 82 | 83 | 84 | }; 85 | 86 | 87 | 88 | 89 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Ui/Gui/TgcGuiCheckBox.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Ui/Gui/TgcGuiCheckBox.h" 11 | #include "TgcViewer/GuiController.h" //required by forward declaration 12 | using namespace TgcViewer; 13 | 14 | 15 | TgcGuiCheckBox::TgcGuiCheckBox(const string id, const string label) 16 | { 17 | this->init(id); 18 | this->checked = false; 19 | this->label = label; 20 | this->mouseOver = false; 21 | 22 | this->sprite = new TgcSprite(); 23 | this->sprite->texture = TgcTexture::createTexture(GuiController::Instance->engineMediaPath + "Ui\\gui_palette.png"); 24 | this->sprite->size = Vector2(32, 32); 25 | this->sprite->srcRect.y = 0; 26 | this->sprite->srcRect.width = this->sprite->size.Width; 27 | this->sprite->srcRect.height = this->sprite->size.Height; 28 | this->sprite->init(); 29 | 30 | this->size = this->sprite->size; 31 | 32 | this->labelText = new TgcText2d(); 33 | this->labelText->color = Color::White; 34 | this->labelText->updateValues(); 35 | } 36 | 37 | 38 | TgcGuiCheckBox::TgcGuiCheckBox(const TgcGuiCheckBox& other) 39 | { 40 | } 41 | 42 | 43 | TgcGuiCheckBox::~TgcGuiCheckBox() 44 | { 45 | } 46 | 47 | void TgcGuiCheckBox::render() 48 | { 49 | float imgX = this->checked ? 0.0f : 64.0f; 50 | const Color color = this->mouseOver ? Color::Gold : Color::White; 51 | 52 | this->sprite->position = this->position; 53 | this->sprite->srcRect.x = imgX; 54 | this->sprite->color = color; 55 | this->sprite->updateValues(); 56 | this->sprite->render(); 57 | 58 | this->labelText->position = this->position + Vector2(this->size.X + 4, this->size.Y / 2 - this->labelText->size.Y / 2); 59 | this->labelText->text = this->label; 60 | this->labelText->render(); 61 | } 62 | 63 | void TgcGuiCheckBox::dispose() 64 | { 65 | this->sprite->dispose(); 66 | delete this->sprite; 67 | } 68 | 69 | void TgcGuiCheckBox::onClick(int button, const Vector2 pos) 70 | { 71 | if(button == 0) 72 | { 73 | this->checked = !this->checked; 74 | } 75 | } 76 | 77 | void TgcGuiCheckBox::onMouseOver() 78 | { 79 | this->mouseOver = true; 80 | } 81 | 82 | void TgcGuiCheckBox::onMouseOut() 83 | { 84 | this->mouseOver = false; 85 | } 86 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Ui/Gui/TgcGuiCheckBox.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | 15 | 16 | //Project Includes: 17 | #include "TgcViewer/globals.h" 18 | #include "TgcViewer/Ui/Gui/TgcGuiItem.h" 19 | #include "TgcViewer/2D/TgcSprite.h" 20 | #include "TgcViewer/2D/TgcText2d.h" 21 | #include "TgcViewer/TgcSceneLoader/TgcTexture.h" 22 | #include "TgcViewer/Math/Color.h" 23 | 24 | //Forward declaration for "TgcViewer/GuiController.h" 25 | namespace TgcViewer {class GuiController;} 26 | 27 | 28 | namespace TgcViewer 29 | { 30 | 31 | 32 | 33 | /** 34 | * A GUI checkbox widget 35 | */ 36 | class TgcGuiCheckBox : public TgcGuiItem 37 | { 38 | 39 | public: 40 | 41 | TgcGuiCheckBox(const string id, const string label); 42 | TgcGuiCheckBox(const TgcGuiCheckBox&); 43 | ~TgcGuiCheckBox(); 44 | 45 | //Virtual members 46 | void render(); 47 | void dispose(); 48 | virtual void onClick(int button, const Vector2 pos); 49 | virtual void onMouseOver(); 50 | virtual void onMouseOut(); 51 | 52 | private: 53 | 54 | 55 | public: 56 | 57 | /** 58 | * True if the widget is checked 59 | */ 60 | bool checked; 61 | 62 | /** 63 | * Text for the label of the checkbox 64 | */ 65 | string label; 66 | 67 | 68 | /** 69 | * Text element 70 | */ 71 | TgcText2d* labelText; 72 | 73 | /** 74 | * Checkbox sprite 75 | */ 76 | TgcSprite* sprite; 77 | 78 | 79 | bool mouseOver; 80 | 81 | 82 | private: 83 | 84 | 85 | }; 86 | 87 | 88 | 89 | 90 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Ui/Gui/TgcGuiItem.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Ui/Gui/TgcGuiItem.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | TgcGuiItem::TgcGuiItem() 15 | { 16 | } 17 | 18 | 19 | TgcGuiItem::TgcGuiItem(const TgcGuiItem& other) 20 | { 21 | } 22 | 23 | 24 | TgcGuiItem::~TgcGuiItem() 25 | { 26 | } 27 | 28 | void TgcGuiItem::init(const string id) 29 | { 30 | this->id = id; 31 | this->position = Vector2(0, 0); 32 | this->size = Vector2(0, 0); 33 | this->visible = true; 34 | } 35 | 36 | bool TgcGuiItem::inside(const Vector2 pos) const 37 | { 38 | return pos.X >= position.X && pos.X <= position.X + size.Width && 39 | pos.Y >= position.Y && pos.Y <= position.Y + size.Height; 40 | } 41 | 42 | void TgcGuiItem::onFocus() 43 | { 44 | } 45 | 46 | void TgcGuiItem::onFocusLost() 47 | { 48 | } 49 | 50 | void TgcGuiItem::onMouseOver() 51 | { 52 | } 53 | 54 | void TgcGuiItem::onMouseOut() 55 | { 56 | } 57 | 58 | void TgcGuiItem::onClick(int button, const Vector2 pos) 59 | { 60 | } 61 | 62 | void TgcGuiItem::onMouseDown(int button, const Vector2 pos) 63 | { 64 | } 65 | 66 | void TgcGuiItem::onMouseUp(int button, const Vector2 pos) 67 | { 68 | } 69 | 70 | void TgcGuiItem::onMouseMove(const Vector2 pos) 71 | { 72 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Ui/Modifiers/TgcBoolModifier.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Ui/Modifiers/TgcBoolModifier.h" 11 | #include "TgcViewer/GuiController.h" //required by forward declaration 12 | using namespace TgcViewer; 13 | 14 | 15 | TgcBoolModifier::TgcBoolModifier(const string id, const string label, bool value) 16 | { 17 | this->init(id); 18 | 19 | checkbox = new TgcGuiCheckBox(id, label); 20 | checkbox->checked = value; 21 | GuiController::Instance->gui->add(checkbox); 22 | 23 | this->size = checkbox->size; 24 | } 25 | 26 | TgcBoolModifier::TgcBoolModifier(const TgcBoolModifier& other) 27 | { 28 | } 29 | 30 | TgcBoolModifier::~TgcBoolModifier() 31 | { 32 | } 33 | 34 | void TgcBoolModifier::update() 35 | { 36 | } 37 | 38 | void TgcBoolModifier::dispose() 39 | { 40 | } 41 | 42 | bool TgcBoolModifier::getBool() const 43 | { 44 | return checkbox->checked; 45 | } 46 | 47 | string TgcBoolModifier::getString() const 48 | { 49 | return checkbox->checked ? "true" : "false"; 50 | } 51 | 52 | void TgcBoolModifier::setPosition(const Vector2 pos) 53 | { 54 | checkbox->position = pos; 55 | } 56 | 57 | 58 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Ui/Modifiers/TgcBoolModifier.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | using namespace std; 16 | 17 | //Project Includes: 18 | #include "TgcViewer/globals.h" 19 | #include "TgcViewer/Ui/Modifiers/TgcModifierItem.h" 20 | #include "TgcViewer/Ui/Gui/TgcGuiCheckBox.h" 21 | 22 | //Forward declaration for "TgcViewer/GuiController.h" 23 | namespace TgcViewer {class GuiController;} 24 | 25 | 26 | namespace TgcViewer 27 | { 28 | 29 | 30 | 31 | /** 32 | * A Boolean modifier with a checkbox 33 | */ 34 | class TgcBoolModifier : public TgcModifierItem 35 | { 36 | 37 | public: 38 | 39 | TgcBoolModifier(const string id, const string label, bool value); 40 | TgcBoolModifier(const TgcBoolModifier&); 41 | ~TgcBoolModifier(); 42 | 43 | 44 | //Virtual members 45 | virtual void update(); 46 | virtual void dispose(); 47 | virtual bool getBool() const; 48 | virtual string getString() const; 49 | virtual void setPosition(const Vector2 pos); 50 | 51 | 52 | 53 | private: 54 | 55 | public: 56 | 57 | /** 58 | * Checkbox widget 59 | */ 60 | TgcGuiCheckBox* checkbox; 61 | 62 | private: 63 | 64 | 65 | }; 66 | 67 | 68 | 69 | 70 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Ui/Modifiers/TgcFloatModifier.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Ui/Modifiers/TgcFloatModifier.h" 11 | #include "TgcViewer/GuiController.h" //required by forward declaration 12 | using namespace TgcViewer; 13 | 14 | 15 | TgcFloatModifier::TgcFloatModifier(const string id, const string label, float minValue, float maxValue, float currentValue) 16 | { 17 | this->init(id); 18 | 19 | slider = new TgcGuiSlider(id, label); 20 | slider->setValues(minValue, maxValue, currentValue); 21 | GuiController::Instance->gui->add(slider); 22 | 23 | this->size = slider->size; 24 | } 25 | 26 | TgcFloatModifier::TgcFloatModifier(const TgcFloatModifier& other) 27 | { 28 | } 29 | 30 | TgcFloatModifier::~TgcFloatModifier() 31 | { 32 | } 33 | 34 | void TgcFloatModifier::update() 35 | { 36 | } 37 | 38 | void TgcFloatModifier::dispose() 39 | { 40 | } 41 | 42 | float TgcFloatModifier::getFloat() const 43 | { 44 | return slider->currentValue; 45 | } 46 | 47 | int TgcFloatModifier::getInt() const 48 | { 49 | return (int)slider->currentValue; 50 | } 51 | 52 | string TgcFloatModifier::getString() const 53 | { 54 | return TgcParserUtils::toString(slider->currentValue); 55 | } 56 | 57 | void TgcFloatModifier::setPosition(const Vector2 pos) 58 | { 59 | slider->position = pos; 60 | } 61 | 62 | 63 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Ui/Modifiers/TgcFloatModifier.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | using namespace std; 16 | 17 | //Project Includes: 18 | #include "TgcViewer/globals.h" 19 | #include "TgcViewer/Ui/Modifiers/TgcModifierItem.h" 20 | #include "TgcViewer/Ui/Gui/TgcGuiSlider.h" 21 | #include "TgcViewer/TgcSceneLoader/TgcParserUtils.h" 22 | 23 | //Forward declaration for "TgcViewer/GuiController.h" 24 | namespace TgcViewer {class GuiController;} 25 | 26 | 27 | namespace TgcViewer 28 | { 29 | 30 | 31 | 32 | /** 33 | * A float or numeric modifier with a slider 34 | */ 35 | class TgcFloatModifier : public TgcModifierItem 36 | { 37 | 38 | public: 39 | 40 | TgcFloatModifier(const string id, const string label, float minValue, float maxValue, float currentValue); 41 | TgcFloatModifier(const TgcFloatModifier&); 42 | ~TgcFloatModifier(); 43 | 44 | 45 | //Virtual members 46 | virtual void update(); 47 | virtual void dispose(); 48 | virtual float getFloat() const; 49 | virtual int getInt() const; 50 | virtual string getString() const; 51 | virtual void setPosition(const Vector2 pos); 52 | 53 | 54 | 55 | private: 56 | 57 | public: 58 | 59 | /** 60 | * slider widget 61 | */ 62 | TgcGuiSlider* slider; 63 | 64 | private: 65 | 66 | 67 | }; 68 | 69 | 70 | 71 | 72 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Ui/Modifiers/TgcModifierItem.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Ui/Modifiers/TgcModifierItem.h" 11 | #include "TgcViewer/GuiController.h" //required by forward declaration 12 | using namespace TgcViewer; 13 | 14 | 15 | TgcModifierItem::TgcModifierItem() 16 | { 17 | } 18 | 19 | 20 | TgcModifierItem::TgcModifierItem(const TgcModifierItem& other) 21 | { 22 | } 23 | 24 | TgcModifierItem::~TgcModifierItem() 25 | { 26 | } 27 | 28 | void TgcModifierItem::init(const string id) 29 | { 30 | this->id = id; 31 | this->size = Vector2(0, 0); 32 | } 33 | 34 | float TgcModifierItem::getFloat() const 35 | { 36 | return 0; 37 | } 38 | 39 | int TgcModifierItem::getInt() const 40 | { 41 | return 0; 42 | } 43 | 44 | bool TgcModifierItem::getBool() const 45 | { 46 | return false; 47 | } 48 | 49 | string TgcModifierItem::getString() const 50 | { 51 | return ""; 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Ui/Modifiers/TgcModifierItem.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | using namespace std; 16 | 17 | //Project Includes: 18 | #include "TgcViewer/globals.h" 19 | #include "TgcViewer/Math/Vector2.h" 20 | 21 | //Forward declaration for "TgcViewer/GuiController.h" 22 | namespace TgcViewer {class GuiController;} 23 | 24 | 25 | namespace TgcViewer 26 | { 27 | 28 | 29 | 30 | /** 31 | * An abstract modifier item 32 | */ 33 | class TgcModifierItem 34 | { 35 | 36 | public: 37 | 38 | TgcModifierItem(); 39 | TgcModifierItem(const TgcModifierItem&); 40 | ~TgcModifierItem(); 41 | 42 | /** 43 | * Init the modifier 44 | */ 45 | void init(const string id); 46 | 47 | /** 48 | * Updates the modifier 49 | */ 50 | virtual void update() = 0; 51 | 52 | /** 53 | * Free resources 54 | */ 55 | virtual void dispose() = 0; 56 | 57 | 58 | /** 59 | * Modifier data accesors 60 | */ 61 | virtual float getFloat() const; 62 | virtual int getInt() const; 63 | virtual bool getBool() const; 64 | virtual string getString() const; 65 | 66 | 67 | /** 68 | * {Internal} 69 | * Sets the modifier position 70 | */ 71 | virtual void setPosition(const Vector2 pos) = 0; 72 | 73 | 74 | private: 75 | 76 | public: 77 | 78 | /** 79 | * Unique identifier for the modifier 80 | */ 81 | string id; 82 | 83 | /** 84 | * Size of the modifier 85 | */ 86 | Vector2 size; 87 | 88 | private: 89 | 90 | 91 | }; 92 | 93 | 94 | 95 | 96 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Ui/TgcLogger.cpp: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #include "TgcViewer/Ui/TgcLogger.h" 11 | #include "TgcViewer/GuiController.h" //required by forward declaration 12 | using namespace TgcViewer; 13 | 14 | 15 | TgcLogger::TgcLogger() 16 | { 17 | } 18 | 19 | 20 | TgcLogger::TgcLogger(const TgcLogger& other) 21 | { 22 | } 23 | 24 | 25 | TgcLogger::~TgcLogger() 26 | { 27 | } 28 | 29 | void TgcLogger::log(string txt) 30 | { 31 | cout << txt; 32 | } 33 | 34 | void TgcLogger::logError(string txt) 35 | { 36 | cerr << txt; 37 | MessageBox(GuiController::Instance->windowHandler->hwnd, txt.c_str(), "Error", MB_OK); 38 | } 39 | 40 | void TgcLogger::dispose() 41 | { 42 | } 43 | 44 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Ui/TgcLogger.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | //General Includes: 14 | #include 15 | #include 16 | using namespace std; 17 | 18 | //Project Includes: 19 | #include "TgcViewer/globals.h" 20 | 21 | //Forward declaration for "TgcViewer/GuiController.h" 22 | namespace TgcViewer {class GuiController;} 23 | 24 | 25 | namespace TgcViewer 26 | { 27 | 28 | 29 | 30 | /** 31 | * Tools for message logging 32 | */ 33 | class TgcLogger 34 | { 35 | 36 | public: 37 | 38 | TgcLogger(); 39 | TgcLogger(const TgcLogger&); 40 | ~TgcLogger(); 41 | 42 | 43 | /** 44 | * Log message 45 | */ 46 | void log(string txt); 47 | 48 | /** 49 | * Log error message 50 | */ 51 | void logError(string error); 52 | 53 | /** 54 | * Free resources 55 | */ 56 | void dispose(); 57 | 58 | private: 59 | 60 | public: 61 | 62 | private: 63 | 64 | }; 65 | 66 | 67 | 68 | 69 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Windows/HighResolutionTimer.cpp: -------------------------------------------------------------------------------- 1 | /*############################################################# 2 | TgcViewer-cpp 3 | 4 | Author: Matias Leone 5 | 6 | #############################################################*/ 7 | 8 | 9 | #include "TgcViewer/Windows/HighResolutionTimer.h" 10 | using namespace TgcViewer; 11 | 12 | 13 | HighResolutionTimer::HighResolutionTimer() 14 | { 15 | this->frameSecond = 0; 16 | this->fps = 0; 17 | this->frameTime = 0; 18 | this->frameCount = 0; 19 | } 20 | 21 | 22 | HighResolutionTimer::HighResolutionTimer(const HighResolutionTimer& other) 23 | { 24 | } 25 | 26 | 27 | HighResolutionTimer::~HighResolutionTimer() 28 | { 29 | } 30 | 31 | void HighResolutionTimer::reset() 32 | { 33 | this->startTime = this->ticks(); 34 | } 35 | 36 | void HighResolutionTimer::set() 37 | { 38 | // Calc frame time. 39 | const long endTime = this->ticks(); 40 | this->frameTime = (float)(endTime - this->startTime) / (float)this->frequency(); 41 | this->startTime = endTime; 42 | 43 | // Calc fps. 44 | this->frameCount++; 45 | this->frameSecond += this->frameTime; 46 | if (this->frameSecond >= 1.0f) 47 | { 48 | this->frameSecond = 0; 49 | this->fps = this->frameCount; 50 | this->frameCount = 0; 51 | } 52 | } 53 | 54 | long HighResolutionTimer::frequency() 55 | { 56 | LARGE_INTEGER freq; 57 | freq.QuadPart = 0; 58 | QueryPerformanceFrequency(&freq); 59 | return (long)freq.QuadPart; 60 | } 61 | 62 | long HighResolutionTimer::ticks() 63 | { 64 | LARGE_INTEGER ticks; 65 | ticks.QuadPart = 0; 66 | QueryPerformanceCounter(&ticks); 67 | return (long)ticks.QuadPart; 68 | } 69 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/Windows/HighResolutionTimer.h: -------------------------------------------------------------------------------- 1 | /*############################################################# 2 | TgcViewer-cpp 3 | 4 | Author: Matias Leone 5 | 6 | #############################################################*/ 7 | 8 | 9 | #pragma once 10 | 11 | 12 | //General Includes: 13 | #include 14 | 15 | 16 | namespace TgcViewer 17 | { 18 | 19 | 20 | 21 | /*//////////////////////////////////////////////////////////////////////////////// 22 | Class name: HighResolutionTimer 23 | ////////////////////////////////////////////////////////////////////////////////*/ 24 | class HighResolutionTimer 25 | { 26 | 27 | public: 28 | 29 | HighResolutionTimer(); 30 | HighResolutionTimer(const HighResolutionTimer&); 31 | ~HighResolutionTimer(); 32 | 33 | void reset(); 34 | void set(); 35 | 36 | 37 | private: 38 | 39 | long ticks(); 40 | long frequency(); 41 | 42 | public: 43 | 44 | float frameTime; 45 | int fps; 46 | 47 | 48 | private: 49 | 50 | long startTime; 51 | int frameCount; 52 | float frameSecond; 53 | 54 | }; 55 | 56 | 57 | 58 | 59 | } -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/globals.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | #pragma once 10 | 11 | 12 | 13 | #define algo 0 14 | -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/TgcViewer/stdafx.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////////// 2 | // TgcViewer-cpp 3 | // 4 | // Author: Matias Leone 5 | // 6 | ///////////////////////////////////////////////////////////////////////////////// 7 | 8 | 9 | 10 | #pragma once 11 | 12 | 13 | #define algo2 0 -------------------------------------------------------------------------------- /JanuaEngine/tgcviewer-cpp/main.cpp: -------------------------------------------------------------------------------- 1 | /*############################################################# 2 | TgcViewer-cpp 3 | 4 | Author: Matias Leone 5 | 6 | Application entry point 7 | #############################################################*/ 8 | 9 | #include "TgcViewer/GuiController.h" 10 | #include "TgcViewer/Example/TgcExample.h" 11 | using namespace TgcViewer; 12 | 13 | 14 | //Concret example to be used 15 | #include "Examples/Example1/Example1.h" 16 | #include "Examples/ExampleVB/ExampleVB.h" 17 | #include "Examples/ExampleEditor/ExampleEditor.h" 18 | #include "Examples/ExampleTgcBox/ExampleTgcBox.h" 19 | #include "Examples/ExampleOCEngine1/ExampleOCEngine1.h" 20 | #include "Examples/ExampleOCEngine1/ExampleOCEngineFPSView.h" 21 | #include "Examples/ExampleOCEngine1/ExampleCreateRawSceneXML.h" 22 | using namespace Examples; 23 | 24 | 25 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow) 26 | { 27 | //Create GuiController 28 | GuiController::newInstance(); 29 | 30 | 31 | //Create concret example 32 | //TgcExample* example = new Example1(); 33 | //TgcExample* example = new ExampleVB(); 34 | //TgcExample* example = new ExampleEditor(); 35 | //TgcExample* example = new ExampleTgcBox(); 36 | //TgcExample* example = new ExampleOCEngine1(); 37 | TgcExample* example = new ExampleOCEngineFPSView(); 38 | //TgcExample* example = new ExampleCreateRawSceneXML(); 39 | 40 | 41 | //Init graphics 42 | GuiController::Instance->initGraphics(example); 43 | 44 | //Shutdown 45 | //GuiController::Instance->dispose(); 46 | 47 | return 0; 48 | } -------------------------------------------------------------------------------- /site/img/JanuaImg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/site/img/JanuaImg1.jpg -------------------------------------------------------------------------------- /site/img/JanuaImg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/site/img/JanuaImg2.jpg -------------------------------------------------------------------------------- /site/img/LogoJanua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gigc/Janua/cbcc8ad0e9501e1faef5b37a964769970aa3d236/site/img/LogoJanua.png --------------------------------------------------------------------------------