APEX Framework: Module.h Source File

NVIDIA APEX

Module.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 MODULE_H
00013 #define MODULE_H
00014 
00020 #include "ApexInterface.h"
00021 #include "ApexSDK.h"
00022 #include "foundation/PxSimpleTypes.h"
00023 
00024 namespace nvidia
00025 {
00026 namespace apex
00027 {
00028 
00029 PX_PUSH_PACK_DEFAULT
00030 
00031 class RenderableIterator;
00032 
00036 struct RenderLockMode
00037 {
00041     enum Enum
00042     {
00046         NO_RENDER_LOCK                  = 0,
00047 
00051         PER_ACTOR_RENDER_LOCK           = 1,
00052 
00056         PER_MODULE_SCENE_RENDER_LOCK    = 2,
00057     };
00058 };
00059 
00063 template <typename T>
00064 struct Range
00065 {
00066     Range() {};
00070     Range(T inMin, T inMax) : minimum(inMin), maximum(inMax) {};
00071 
00075     bool operator== (const Range& r) const
00076     {
00077         return minimum == r.minimum && maximum == r.maximum;
00078     }
00079 
00083     T minimum;
00087     T maximum;
00088 };
00089 
00090 
00091 
00097 class Module : public ApexInterface
00098 {
00099 public:
00104     virtual void init(::NvParameterized::Interface& desc) = 0;
00105 
00109     virtual const char* getName() const = 0;
00110 
00114     virtual AuthObjTypeID getModuleID() const = 0;
00115 
00120     virtual ::NvParameterized::Interface* getDefaultModuleDesc()
00121     {
00122         return NULL;
00123     }
00124 
00132     virtual RenderableIterator* createRenderableIterator(const Scene&) = 0;
00133 
00139     virtual bool setRenderLockMode(RenderLockMode::Enum, Scene&) { return false; }
00140 
00144     virtual RenderLockMode::Enum getRenderLockMode(const Scene&) const { return RenderLockMode::NO_RENDER_LOCK; }
00145 
00151     virtual bool lockModuleSceneRenderLock(Scene&) { return false; }
00152 
00158     virtual bool unlockModuleSceneRenderLock(Scene&) { return false; }
00159 };
00160 
00161 PX_POP_PACK
00162 
00163 }
00164 } // end namespace nvidia::apex
00165 
00166 #endif // MODULE_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.