#include <llvolume.h>
Public Member Functions | |
LLVolume (const LLVolumeParams ¶ms, const F32 detail, const BOOL generate_single_face=FALSE, const BOOL is_unique=FALSE) | |
U8 | getProfileType () const |
U8 | getPathType () const |
S32 | getNumFaces () const |
S32 | getNumVolumeFaces () const |
F32 | getDetail () const |
const LLVolumeParams & | getParams () const |
LLVolumeParams | getCopyOfParams () const |
const LLProfile & | getProfile () const |
LLPath & | getPath () const |
void | resizePath (S32 length) |
const std::vector< Point > & | getMesh () const |
const LLVector3 & | getMeshPt (const U32 i) const |
void | setDirty () |
void | regen () |
void | genBinormals (S32 face) |
BOOL | isConvex () const |
BOOL | isCap (S32 face) |
BOOL | isFlat (S32 face) |
BOOL | isUnique () const |
S32 | getSculptLevel () const |
S32 * | getTriangleIndices (U32 &num_indices) const |
S32 | getNumTriangleIndices () const |
void | generateSilhouetteVertices (std::vector< LLVector3 > &vertices, std::vector< LLVector3 > &normals, std::vector< S32 > &segments, const LLVector3 &view_vec, const LLMatrix4 &mat, const LLMatrix3 &norm_mat) |
S32 | lineSegmentIntersect (const LLVector3 &start, LLVector3 &end) const |
LLFaceID | generateFaceMask () |
BOOL | isFaceMaskValid (LLFaceID face_mask) |
const LLVolumeFace & | getVolumeFace (const S32 f) const |
void | sculpt (U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8 *sculpt_data, S32 sculpt_level) |
Static Public Member Functions | |
static BOOL | cleanupTriangleData (const S32 num_input_vertices, const std::vector< Point > &input_vertices, const S32 num_input_triangles, S32 *input_triangles, S32 &num_output_vertices, LLVector3 **output_vertices, S32 &num_output_triangles, S32 **output_triangles) |
Public Attributes | |
U32 | mFaceMask |
LLVector3 | mLODScaleBias |
Static Public Attributes | |
static S32 | sNumMeshPoints = 0 |
Protected Types | |
typedef std::vector< LLVolumeFace > | face_list_t |
Protected Member Functions | |
BOOL | generate () |
void | createVolumeFaces () |
Protected Attributes | |
BOOL | mUnique |
F32 | mDetail |
S32 | mSculptLevel |
LLVolumeParams | mParams |
LLPath * | mPathp |
LLProfile * | mProfilep |
std::vector< Point > | mMesh |
BOOL | mGenerateSingleFace |
face_list_t | mVolumeFaces |
Private Member Functions | |
LLVolume (const LLVolume &) | |
~LLVolume () | |
F32 | sculptGetSurfaceArea (U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8 *sculpt_data) |
void | sculptGenerateMapVertices (U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8 *sculpt_data, U8 sculpt_type) |
void | sculptGeneratePlaceholder () |
Friends | |
class | LLVolumeLODGroup |
std::ostream & | operator<< (std::ostream &s, const LLVolume &volume) |
std::ostream & | operator<< (std::ostream &s, const LLVolume *volumep) |
Classes | |
struct | FaceParams |
struct | Point |
Definition at line 826 of file llvolume.h.
typedef std::vector<LLVolumeFace> LLVolume::face_list_t [protected] |
Definition at line 935 of file llvolume.h.
LLVolume::LLVolume | ( | const LLVolume & | ) | [private] |
LLVolume::~LLVolume | ( | ) | [private] |
Definition at line 1682 of file llvolume.cpp.
References mMesh, mPathp, mProfilep, mVolumeFaces, NULL, and sNumMeshPoints.
LLVolume::LLVolume | ( | const LLVolumeParams & | params, | |
const F32 | detail, | |||
const BOOL | generate_single_face = FALSE , |
|||
const BOOL | is_unique = FALSE | |||
) |
Definition at line 1635 of file llvolume.cpp.
References createVolumeFaces(), generate(), LLPathParams::getCurveType(), LLVolumeParams::getPathParams(), LLVolumeParams::getSculptID(), LLUUID::isNull(), LL_PCODE_PATH_FLEXIBLE, mDetail, mFaceMask, mGenerateSingleFace, mParams, mPathp, mProfilep, mSculptLevel, LLMemType::MTYPE_VOLUME, and mUnique.
U8 LLVolume::getProfileType | ( | ) | const [inline] |
Definition at line 851 of file llvolume.h.
Referenced by LLVolumeFace::createSide().
U8 LLVolume::getPathType | ( | ) | const [inline] |
Definition at line 852 of file llvolume.h.
Referenced by LLVolumeFace::createSide().
S32 LLVolume::getNumFaces | ( | ) | const [inline] |
Definition at line 853 of file llvolume.h.
References S32.
Referenced by createVolumeFaces(), LLVOVolume::genBBoxes(), isFaceMaskValid(), lineSegmentIntersect(), LLVOVolume::updateFaceFlags(), and LLVOVolume::updateGeometry().
S32 LLVolume::getNumVolumeFaces | ( | ) | const [inline] |
Definition at line 854 of file llvolume.h.
Referenced by LLViewerCamera::areVertsVisible(), and LLFace::genVolumeBBoxes().
F32 LLVolume::getDetail | ( | ) | const [inline] |
Definition at line 855 of file llvolume.h.
Referenced by LLVOVolume::updateGeometry().
const LLVolumeParams& LLVolume::getParams | ( | ) | const [inline] |
Definition at line 856 of file llvolume.h.
Referenced by LLVOVolume::canBeFlexible(), LLVolumeFace::createCap(), LLVolumeFace::createSide(), LLVolumeImplFlexible::doUpdateGeometry(), LLPanelObject::getState(), LLVOVolume::isFlexible(), operator<<(), LLVolumeImplFlexible::setAttributesOfAllSections(), LLVOVolume::setIsFlexible(), LLVolumeMgr::unrefVolume(), LLVOVolume::updateGeometry(), and LLVOTextBubble::updateGeometry().
LLVolumeParams LLVolume::getCopyOfParams | ( | ) | const [inline] |
Definition at line 857 of file llvolume.h.
const LLProfile& LLVolume::getProfile | ( | ) | const [inline] |
Definition at line 858 of file llvolume.h.
Referenced by LLVolumeFace::createCap(), LLVolumeFace::createSide(), LLVolumeFace::createUnCutCubeCap(), getNumTriangleIndices(), and getTriangleIndices().
LLPath& LLVolume::getPath | ( | ) | const [inline] |
Definition at line 859 of file llvolume.h.
Referenced by LLVolumeFace::createCap(), LLVolumeFace::createSide(), LLVolumeFace::createUnCutCubeCap(), createVolumeFaces(), LLVolumeImplFlexible::doFlexibleUpdate(), getNumTriangleIndices(), and getTriangleIndices().
void LLVolume::resizePath | ( | S32 | length | ) |
Definition at line 1665 of file llvolume.cpp.
References mPathp, mVolumeFaces, and LLPath::resizePath().
Referenced by LLVolumeImplFlexible::doFlexibleUpdate().
const std::vector<Point>& LLVolume::getMesh | ( | ) | const [inline] |
Definition at line 861 of file llvolume.h.
Referenced by LLVolumeFace::createCap(), LLVolumeFace::createSide(), and LLVolumeFace::createUnCutCubeCap().
Definition at line 862 of file llvolume.h.
void LLVolume::setDirty | ( | ) | [inline] |
Definition at line 864 of file llvolume.h.
void LLVolume::regen | ( | ) |
Definition at line 1671 of file llvolume.cpp.
References createVolumeFaces(), and generate().
Referenced by LLVolumeImplFlexible::doFlexibleRebuild().
void LLVolume::genBinormals | ( | S32 | face | ) |
BOOL LLVolume::isConvex | ( | ) | const |
Definition at line 4095 of file llvolume.cpp.
References LLVolumeParams::isConvex(), and mParams.
BOOL LLVolume::isUnique | ( | ) | const [inline] |
Definition at line 872 of file llvolume.h.
Referenced by LLVolumeMgr::unrefVolume().
S32 LLVolume::getSculptLevel | ( | ) | const [inline] |
Definition at line 874 of file llvolume.h.
Referenced by LLVOVolume::sculpt(), and LLVOVolume::updateTextures().
Definition at line 2531 of file llvolume.cpp.
References FALSE, LLProfileParams::getHollow(), getNumTriangleIndices(), getPath(), getProfile(), LLVolumeParams::getProfileParams(), LLProfile::getTotal(), LLProfile::getTotalOut(), i, LLPath::isOpen(), LLProfile::isOpen(), llassert, llendl, llerrs, llinfos, llwarns, LLVector3::magVecSquared(), MAX_VOLUME_TRIANGLE_INDICES, mMesh, mParams, LLPath::mPath, LLProfile::mProfile, LLMemType::MTYPE_VOLUME, LLVector3::mV, NULL, S32, TRUE, and VZ.
S32 LLVolume::getNumTriangleIndices | ( | ) | const |
Definition at line 3154 of file llvolume.cpp.
References LLProfileParams::getHollow(), getPath(), getProfile(), LLVolumeParams::getProfileParams(), LLProfile::getTotal(), LLProfile::getTotalOut(), LLPath::isOpen(), LLProfile::isOpen(), mParams, LLPath::mPath, and S32.
Referenced by getTriangleIndices().
void LLVolume::generateSilhouetteVertices | ( | std::vector< LLVector3 > & | vertices, | |
std::vector< LLVector3 > & | normals, | |||
std::vector< S32 > & | segments, | |||
const LLVector3 & | view_vec, | |||
const LLMatrix4 & | mat, | |||
const LLMatrix3 & | norm_mat | |||
) |
Definition at line 3214 of file llvolume.cpp.
References LLVolumeFace::CAP_MASK, j, LLVector3::magVecSquared(), LLVolumeFace::mEdge, LLVolumeFace::mIndices, LLMemType::MTYPE_VOLUME, LLVolumeFace::mTypeMask, LLVolumeFace::mVertices, mVolumeFaces, LLVector3::normVec(), S32, and vector_append().
Referenced by LLVOVolume::generateSilhouette().
Definition at line 3408 of file llvolume.cpp.
References getNumFaces(), getVolumeFace(), i, j, LLTriangleLineSegmentIntersect(), LLVector3::magVecSquared(), LLVolumeFace::mIndices, LLVolumeFace::mVertices, and S32.
Referenced by LLVOVolume::lineSegmentIntersect().
BOOL LLVolume::cleanupTriangleData | ( | const S32 | num_input_vertices, | |
const std::vector< Point > & | input_vertices, | |||
const S32 | num_input_triangles, | |||
S32 * | input_triangles, | |||
S32 & | num_output_vertices, | |||
LLVector3 ** | output_vertices, | |||
S32 & | num_output_triangles, | |||
S32 ** | output_triangles | |||
) | [static] |
Definition at line 3550 of file llvolume.cpp.
References equalTriangle(), FALSE, i, llendl, llwarns, LLVertexIndexPair::mIndex, LLMemType::MTYPE_VOLUME, LLVertexIndexPair::mVertex, NULL, S32, TRUE, and VERTEX_SLOP_SQRD.
LLFaceID LLVolume::generateFaceMask | ( | ) |
Definition at line 4030 of file llvolume.cpp.
References LLProfileParams::getBegin(), LLProfileParams::getCurveType(), LLProfileParams::getEnd(), LLProfileParams::getHollow(), LLVolumeParams::getProfileParams(), LLPath::isOpen(), LLProfile::isOpen(), LL_FACE_INNER_SIDE, LL_FACE_OUTER_SIDE_0, LL_FACE_PATH_BEGIN, LL_FACE_PATH_END, LL_FACE_PROFILE_BEGIN, LL_FACE_PROFILE_END, LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PROFILE_CIRCLE_HALF, LL_PCODE_PROFILE_EQUALTRI, LL_PCODE_PROFILE_ISOTRI, LL_PCODE_PROFILE_MASK, LL_PCODE_PROFILE_RIGHTTRI, LL_PCODE_PROFILE_SQUARE, llceil(), llendl, llerrs, mParams, mPathp, mProfilep, and S32.
Definition at line 4084 of file llvolume.cpp.
References getNumFaces(), i, LLProfile::mFaces, mProfilep, and S32.
const LLVolumeFace& LLVolume::getVolumeFace | ( | const S32 | f | ) | const [inline] |
Definition at line 909 of file llvolume.h.
Referenced by LLViewerCamera::areVertsVisible(), LLFace::genVolumeBBoxes(), LLVOTextBubble::getGeometry(), LLFace::getGeometryVolume(), lineSegmentIntersect(), LLVOVolume::updateFaceSize(), and LLVOTextBubble::updateFaceSize().
void LLVolume::sculpt | ( | U16 | sculpt_width, | |
U16 | sculpt_height, | |||
S8 | sculpt_components, | |||
const U8 * | sculpt_data, | |||
S32 | sculpt_level | |||
) |
Definition at line 2051 of file llvolume.cpp.
References createVolumeFaces(), FALSE, LLProfile::generate(), LLPath::generate(), LLVolumeParams::getPathParams(), LLVolumeParams::getProfileParams(), LLVolumeParams::getSculptType(), i, LLPath::isOpen(), llendl, llwarns, mDetail, mFaceMask, LLProfile::mFaces, mMesh, mParams, LLPath::mPath, mPathp, LLProfile::mProfile, mProfilep, mSculptLevel, LLMemType::MTYPE_VOLUME, mVolumeFaces, NULL, S32, SCULPT_MIN_AREA, sculptGenerateMapVertices(), sculptGeneratePlaceholder(), sculptGetSurfaceArea(), sNumMeshPoints, and TRUE.
Referenced by LLVOVolume::sculpt().
F32 LLVolume::sculptGetSurfaceArea | ( | U16 | sculpt_width, | |
U16 | sculpt_height, | |||
S8 | sculpt_components, | |||
const U8 * | sculpt_data | |||
) | [private] |
Definition at line 1912 of file llvolume.cpp.
References LLVector3::magVec(), LLPath::mPath, mPathp, LLProfile::mProfile, mProfilep, NULL, S32, and sculpt_st_to_vector().
Referenced by sculpt().
void LLVolume::sculptGenerateMapVertices | ( | U16 | sculpt_width, | |
U16 | sculpt_height, | |||
S8 | sculpt_components, | |||
const U8 * | sculpt_data, | |||
U8 | sculpt_type | |||
) | [private] |
Definition at line 1980 of file llvolume.cpp.
References i, LL_SCULPT_TYPE_CYLINDER, LL_SCULPT_TYPE_SPHERE, LL_SCULPT_TYPE_TORUS, mMesh, LLPath::mPath, mPathp, LLVolume::Point::mPos, LLProfile::mProfile, mProfilep, LLMemType::MTYPE_VOLUME, S32, and sculpt_xy_to_vector().
Referenced by sculpt().
void LLVolume::sculptGeneratePlaceholder | ( | ) | [private] |
Definition at line 1947 of file llvolume.cpp.
References F_PI, i, mMesh, LLPath::mPath, mPathp, LLVolume::Point::mPos, LLProfile::mProfile, mProfilep, LLMemType::MTYPE_VOLUME, LLVector3::mV, RADIUS, and S32.
Referenced by sculpt().
BOOL LLVolume::generate | ( | ) | [protected] |
Definition at line 1692 of file llvolume.cpp.
References FALSE, LLProfile::generate(), LLPath::generate(), LLProfileParams::getCurveType(), LLPathParams::getCurveType(), LLVolumeParams::getPathParams(), LLVolumeParams::getProfileParams(), LLPathParams::getScale(), LLPath::isOpen(), LL_PCODE_PATH_CIRCLE, LL_PCODE_PATH_LINE, LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PROFILE_EQUALTRI, LL_PCODE_PROFILE_ISOTRI, LL_PCODE_PROFILE_RIGHTTRI, LL_PCODE_PROFILE_SQUARE, llassert_always, mDetail, mFaceMask, LLProfile::mFaces, mLODScaleBias, mMesh, mParams, LLPath::mPath, mPathp, LLVolume::Point::mPos, LLProfile::mProfile, mProfilep, LLMemType::MTYPE_VOLUME, LLVector3::mV, LLVector2::mV, S32, LLVector3::setVec(), sNumMeshPoints, and TRUE.
Referenced by LLVolume(), and regen().
void LLVolume::createVolumeFaces | ( | ) | [protected] |
Definition at line 1778 of file llvolume.cpp.
References LLVolumeFace::BOTTOM_MASK, LLVolumeFace::CAP_MASK, LLVolumeFace::END_MASK, FALSE, LLVolumeFace::FLAT_MASK, LLProfileParams::getHollow(), getNumFaces(), getPath(), LLVolumeParams::getProfileParams(), LLVolumeFace::HOLLOW_MASK, i, LLVolumeFace::INNER_MASK, LLProfile::isOpen(), LL_FACE_INNER_SIDE, LL_FACE_PATH_BEGIN, LL_FACE_PATH_END, LL_FACE_PROFILE_BEGIN, LL_FACE_PROFILE_END, llassert, LLVolumeFace::mBeginS, LLVolumeFace::mBeginT, LLProfile::Face::mCap, LLProfile::Face::mCount, LLProfile::Face::mFaceID, LLProfile::mFaces, LLProfile::Face::mFlat, mGenerateSingleFace, LLVolumeFace::mID, LLProfile::Face::mIndex, LLVolumeFace::mNumS, LLVolumeFace::mNumT, mParams, LLPath::mPath, mProfilep, LLMemType::MTYPE_VOLUME, LLVolumeFace::mTypeMask, mVolumeFaces, LLVolumeFace::OPEN_MASK, LLVolumeFace::OUTER_MASK, S32, LLVolumeFace::SIDE_MASK, LLVolumeFace::TOP_MASK, and TRUE.
Referenced by LLVolume(), regen(), and sculpt().
friend class LLVolumeLODGroup [friend] |
Definition at line 828 of file llvolume.h.
std::ostream& operator<< | ( | std::ostream & | s, | |
const LLVolume & | volume | |||
) | [friend] |
Definition at line 4164 of file llvolume.cpp.
std::ostream& operator<< | ( | std::ostream & | s, | |
const LLVolume * | volumep | |||
) | [friend] |
Definition at line 4174 of file llvolume.cpp.
S32 LLVolume::sNumMeshPoints = 0 [static] |
BOOL LLVolume::mUnique [protected] |
F32 LLVolume::mDetail [protected] |
S32 LLVolume::mSculptLevel [protected] |
LLVolumeParams LLVolume::mParams [protected] |
Definition at line 929 of file llvolume.h.
Referenced by createVolumeFaces(), generate(), generateFaceMask(), getNumTriangleIndices(), getTriangleIndices(), isConvex(), LLVolume(), and sculpt().
LLPath* LLVolume::mPathp [protected] |
Definition at line 930 of file llvolume.h.
Referenced by generate(), generateFaceMask(), LLVolume(), operator<<(), resizePath(), sculpt(), sculptGenerateMapVertices(), sculptGeneratePlaceholder(), sculptGetSurfaceArea(), and ~LLVolume().
LLProfile* LLVolume::mProfilep [protected] |
Definition at line 931 of file llvolume.h.
Referenced by createVolumeFaces(), generate(), generateFaceMask(), isCap(), isFaceMaskValid(), isFlat(), LLVolume(), operator<<(), sculpt(), sculptGenerateMapVertices(), sculptGeneratePlaceholder(), sculptGetSurfaceArea(), and ~LLVolume().
std::vector<Point> LLVolume::mMesh [protected] |
Definition at line 932 of file llvolume.h.
Referenced by generate(), getTriangleIndices(), sculpt(), sculptGenerateMapVertices(), sculptGeneratePlaceholder(), and ~LLVolume().
BOOL LLVolume::mGenerateSingleFace [protected] |
face_list_t LLVolume::mVolumeFaces [protected] |
Definition at line 936 of file llvolume.h.
Referenced by createVolumeFaces(), genBinormals(), generateSilhouetteVertices(), resizePath(), sculpt(), and ~LLVolume().