summaryrefslogtreecommitdiff
path: root/public/movieobjects/dmemorphoperator.h
blob: 0479a5afc391d9767e3b8bcf26f26201975f64aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// The morph operator class - sets morph target weights on meshes
//
//=============================================================================

#ifndef DMEMORPHOPERATOR_H
#define DMEMORPHOPERATOR_H
#ifdef _WIN32
#pragma once
#endif

#include "datamodel/dmelement.h"
#include "datamodel/dmattribute.h"
#include "datamodel/dmattributevar.h"
#include "movieobjects/dmeoperator.h"


//-----------------------------------------------------------------------------
// Forward declarations
//-----------------------------------------------------------------------------
class CDmeMesh;


//-----------------------------------------------------------------------------
// A class representing a camera
//-----------------------------------------------------------------------------
class CDmeMorphOperator : public CDmeOperator
{
	DEFINE_ELEMENT( CDmeMorphOperator, CDmeOperator );

public:
	virtual void Operate();

	// need this until we have the EditApply message queue
	void OnAttributeChanged( CDmAttribute *pAttribute );

	virtual void GetInputAttributes ( CUtlVector< CDmAttribute * > &attrs );
	virtual void GetOutputAttributes( CUtlVector< CDmAttribute * > &attrs );

	// accessors
	uint NumDeltaStateWeights();
	CDmElement *GetDeltaStateWeight( uint i );
	CDmeMesh *GetMesh();

protected:
	CDmaElement< CDmeMesh >    m_mesh;
	CDmaElementArray< CDmElement > m_deltaStateWeights;
	CDmaString                 m_baseStateName;
};


#endif // DMEMORPHOPERATOR_H