TurbulenceRenderCallback.h
00001 /* 00002 * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved. 00003 * 00004 * NVIDIA CORPORATION and its licensors retain all intellectual property 00005 * and proprietary rights in and to this software, related documentation 00006 * and any modifications thereto. Any use, reproduction, disclosure or 00007 * distribution of this software and related documentation without an express 00008 * license agreement from NVIDIA CORPORATION is strictly prohibited. 00009 */ 00010 00011 00012 #ifndef TURBULENCE_RENDER_CALLBACK_H 00013 #define TURBULENCE_RENDER_CALLBACK_H 00014 00015 #include "foundation/Px.h" 00016 #include "UserRenderCallback.h" 00017 00018 namespace nvidia 00019 { 00020 namespace apex 00021 { 00022 00023 PX_PUSH_PACK_DEFAULT 00024 00025 class TurbulenceRenderable; 00026 00030 struct TurbulenceVelocityFormat 00031 { 00035 enum Enum 00036 { 00037 DEFAULT = 0, 00038 HALF4 = RenderDataFormat::HALF4, 00039 FLOAT4 = RenderDataFormat::FLOAT4, 00040 }; 00041 }; 00042 00046 struct TurbulenceDensityFormat 00047 { 00051 enum Enum 00052 { 00053 DEFAULT = 0, 00054 UBYTE1 = RenderDataFormat::UBYTE1, 00055 HALF1 = RenderDataFormat::HALF1, 00056 FLOAT1 = RenderDataFormat::FLOAT1, 00057 }; 00058 }; 00059 00063 struct TurbulenceFlameFormat 00064 { 00068 enum Enum 00069 { 00070 DEFAULT = 0, 00071 HALF4 = RenderDataFormat::HALF4, 00072 FLOAT4 = RenderDataFormat::FLOAT4, 00073 }; 00074 }; 00075 00079 struct TurbulenceRenderLayout 00080 { 00081 TurbulenceRenderLayout() 00082 { 00083 setDefaults(); 00084 } 00085 00087 void setDefaults() 00088 { 00089 velocityFormat = TurbulenceVelocityFormat::DEFAULT; 00090 densityFormat = TurbulenceDensityFormat::DEFAULT; 00091 flameFormat = TurbulenceFlameFormat::DEFAULT; 00092 } 00093 00095 TurbulenceVelocityFormat::Enum velocityFormat; 00096 00098 TurbulenceDensityFormat::Enum densityFormat; 00099 00101 TurbulenceFlameFormat::Enum flameFormat; 00102 }; 00103 00107 class TurbulenceRenderCallback : public UserRenderCallback 00108 { 00109 public: 00111 virtual void onCreatedTurbulenceRenderable(TurbulenceRenderable& ) {} 00112 00114 virtual void onUpdatedTurbulenceRenderable(TurbulenceRenderable& ) {} 00115 00117 virtual void onReleasingTurbulenceRenderable(TurbulenceRenderable& ) {} 00118 00120 virtual bool getTurbulenceRenderLayout(TurbulenceRenderLayout& renderLayout, uint32_t sizeX, uint32_t sizeY, uint32_t sizeZ, uint32_t densitySizeMultiplier, uint32_t flameSizeMultiplier) 00121 { 00122 PX_UNUSED(renderLayout); 00123 PX_UNUSED(sizeX); 00124 PX_UNUSED(sizeY); 00125 PX_UNUSED(sizeZ); 00126 PX_UNUSED(densitySizeMultiplier); 00127 PX_UNUSED(flameSizeMultiplier); 00128 return false; 00129 } 00130 }; 00131 00132 PX_POP_PACK 00133 00134 } 00135 } // end namespace nvidia 00136 00137 #endif // TURBULENCE_RENDER_CALLBACK_H
Generated on Fri Dec 15 2017 13:58:35 Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.