EmitterLodParamDesc.h
Go to the documentation of this file.
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 EMITTER_LOD_PARAM_DESC_H 00013 #define EMITTER_LOD_PARAM_DESC_H 00014 00015 #include "Apex.h" 00016 00017 namespace nvidia 00018 { 00019 namespace apex 00020 { 00021 00022 00023 PX_PUSH_PACK_DEFAULT 00024 00026 class EmitterLodParamDesc : public ApexDesc 00027 { 00028 public: 00029 float maxDistance; 00030 float distanceWeight; 00031 float speedWeight; 00032 float lifeWeight; 00033 float separationWeight; 00034 float bias; 00035 00039 PX_INLINE EmitterLodParamDesc() : ApexDesc() 00040 { 00041 init(); 00042 } 00043 00047 PX_INLINE void setToDefault() 00048 { 00049 ApexDesc::setToDefault(); 00050 init(); 00051 } 00052 00056 PX_INLINE bool isValid() const 00057 { 00058 if (distanceWeight < 0.0f || speedWeight < 0.0f || lifeWeight < 0.0f) 00059 { 00060 return false; 00061 } 00062 if (separationWeight < 0.0f || maxDistance < 0.0f || bias < 0.0f) 00063 { 00064 return false; 00065 } 00066 return ApexDesc::isValid(); 00067 } 00068 00072 enum ManifestVersions 00073 { 00074 initial, 00075 00076 count, 00077 current = count - 1 00078 }; 00079 00080 private: 00081 00082 PX_INLINE void init() 00083 { 00084 // These defaults give you pure distance based LOD weighting 00085 maxDistance = 0.0f; 00086 distanceWeight = 1.0f; 00087 speedWeight = 0.0f; 00088 lifeWeight = 0.0f; 00089 separationWeight = 0.0f; 00090 bias = 1.0f; 00091 } 00092 }; 00093 00094 00095 PX_POP_PACK 00096 00097 } 00098 } // end namespace nvidia 00099 00100 #endif // EMITTER_LOD_PARAM_DESC_H
Generated on Fri Dec 15 2017 13:58:27 Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.