⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 icezcbbreaker.h

📁 使用stl技术,(还没看,是听说的)
💻 H
📖 第 1 页 / 共 2 页
字号:
				Point				mBSCenter;					//!< Bounding sphere center
				float				mBSRadius;					//!< Bounding sphere radius
		// Possible volume integrals
				Point				mCOM;						//!< Center Of Mass
				float				mComputedMass;				//!< Total mass
				float				mInertiaTensor[3][3];		//!< Inertia tensor (mass matrix) relative to the origin
				float				mCOMInertiaTensor[3][3];	//!< Inertia tensor (mass matrix) relative to the COM
		// Winding order
				bool				mParity;					//!< Faces are CW or CCW.
	};

	class ICERENDERMANAGER_API ZCBPrimitiveParams
	{
		public:
		// Constructor / Destructor
									ZCBPrimitiveParams() : mType(ZCB_PRIM_UNDEFINED)	{}
		virtual						~ZCBPrimitiveParams()								{}

				ZCBPrimitiveType	mType;
	};

	class ICERENDERMANAGER_API ZCBBoxParams : public ZCBPrimitiveParams
	{
		public:
		// Constructor / Destructor
									ZCBBoxParams()	{ mType = ZCB_PRIM_BOX;	}
		virtual						~ZCBBoxParams()	{}

				float				mLength;
				float				mWidth;
				float				mHeight;
				int					mWSegs;
				int					mLSegs;
				int					mHSegs;
				BOOL				mGenUVS;
	};

	class ICERENDERMANAGER_API ZCBSphereParams : public ZCBPrimitiveParams
	{
		public:
		// Constructor / Destructor
									ZCBSphereParams()	{ mType = ZCB_PRIM_SPHERE;	}
		virtual						~ZCBSphereParams()	{}

				float				mRadius;
				int					mSegments;
				BOOL				mSmooth;
				float				mHemisphere;
				BOOL				mSquash;	// else Chop
				float				mSliceFrom;
				float				mSliceTo;
				BOOL				mSliceOn;
				BOOL				mRecenter;	// Base to pivot
				BOOL				mGenUVS;
	};

	class ICERENDERMANAGER_API ZCBGeosphereParams : public ZCBPrimitiveParams
	{
		public:
		// Constructor / Destructor
									ZCBGeosphereParams()	{ mType = ZCB_PRIM_GEOSPHERE;	}
		virtual						~ZCBGeosphereParams()	{}

				float				mRadius;
				int					mSegments;
				int					mGenType;	// Between 0 & 2
				BOOL				mHemisphere;
				BOOL				mSmooth;
				BOOL				mRecenter;
				BOOL				mGenUVS;
	};

	class ICERENDERMANAGER_API ZCBCylinderParams : public ZCBPrimitiveParams
	{
		public:
		// Constructor / Destructor
									ZCBCylinderParams()		{ mType = ZCB_PRIM_CYLINDER;	}
		virtual						~ZCBCylinderParams()	{}

				float				mRadius;
				float				mHeight;
				int					mHSegs;
				int					mCapSegs;
				int					mSides;
				BOOL				mSmooth;
				BOOL				mSliceOn;
				float				mSliceFrom;
				float				mSliceTo;
				BOOL				mGenUVS;
	};

	class ICERENDERMANAGER_API ZCBConeParams : public ZCBPrimitiveParams
	{
		public:
		// Constructor / Destructor
									ZCBConeParams()		{ mType = ZCB_PRIM_CONE;	}
		virtual						~ZCBConeParams()	{}

				float				mRadius1;
				float				mRadius2;
				float				mHeight;
				int					mHSegs;
				int					mCapSegs;
				int					mSides;
				BOOL				mSmooth;
				BOOL				mSliceOn;
				float				mSliceFrom;
				float				mSliceTo;
				BOOL				mGenUVS;
	};

	class ICERENDERMANAGER_API ZCBTorusParams : public ZCBPrimitiveParams
	{
		public:
		// Constructor / Destructor
									ZCBTorusParams()	{ mType = ZCB_PRIM_TORUS;	}
		virtual						~ZCBTorusParams()	{}

				float				mRadius1;
				float				mRadius2;
				float				mRotation;
				float				mTwist;
				int					mSegments;
				int					mSides;
				BOOL				mSmooth;
				BOOL				mSliceOn;
				float				mSliceFrom;
				float				mSliceTo;
				BOOL				mGenUVS;
	};

	class ICERENDERMANAGER_API ZCBTubeParams : public ZCBPrimitiveParams
	{
		public:
		// Constructor / Destructor
									ZCBTubeParams()		{ mType = ZCB_PRIM_TUBE;	}
		virtual						~ZCBTubeParams()	{}

				float				mRadius1;
				float				mRadius2;
				float				mHeight;
				int					mSegments;
				int					mCapSegs;
				int					mSides;
				BOOL				mSmooth;
				BOOL				mSliceOn;
				float				mSliceFrom;
				float				mSliceTo;
				BOOL				mGenUVS;
	};

	class ICERENDERMANAGER_API ZCBTeapotParams : public ZCBPrimitiveParams
	{
		public:
		// Constructor / Destructor
									ZCBTeapotParams()	{ mType = ZCB_PRIM_TEAPOT;	}
		virtual						~ZCBTeapotParams()	{}
		// Not implemented
	};

	class ICERENDERMANAGER_API ZCBPlaneParams : public ZCBPrimitiveParams
	{
		public:
		// Constructor / Destructor
									ZCBPlaneParams()	{ mType = ZCB_PRIM_PLANE;	}
		virtual						~ZCBPlaneParams()	{}

				float				mLength;
				float				mWidth;
				int					mWidthSegs;
				int					mLengthSegs;
				float				mDensity;
				float				mScale;
				BOOL				mGenUVS;
	};

	class ICERENDERMANAGER_API ZCBHedraParams : public ZCBPrimitiveParams
	{
		public:
		// Constructor / Destructor
									ZCBHedraParams()	{ mType = ZCB_PRIM_HEDRA;	}
		virtual						~ZCBHedraParams()	{}

				float				mRadius;
				int					mFamily;
				float				mP;
				float				mQ;
				float				mScaleP;
				float				mScaleQ;
				float				mScaleR;
				int					mVertices;
				BOOL				mGenUVS;
	};

	class ICERENDERMANAGER_API ZCBCapsuleParams : public ZCBPrimitiveParams
	{
		public:
		// Constructor / Destructor
									ZCBCapsuleParams()	{ mType = ZCB_PRIM_CAPSULE;	}
		virtual						~ZCBCapsuleParams()	{}

				float				mRadius;
				float				mHeight;
				int					mCenters;
				int					mSides;
				int					mHSegs;
				BOOL				mSmooth;
				BOOL				mSliceOn;
				float				mSliceFrom;
				float				mSliceTo;
				BOOL				mGenUVS;
	};

	class ICERENDERMANAGER_API ZCBMeshInfo : public ZCBBaseInfo, public ZCBNativeMeshInfo
	{
		public:
		// Constructor/Destructor
									ZCBMeshInfo();
		virtual						~ZCBMeshInfo();

		// Parameters
				bool				mIsCollapsed;		//!< true => mesh comes from a collapsed modifier stack
				bool				mIsSkeleton;		//!< true => mesh is a BIPED part (i.e. a bone)
				bool				mIsInstance;		//!< true => mesh is an instance from another mesh
				bool				mIsTarget;			//!< true => mesh is a target node (camera, spot or directional target)
				bool				mIsConvertible;		//!< false => mesh can't be converted to triangles (and the native format is unsupported)
				bool				mIsSkin;			//!< true => the mesh is a PHYSIQUE skin
				bool				mCastShadows;		//!< true => a shadow volume can be built from the mesh
				bool				mReceiveShadows;	//!< true => mesh can receive shadows
				bool				mMotionBlur;		//!< true => mesh should be motion blured

		// Biped-related information (valid if mIsSkeleton==true)
				udword				mCharID;			//!< Owner character's ID
				udword				mCSID;				//!< CSID code.
		// Mesh data
				MBResult*			mCleanMesh;			//!< Mesh after consolidation
		// Lightmapper data
				udword				mNbColors;			//!< Number of computed colors
				Point*				mColors;			//!< Computed colors
		// Primitive data
				ZCBPrimitiveParams*	mPrimParams;
	};

	class ICERENDERMANAGER_API ZCBShapeInfo : public ZCBBaseInfo
	{
		public:
		// Constructor/Destructor
									ZCBShapeInfo();
		virtual						~ZCBShapeInfo();

				ZCBShapeType		mType;					//!< Type of shape
		// Shape parameters
				udword				mNbLines;				//!< Number of polylines
				udword*				mNbVerts;				//!< Number of vertices for each polyline
				bool*				mClosed;				//!< Closed/open polylines
				Point*				mVerts;					//!< List of vertices
				udword				mTotalNbVerts;			//!< Total number of vertices in the list (=sum of all mNbVerts)
				sdword				mMatID;					//!< Shape's material ID
	};

	class ICERENDERMANAGER_API ZCBHelperInfo : public ZCBBaseInfo
	{
		public:
		// Constructor/Destructor
									ZCBHelperInfo();
		virtual						~ZCBHelperInfo();

		// Helper parameters
				ZCBHelperType		mHelperType;		//!< Type of helper
				bool				mIsGroupHead;		//!< True for group heads
				float				mLength;			//!< For BoxGizmo
				float				mWidth;				//!< For BoxGizmo
				float				mHeight;			//!< For BoxGizmo/CylinderGizmo
				float				mRadius;			//!< For CylinderGizmo/SphereGizmo
				bool				mHemi;				//!< For SphereGizmo
				Container			mGroupedObjects;	//!< IDs of grouped objects [not available in old files, so use mIsGroupHead instead]
	};

	class ICERENDERMANAGER_API ZCBControllerInfo
	{
		public:
		// Constructor/Destructor
									ZCBControllerInfo();
		virtual						~ZCBControllerInfo();

				String				mField;					//!< Controlled field
				sdword				mObjectID;				//!< Controller's ID
				sdword				mOwnerID;				//!< Owner object's ID
				ZCBObjType			mOwnerType;				//!< Owner object's type

				ZCBCtrlType			mCtrlType;				//!< Controlled type (float, quat, etc)
				ZCBCtrlMode			mCtrlMode;				//!< Controller mode (sampling, keyframes, etc)

		// Sampling-related values
				udword				mNbSamples;				//!< Number of samples
				udword				mSamplingRate;			//!< Sampling rate
				void*				mSamples;				//!< Sampled data
				udword				mNbVertices;			//!< Number of vertices for morph controllers
	};

	class ICERENDERMANAGER_API ZCBMotionInfo
	{
		public:
		// Constructor/Destructor
									ZCBMotionInfo()		{}
		virtual						~ZCBMotionInfo()	{}

				String				mName;				//!< Motion's name
				String				mType;				//!< Motion's type
				udword				mCharID;			//!< Owner's character ID
				udword				mNbBones;			//!< Number of bones involved
				udword				mNbVBones;			//!< Number of virtual bones involved
				void*				mData;				//!< Motion data
				bool				mLocalPRS;			//!< True for relative PRS
				bool				mD3DCompliant;		//!< True if converted to D3D frame
	};

	class ICERENDERMANAGER_API ZCBBreaker : public ZCBComponents
	{
		public:
		// Constructor / Destructor
									ZCBBreaker();
		virtual						~ZCBBreaker();

		// Import method
		virtual	bool				Import(const String& filename);

		// Application-dependent import methods, called by the importer
		virtual	bool				NewScene				(const ZCBSceneInfo& scene)				= 0;
		virtual	bool				NewCamera				(const ZCBCameraInfo& camera)			= 0;
		virtual	bool				NewLight				(const ZCBLightInfo& light)				= 0;
		virtual	bool				NewMaterial				(const ZCBMaterialInfo& material)		= 0;
		virtual	bool				NewTexture				(const ZCBTextureInfo& texture)			= 0;
		virtual	bool				NewMesh					(const ZCBMeshInfo& mesh)				= 0;
		virtual	bool				NewShape				(const ZCBShapeInfo& shape)				= 0;
		virtual	bool				NewHelper				(const ZCBHelperInfo& helper)			= 0;
		virtual	bool				NewController			(const ZCBControllerInfo& controller)	= 0;
		virtual	bool				NewMotion				(const ZCBMotionInfo& motion)			= 0;

		// Application-dependent error handler
		virtual	bool				ZCBImportError			(const char* error_text, udword error_code)	= 0;

		// Application-dependent log method
		virtual	void				ZCBLog					(LPSTR fmt, ...)							= 0;

		// Free used memory
				void				ReleaseRam();
		protected:
				ZCBFile				mFileType;
				CustomArray*		mImportArray;
		private:
				udword				mZCBGlobalVersion;
				udword				mMAINVersion;
				udword				mMOVEVersion;
				udword				mCAMSVersion;
				udword				mLITEVersion;
				udword				mMATLVersion;
				udword				mTEXMVersion;
				udword				mMESHVersion;
				udword				mCTRLVersion;
				udword				mSHAPVersion;
				udword				mHELPVersion;

				bool				Import();

				bool				ImportCameras			(CustomArray& importer);
				bool				ImportLights			(CustomArray& importer);
				bool				ImportMaterials			(CustomArray& importer);
				bool				ImportTextures			(CustomArray& importer);
				bool				ImportMeshes			(CustomArray& importer);
				bool				ImportShapes			(CustomArray& importer);
				bool				ImportHelpers			(CustomArray& importer);
				bool				ImportControllers		(CustomArray& importer);
				bool				ImportMotion			(CustomArray& importer);

				bool				ImportVertices			(ZCBMeshInfo& curmesh, CustomArray& importer);
				bool				ImportSkinData			(ZCBMeshInfo& curmesh, CustomArray& importer);
				bool				ImportTextureVertices	(ZCBMeshInfo& curmesh, CustomArray& importer);
				bool				ImportVertexColors		(ZCBMeshInfo& curmesh, CustomArray& importer);
				bool				ImportFaces				(ZCBMeshInfo& curmesh, CustomArray& importer);
				bool				ImportExtraStuff		(ZCBMeshInfo& curmesh, CustomArray& importer);
				bool				ImportConsolidated		(ZCBMeshInfo& curmesh, CustomArray& importer);
				bool				ImportLightingData		(ZCBMeshInfo& curmesh, CustomArray& importer);

				bool				ImportCroppingValues	(TextureCrop& cvalues, TextureMatrix& tmtx, CustomArray& importer, bool& wrap_u, bool& mirror_u, bool& wrap_v, bool& mirror_v);
	};

#endif // __ICEZCBBREAKER_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -