aboutsummaryrefslogtreecommitdiff
path: root/APEX_1.4/module/basicfs/include/WindFSAsset.h
diff options
context:
space:
mode:
authorgit perforce import user <a@b>2016-10-25 12:29:14 -0600
committerSheikh Dawood Abdul Ajees <Sheikh Dawood Abdul Ajees>2016-10-25 18:56:37 -0500
commit3dfe2108cfab31ba3ee5527e217d0d8e99a51162 (patch)
treefa6485c169e50d7415a651bf838f5bcd0fd3bfbd /APEX_1.4/module/basicfs/include/WindFSAsset.h
downloadphysx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.tar.xz
physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.zip
Initial commit:
PhysX 3.4.0 Update @ 21294896 APEX 1.4.0 Update @ 21275617 [CL 21300167]
Diffstat (limited to 'APEX_1.4/module/basicfs/include/WindFSAsset.h')
-rw-r--r--APEX_1.4/module/basicfs/include/WindFSAsset.h185
1 files changed, 185 insertions, 0 deletions
diff --git a/APEX_1.4/module/basicfs/include/WindFSAsset.h b/APEX_1.4/module/basicfs/include/WindFSAsset.h
new file mode 100644
index 00000000..4d29d0bd
--- /dev/null
+++ b/APEX_1.4/module/basicfs/include/WindFSAsset.h
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+
+#ifndef __WIND_FS_ASSET_H__
+#define __WIND_FS_ASSET_H__
+
+#include "BasicFSAssetImpl.h"
+#include "WindFSAssetPreview.h"
+#include "WindFSAssetParams.h"
+#include "WindFSActorParams.h"
+#include "ApexAuthorableObject.h"
+
+namespace nvidia
+{
+namespace apex
+{
+class RenderMeshAsset;
+}
+namespace basicfs
+{
+
+class WindFSActorImpl;
+
+class WindFSAsset : public BasicFSAssetImpl
+{
+ friend class BasicFSAssetDummyAuthoring;
+public:
+ APEX_RW_LOCKABLE_BOILERPLATE
+
+ WindFSAsset(ModuleBasicFSImpl*, ResourceList&, const char*);
+ WindFSAsset(ModuleBasicFSImpl*, ResourceList&, NvParameterized::Interface*, const char*);
+ ~WindFSAsset();
+
+ /* Asset */
+ AuthObjTypeID getObjTypeID() const
+ {
+ return mAssetTypeID;
+ }
+ const char* getObjTypeName() const
+ {
+ return getClassName();
+ }
+
+ /* ApexInterface */
+ virtual void release()
+ {
+ mModule->mSdk->releaseAsset(*this);
+ }
+
+ // TODO: implement forceLoadAssets
+ uint32_t forceLoadAssets()
+ {
+ return 0;
+ }
+
+ NvParameterized::Interface* getAssetNvParameterized() const
+ {
+ return mParams;
+ }
+
+ NvParameterized::Interface* releaseAndReturnNvParameterizedInterface(void)
+ {
+ NvParameterized::Interface* ret = mParams;
+ mParams = NULL;
+ release();
+ return ret;
+ }
+
+ /* BasicFSAsset specific methods */
+ void destroy();
+
+ /**
+ * \brief Apply any changes that may been made to the NvParameterized::Interface on this asset.
+ */
+ virtual void applyEditingChanges(void)
+ {
+ APEX_INVALID_OPERATION("Not yet implemented!");
+ }
+
+ WindFSPreview* createWindFSPreview(const WindFSPreviewDesc& desc, AssetPreviewScene* previewScene);
+ WindFSPreview* createWindFSPreviewImpl(const WindFSPreviewDesc& desc, WindFSAsset* TurboAsset, AssetPreviewScene* previewScene);
+ void releaseWindFSPreview(WindFSPreview& preview);
+
+ NvParameterized::Interface* getDefaultActorDesc();
+ virtual Actor* createApexActor(const NvParameterized::Interface& /*parms*/, Scene& /*apexScene*/);
+
+ NvParameterized::Interface* getDefaultAssetPreviewDesc();
+ virtual AssetPreview* createApexAssetPreview(const NvParameterized::Interface& /*params*/, AssetPreviewScene* previewScene);
+
+ virtual bool isValidForActorCreation(const ::NvParameterized::Interface& /*parms*/, Scene& /*apexScene*/) const
+ {
+ return true; // todo implement this method
+ }
+
+ /* Typical asset members */
+ static const char* getClassName() // return to protected
+ {
+ return WIND_FS_AUTHORING_TYPE_NAME;
+ }
+
+protected:
+
+ static AuthObjTypeID mAssetTypeID;
+
+ WindFSAssetParams* mParams;
+ WindFSActorParams* mDefaultActorParams;
+ WindFSPreviewParams* mDefaultPreviewParams;
+
+ friend class ModuleBasicFSImpl;
+ friend class WindFSActorImpl;
+ friend class WindFSAssetPreview;
+ template <class T_Module, class T_Asset, class T_AssetAuthoring> friend class nvidia::apex::ApexAuthorableObject;
+
+};
+
+class WindFSAssetAuthoring : public WindFSAsset, public ApexAssetAuthoring, public BasicFSAssetAuthoring
+{
+public:
+ APEX_RW_LOCKABLE_BOILERPLATE
+
+ WindFSAssetAuthoring(ModuleBasicFSImpl* m, ResourceList& l) :
+ WindFSAsset(m, l, "WindFSAssetAuthoring") {}
+
+ WindFSAssetAuthoring(ModuleBasicFSImpl* m, ResourceList& l, const char* name) :
+ WindFSAsset(m, l, name) {}
+
+ WindFSAssetAuthoring(ModuleBasicFSImpl* m, ResourceList& l, NvParameterized::Interface* params, const char* name) :
+ WindFSAsset(m, l, params, name) {}
+
+ ~WindFSAssetAuthoring() {}
+ void destroy()
+ {
+ delete this;
+ }
+
+ /* AssetAuthoring */
+ const char* getName(void) const
+ {
+ return WindFSAsset::getName();
+ }
+ const char* getObjTypeName() const
+ {
+ return WindFSAsset::getClassName();
+ }
+ bool prepareForPlatform(nvidia::apex::PlatformTag)
+ {
+ APEX_INVALID_OPERATION("Not Implemented.");
+ return false;
+ }
+
+ void setToolString(const char* toolName, const char* toolVersion, uint32_t toolChangelist)
+ {
+ ApexAssetAuthoring::setToolString(toolName, toolVersion, toolChangelist);
+ }
+
+ /* ApexInterface */
+ virtual void release()
+ {
+ mModule->mSdk->releaseAssetAuthoring(*this);
+ }
+
+ NvParameterized::Interface* getNvParameterized() const
+ {
+ return WindFSAsset::getAssetNvParameterized();
+ }
+
+ NvParameterized::Interface* releaseAndReturnNvParameterizedInterface(void)
+ {
+ return WindFSAsset::releaseAndReturnNvParameterizedInterface();
+ }
+
+};
+
+}
+} // end namespace nvidia::apex
+
+#endif \ No newline at end of file