41#ifndef INCLUDED_GLS_SERIAL_MORPH_MESH_H
42#define INCLUDED_GLS_SERIAL_MORPH_MESH_H
49#include "gls_resource_file_mgr.h"
56#if( defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLSGEN_IMPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
57 && defined( _MSC_VER )
58# if defined( GLSGEN_EXPORT_GLSADVANCEDMESH ) || defined( GLS_EXPORT_GENERATED )
59# define GLSGEN_GlsSerialMorphMesh_EXPORT __declspec( dllexport )
61# define GLSGEN_GlsSerialMorphMesh_EXPORT __declspec( dllimport )
64# define GLSGEN_GlsSerialMorphMesh_EXPORT
69#define LIB_BASE_NAME "gls_advanced_mesh"
77class GlsGloFileAttribute;
86 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
89 friend class GlsSerialMorphMeshEditor;
261 void Count(
unsigned count ) { _keyframes.Count( count ); }
264 unsigned Count()
const {
return _keyframes.Count(); }
267 void Clear() { _keyframes.Clear(); }
304 int _gloKeyframeIndex;
307 void CalculateBSplineInterpolation()
const;
Definition: disti_metadata.h:734
Definition: dynamic_array.h:79
Definition: gls_geometry_resource_mesh.h:80
Definition: gls_geometry_resource.h:87
Definition: gls_geometry_resource.h:507
Definition: gls_glo_file.h:1243
Definition: gls_serial_morph_mesh.h:239
void Count(unsigned count)
Definition: gls_serial_morph_mesh.h:261
static void element_read_func(int index, KeyframeDataArray &array, std::istream &instr)
unsigned Count() const
Definition: gls_serial_morph_mesh.h:264
const Keyframe_Data & operator[](const std::size_t index) const
Definition: gls_serial_morph_mesh.h:277
GlsSerialMorphMesh * _parentMesh
Observing pointer to the GlsSerialMorphMesh object.
Definition: gls_serial_morph_mesh.h:241
void Clear()
Clear all elements in the array.
Definition: gls_serial_morph_mesh.h:267
Keyframe_Data & operator[](const std::size_t index)
Definition: gls_serial_morph_mesh.h:272
static void element_write_func(int index, KeyframeDataArray &array, std::ostream &outstr)
Definition: gls_serial_morph_mesh.h:204
Keyframe_Data(const Keyframe_Data &)
Copy constructor.
GlsGeometry_Generic * GetGeometry()
float _value
The key value for this keyframe.
Definition: gls_serial_morph_mesh.h:213
void SetupAttribDict()
Populates the attribute dictionary.
const Keyframe_Data & operator=(const Keyframe_Data &)
DistiAttribDict & Attributes()
GlsGeometry_Generic * _geometry
An observing pointer to the mesh data values for this keyframe.
Definition: gls_serial_morph_mesh.h:212
DistiAttribDict * _attribDict
The attribute dictionary for this object's members.
Definition: gls_serial_morph_mesh.h:206
void SetGeometry(GlsGeometry_Generic *geom)
Definition: gls_serial_morph_mesh.h:84
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
void SetMorphPercent(const float &value)
float _last_keyframe_weight
The blend weight for the first keyframe [0,1].
Definition: gls_serial_morph_mesh.h:290
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
void RecalculateKeyframeIndicesAndWeights()
Update the _last_keyframe_index, _next_keyframe_index, _last_keyframe_weight and _next_keyframe_weigh...
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
float GetKeyframePercent(unsigned int index)
void KeyframeGeometryChanged(Keyframe_Data *)
Called by the KeyframeData class when the geometry changes.
void SetKeyframePercent(unsigned int index, const float &value)
virtual GlsGeometryResource * GetRenderMesh() DISTI_METHOD_OVERRIDE
void InvalidateRenderMesh()
Definition: gls_serial_morph_mesh.h:185
static DisplayObject * CreateInstance()
float _tension
The interpolation tension value.
Definition: gls_serial_morph_mesh.h:286
virtual void CopyGeometry(DisplayObject *src) DISTI_METHOD_OVERRIDE
float _next_keyframe_weight
The blend weight for the next keyframe [0,1].
Definition: gls_serial_morph_mesh.h:291
void SetNumKeyframes(unsigned int count)
GlsGeometry_Generic * _renderMesh
The mesh being morphed.
Definition: gls_serial_morph_mesh.h:294
void SetTension(const float &value)
GlsGeometry_Generic * GetKeyframeGeometry(unsigned int index)
void SetKeyframeGeometry(unsigned int keyframeIndex, GlsGeometry_Generic *newKeyframeGeometry)
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
unsigned int _last_keyframe_index
The first keyframe where _value <= _currentValue.
Definition: gls_serial_morph_mesh.h:288
float _currentValue
The current position in the animation.
Definition: gls_serial_morph_mesh.h:285
KeyframeDataArray _keyframes
The list of animation keyframes.
Definition: gls_serial_morph_mesh.h:283
unsigned int NumKeyframes()
bool _renderMeshIsValid
If false, the mesh will be recalculated prior to next draw.
Definition: gls_serial_morph_mesh.h:293
unsigned int _next_keyframe_index
The next keyframe after last_keyframe_index where _value > _currentValue. If _value matches _currentV...
Definition: gls_serial_morph_mesh.h:289
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:544
The disti::GlsAdvancedMesh class.
Macros and helper code to determine what subset of C++11/14/17 is available.
#define DISTI_SPECIAL_MEM_FUN_DELETE
Macro to wrap function deletion, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:235
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:457
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:214
The disti::GlsGeometryResource class.
#define GLSGEN_GlsSerialMorphMesh_EXPORT
Provides support for creating DLLs.
Definition: gls_serial_morph_mesh.h:64
The disti::Group class. Implements groups of objects.
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47