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;
81 friend class GlsGeometryResourceMesh_SortedDrawable;
86 friend class GlsGeometryResourceMeshEditor;
95 GLSGEN_GlsAdvancedMesh_EXPORT
GlsGeometryResourceMesh(
const GlsGeometryResourceMesh& that,
const bool generateNames );
116 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void Draw(
void );
119 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void GetExtents(
float& minx,
float& miny,
float& minz,
float& maxx,
float& maxy,
float& maxz );
123 virtual GLSGEN_GlsAdvancedMesh_EXPORT
bool Hit(
float x,
float y,
float z,
float scale,
const Vector& directionVector,
Vector* collisionPoint );
125 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void Scale(
float px,
float py,
float pz,
Vertex* anchor,
int handleBar = 0 );
126 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis );
127 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void TranslateVertices(
float x,
float y,
float z );
133 virtual GLSGEN_GlsAdvancedMesh_EXPORT
int TextureIndex(
void );
136 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void TextureIndex(
int index );
139 virtual GLSGEN_GlsAdvancedMesh_EXPORT
bool SetupTexture(
void );
143 virtual GLSGEN_GlsAdvancedMesh_EXPORT
void MaterialIndex(
unsigned int index );
249 oldEffect->Release();
275 class DistiAttributeIndexBufferEffectArray;
283 GLSGEN_GlsAdvancedMesh_EXPORT
void SetupDefaultEffect();
285 GLSGEN_GlsAdvancedMesh_EXPORT
void CleanupDefaultEffect();
287 GLSGEN_GlsAdvancedMesh_EXPORT
void DrawGeometry();
310 GlsGeometryResourceMesh& operator=(
const GlsGeometryResourceMesh& rhs ) DISTI_SPECIAL_MEM_FUN_DELETE;
313 void CopyGeometryInternal(
const GlsGeometryResourceMesh& src );
316 void OnMatChanged( DynamicArray<int>& a, DynamicArray<int>& b );
317 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:273
virtual int TextureIndex(void)
unsigned int NumIndexBufferEffects()
Definition: gls_geometry_resource_mesh.h:186
void SetGeometryTransform(const GlsMatrixType &value)
Definition: dynamic_array.h:62
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:278
SortedDrawableArrayT _indexBufferDrawables
GlsSortedDrawable for each index buffer.
Definition: gls_geometry_resource_mesh.h:279
virtual int MaterialIndex()
bool ReorderAtWill()
Definition: gls_geometry_resource_mesh.h:194
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:202
Definition: gls_glo_file.h:835
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:178
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax=true)
Definition: gls_geometry_resource.h:82
void Count(const unsigned int count)
Definition: dynamic_array.h:115
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:233
GlsRenderEffect * GetIndexBufferEffect(unsigned int bufferNum)
Definition: gls_geometry_resource_mesh.h:217
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:388
const GlsMatrixType & GetGeometryTransform()
Definition: gls_geometry_resource_mesh.h:173
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:270
The disti::GlsGeometryResource class.
GlsGeometryResourceMesh(void)
~GlsGeometryResourceMesh(void)
Definition: gls_render_effect.h:115
Macros and helper code to determine what subset of C++11/14/17 is available.
unsigned int NumIndexBuffers() const
Definition: gls_geometry_resource.h:381
Definition: bmpimage.h:46
Definition: gls_geometry_resource.h:417
The disti::GlsRenderEffect class.