#include <llvolume.h>
Public Member Functions | |
LLProfile () | |
~LLProfile () | |
S32 | getTotal () const |
S32 | getTotalOut () const |
BOOL | isFlat (S32 face) const |
BOOL | isOpen () const |
void | setDirty () |
BOOL | generate (const LLProfileParams ¶ms, BOOL path_open, F32 detail=1.0f, S32 split=0, BOOL is_sculpted=FALSE) |
BOOL | isConcave () const |
Public Attributes | |
std::vector< LLVector3 > | mProfile |
std::vector< LLVector2 > | mNormals |
std::vector< Face > | mFaces |
std::vector< LLVector3 > | mEdgeNormals |
std::vector< LLVector3 > | mEdgeCenters |
F32 | mMaxX |
F32 | mMinX |
Protected Member Functions | |
void | genNormals (const LLProfileParams ¶ms) |
void | genNGon (const LLProfileParams ¶ms, S32 sides, F32 offset=0.0f, F32 bevel=0.0f, F32 ang_scale=1.f, S32 split=0) |
Face * | addHole (const LLProfileParams ¶ms, BOOL flat, F32 sides, F32 offset, F32 box_hollow, F32 ang_scale, S32 split=0) |
Face * | addCap (S16 faceID) |
Face * | addFace (S32 index, S32 count, F32 scaleU, S16 faceID, BOOL flat) |
Protected Attributes | |
BOOL | mOpen |
BOOL | mConcave |
BOOL | mDirty |
S32 | mTotalOut |
S32 | mTotal |
Friends | |
std::ostream & | operator<< (std::ostream &s, const LLProfile &profile) |
Classes | |
struct | Face |
Definition at line 644 of file llvolume.h.
LLProfile::LLProfile | ( | ) | [inline] |
Definition at line 647 of file llvolume.h.
LLProfile::~LLProfile | ( | ) |
Definition at line 1627 of file llvolume.cpp.
S32 LLProfile::getTotal | ( | ) | const [inline] |
Definition at line 658 of file llvolume.h.
Referenced by LLVolumeFace::createCap(), LLVolumeFace::createSide(), LLVolumeFace::createUnCutCubeCap(), LLVolume::getNumTriangleIndices(), and LLVolume::getTriangleIndices().
S32 LLProfile::getTotalOut | ( | ) | const [inline] |
Definition at line 659 of file llvolume.h.
Referenced by LLVolume::getNumTriangleIndices(), and LLVolume::getTriangleIndices().
BOOL LLProfile::isOpen | ( | ) | const [inline] |
Definition at line 661 of file llvolume.h.
Referenced by LLVolumeFace::createSide(), LLVolume::createVolumeFaces(), LLVolume::generateFaceMask(), LLVolume::getNumTriangleIndices(), and LLVolume::getTriangleIndices().
void LLProfile::setDirty | ( | ) | [inline] |
BOOL LLProfile::generate | ( | const LLProfileParams & | params, | |
BOOL | path_open, | |||
F32 | detail = 1.0f , |
|||
S32 | split = 0 , |
|||
BOOL | is_sculpted = FALSE | |||
) |
Definition at line 499 of file llvolume.cpp.
References addCap(), addFace(), addHole(), FALSE, genNGon(), LLProfileParams::getBegin(), LLProfileParams::getCurveType(), LLProfileParams::getEnd(), LLProfileParams::getHollow(), i, LL_FACE_OUTER_SIDE_0, LL_FACE_PATH_BEGIN, LL_FACE_PATH_END, LL_FACE_PROFILE_BEGIN, LL_FACE_PROFILE_END, LL_PCODE_HOLE_CIRCLE, LL_PCODE_HOLE_MASK, LL_PCODE_HOLE_SAME, LL_PCODE_HOLE_SQUARE, LL_PCODE_HOLE_TRIANGLE, 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, llfloor(), llinfos, llwarns, mDirty, mFaces, MIN_DETAIL_FACES, MIN_LOD, mOpen, mProfile, mTotal, mTotalOut, LLMemType::MTYPE_VOLUME, S32, sculpt_sides(), and TRUE.
Referenced by LLVolume::generate(), and LLVolume::sculpt().
BOOL LLProfile::isConcave | ( | ) | const [inline] |
Definition at line 664 of file llvolume.h.
Referenced by genNormals().
void LLProfile::genNormals | ( | const LLProfileParams & | params | ) | [protected] |
Definition at line 337 of file llvolume.cpp.
References LLProfileParams::getHollow(), isConcave(), lerp(), LLVector3::magVecSquared(), mEdgeCenters, mEdgeNormals, mNormals, mProfile, mTotal, mTotalOut, LLVector3::mV, LLVector3::normVec(), S32, LLVector2::setVec(), VX, VY, VZ, and LLVector3::z_axis.
void LLProfile::genNGon | ( | const LLProfileParams & | params, | |
S32 | sides, | |||
F32 | offset = 0.0f , |
|||
F32 | bevel = 0.0f , |
|||
F32 | ang_scale = 1.f , |
|||
S32 | split = 0 | |||
) | [protected] |
Definition at line 190 of file llvolume.cpp.
References F_PI, FALSE, LLProfileParams::getBegin(), LLProfileParams::getEnd(), LLProfileParams::getHollow(), i, lerp(), llround(), mConcave, mMaxX, mMinX, mOpen, mProfile, mTotal, LLMemType::MTYPE_VOLUME, LLVector3::mV, p, S32, LLVector3::setVec(), TRUE, and VX.
Referenced by addHole(), and generate().
LLProfile::Face * LLProfile::addHole | ( | const LLProfileParams & | params, | |
BOOL | flat, | |||
F32 | sides, | |||
F32 | offset, | |||
F32 | box_hollow, | |||
F32 | ang_scale, | |||
S32 | split = 0 | |||
) | [protected] |
Definition at line 437 of file llvolume.cpp.
References addFace(), genNGon(), i, j, LL_FACE_INNER_SIDE, llfloor(), mFaces, mProfile, mTotal, mTotalOut, and S32.
Referenced by generate().
LLProfile::Face * LLProfile::addCap | ( | S16 | faceID | ) | [protected] |
Definition at line 157 of file llvolume.cpp.
References LLProfile::Face::mCap, LLProfile::Face::mCount, LLProfile::Face::mFaceID, mFaces, LLProfile::Face::mIndex, LLProfile::Face::mScaleU, mTotal, LLMemType::MTYPE_VOLUME, TRUE, and vector_append().
Referenced by generate().
LLProfile::Face * LLProfile::addFace | ( | S32 | index, | |
S32 | count, | |||
F32 | scaleU, | |||
S16 | faceID, | |||
BOOL | flat | |||
) | [protected] |
Definition at line 171 of file llvolume.cpp.
References FALSE, LLProfile::Face::mCap, LLProfile::Face::mCount, LLProfile::Face::mFaceID, mFaces, LLProfile::Face::mFlat, LLProfile::Face::mIndex, LLProfile::Face::mScaleU, LLMemType::MTYPE_VOLUME, and vector_append().
Referenced by addHole(), and generate().
std::ostream& operator<< | ( | std::ostream & | s, | |
const LLProfile & | profile | |||
) | [friend] |
Definition at line 4143 of file llvolume.cpp.
std::vector<LLVector3> LLProfile::mProfile |
Definition at line 676 of file llvolume.h.
Referenced by addHole(), LLVolumeFace::createCap(), LLVolumeFace::createSide(), LLVolumeFace::createUnCutCubeCap(), LLVolume::generate(), generate(), genNGon(), genNormals(), LLVolume::getTriangleIndices(), LLVolume::sculpt(), LLVolume::sculptGenerateMapVertices(), LLVolume::sculptGeneratePlaceholder(), and LLVolume::sculptGetSurfaceArea().
std::vector<LLVector2> LLProfile::mNormals |
std::vector<Face> LLProfile::mFaces |
Definition at line 678 of file llvolume.h.
Referenced by addCap(), addFace(), addHole(), LLVolume::createVolumeFaces(), LLVolume::generate(), generate(), LLVolume::isCap(), LLVolume::isFaceMaskValid(), LLVolume::isFlat(), and LLVolume::sculpt().
std::vector<LLVector3> LLProfile::mEdgeNormals |
std::vector<LLVector3> LLProfile::mEdgeCenters |
BOOL LLProfile::mOpen [protected] |
BOOL LLProfile::mConcave [protected] |
BOOL LLProfile::mDirty [protected] |
S32 LLProfile::mTotalOut [protected] |
Definition at line 699 of file llvolume.h.
Referenced by addHole(), generate(), genNormals(), and operator<<().
S32 LLProfile::mTotal [protected] |
Definition at line 700 of file llvolume.h.
Referenced by addCap(), addHole(), generate(), genNGon(), genNormals(), and operator<<().