This file is indexed.

/usr/include/crystalspace-2.0/imesh/furmesh.h is in libcrystalspace-dev 2.0+dfsg-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
/*
  Copyright (C) 2010 Alexandru - Teodor Voicu
      Faculty of Automatic Control and Computer Science of the "Politehnica"
      University of Bucharest
      http://csite.cs.pub.ro/index.php/en/

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Library General Public
  License as published by the Free Software Foundation; either
  version 2 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  Library General Public License for more details.

  You should have received a copy of the GNU Library General Public
  License along with this library; if not, write to the Free
  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#ifndef __FUR_INTERF_H__
#define __FUR_INTERF_H__

#include "csutil/scf.h"
#include "ivideo/rendermesh.h"

class csVector3;
struct iRigidBody;
struct iSector;
struct iTextureWrapper;
struct iView;

namespace CS {
namespace Physics {
namespace Bullet {
struct iDynamicSystem;
} // namespace Bullet
} // namespace Physics
} // namespace CS


/**\file
 * Fur mesh interface files
 */

namespace CS
{
  namespace Mesh
  {
    struct iAnimatedMesh;
    struct iAnimatedMeshFactory;
    struct iAnimatedMeshSubMeshFactory;
  } // namespace Mesh
  
namespace Animation {

/**
 * Simple Animation Controller
 */
struct iFurAnimationControl : public virtual iBase
{
public:
  SCF_INTERFACE (CS::Animation::iFurAnimationControl, 1, 0, 0);

  /**
   * Initialize the fur strand with the given ID
   * \param strandID unique ID for the fur strand
   * \param coordinates C/C++ array of Vector3 representing the initial 
   * positions of the control points
   * \param coordinatesCount the number of control points 
   */
  virtual void InitializeStrand (size_t strandID, csVector3* coordinates,
    size_t coordinatesCount) = 0;

  /**
   * Animate the fur strand with the given ID
   * \param strandID unique ID for the fur strand
   * \param coordinates C/C++ array of Vector3 representing the initial 
   * positions of the control points
   * \param coordinatesCount the number of control points 
   */
  virtual void AnimateStrand (size_t strandID, csVector3* coordinates, size_t
    coordinatesCount) const = 0;

  /**
   * Remove the fur strand with the given ID
   * \param strandID unique ID for the fur strand
   */
  virtual void RemoveStrand (size_t strandID) = 0;

  /**
   * Remove all fur strands
   */
  virtual void RemoveAllStrands () = 0;
};

/**
 * Controller that updates the iFurMesh's geometry
 */
struct iFurPhysicsControl : public virtual iFurAnimationControl
{
public:
  SCF_INTERFACE (CS::Animation::iFurPhysicsControl, 1, 0, 0);

  /**
   * Set the animesh on which the iFurMesh is attached
   */
  virtual void SetAnimatedMesh (CS::Mesh::iAnimatedMesh* animesh) = 0;

  /**
   * Set the rigid body on which the iFurMesh is attached
   */
  virtual void SetRigidBody (iRigidBody* rigidBody) = 0;

  /**
   * Set the iDynamicSystem (optional)
   */
  virtual void SetBulletDynamicSystem (CS::Physics::Bullet::iDynamicSystem* 
    bulletDynamicSystem) = 0;
};

/**
 * Animation controller for animated mesh
 */
struct iFurAnimatedMeshControl : public virtual iFurAnimationControl
{
public:
  SCF_INTERFACE (CS::Animation::iFurAnimatedMeshControl, 1, 0, 0);

  /**
   * Set the animesh on which the iFurMesh is attached
   */
  virtual void SetAnimatedMesh (CS::Mesh::iAnimatedMesh* animesh) = 0;

  /**
   * Set displacement between fur and base mesh
   */
  virtual void SetDisplacement (float displacement) = 0;
};

} // namespace Animation
} // namespace CS

namespace CS {
namespace Mesh {

struct iFurMeshMaterialProperties;
struct iFurMeshFactory;
struct iFurMeshType;
struct iFurMesh;

/**
 * Access to the properties used for the iFurMesh.
 */
struct iFurMeshState : public virtual iBase
{
public:
  SCF_INTERFACE (CS::Mesh::iFurMeshState, 1, 0, 0);

  /**
   * Get the width of a strand
   */
  virtual float GetStrandWidth () const = 0;

  /**
   * Set the width of a strand
   */
  virtual void SetStrandWidth (float strandWidth) = 0;

  /**
   * Get the displacement between the fur mesh and the base mesh
   */
  virtual float GetDisplacement () const = 0;

  /**
   * Set the displacement between the fur mesh and the base mesh
   */
  virtual void SetDisplacement (float displacement) = 0;

  /**
   * Get the density map texture
   */
  virtual iTextureWrapper* GetDensityMap () const = 0;

  /**
   * Set the density map texture
   */
  virtual void SetDensityMap (iTextureWrapper* densityMap) = 0;

  /**
   * Get the density factor for guide furs
   */
  virtual float GetDensityFactorGuideFurs () const = 0;

  /**
   * Set the density factor for guide furs
   */
  virtual void SetDensityFactorGuideFurs (float densityFactorGuideFurs) = 0;

  /**
   * Get the density factor for fur strands
   */
  virtual float GetDensityFactorFurStrands () const = 0;

  /**
   * Set the density factor for fur strands
   */
  virtual void SetDensityFactorFurStrands (float densityFactorFurStrands) = 0;

  /**
   * Get the heightmap map texture
   */
  virtual iTextureWrapper* GetHeightMap () const = 0;

  /**
   * Set the heightmap map texture
   */
  virtual void SetHeightMap (iTextureWrapper* heightMap) = 0;

  /**
   * Get the height factor (for guide furs)
   */
  virtual float GetHeightFactor () const = 0;

  /**
   * Set the height factor (for guide furs)
   */
  virtual void SetHeightFactor (float heightFactor) = 0;

  /**
   * Get the average number of control points per fur strand
   */
  virtual uint GetAverageControlPointsCount () const = 0;

  /**
   * Set the average number of control points per fur strand
   */
  virtual void SetAverageControlPointsCount (uint averageControlPointsCount) = 0;

  /**
   * Get the distance between control points on a fur
   */
  virtual float GetControlPointsDistance () const = 0;

  /**
   * Set the distance between control points on a fur
   */
  virtual void SetControlPointsDistance (float controlPointsDistance) = 0;

  /**
   * Get the fur strand thickness variation
   */
  virtual float GetThicknessVariation () const = 0;

  /**
   * Set the fur strand thickness variation
   */
  virtual void SetThicknessVariation (float thicknessVariation) = 0;

  /**
   * Get the pointiness of a fur strand
   */
  virtual float GetPointiness () const = 0;

  /**
   * Set the pointiness of a fur strand
   */
  virtual void SetPointiness (float pointiness) = 0;

  /**
   * Get the fur strand position deviation
   */
  virtual float GetFurStrandDeviation () const = 0;

  /**
   * Set the fur strand position deviation
   */
  virtual void SetFurStrandDeviation (float furStrandDeviation) = 0;

  /**
   * Get the control points position deviation
   */
  virtual float GetControlPointsDeviation () const = 0;

  /**
   * Set the control points position deviation
   */
  virtual void SetControlPointsDeviation (float positionDeviation) = 0;

  /**
   * Check if fur grows based on tangent direction
   */
  virtual bool GetGrowTangent () const = 0;

  /**
   * Set if fur grows based on tangent direction
   */
  virtual void SetGrowTangent (bool growTangent) = 0;

  /**
   * Check if we grow small fur (tangents are reversed with normals)
   */
  virtual bool GetSmallFur () const = 0;

  /**
   * Set if fur grows based on tangent direction
   */
  virtual void SetSmallFur (bool smallFur) = 0;

  /**
   * Get mixmode
   */
  virtual uint GetMixmode () const = 0;

  /**
   * Set mixmode
   */
  virtual void SetMixmode (uint mode) = 0;

  /**
   * Get render priority
   */
  virtual CS::Graphics::RenderPriority GetRenderPriority () const = 0;

  /**
   * Set render priority
   */
  virtual void SetRenderPriority (CS::Graphics::RenderPriority priority) = 0;

  /**
   * Get Z-buffer
   */
  virtual csZBufMode GetZBufMode () const = 0;

  /**
   * Set Z-buffer
   */
  virtual void SetZBufMode (csZBufMode z_buf_mode) = 0;
};

/**
 * Store the material used for the iFurMesh.
 * Material variables can be updated each frame via the Update function.
 */
struct iFurMeshMaterialProperties : public virtual iBase
{
public:
  SCF_INTERFACE (CS::Mesh::iFurMeshMaterialProperties, 1, 0, 0);

  /**
   * Get the material used
   */
  virtual iMaterial* GetMaterial () const = 0;

  /**
   * Set the material used. Can be created externally from an XML
   */
  virtual void SetMaterial (iMaterial* material) = 0;

  /**
   * Update the material data after modifying the material variables
   */
  virtual void Invalidate () = 0;

  /**
   * Called each frame. New material variables values can be send to the shader
   */
  virtual void Update () = 0;
};

/**\addtogroup meshplugins
 * @{ */

/**\name Fur mesh
 * @{ */

/**
 * State of a fur mesh object factory
 */
struct iFurMeshFactory : public virtual iBase
{
public:
  SCF_INTERFACE (CS::Mesh::iFurMeshFactory, 1, 0, 0);
};

/**
 * This plugin describes a specific type of fur mesh objects.
 * All methods are inherited from iMeshObjectType
 */
struct iFurMeshType : public virtual iBase
{
public:
  SCF_INTERFACE (CS::Mesh::iFurMeshType, 1, 0, 0);

  /**
   * Create a FurMeshBasicProperties using a cons char * as unique ID.
   * This iFurMeshMaterialProperties only defines set and get material
   */
  virtual iFurMeshMaterialProperties* 
    CreateFurMeshBasicProperties (const char* name) = 0;

  /**
   * Create a HairMeshMarschnerProperties using a cons char * as unique ID
   */
  virtual iFurMeshMaterialProperties* 
    CreateHairMeshMarschnerProperties (const char* name) = 0;

  /**
   * Find iFurMeshMaterialProperties with ID name or return 0 otherwise.
   */
  virtual iFurMeshMaterialProperties* 
    FindFurMeshMaterialProperites (const char* name) const = 0;

  /**
   * Remove iFurMeshMaterialProperties with ID name if exists.
   */
  virtual void RemoveFurMeshMaterialProperites (const char* name) = 0;

  /**
   * Remove all iFurMeshMaterialProperties.
   */
  virtual void ClearFurMeshMaterialProperites () = 0;

  /**
   * Create a CS::Animation::FurPhysicsControl using a cons char * as unique ID
   */
  virtual CS::Animation::iFurAnimationControl* CreateFurPhysicsControl
    (const char* name) = 0;

  /**
   * Create a FurAnimatedMeshControl using a cons char * as unique ID
   */
  virtual CS::Animation::iFurAnimationControl* CreateFurAnimatedMeshControl
    (const char* name) = 0;

  /**
   * Find iFurAnimationControl with ID name or return 0 otherwise.
   */
  virtual CS::Animation::iFurAnimationControl* FindFurAnimationControl
    (const char* name) const = 0;

  /**
   * Remove iFurAnimationControl with ID name if exists.
   */
  virtual void RemoveFurAnimationControl (const char* name) = 0;

  /**
   * Remove all iFurAnimationControls.
   */
  virtual void ClearFurAnimationControls () = 0;
};

/**
 * State and setting for an instance of a fur mesh
 */
struct iFurMesh : public virtual iBase  
{
  SCF_INTERFACE (CS::Mesh::iFurMesh, 1, 0, 0);

  /**
   * Generates the geometry for the current instance of a fur mesh.
   * The associated iFurMeshFactory is created by this function
   */
  virtual void GenerateGeometry (iView* view, iSector* room) = 0;

  /**
   * Set the LOD for the guide fur. 
   * Pure guide fur is updated via the associated iFurPhysicsControl
   */
  virtual void SetGuideLOD (float guideLOD) = 0; 

  /**
   * Set the LOD for the fur strands. 
   * Fur strands are the rendered geometry.
   */
  virtual void SetStrandLOD (float strandLOD) = 0;

  /**
   * Set the LOD for the control points. 
   * It only has three level from 0 to 1.
   */
  virtual void SetControlPointsLOD(float controlPointsLOD) = 0;

  /**
   * Set the overall LOD. Equivalent to calling SetGuidLOD and SetStrandLOD 
   * with the same parameter.
   */
  virtual void SetLOD (float lod) = 0;

  /**
   * Set the animesh
   */
  virtual void SetAnimatedMesh (CS::Mesh::iAnimatedMesh* animesh) = 0;

  /**
   * Set the associated CS::Animation::iFurAnimationControl
   */
  virtual void SetAnimationControl (CS::Animation::iFurAnimationControl* physicsControl) = 0;
  
  /**
   * Start the associated CS::Animation::iFurAnimationControl. 
   * Pure guide furs will be synchronized with the
   * CS::Animation::iFurAnimationControl every frame
   */
  virtual void StartAnimationControl () = 0;

  /**
   * Stop the associated iFurAnimationControl. 
   * Pure guide furs will stop being synchronized with the
   * CS::Animation::iFurAnimationControl
   */
  virtual void StopAnimationControl () = 0;
 
  /**
   * Enable the fur mesh (by default the fur mesh is enabled)
   */
  virtual void EnableMesh () = 0;

  /**
   * Reset the position of the mesh on the base mesh.
   * Pure guide furs will stop and start being synchronized with
   * CS::Animation::iFurAnimationControl
   */
  virtual void ResetMesh () = 0;

  /**
   * Disable the fur mesh (used for small fur when camera is at a certain distance)
   */
  virtual void DisableMesh () = 0;

  /**
   * Set the associated iFurMeshMaterialProperties
   */
  virtual void SetFurMeshProperties (iFurMeshMaterialProperties* furMeshProperties) = 0;

  /**
   * Get the associated iFurMeshMaterialProperties.
   * Shader variables can be obtained via the material of the iFurMeshMaterialProperties
   */
  virtual iFurMeshMaterialProperties* GetFurMeshProperties () const = 0;

  /**
   * Set an iAnimatedMeshFactory corresponding to the iAnimatedMeshSubMeshFactory
   */
  virtual void SetMeshFactory (CS::Mesh::iAnimatedMeshFactory* meshFactory) = 0;

  /**
   * Set iAnimatedMeshSubMeshFactory on which fur will grow
   */
  virtual void SetMeshFactorySubMesh (CS::Mesh::iAnimatedMeshSubMeshFactory* 
    meshFactorySubMesh) = 0;
};


/** @} */

/** @} */

} // namespace Mesh
} // namespace CS

#endif // __FUR_INTERF_H__