imesh/furmesh.h Source File (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

imesh/furmesh.h
Go to the documentation of this file.

    00001 /*
    00002   Copyright (C) 2010 Alexandru - Teodor Voicu
    00003       Faculty of Automatic Control and Computer Science of the "Politehnica"
    00004       University of Bucharest
    00005       http://csite.cs.pub.ro/index.php/en/
    00006
    00007   This library is free software; you can redistribute it and/or
    00008   modify it under the terms of the GNU Library General Public
    00009   License as published by the Free Software Foundation; either
    00010   version 2 of the License, or (at your option) any later version.
    00011
    00012   This library is distributed in the hope that it will be useful,
    00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
    00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    00015   Library General Public License for more details.
    00016
    00017   You should have received a copy of the GNU Library General Public
    00018   License along with this library; if not, write to the Free
    00019   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00020 */
    00021
    00022 #ifndef __FUR_INTERF_H__
    00023 #define __FUR_INTERF_H__
    00024
    00025 #include "csutil/scf.h"
    00026 #include "ivideo/rendermesh.h"
    00027
    00028 class csVector3;
    00029 struct iRigidBody;
    00030 struct iSector;
    00031 struct iTextureWrapper;
    00032 struct iView;
    00033
    00034 namespace CS {
    00035 namespace Physics {
    00036 namespace Bullet {
    00037 struct iDynamicSystem;
    00038 } // namespace Bullet
    00039 } // namespace Physics
    00040 } // namespace CS
    00041
    00042
    00047 namespace CS
    00048 {
    00049   namespace Mesh
    00050   {
    00051     struct iAnimatedMesh;
    00052     struct iAnimatedMeshFactory;
    00053     struct iAnimatedMeshSubMeshFactory;
    00054   } // namespace Mesh
    00055
    00056 namespace Animation {
    00057
    00061 struct iFurAnimationControl : public virtual iBase
    00062 {
    00063 public:
    00064   SCF_INTERFACE (CS::Animation::iFurAnimationControl, 1, 0, 0);
    00065
    00073   virtual void InitializeStrand (size_t strandID, csVector3* coordinates,
    00074     size_t coordinatesCount) = 0;
    00075
    00083   virtual void AnimateStrand (size_t strandID, csVector3* coordinates, size_t
    00084     coordinatesCount) const = 0;
    00085
    00090   virtual void RemoveStrand (size_t strandID) = 0;
    00091
    00095   virtual void RemoveAllStrands () = 0;
    00096 };
    00097
    00101 struct iFurPhysicsControl : public virtual iFurAnimationControl
    00102 {
    00103 public:
    00104   SCF_INTERFACE (CS::Animation::iFurPhysicsControl, 1, 0, 0);
    00105
    00109   virtual void SetAnimatedMesh (CS::Mesh::iAnimatedMesh* animesh) = 0;
    00110
    00114   virtual void SetRigidBody (iRigidBody* rigidBody) = 0;
    00115
    00119   virtual void SetBulletDynamicSystem (CS::Physics::Bullet::iDynamicSystem*
    00120     bulletDynamicSystem) = 0;
    00121 };
    00122
    00126 struct iFurAnimatedMeshControl : public virtual iFurAnimationControl
    00127 {
    00128 public:
    00129   SCF_INTERFACE (CS::Animation::iFurAnimatedMeshControl, 1, 0, 0);
    00130
    00134   virtual void SetAnimatedMesh (CS::Mesh::iAnimatedMesh* animesh) = 0;
    00135
    00139   virtual void SetDisplacement (float displacement) = 0;
    00140 };
    00141
    00142 } // namespace Animation
    00143 } // namespace CS
    00144
    00145 namespace CS {
    00146 namespace Mesh {
    00147
    00148 struct iFurMeshMaterialProperties;
    00149 struct iFurMeshFactory;
    00150 struct iFurMeshType;
    00151 struct iFurMesh;
    00152
    00156 struct iFurMeshState : public virtual iBase
    00157 {
    00158 public:
    00159   SCF_INTERFACE (CS::Mesh::iFurMeshState, 1, 0, 0);
    00160
    00164   virtual float GetStrandWidth () const = 0;
    00165
    00169   virtual void SetStrandWidth (float strandWidth) = 0;
    00170
    00174   virtual float GetDisplacement () const = 0;
    00175
    00179   virtual void SetDisplacement (float displacement) = 0;
    00180
    00184   virtual iTextureWrapper* GetDensityMap () const = 0;
    00185
    00189   virtual void SetDensityMap (iTextureWrapper* densityMap) = 0;
    00190
    00194   virtual float GetDensityFactorGuideFurs () const = 0;
    00195
    00199   virtual void SetDensityFactorGuideFurs (float densityFactorGuideFurs) = 0;
    00200
    00204   virtual float GetDensityFactorFurStrands () const = 0;
    00205
    00209   virtual void SetDensityFactorFurStrands (float densityFactorFurStrands) = 0;
    00210
    00214   virtual iTextureWrapper* GetHeightMap () const = 0;
    00215
    00219   virtual void SetHeightMap (iTextureWrapper* heightMap) = 0;
    00220
    00224   virtual float GetHeightFactor () const = 0;
    00225
    00229   virtual void SetHeightFactor (float heightFactor) = 0;
    00230
    00234   virtual uint GetAverageControlPointsCount () const = 0;
    00235
    00239   virtual void SetAverageControlPointsCount (uint averageControlPointsCount) = 0;
    00240
    00244   virtual float GetControlPointsDistance () const = 0;
    00245
    00249   virtual void SetControlPointsDistance (float controlPointsDistance) = 0;
    00250
    00254   virtual float GetThicknessVariation () const = 0;
    00255
    00259   virtual void SetThicknessVariation (float thicknessVariation) = 0;
    00260
    00264   virtual float GetPointiness () const = 0;
    00265
    00269   virtual void SetPointiness (float pointiness) = 0;
    00270
    00274   virtual float GetFurStrandDeviation () const = 0;
    00275
    00279   virtual void SetFurStrandDeviation (float furStrandDeviation) = 0;
    00280
    00284   virtual float GetControlPointsDeviation () const = 0;
    00285
    00289   virtual void SetControlPointsDeviation (float positionDeviation) = 0;
    00290
    00294   virtual bool GetGrowTangent () const = 0;
    00295
    00299   virtual void SetGrowTangent (bool growTangent) = 0;
    00300
    00304   virtual bool GetSmallFur () const = 0;
    00305
    00309   virtual void SetSmallFur (bool smallFur) = 0;
    00310
    00314   virtual uint GetMixmode () const = 0;
    00315
    00319   virtual void SetMixmode (uint mode) = 0;
    00320
    00324   virtual CS::Graphics::RenderPriority GetRenderPriority () const = 0;
    00325
    00329   virtual void SetRenderPriority (CS::Graphics::RenderPriority priority) = 0;
    00330
    00334   virtual csZBufMode GetZBufMode () const = 0;
    00335
    00339   virtual void SetZBufMode (csZBufMode z_buf_mode) = 0;
    00340 };
    00341
    00346 struct iFurMeshMaterialProperties : public virtual iBase
    00347 {
    00348 public:
    00349   SCF_INTERFACE (CS::Mesh::iFurMeshMaterialProperties, 1, 0, 0);
    00350
    00354   virtual iMaterial* GetMaterial () const = 0;
    00355
    00359   virtual void SetMaterial (iMaterial* material) = 0;
    00360
    00364   virtual void Invalidate () = 0;
    00365
    00369   virtual void Update () = 0;
    00370 };
    00371
    00381 struct iFurMeshFactory : public virtual iBase
    00382 {
    00383 public:
    00384   SCF_INTERFACE (CS::Mesh::iFurMeshFactory, 1, 0, 0);
    00385 };
    00386
    00391 struct iFurMeshType : public virtual iBase
    00392 {
    00393 public:
    00394   SCF_INTERFACE (CS::Mesh::iFurMeshType, 1, 0, 0);
    00395
    00400   virtual iFurMeshMaterialProperties*
    00401     CreateFurMeshBasicProperties (const char* name) = 0;
    00402
    00406   virtual iFurMeshMaterialProperties*
    00407     CreateHairMeshMarschnerProperties (const char* name) = 0;
    00408
    00412   virtual iFurMeshMaterialProperties*
    00413     FindFurMeshMaterialProperites (const char* name) const = 0;
    00414
    00418   virtual void RemoveFurMeshMaterialProperites (const char* name) = 0;
    00419
    00423   virtual void ClearFurMeshMaterialProperites () = 0;
    00424
    00428   virtual CS::Animation::iFurAnimationControl* CreateFurPhysicsControl
    00429     (const char* name) = 0;
    00430
    00434   virtual CS::Animation::iFurAnimationControl* CreateFurAnimatedMeshControl
    00435     (const char* name) = 0;
    00436
    00440   virtual CS::Animation::iFurAnimationControl* FindFurAnimationControl
    00441     (const char* name) const = 0;
    00442
    00446   virtual void RemoveFurAnimationControl (const char* name) = 0;
    00447
    00451   virtual void ClearFurAnimationControls () = 0;
    00452 };
    00453
    00457 struct iFurMesh : public virtual iBase
    00458 {
    00459   SCF_INTERFACE (CS::Mesh::iFurMesh, 1, 0, 0);
    00460
    00465   virtual void GenerateGeometry (iView* view, iSector* room) = 0;
    00466
    00471   virtual void SetGuideLOD (float guideLOD) = 0;
    00472
    00477   virtual void SetStrandLOD (float strandLOD) = 0;
    00478
    00483   virtual void SetControlPointsLOD(float controlPointsLOD) = 0;
    00484
    00489   virtual void SetLOD (float lod) = 0;
    00490
    00494   virtual void SetAnimatedMesh (CS::Mesh::iAnimatedMesh* animesh) = 0;
    00495
    00499   virtual void SetAnimationControl (CS::Animation::iFurAnimationControl* physicsControl) = 0;
    00500
    00506   virtual void StartAnimationControl () = 0;
    00507
    00513   virtual void StopAnimationControl () = 0;
    00514
    00518   virtual void EnableMesh () = 0;
    00519
    00525   virtual void ResetMesh () = 0;
    00526
    00530   virtual void DisableMesh () = 0;
    00531
    00535   virtual void SetFurMeshProperties (iFurMeshMaterialProperties* furMeshProperties) = 0;
    00536
    00541   virtual iFurMeshMaterialProperties* GetFurMeshProperties () const = 0;
    00542
    00546   virtual void SetMeshFactory (CS::Mesh::iAnimatedMeshFactory* meshFactory) = 0;
    00547
    00551   virtual void SetMeshFactorySubMesh (CS::Mesh::iAnimatedMeshSubMeshFactory*
    00552     meshFactorySubMesh) = 0;
    00553 };
    00554
    00555
    00560 } // namespace Mesh
    00561 } // namespace CS
    00562
    00563 #endif // __FUR_INTERF_H__