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
68 #define LIB_BASE_NAME "gls_advanced_mesh"
76 class GlsGloFileAttribute;
85 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
88 friend class GlsSerialMorphMeshEditor;
93 GLSGEN_GlsSerialMorphMesh_EXPORT
GlsSerialMorphMesh(
const GlsSerialMorphMesh& that,
const bool generateNames );
98 static GLSGEN_GlsSerialMorphMesh_EXPORT
DisplayObject* CreateInstance();
130 GLSGEN_GlsSerialMorphMesh_EXPORT
void SetNumKeyframes(
unsigned int count );
135 GLSGEN_GlsSerialMorphMesh_EXPORT
unsigned int NumKeyframes();
151 GLSGEN_GlsSerialMorphMesh_EXPORT
void SetKeyframePercent(
unsigned int index,
const float& value );
161 GLSGEN_GlsSerialMorphMesh_EXPORT
void SetMorphPercent(
const float& value );
175 GLSGEN_GlsSerialMorphMesh_EXPORT
void SetTension(
const float& value );
180 GLSGEN_GlsSerialMorphMesh_EXPORT
float GetTension();
208 void SetupAttribDict();
215 GLSGEN_GlsSerialMorphMesh_EXPORT Keyframe_Data(
const Keyframe_Data& );
216 GLSGEN_GlsSerialMorphMesh_EXPORT ~Keyframe_Data();
217 GLSGEN_GlsSerialMorphMesh_EXPORT
const Keyframe_Data& operator=(
const Keyframe_Data& );
228 GlsSerialMorphMesh* _parentMesh;
231 : _parentMesh( NULL )
234 static void element_read_func(
int index, KeyframeDataArray& array, std::istream& instr );
235 static void element_write_func(
int index, KeyframeDataArray& array, std::ostream& outstr );
237 void Count(
unsigned count ) { _keyframes.Count( count ); }
238 unsigned Count()
const {
return _keyframes.Count(); }
240 void Clear() { _keyframes.Clear(); }
242 Keyframe_Data& operator[](
const std::size_t index ) {
return _keyframes[
static_cast<unsigned>( index ) ]; }
243 const Keyframe_Data& operator[](
const std::size_t index )
const {
return _keyframes[
static_cast<unsigned>( index ) ]; }
257 unsigned int _last_keyframe_index;
258 unsigned int _next_keyframe_index;
259 float _last_keyframe_weight;
260 float _next_keyframe_weight;
262 bool _renderMeshIsValid;
266 GLSGEN_GlsSerialMorphMesh_EXPORT
void RecalculateKeyframeIndicesAndWeights();
269 GLSGEN_GlsSerialMorphMesh_EXPORT
void KeyframeGeometryChanged(
Keyframe_Data* );
273 int _gloKeyframeIndex;
276 void CalculateBSplineInterpolation()
const;
279 GLSGEN_GlsSerialMorphMesh_EXPORT
void InitializeMembers();
282 GlsSerialMorphMesh& operator=(
const GlsSerialMorphMesh& rhs ) DISTI_SPECIAL_MEM_FUN_DELETE;
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
Definition: dynamic_array.h:66
The disti::Group class. Implements groups of objects.
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:296
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
The disti::GlsAdvancedMesh class.
void SetMorphPercent(const float &value)
void InvalidateRenderMesh()
Definition: gls_serial_morph_mesh.h:184
virtual GlsGeometryResource * GetRenderMesh()
Definition: gls_serial_morph_mesh.h:82
virtual ~GlsSerialMorphMesh()
Definition: gls_glo_file.h:982
virtual void CopyProperties(DisplayObject *src)
GlsGeometry_Generic * GetKeyframeGeometry(unsigned int index)
Definition: gls_serial_morph_mesh.h:203
Definition: gls_geometry_resource.h:82
Definition: gls_serial_morph_mesh.h:225
unsigned int NumKeyframes()
float GetKeyframePercent(unsigned int index)
virtual DisplayObject * CloneObject(bool generateNames=false)
Definition: disti_metadata.h:665
void SetKeyframeGeometry(unsigned int keyframeIndex, GlsGeometry_Generic *newKeyframeGeometry)
Definition: gls_geometry_resource_mesh.h:78
virtual void CopyGeometry(DisplayObject *src)
void SetTension(const float &value)
virtual void SetAvailableAttributes(unsigned int value)
The disti::GlsGeometryResource class.
void SetKeyframePercent(unsigned int index, const float &value)
void SetNumKeyframes(unsigned int count)
Macros and helper code to determine what subset of C++11/14/17 is available.
virtual void PreDraw(const OpenGLMatrices &parentMatrices, Culler &culler)
Definition: bmpimage.h:46
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
Definition: gls_geometry_resource.h:453