#include "linden_common.h"
#include "llmath.h"
#include <set>
#include "llerror.h"
#include "llmemtype.h"
#include "llvolumemgr.h"
#include "v2math.h"
#include "v3math.h"
#include "v4math.h"
#include "m4math.h"
#include "m3math.h"
#include "lldarray.h"
#include "llvolume.h"
#include "llstl.h"
Go to the source code of this file.
Classes | |
class | LLVertexIndexPair |
struct | lessVertex |
struct | lessTriangle |
Defines | |
#define | DEBUG_SILHOUETTE_BINORMALS 0 |
#define | DEBUG_SILHOUETTE_NORMALS 0 |
#define | DEBUG_SILHOUETTE_EDGE_MAP 0 |
Functions | |
BOOL | check_same_clock_dir (const LLVector3 &pt1, const LLVector3 &pt2, const LLVector3 &pt3, const LLVector3 &norm) |
BOOL | LLTriangleLineSegmentIntersect (const LLVector3 &pt1, const LLVector3 &pt2, const LLVector3 &pt3, LLVector3 &linept, const LLVector3 &vect) |
S32 | sculpt_sides (F32 detail) |
LLVector3 | sculpt_rgb_to_vector (U8 r, U8 g, U8 b) |
U32 | sculpt_xy_to_index (U32 x, U32 y, U16 sculpt_width, U16 sculpt_height, S8 sculpt_components) |
U32 | sculpt_st_to_index (S32 s, S32 t, S32 size_s, S32 size_t, U16 sculpt_width, U16 sculpt_height, S8 sculpt_components) |
LLVector3 | sculpt_index_to_vector (U32 index, const U8 *sculpt_data) |
LLVector3 | sculpt_st_to_vector (S32 s, S32 t, S32 size_s, S32 size_t, U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8 *sculpt_data) |
LLVector3 | sculpt_xy_to_vector (U32 x, U32 y, U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8 *sculpt_data) |
bool | approx_zero (F32 f, F32 tolerance=APPROXIMATELY_ZERO) |
static bool | limit_range (F32 &v, F32 min, F32 max, F32 tolerance=APPROXIMATELY_ZERO) |
BOOL | equalTriangle (const S32 *a, const S32 *b) |
std::ostream & | operator<< (std::ostream &s, const LLProfileParams &profile_params) |
std::ostream & | operator<< (std::ostream &s, const LLPathParams &path_params) |
std::ostream & | operator<< (std::ostream &s, const LLVolumeParams &volume_params) |
std::ostream & | operator<< (std::ostream &s, const LLProfile &profile) |
std::ostream & | operator<< (std::ostream &s, const LLPath &path) |
std::ostream & | operator<< (std::ostream &s, const LLVolume &volume) |
std::ostream & | operator<< (std::ostream &s, const LLVolume *volumep) |
void | LerpPlanarVertex (LLVolumeFace::VertexData &v0, LLVolumeFace::VertexData &v1, LLVolumeFace::VertexData &v2, LLVolumeFace::VertexData &vout, F32 coef01, F32 coef02) |
LLVector3 | calc_binormal_from_triangle (const LLVector3 &pos0, const LLVector2 &tex0, const LLVector3 &pos1, const LLVector2 &tex1, const LLVector3 &pos2, const LLVector2 &tex2) |
Variables | |
const F32 | CUT_MIN = 0.f |
const F32 | CUT_MAX = 1.f |
const F32 | MIN_CUT_DELTA = 0.02f |
const F32 | HOLLOW_MIN = 0.f |
const F32 | HOLLOW_MAX = 0.95f |
const F32 | HOLLOW_MAX_SQUARE = 0.7f |
const F32 | TWIST_MIN = -1.f |
const F32 | TWIST_MAX = 1.f |
const F32 | RATIO_MIN = 0.f |
const F32 | RATIO_MAX = 2.f |
const F32 | HOLE_X_MIN = 0.05f |
const F32 | HOLE_X_MAX = 1.0f |
const F32 | HOLE_Y_MIN = 0.05f |
const F32 | HOLE_Y_MAX = 0.5f |
const F32 | SHEAR_MIN = -0.5f |
const F32 | SHEAR_MAX = 0.5f |
const F32 | REV_MIN = 1.f |
const F32 | REV_MAX = 4.f |
const F32 | TAPER_MIN = -1.f |
const F32 | TAPER_MAX = 1.f |
const F32 | SKEW_MIN = -0.95f |
const F32 | SKEW_MAX = 0.95f |
const S32 | SCULPT_REZ_1 = 6 |
const S32 | SCULPT_REZ_2 = 8 |
const S32 | SCULPT_REZ_3 = 16 |
const S32 | SCULPT_REZ_4 = 32 |
const F32 | SCULPT_MIN_AREA = 0.002f |
const F32 | APPROXIMATELY_ZERO = 0.001f |
const F32 | VERTEX_SLOP = 0.00001f |
const F32 | VERTEX_SLOP_SQRD = VERTEX_SLOP * VERTEX_SLOP |
const F32 | MIN_CONCAVE_PROFILE_WEDGE = 0.125f |
const F32 | MIN_CONCAVE_PATH_WEDGE = 0.111111f |
Copyright (c) 2002-2008, Linden Research, Inc.
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
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
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.
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$
Definition in file llvolume.cpp.
#define DEBUG_SILHOUETTE_BINORMALS 0 |
Definition at line 49 of file llvolume.cpp.
#define DEBUG_SILHOUETTE_EDGE_MAP 0 |
Definition at line 51 of file llvolume.cpp.
#define DEBUG_SILHOUETTE_NORMALS 0 |
Definition at line 50 of file llvolume.cpp.
bool approx_zero | ( | F32 | f, | |
F32 | tolerance = APPROXIMATELY_ZERO | |||
) |
Definition at line 2170 of file llvolume.cpp.
Referenced by limit_range(), LLVolumeParams::setRadiusOffset(), and LLVolumeParams::setSkew().
LLVector3 calc_binormal_from_triangle | ( | const LLVector3 & | pos0, | |
const LLVector2 & | tex0, | |||
const LLVector3 & | pos1, | |||
const LLVector2 & | tex1, | |||
const LLVector3 & | pos2, | |||
const LLVector2 & | tex2 | |||
) |
Definition at line 5119 of file llvolume.cpp.
References LLVector2::mV, LLVector3::mV, r1, r2, VX, VY, and VZ.
Referenced by LLVolumeFace::createBinormals(), LLVolumeFace::createCap(), and LLVolumeFace::createUnCutCubeCap().
BOOL check_same_clock_dir | ( | const LLVector3 & | pt1, | |
const LLVector3 & | pt2, | |||
const LLVector3 & | pt3, | |||
const LLVector3 & | norm | |||
) |
Definition at line 92 of file llvolume.cpp.
Referenced by LLTriangleLineSegmentIntersect().
Definition at line 3541 of file llvolume.cpp.
Referenced by LLVolume::cleanupTriangleData().
void LerpPlanarVertex | ( | LLVolumeFace::VertexData & | v0, | |
LLVolumeFace::VertexData & | v1, | |||
LLVolumeFace::VertexData & | v2, | |||
LLVolumeFace::VertexData & | vout, | |||
F32 | coef01, | |||
F32 | coef02 | |||
) |
Definition at line 4201 of file llvolume.cpp.
References LLVolumeFace::VertexData::mBinormal, LLVolumeFace::VertexData::mNormal, LLVolumeFace::VertexData::mPosition, and LLVolumeFace::VertexData::mTexCoord.
Referenced by LLVolumeFace::createUnCutCubeCap().
static bool limit_range | ( | F32 & | v, | |
F32 | min, | |||
F32 | max, | |||
F32 | tolerance = APPROXIMATELY_ZERO | |||
) | [static] |
Definition at line 2176 of file llvolume.cpp.
References approx_zero().
Referenced by LLVolumeParams::setBeginAndEndS(), LLVolumeParams::setBeginAndEndT(), LLVolumeParams::setHollow(), LLVolumeParams::setRatio(), LLVolumeParams::setRevolutions(), LLVolumeParams::setShear(), LLVolumeParams::setTaperX(), LLVolumeParams::setTaperY(), LLVolumeParams::setTwistBegin(), and LLVolumeParams::setTwistEnd().
BOOL LLTriangleLineSegmentIntersect | ( | const LLVector3 & | pt1, | |
const LLVector3 & | pt2, | |||
const LLVector3 & | pt3, | |||
LLVector3 & | linept, | |||
const LLVector3 & | vect | |||
) |
Definition at line 109 of file llvolume.cpp.
References check_same_clock_dir(), FALSE, LLVector3::setVec(), and TRUE.
Referenced by LLVolume::lineSegmentIntersect().
std::ostream& operator<< | ( | std::ostream & | s, | |
const LLVolume * | volumep | |||
) |
Definition at line 4174 of file llvolume.cpp.
References LLVolume::getParams(), LLVolume::mPathp, and LLVolume::mProfilep.
std::ostream& operator<< | ( | std::ostream & | s, | |
const LLVolume & | volume | |||
) |
Definition at line 4164 of file llvolume.cpp.
References LLVolume::getParams(), LLVolume::mPathp, and LLVolume::mProfilep.
std::ostream& operator<< | ( | std::ostream & | s, | |
const LLPath & | path | |||
) |
Definition at line 4154 of file llvolume.cpp.
References LLPath::mDirty, LLPath::mOpen, LLPath::mStep, and LLPath::mTotal.
std::ostream& operator<< | ( | std::ostream & | s, | |
const LLProfile & | profile | |||
) |
Definition at line 4143 of file llvolume.cpp.
References LLProfile::mDirty, LLProfile::mOpen, LLProfile::mTotal, and LLProfile::mTotalOut.
std::ostream& operator<< | ( | std::ostream & | s, | |
const LLVolumeParams & | volume_params | |||
) |
Definition at line 4134 of file llvolume.cpp.
References LLVolumeParams::mPathParams, and LLVolumeParams::mProfileParams.
std::ostream& operator<< | ( | std::ostream & | s, | |
const LLPathParams & | path_params | |||
) |
Definition at line 4116 of file llvolume.cpp.
References LLPathParams::mBegin, LLPathParams::mCurveType, LLPathParams::mEnd, LLPathParams::mRadiusOffset, LLPathParams::mRevolutions, LLPathParams::mScale, LLPathParams::mShear, LLPathParams::mSkew, LLPathParams::mTaper, LLPathParams::mTwistBegin, and LLPathParams::mTwistEnd.
std::ostream& operator<< | ( | std::ostream & | s, | |
const LLProfileParams & | profile_params | |||
) |
Definition at line 4105 of file llvolume.cpp.
References LLProfileParams::mBegin, LLProfileParams::mCurveType, LLProfileParams::mEnd, and LLProfileParams::mHollow.
Definition at line 1890 of file llvolume.cpp.
References sculpt_rgb_to_vector().
Referenced by sculpt_st_to_vector(), and sculpt_xy_to_vector().
Definition at line 1863 of file llvolume.cpp.
References LLVector3::mV, VX, VY, and VZ.
Referenced by sculpt_index_to_vector().
Definition at line 475 of file llvolume.cpp.
References SCULPT_REZ_1, SCULPT_REZ_2, SCULPT_REZ_3, and SCULPT_REZ_4.
Referenced by LLPath::generate(), and LLProfile::generate().
U32 sculpt_st_to_index | ( | S32 | s, | |
S32 | t, | |||
S32 | size_s, | |||
S32 | size_t, | |||
U16 | sculpt_width, | |||
U16 | sculpt_height, | |||
S8 | sculpt_components | |||
) | [inline] |
Definition at line 1881 of file llvolume.cpp.
References sculpt_xy_to_index().
Referenced by sculpt_st_to_vector().
LLVector3 sculpt_st_to_vector | ( | S32 | s, | |
S32 | t, | |||
S32 | size_s, | |||
S32 | size_t, | |||
U16 | sculpt_width, | |||
U16 | sculpt_height, | |||
S8 | sculpt_components, | |||
const U8 * | sculpt_data | |||
) | [inline] |
Definition at line 1897 of file llvolume.cpp.
References sculpt_index_to_vector(), and sculpt_st_to_index().
Referenced by LLVolume::sculptGetSurfaceArea().
U32 sculpt_xy_to_index | ( | U32 | x, | |
U32 | y, | |||
U16 | sculpt_width, | |||
U16 | sculpt_height, | |||
S8 | sculpt_components | |||
) | [inline] |
Definition at line 1874 of file llvolume.cpp.
Referenced by sculpt_st_to_index(), and sculpt_xy_to_vector().
LLVector3 sculpt_xy_to_vector | ( | U32 | x, | |
U32 | y, | |||
U16 | sculpt_width, | |||
U16 | sculpt_height, | |||
S8 | sculpt_components, | |||
const U8 * | sculpt_data | |||
) | [inline] |
Definition at line 1904 of file llvolume.cpp.
References sculpt_index_to_vector(), and sculpt_xy_to_index().
Referenced by LLVolume::sculptGenerateMapVertices().
const F32 APPROXIMATELY_ZERO = 0.001f |
Definition at line 2169 of file llvolume.cpp.
Definition at line 54 of file llvolume.cpp.
Definition at line 53 of file llvolume.cpp.
const F32 HOLE_X_MAX = 1.0f |
const F32 HOLE_X_MIN = 0.05f |
const F32 HOLE_Y_MAX = 0.5f |
const F32 HOLE_Y_MIN = 0.05f |
const F32 HOLLOW_MAX = 0.95f |
const F32 HOLLOW_MAX_SQUARE = 0.7f |
const F32 HOLLOW_MIN = 0.f |
const F32 MIN_CONCAVE_PATH_WEDGE = 0.111111f |
const F32 MIN_CONCAVE_PROFILE_WEDGE = 0.125f |
const F32 MIN_CUT_DELTA = 0.02f |
Definition at line 55 of file llvolume.cpp.
Referenced by LLVolumeParams::setBeginAndEndS(), and LLVolumeParams::setBeginAndEndT().
const F32 SCULPT_MIN_AREA = 0.002f |
const S32 SCULPT_REZ_1 = 6 |
const S32 SCULPT_REZ_2 = 8 |
const S32 SCULPT_REZ_3 = 16 |
const S32 SCULPT_REZ_4 = 32 |
Definition at line 80 of file llvolume.cpp.
Referenced by LLVolumeParams::setTaperX(), and LLVolumeParams::setTaperY().
Definition at line 79 of file llvolume.cpp.
Referenced by LLVolumeParams::setTaperX(), and LLVolumeParams::setTaperY().
Definition at line 62 of file llvolume.cpp.
Referenced by LLVolumeParams::setTwistBegin(), and LLVolumeParams::setTwistEnd().
Definition at line 61 of file llvolume.cpp.
Referenced by LLVolumeParams::setTwistBegin(), and LLVolumeParams::setTwistEnd().
const F32 VERTEX_SLOP = 0.00001f |
const F32 VERTEX_SLOP_SQRD = VERTEX_SLOP * VERTEX_SLOP |