41 #ifndef INCLUDED_GLS_GEOMETRY_RESOURCE_MESH_H
42 #define INCLUDED_GLS_GEOMETRY_RESOURCE_MESH_H
51 #if( defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLSGEN_IMPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
52 && defined( _MSC_VER )
53 # if defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED )
54 # define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllexport )
56 # define GLSGEN_GlsAdvancedMesh_EXPORT __declspec( dllimport )
59 # define GLSGEN_GlsAdvancedMesh_EXPORT
66 class GlsSortedDrawable;
70 class GlsGloFileAttribute;
82 friend class GlsGeometryResourceMesh_SortedDrawable;
86 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
89 friend class GlsGeometryResourceMeshEditor;
98 GLSGEN_GlsAdvancedMesh_EXPORT
GlsGeometryResourceMesh(
const GlsGeometryResourceMesh& that,
const bool generateNames );
108 virtual void OnGeometryResourceChanged()
125 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void Draw(
void );
128 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void GetExtents(
float& minx,
float& miny,
float& minz,
float& maxx,
float& maxy,
float& maxz );
132 virtual GLSGEN_GlsAdvancedMesh_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint );
134 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar = 0 );
135 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis );
136 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void TranslateVertices(
float x,
float y,
float z );
142 virtual GLSGEN_GlsAdvancedMesh_EXPORT
int TextureIndex(
void );
145 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void TextureIndex(
int index );
148 virtual GLSGEN_GlsAdvancedMesh_EXPORT
bool SetupTexture(
void );
152 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void MaterialIndex(
unsigned int index );
258 oldEffect->Release();
284 class DistiAttributeIndexBufferEffectArray;
292 GLSGEN_GlsAdvancedMesh_EXPORT
void SetupDefaultEffect();
294 GLSGEN_GlsAdvancedMesh_EXPORT
void CleanupDefaultEffect();
296 GLSGEN_GlsAdvancedMesh_EXPORT
void DrawGeometry();
319 GlsGeometryResourceMesh& operator=(
const GlsGeometryResourceMesh& rhs ) DISTI_SPECIAL_MEM_FUN_DELETE;
322 void CopyGeometryInternal(
const GlsGeometryResourceMesh& src );
325 void OnMatChanged( DynamicArray<int>& a, DynamicArray<int>& b );
326 void ReplaceMaterial(
unsigned int oldIndex,
unsigned int newIndex );
331 unsigned int material_index,
332 int diffuse_texture_index,
333 int normal_texture_index,
334 int specular_texture_index,
335 int reflection_texture_index,
336 float diffuse_amount,
338 float specular_amount,
339 float reflection_amount,
340 bool useVertexColors,
341 bool normalFlipGreen,
342 float diff_map_offset_v = 0.0f,
343 float diff_map_offset_u = 0.0f,
344 float diff_map_tiling_u = 1.0f,
345 float diff_map_tiling_v = 1.0f,
346 float diff_map_angle_w = 0.0f,
347 float norm_map_offset_v = 0.0f,
348 float norm_map_offset_u = 0.0f,
349 float norm_map_tiling_u = 1.0f,
350 float norm_map_tiling_v = 1.0f,
351 float norm_map_angle_w = 0.0f,
352 float spec_map_offset_v = 0.0f,
353 float spec_map_offset_u = 0.0f,
354 float spec_map_tiling_u = 1.0f,
355 float spec_map_tiling_v = 1.0f,
356 float spec_map_angle_w = 0.0f );
IndexBufferEffectArrayT _indexBufferEffects
The effect to use for each index buffer.
Definition: gls_geometry_resource_mesh.h:282
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
virtual int TextureIndex(void)
unsigned int NumIndexBufferEffects()
Definition: gls_geometry_resource_mesh.h:195
void SetGeometryTransform(const GlsMatrixType &value)
unsigned Count() const
Definition: dynamic_array.h:204
Definition: dynamic_array.h:66
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:296
SortedDrawableArrayT _indexBufferDrawables
GlsSortedDrawable for each index buffer.
Definition: gls_geometry_resource_mesh.h:288
virtual int MaterialIndex()
bool ReorderAtWill()
Definition: gls_geometry_resource_mesh.h:203
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:211
Definition: gls_glo_file.h:982
The disti::DisplayObject class and global enumerations.
Definition: gls_geometry_resource.h:241
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:187
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true)
Definition: gls_geometry_resource.h:82
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:242
GlsRenderEffect * GetIndexBufferEffect(unsigned int bufferNum)
Definition: gls_geometry_resource_mesh.h:226
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)
const GlsMatrixType & GetGeometryTransform()
Definition: gls_geometry_resource_mesh.h:182
Definition: gls_geometry_resource_mesh.h:78
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:279
The disti::GlsGeometryResource class.
GlsGeometryResourceMesh(void)
~GlsGeometryResourceMesh(void)
Definition: gls_render_effect.h:117
Macros and helper code to determine what subset of C++11/14/17 is available.
unsigned int NumIndexBuffers() const
Definition: gls_geometry_resource.h:417
Definition: bmpimage.h:46
Definition: gls_geometry_resource.h:453
The disti::GlsRenderEffect class.