summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawable.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-08-31 16:37:40 -0500
committerDave Parks <davep@lindenlab.com>2010-08-31 16:37:40 -0500
commite68f9e566b5aeb5341f5adea0b8a6ccde86ee93d (patch)
tree6454bf6b303d03f89e567a6ea9cfee7c85aaa1ac /indra/newview/lldrawable.h
parent3cabca8df62ae8ee815dd7d885f14f5a7d0ea98d (diff)
parent771195865c4fb336f573025e9a7a22313bfb6cb8 (diff)
merge
Diffstat (limited to 'indra/newview/lldrawable.h')
-rw-r--r--indra/newview/lldrawable.h70
1 files changed, 45 insertions, 25 deletions
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index 9cf9b69d3e..fc90bc57c4 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -2,25 +2,31 @@
* @file lldrawable.h
* @brief LLDrawable class definition
*
- * $LicenseInfo:firstyear=2002&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
+ * $LicenseInfo:firstyear=2002&license=viewergpl$
+ *
+ * Copyright (c) 2002-2009, Linden Research, Inc.
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
*
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
@@ -35,6 +41,7 @@
#include "v4math.h"
#include "m4math.h"
#include "v4coloru.h"
+#include "llvector4a.h"
#include "llquaternion.h"
#include "xform.h"
#include "llmemtype.h"
@@ -60,6 +67,17 @@ const U32 SILHOUETTE_HIGHLIGHT = 0;
class LLDrawable : public LLRefCount
{
public:
+ LLDrawable(const LLDrawable& rhs)
+ {
+ *this = rhs;
+ }
+
+ const LLDrawable& operator=(const LLDrawable& rhs)
+ {
+ llerrs << "Illegal operation!" << llendl;
+ return *this;
+ }
+
static void initClass();
LLDrawable() { init(); }
@@ -88,14 +106,14 @@ public:
const LLVector3& getPosition() const { return mXform.getPosition(); }
const LLVector3& getWorldPosition() const { return mXform.getPositionW(); }
const LLVector3 getPositionAgent() const;
- const LLVector3d& getPositionGroup() const { return mPositionGroup; }
+ const LLVector4a& getPositionGroup() const { return *mPositionGroup; }
const LLVector3& getScale() const { return mCurrentScale; }
void setScale(const LLVector3& scale) { mCurrentScale = scale; }
const LLQuaternion& getWorldRotation() const { return mXform.getWorldRotation(); }
const LLQuaternion& getRotation() const { return mXform.getRotation(); }
F32 getIntensity() const { return llmin(mXform.getScale().mV[0], 4.f); }
S32 getLOD() const { return mVObjp ? mVObjp->getLOD() : 1; }
- F64 getBinRadius() const { return mBinRadius; }
+ F32 getBinRadius() const { return mBinRadius; }
void getMinMax(LLVector3& min,LLVector3& max) const { mXform.getMinMax(min,max); }
LLXformMatrix* getXform() { return &mXform; }
@@ -149,7 +167,7 @@ public:
void updateSpecialHoverCursor(BOOL enabled);
- virtual void shiftPos(const LLVector3 &shift_vector);
+ virtual void shiftPos(const LLVector4a &shift_vector);
S32 getGeneration() const { return mGeneration; }
@@ -167,11 +185,12 @@ public:
const LLVector3& getBounds(LLVector3& min, LLVector3& max) const;
virtual void updateSpatialExtents();
virtual void updateBinRadius();
- const LLVector3* getSpatialExtents() const;
- void setSpatialExtents(LLVector3 min, LLVector3 max);
- void setPositionGroup(const LLVector3d& pos);
- void setPositionGroup(const LLVector3& pos) { setPositionGroup(LLVector3d(pos)); }
+ const LLVector4a* getSpatialExtents() const;
+ void setSpatialExtents(const LLVector3& min, const LLVector3& max);
+ void setSpatialExtents(const LLVector4a& min, const LLVector4a& max);
+ void setPositionGroup(const LLVector4a& pos);
+
void setRenderType(S32 type) { mRenderType = type; }
BOOL isRenderType(S32 type) { return mRenderType == type; }
S32 getRenderType() { return mRenderType; }
@@ -282,6 +301,9 @@ public:
private:
typedef std::vector<LLFace*> face_list_t;
+ LLVector4a* mExtents;
+ LLVector4a* mPositionGroup;
+
U32 mState;
S32 mRenderType;
LLPointer<LLViewerObject> mVObjp;
@@ -291,9 +313,7 @@ private:
mutable U32 mVisible;
F32 mRadius;
- LLVector3 mExtents[2];
- LLVector3d mPositionGroup;
- F64 mBinRadius;
+ F32 mBinRadius;
S32 mGeneration;
LLVector3 mCurrentScale;