首页 > 其他分享 >xx

xx

时间:2024-07-19 14:52:42浏览次数:11  
标签:GeometricObjects SOURCE Source hpp source xx cpp

---------------------------------------------------------------------------------------------------

CMake Build Configuration for the Ray Tracing

See README.md for guidance.

---------------------------------------------------------------------------------------------------

cmake_minimum_required ( VERSION 3.1.0...3.27.0 )

set (prjName ht_master_sec)

project ( ht_master_sec LANGUAGES CXX )

Set to C++11

set ( CMAKE_CXX_STANDARD 11 )
set ( CMAKE_CXX_STANDARD_REQUIRED ON )
set ( CMAKE_CXX_EXTENSIONS OFF )

include (cmake/findSDL.cmake)

Source

set (SOURCE_BRDF_Source
source/BRDF/BRDF.cpp
source/BRDF/BRDF.hpp
source/BRDF/GlossySpecular.hpp
source/BRDF/GlossySpecular.cpp
source/BRDF/Lambertian.hpp
source/BRDF/Lambertian.cpp
source/BRDF/PerfectSpecular.hpp
source/BRDF/PerfectSpecular.cpp
)
SOURCE_GROUP("source\BRDF" FILES ${SOURCE_BRDF_Source})

set (SOURCE_build_Source
source/build/BuildAmbientOcclusion.hpp
source/build/BuildAreaLight.hpp
source/build/BuildBBCoverPicLight.hpp
source/build/BuildBox.hpp
source/build/BuildGlossy.hpp
source/build/BuildHorizontalPlane.hpp
source/build/BuildMirrorHall.hpp
source/build/BuildMultipleObjects.hpp
source/build/BuildReflective.hpp
source/build/BuildShadedTest.hpp
source/build/BuildShadowsTest.hpp
source/build/BuildSimpleMesh.hpp
source/build/BuildSingleSphere.hpp
source/build/BuildSingleSphereLight.hpp
source/build/BuildSinusoid.hpp
source/build/BuildSphereGrid.hpp
source/build/BuildSpheresQueue.hpp
)
SOURCE_GROUP("source//build" FILES ${SOURCE_build_Source})

set (SOURCE_Cameras_Source
source/Cameras/Camera.cpp
source/Cameras/Camera.hpp
source/Cameras/Orthographic.cpp
source/Cameras/Orthographic.hpp
source/Cameras/Pinhole.cpp
source/Cameras/Pinhole.hpp
source/Cameras/ThinLens.cpp
source/Cameras/ThinLens.hpp
)
SOURCE_GROUP("source//camera" FILES ${SOURCE_Cameras_Source})

set (SOURCE_Light_Soruce
source/Light/Ambient.cpp
source/Light/Ambient.hpp
source/Light/AmbientOccluder.cpp
source/Light/AmbientOccluder.hpp
source/Light/AreaLight.cpp
source/Light/AreaLight.hpp
source/Light/Directional.cpp
source/Light/Directional.hpp
source/Light/Light.cpp
source/Light/Light.hpp
source/Light/PointLight.cpp
source/Light/PointLight.hpp
)
SOURCE_GROUP("source//light" FILES ${SOURCE_Light_Soruce})

set (SOURCE_Materials_Source
source/Materials/Emissive.cpp
source/Materials/Emissive.hpp
source/Materials/Material.cpp
source/Materials/Material.hpp
source/Materials/Matte.cpp
source/Materials/Matte.hpp
source/Materials/Phong.cpp
source/Materials/Phong.hpp
source/Materials/Reflective.cpp
source/Materials/Reflective.hpp
)
SOURCE_GROUP("source//materials" FILES ${SOURCE_Materials_Source})

set ( SOURCE_Samplers_Source
source/Samplers/Jittered.cpp
source/Samplers/Jittered.hpp
source/Samplers/MultiJittered.cpp
source/Samplers/MultiJittered.hpp
source/Samplers/NRooks.cpp
source/Samplers/NRooks.hpp
source/Samplers/Regular.cpp
source/Samplers/Regular.hpp
source/Samplers/NRooks.cpp
source/Samplers/NRooks.hpp
source/Samplers/Sampler.cpp
source/Samplers/Sampler.hpp
)
SOURCE_GROUP("source//samplers" FILES ${SOURCE_Samplers_Source})

set ( SOURCE_Tracers_Source
source/Tracers/AreaLighting.cpp
source/Tracers/AreaLighting.hpp
source/Tracers/RayCast.hpp
source/Tracers/RayCast.cpp
source/Tracers/Tracer.hpp
source/Tracers/Tracer.cpp
source/Tracers/Whitted.hpp
source/Tracers/Whitted.cpp
)
SOURCE_GROUP("source//tracers" FILES ${SOURCE_Tracers_Source})

set ( SOURCE_Utilities_Source
source/Utilities/Constants.hpp
source/Utilities/Debug.hpp
source/Utilities/Maths.hpp
source/Utilities/Matrix.cpp
source/Utilities/Matrix.hpp
source/Utilities/Normal.cpp
source/Utilities/Normal.hpp
source/Utilities/Point2D.cpp
source/Utilities/Point2D.hpp
source/Utilities/Point3D.cpp
source/Utilities/Point3D.hpp
source/Utilities/Ray.cpp
source/Utilities/Ray.hpp
source/Utilities/RGBColor.cpp
source/Utilities/RGBColor.hpp
source/Utilities/ShadeRec.cpp
source/Utilities/ShadeRec.hpp
source/Utilities/Vector3D.cpp
source/Utilities/Vector3D.hpp
)
SOURCE_GROUP("source//utilities" FILES ${SOURCE_Utilities_Source})

set (SOURCE_Window_Source
source/Window/Window.cpp
source/Window/Window.hpp
source/Window/Window-NOTHREAD.cpp
source/Window/Window-NOTHREAD.hpp
source/Window/Window-THREAD.cpp
source/Window/Window-THREAD.hpp
)
SOURCE_GROUP("source//window" FILES ${SOURCE_Window_Source})

set (SOURCE_World_Source
source/World/ViewPlane.cpp
source/World/ViewPlane.hpp
source/World/World.cpp
source/World/World.hpp
)
SOURCE_GROUP("source//world" FILES ${SOURCE_World_Source})

set (SOURCE_GeometricObjects_Source
source/GeometricObjects/BBox.cpp
source/GeometricObjects/BBox.hpp
source/GeometricObjects/Box.cpp
source/GeometricObjects/Box.hpp
source/GeometricObjects/Compound.cpp
source/GeometricObjects/Compound.hpp
source/GeometricObjects/Cylinder.cpp
source/GeometricObjects/Cylinder.hpp
source/GeometricObjects/Disk.cpp
source/GeometricObjects/Disk.hpp
source/GeometricObjects/FlatMeshTriangle.cpp
source/GeometricObjects/FlatMeshTriangle.hpp
source/GeometricObjects/GeometricObject.cpp
source/GeometricObjects/GeometricObject.hpp
source/GeometricObjects/Mesh.cpp
source/GeometricObjects/Mesh.hpp
source/GeometricObjects/MeshTriangle.cpp
source/GeometricObjects/MeshTriangle.hpp
source/GeometricObjects/OpenCylinder.cpp
source/GeometricObjects/OpenCylinder.hpp
source/GeometricObjects/Plane.cpp
source/GeometricObjects/Plane.hpp
source/GeometricObjects/Rectangle.cpp
source/GeometricObjects/Rectangle.hpp
source/GeometricObjects/SmoothMeshTriangle.cpp
source/GeometricObjects/SmoothMeshTriangle.hpp
source/GeometricObjects/Sphere.cpp
source/GeometricObjects/Sphere.hpp
source/GeometricObjects/Torus.cpp
source/GeometricObjects/Torus.hpp
source/GeometricObjects/Triangle.cpp
source/GeometricObjects/Triangle.hpp
)
SOURCE_GROUP("source//GeometricObjects" FILES ${SOURCE_GeometricObjects_Source})

SET(RayTracing_SRCS
${SOURCE_BRDF_Source}
${SOURCE_build_Source}
${SOURCE_Cameras_Source}
${SOURCE_Light_Soruce}
${SOURCE_Materials_Source}
${SOURCE_Samplers_Source}
${SOURCE_Tracers_Source}
${SOURCE_Utilities_Source}
${SOURCE_Window_Source}
${SOURCE_World_Source}
${SOURCE_GeometricObjects_Source}
source/Main/main.cpp
)

Executables

add_executable(${prjName} ${EXTERNAL} ${RayTracing_SRCS})

if(SDL_FOUND)
target_link_libraries(${prjName} \({SDL_LIBRARY}) target_include_directories(\){prjName} PUBLIC ${SDL_INCLUDE_PATH})
endif()

include_directories(src/include/)

Specific compiler flags below. We're not going to add options for all possible compilers, but if

you're new to CMake (like we are), the following may be a helpful example if you're using a

different compiler or want to set different compiler options.

message (STATUS "Compiler ID: " ${CMAKE_CXX_COMPILER_ID})
message (STATUS "Release flags: " ${CMAKE_CXX_FLAGS_RELEASE})
message (STATUS "Debug flags: " ${CMAKE_CXX_FLAGS_DEBUG})

if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# /wd #### - Disable warning
# /we #### - treat warning as error
add_compile_options("/W4") # Enable level-4 warnings
add_compile_options("/we 4265") # Class has virtual functions, but its non-trivial destructor is not virtual
add_compile_options("/we 5204") # Class has virtual functions, but its trivial destructor is not virtual
add_compile_options("/wd 4100") # unreferenced formal parameter
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wnon-virtual-dtor) # Class has virtual functions, but its destructor is not virtual
add_compile_options(-Wreorder) # Data member will be initialized after [other] data member
add_compile_options(-Wmaybe-uninitialized) # Variable improperly initialized
add_compile_options(-Wunused-variable) # Variable is defined but unused
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wnon-virtual-dtor) # Class has virtual functions, but its destructor is not virtual
add_compile_options(-Wreorder) # Data member will be initialized after [other] data member
add_compile_options(-Wsometimes-uninitialized) # Variable improperly initialized
add_compile_options(-Wunused-variable) # Variable is defined but unused
endif()

IF (WIN32)
FIND_PATH(SDL_INCLUDE_PATH SDL/SDL.h
DOC "The directory where GL/glew.h resides")

FIND_LIBRARY( SDL_LIBRARY
    NAMES SDL SDL2
    PATHS
    DOC "The SDL library")

ELSE (WIN32)
ENDIF (WIN32)

SET(SDL_FOUND "NO")
IF (SDL_INCLUDE_PATH AND SDL_LIBRARY)
SET(SDL_LIBRARIES ${SDL_LIBRARY} )
SET(SDL_FOUND "YES")
ENDIF (SDL_INCLUDE_PATH AND SDL_LIBRARY)

标签:GeometricObjects,SOURCE,Source,hpp,source,xx,cpp
From: https://www.cnblogs.com/ultramanX/p/18311463

相关文章

  • xxl-job使用记录
    xxl-job对比@Scheduled的优势:xxl-job在分布式环境下不会重复执行,@Scheduled只适用单节点应用,不能在多节点环境用。xxl-job有页面,能传参,能配置多任务顺序执行1、github下载xxl-job项目 https://github.com/xuxueli/xxl-job/2、修改项目的配置文件,数据库,端口,日志路径等3、自己项......
  • [GWCTF 2019]xxor
    64位,进ida第一个for循环,输入六个32位字符串,转换成整数,存到v6数组第二个for循环,函数是把低位和高位分成了两个dword,就是在一个循环中一下处理了两个数据(两个32位数据在64位数组中)然后看看这个unk_601060,32位对齐,所以里面的数据就是(2,2,3,4)接下来就是sub_400686这个加密函数可......
  • xxe学习笔记
    什么是xxeXXE(XMLExternalEntityInjection)全称为XML外部实体注入,由于程序在解析输入的XML数据时,解析了攻击者伪造的外部实体而产生的。例如PHP中的simplexml_load默认情况下会解析外部实体,有XXE漏洞的标志性函数为simplexml_load_string()。当允许引用外部实体时,通过构造恶......
  • XX2104 培训【C++解决】
    描述某培训机构的学员有如下信息:姓名(字符串)年龄(周岁,整数)去年NOIP成绩(整数,且保证是5的倍数)经过为期一年的培训,所有同学的成绩都有所提高,提升了20%(当然NOIP满分是600分,不能超过这个得分)。输入学员信息,请设计一个结构体储存这些学生信息,并设计一个函数模拟培训......
  • 端口被占用如何处理Error: listen EADDRINUSE: address already in use :::xxxx
    启动项目出现Error:listenEADDRINUSE:addressalreadyinuse:::9088yarnrunv1.22.19$nodesrc/index.jsevents.js:377thrower;//Unhandled'error'event^Error:listenEADDRINUSE:addressalreadyinuse:::9088atServer.setupL......
  • XXS漏洞简介
          ......
  • 编译xx.java文件时,未生成对应class文件
    现象:编译xx.java文件时,未生成对应class文件;或报错:不可映射字符原因:文件中有中文,编码模式不匹配控制台-属性-选项,可看见控制台的编码是GBK编码;如果.java文件里含有中文,需将.java文件的编码模式也改为GBK保存。  现象:执行命令>javaHello.class,报错:找不到或无法加载主类原......
  • 2024-07-12 vue项目中 运行 npm run build 或 yarn build 打包 没有生成 xx.es.js 文
    我在写一个ui组件库,在打包时发现dist文件夹里没有生成我想要的xx.es.js文件,我查看了我的vue项目中的vue.config.js文件,发现build.lib没有指定输出的文件名解决方案:配置项目中的vue.config.js文件,参考我的......
  • XXE
    XXEXXE全称为XMLEnternalEntityInjection,中文名称:XML外部实体注入XXE漏洞DTD引用外部实体时导致的漏洞解析时未对XML外部实体加以限制,攻击者可以将恶意代码注入到XML中,导致服务器加载恶意的外部实体引发文件读取,SSRF,命令执行等特征:在HTTP的Request报文出现一下请求报文,即......
  • xxl-job中的cron表达式详解
    一、xxl-job的简介xxl-job是一个轻量级分布式任务调度平台,核心的设计目标:学习简单、开发迅速、轻量级、易扩展。现已开放源代码并接入多家公司线上产品线,开箱即用。而且有较为完善的说明文档《分布式任务调度平台XXL-JOB》和图形化操作界面。xxl-job是开源项目,在GitHub......