41 #ifndef INCLUDED_GLS_GEOMETRY_RESOURCE_MESH_H 
   42 #define INCLUDED_GLS_GEOMETRY_RESOURCE_MESH_H 
   51 #if (defined(GLSGEN_EXPORT_GLSADVANCEDMESH) || \ 
   52      defined(GLSGEN_IMPORT_GLSADVANCEDMESH) || \ 
   53      defined(GLS_EXPORT_GENERATED) || \ 
   54      defined(GLS_IMPORT_GENERATED)) \ 
   56 #  if defined(GLSGEN_EXPORT_GLSADVANCEDMESH) || defined(GLS_EXPORT_GENERATED) 
   57 #    define GLSGEN_GlsAdvancedMesh_EXPORT    __declspec(dllexport) 
   59 #    define GLSGEN_GlsAdvancedMesh_EXPORT    __declspec(dllimport) 
   62 #  define GLSGEN_GlsAdvancedMesh_EXPORT 
   70 class GlsSortedDrawable;
 
   74 class GlsGloFileAttribute;
 
   85     friend class GlsGeometryResourceMesh_SortedDrawable;
 
   90     friend class GlsGeometryResourceMeshEditor;
 
   99     GLSGEN_GlsAdvancedMesh_EXPORT 
GlsGeometryResourceMesh( 
const GlsGeometryResourceMesh& that, 
const bool generateNames );
 
  120     virtual GLSGEN_GlsAdvancedMesh_EXPORT 
void Draw(
void);
 
  123     virtual GLSGEN_GlsAdvancedMesh_EXPORT 
void GetExtents(
float &minx, 
float &miny, 
float &minz, 
float &maxx, 
float &maxy, 
float &maxz);
 
  127     virtual GLSGEN_GlsAdvancedMesh_EXPORT 
bool Hit(
float x,
float y,
float z,
float scale, 
const Vector& directionVector,
Vector *collisionPoint);
 
  129     virtual GLSGEN_GlsAdvancedMesh_EXPORT 
void Scale(
float px, 
float py, 
float pz, 
Vertex *anchor, 
int handleBar = 0);
 
  130     virtual GLSGEN_GlsAdvancedMesh_EXPORT 
void Rotate(
const Vector &orig,
float angle, 
const Vector &axis);
 
  131     virtual GLSGEN_GlsAdvancedMesh_EXPORT 
void TranslateVertices(
float x, 
float y, 
float z);
 
  137     virtual GLSGEN_GlsAdvancedMesh_EXPORT 
int TextureIndex(
void);
 
  140     virtual GLSGEN_GlsAdvancedMesh_EXPORT 
void TextureIndex(
int index);
 
  143     virtual GLSGEN_GlsAdvancedMesh_EXPORT 
bool SetupTexture(
void);
 
  147     virtual GLSGEN_GlsAdvancedMesh_EXPORT 
void MaterialIndex(
unsigned int index);
 
  249         if (newEffect) { newEffect->
AddRef(); }
 
  250         if (oldEffect) { oldEffect->Release(); }
 
  261     virtual GLSGEN_GlsAdvancedMesh_EXPORT 
void SetFromGloData(GlsGloFileAttribute &data);
 
  276     class DistiAttributeIndexBufferEffectArray;
 
  284     GLSGEN_GlsAdvancedMesh_EXPORT 
void SetupDefaultEffect();
 
  286     GLSGEN_GlsAdvancedMesh_EXPORT 
void CleanupDefaultEffect();
 
  288     GLSGEN_GlsAdvancedMesh_EXPORT 
void DrawGeometry();
 
  292     bool SetGloIndexBufferEffect(GlsGloFileAttribute& data);
 
  309     GlsGeometryResourceMesh& operator=( 
const GlsGeometryResourceMesh &rhs ) DISTI_SPECIAL_MEM_FUN_DELETE;
 
  312     void CopyGeometryInternal( 
const GlsGeometryResourceMesh& src );
 
  315     void OnMatChanged(DynamicArray<int> &a, DynamicArray<int> &b);
 
  316     void ReplaceMaterial(
unsigned int oldIndex,
unsigned int newIndex);
 
  322     unsigned int material_index,
 
  323     int diffuse_texture_index,
 
  324     int normal_texture_index,
 
  325     int specular_texture_index,
 
  326     int reflection_texture_index,
 
  327     float diffuse_amount,
 
  329     float specular_amount,
 
  330     float reflection_amount,
 
  331     bool useVertexColors,
 
  332     bool normalFlipGreen,
 
  333     float diff_map_offset_v = 0.0f,
 
  334     float diff_map_offset_u = 0.0f,
 
  335     float diff_map_tiling_u = 1.0f,
 
  336     float diff_map_tiling_v = 1.0f,
 
  337     float diff_map_angle_w = 0.0f,
 
  338     float norm_map_offset_v = 0.0f,
 
  339     float norm_map_offset_u = 0.0f,
 
  340     float norm_map_tiling_u = 1.0f,
 
  341     float norm_map_tiling_v = 1.0f,
 
  342     float norm_map_angle_w = 0.0f,
 
  343     float spec_map_offset_v = 0.0f,
 
  344     float spec_map_offset_u = 0.0f,
 
  345     float spec_map_tiling_u = 1.0f,
 
  346     float spec_map_tiling_v = 1.0f,
 
  347     float spec_map_angle_w = 0.0f
 
IndexBufferEffectArrayT _indexBufferEffects
The effect to use for each index buffer. 
Definition: gls_geometry_resource_mesh.h:274
virtual int TextureIndex(void)
unsigned int NumIndexBufferEffects()
Definition: gls_geometry_resource_mesh.h:190
void SetGeometryTransform(const GlsMatrixType &value)
Definition: dynamic_array.h:63
Class to contain current OpenGL view, projection and draw matrices. 
Definition: util.h:289
SortedDrawableArrayT _indexBufferDrawables
GlsSortedDrawable for each index buffer. 
Definition: gls_geometry_resource_mesh.h:280
virtual int MaterialIndex()
bool ReorderAtWill()
Definition: gls_geometry_resource_mesh.h:198
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
virtual void CopyGeometry(DisplayObject *src)
virtual DynamicArray< int > & MaterialIndices()
virtual void CopyProperties(DisplayObject *src)
virtual DisplayObject * Pick3D(const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices)
virtual void UpdateBoundingVolume(void)
virtual void ResizeIndexBufferEffectsArray(unsigned int newSize)
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
void ReorderAtWill(bool reorderAtWill)
Definition: gls_geometry_resource_mesh.h:206
The disti::DisplayObject class and global enumerations. 
virtual void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz)
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
unsigned int NumIndexBuffers()
Definition: gls_geometry_resource_mesh.h:182
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true)
Definition: gls_geometry_resource.h:86
void Count(const unsigned int count)
Definition: dynamic_array.h:120
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0)
void SetIndexBufferEffect(unsigned int bufferNum, GlsRenderEffect *newEffect)
Definition: gls_geometry_resource_mesh.h:239
GlsRenderEffect * GetIndexBufferEffect(unsigned int bufferNum)
Definition: gls_geometry_resource_mesh.h:223
virtual void SetAvailableAttributes(unsigned int value)
GlsRenderEffect * CreateRenderEffect_DiffNormSpecRefl(unsigned int material_index, int diffuse_texture_index, int normal_texture_index, int specular_texture_index, int reflection_texture_index, float diffuse_amount, float normal_amount, float specular_amount, float reflection_amount, bool useVertexColors, bool normalFlipGreen, float diff_map_offset_v=0.0f, float diff_map_offset_u=0.0f, float diff_map_tiling_u=1.0f, float diff_map_tiling_v=1.0f, float diff_map_angle_w=0.0f, float norm_map_offset_v=0.0f, float norm_map_offset_u=0.0f, float norm_map_tiling_u=1.0f, float norm_map_tiling_v=1.0f, float norm_map_angle_w=0.0f, float spec_map_offset_v=0.0f, float spec_map_offset_u=0.0f, float spec_map_tiling_u=1.0f, float spec_map_tiling_v=1.0f, float spec_map_angle_w=0.0f)
T * InternalArray(void)
Definition: dynamic_array.h:394
const GlsMatrixType & GetGeometryTransform()
Definition: gls_geometry_resource_mesh.h:177
Definition: gls_geometry_resource_mesh.h:82
virtual void TranslateVertices(float x, float y, float z)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
bool _reorderAtWill
Definition: gls_geometry_resource_mesh.h:271
The disti::GlsGeometryResource class. 
GlsGeometryResourceMesh(void)
~GlsGeometryResourceMesh(void)
Definition: gls_render_effect.h:119
Macros and helper code to determine what subset of C++11/14/17 is available. 
unsigned int NumIndexBuffers() const 
Definition: gls_geometry_resource.h:384
Definition: bmpimage.h:46
Definition: gls_geometry_resource.h:421
The disti::GlsRenderEffect class.