PageRenderTime 12ms CodeModel.GetById 2ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llmath/llsdutil_math.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 64 lines | 22 code | 9 blank | 33 comment | 0 complexity | 6af28b14ef2fee8b37a9da52daeaffb7 MD5 | raw file
 1/** 
 2 * @file llsdutil_math.h
 3 * @author Brad
 4 * @date 2009-05-19
 5 * @brief Utility classes, functions, etc, for using structured data with math classes.
 6 *
 7 * $LicenseInfo:firstyear=2009&license=viewerlgpl$
 8 * Second Life Viewer Source Code
 9 * Copyright (C) 2010, Linden Research, Inc.
10 * 
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation;
14 * version 2.1 of the License only.
15 * 
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 * Lesser General Public License for more details.
20 * 
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
24 * 
25 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
26 * $/LicenseInfo$
27 */
28
29#ifndef LL_LLSDUTIL_MATH_H
30#define LL_LLSDUTIL_MATH_H
31
32class LL_COMMON_API LLSD;
33
34// vector3
35class LLVector3;
36LLSD ll_sd_from_vector3(const LLVector3& vec);
37LLVector3 ll_vector3_from_sd(const LLSD& sd, S32 start_index = 0);
38
39// vector4
40class LLVector4;
41LLSD ll_sd_from_vector4(const LLVector4& vec);
42LLVector4 ll_vector4_from_sd(const LLSD& sd, S32 start_index = 0);
43
44// vector3d (double)
45class LLVector3d;
46LLSD ll_sd_from_vector3d(const LLVector3d& vec);
47LLVector3d ll_vector3d_from_sd(const LLSD& sd, S32 start_index = 0);
48
49// vector2
50class LLVector2;
51LLSD ll_sd_from_vector2(const LLVector2& vec);
52LLVector2 ll_vector2_from_sd(const LLSD& sd);
53
54// Quaternion
55class LLQuaternion;
56LLSD ll_sd_from_quaternion(const LLQuaternion& quat);
57LLQuaternion ll_quaternion_from_sd(const LLSD& sd);
58
59// color4
60class LLColor4;
61LLSD ll_sd_from_color4(const LLColor4& c);
62LLColor4 ll_color4_from_sd(const LLSD& sd);
63
64#endif // LL_LLSDUTIL_MATH_H