/usr/include/crystalspace-2.0/imesh/protomesh.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 | /*
Copyright (C) 2004 by Jorrit Tyberghein
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 __CS_IMESH_PROTOMESH_H__
#define __CS_IMESH_PROTOMESH_H__
/**\file
* Tutorial mesh object
*/
#include "csutil/scf.h"
/**\addtogroup meshplugins
* @{ */
class csVector3;
class csVector2;
class csColor;
struct csTriangle;
struct iMaterialWrapper;
/**
* The proto mesh is a demonstration or tutorial mesh. It is
* very simple and really unusable in games but it is a very good
* start to make a new mesh object.
*
* The proto mesh supports:
* - Primitive geometry (8 vertices, 12 triangles, just enough for a box).
* - Setting of base color and per vertex color.
* - Setting of vertices, texels, and normals.
* - Material per mesh object.
* - Sharing geometry in the factory.
* - Collision detection.
* - Direct creation of render buffers.
* - Delayed creation of render buffers.
*
* The general API for the proto factory. Here you define the
* actual geometry which is shared between all proto mesh instances.
*
* Main creators of instances implementing this interface:
* - Protomesh mesh object plugin (crystalspace.mesh.object.protomesh)
* - iMeshObjectType::NewFactory()
*
* Main ways to get pointers to this interface:
* - scfQueryInterface() on iMeshFactoryWrapper::GetMeshObjectFactory()
*
* Main users of this interface:
* - Protomesh Factory Loader plugin
(crystalspace.mesh.loader.factory.protomesh)
*
*/
struct iProtoFactoryState : public virtual iBase
{
SCF_INTERFACE (iProtoFactoryState, 2, 0, 0);
/**
* Get the array of vertices. It is legal to modify the vertices
* in this array. The number of vertices in this array is guaranteed
* to be equal to 8.
*/
virtual csVector3* GetVertices () = 0;
/**
* Get the array of texels. It is legal to modify the texels in this
* array. The number of texels in this array is guaranteed to
* be equal to 8.
*/
virtual csVector2* GetTexels () = 0;
/**
* Get the array of normals. It is legal to modify the normals in this
* array. The number of normals in this array is guaranteed to
* be equal to 8.
*/
virtual csVector3* GetNormals () = 0;
/**
* Get the array of colors. It is legal to modify the colors in this
* array. The number of colors in this array is guaranteed to
* be equal to 8.
*/
virtual csColor* GetColors () = 0;
/**
* Get the array of triangles. It is legal to modify the triangles in this
* array. The number of triangles in this array is guaranteed to
* be equal to 12.
*/
virtual csTriangle* GetTriangles () = 0;
/**
* After making a significant change to the vertices or triangles you
* probably want to let this object recalculate the bounding boxes
* and such. This function will invalidate the internal data structures
* so that they are recomputed.
*/
virtual void Invalidate () = 0;
};
/**
* This interface describes the API for the proto mesh object.
*
* Main creators of instances implementing this interface:
* - Proto mesh object plugin (crystalspace.mesh.object.protomesh)
* - iMeshObjectFactory::NewInstance()
*
* Main ways to get pointers to this interface:
* - scfQueryInterface() on iMeshWrapper::GetMeshObject()
*
* Main users of this interface:
* - Protomesh Loader plugin (crystalspace.mesh.loader.protomesh)
*
*/
struct iProtoMeshState : public virtual iBase
{
SCF_INTERFACE (iProtoMeshState, 1, 0, 0);
/**
* Set mesh-specific fuzz factor.
* \remarks This method is purely present for illustrational purposes and
* has, in fact, no effect on the actual mesh.
*/
virtual void SetFuzzFactor (float factor) = 0;
/**
* Get mesh-specific fuzz factor.
* \remarks This method is purely present for illustrational purposes.
*/
virtual float GetFuzzFactor () = 0;
};
/** @} */
#endif // __CS_IMESH_PROTOMESH_H__
|