PageRenderTime 23ms CodeModel.GetById 18ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llprimitive/lltextureanim.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 72 lines | 40 code | 7 blank | 25 comment | 0 complexity | f9800107832f8a3e8200f5265769ce58 MD5 | raw file
 1/** 
 2 * @file lltextureanim.h
 3 * @brief LLTextureAnim base class
 4 *
 5 * $LicenseInfo:firstyear=2001&license=viewerlgpl$
 6 * Second Life Viewer Source Code
 7 * Copyright (C) 2010, Linden Research, Inc.
 8 * 
 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation;
12 * version 2.1 of the License only.
13 * 
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * Lesser General Public License for more details.
18 * 
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 * 
23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
24 * $/LicenseInfo$
25 */
26
27#ifndef LL_LLTEXTUREANIM_H
28#define LL_LLTEXTUREANIM_H
29
30#include "stdtypes.h"
31#include "llsd.h"
32
33class LLMessageSystem;
34class LLDataPacker;
35
36class LLTextureAnim
37{
38public:
39	LLTextureAnim();
40	virtual ~LLTextureAnim();
41
42	virtual void reset();
43	void packTAMessage(LLMessageSystem *mesgsys) const;
44	void packTAMessage(LLDataPacker &dp) const;
45	void unpackTAMessage(LLMessageSystem *mesgsys, const S32 block_num);
46	void unpackTAMessage(LLDataPacker &dp);
47	BOOL equals(const LLTextureAnim &other) const;
48	LLSD asLLSD() const;
49	operator LLSD() const { return asLLSD(); }
50	bool fromLLSD(LLSD& sd);
51
52	enum
53	{
54		ON				= 0x01,
55		LOOP			= 0x02,
56		REVERSE			= 0x04,
57		PING_PONG		= 0x08,
58		SMOOTH			= 0x10,
59		ROTATE			= 0x20,
60		SCALE			= 0x40,
61	};
62
63public:
64	U8 mMode;
65	S8 mFace;
66	U8 mSizeX;
67	U8 mSizeY;
68	F32 mStart;
69	F32 mLength;
70	F32 mRate; // Rate in frames per second.
71};
72#endif