LLProfile Class Reference

#include <llvolume.h>

Collaboration diagram for LLProfile:

Collaboration graph
List of all members.

Public Member Functions

 LLProfile (const LLProfileParams &params)
 ~LLProfile ()
S32 getTotal () const
S32 getTotalOut () const
BOOL isHollow () const
BOOL isFlat (S32 face) const
BOOL isOpen () const
void setDirty ()
BOOL generate (BOOL path_open, F32 detail=1.0f, S32 split=0, BOOL is_sculpted=FALSE)
BOOL isConcave () const

Public Attributes

const LLProfileParamsmParams
std::vector< LLVector3mProfile
std::vector< LLVector2mNormals
std::vector< FacemFaces
std::vector< LLVector3mEdgeNormals
std::vector< LLVector3mEdgeCenters
F32 mMaxX
F32 mMinX

Protected Member Functions

void genNormals ()
void genNGon (S32 sides, F32 offset=0.0f, F32 bevel=0.0f, F32 ang_scale=1.f, S32 split=0)
FaceaddHole (BOOL flat, F32 sides, F32 offset, F32 box_hollow, F32 ang_scale, S32 split=0)
FaceaddCap (S16 faceID)
FaceaddFace (S32 index, S32 count, F32 scaleU, S16 faceID, BOOL flat)

Protected Attributes

BOOL mOpen
BOOL mConcave
BOOL mDirty
S32 mTotalOut
S32 mTotal


std::ostream & operator<< (std::ostream &s, const LLProfile &profile)


struct  Face

Detailed Description

Definition at line 638 of file llvolume.h.

Constructor & Destructor Documentation

LLProfile::LLProfile ( const LLProfileParams params  )  [inline]

Definition at line 641 of file llvolume.h.

LLProfile::~LLProfile (  ) 

Definition at line 1605 of file llvolume.cpp.

Member Function Documentation

LLProfile::Face * LLProfile::addCap ( S16  faceID  )  [protected]

Definition at line 156 of file llvolume.cpp.

References face, mFaces, mTotal, 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 168 of file llvolume.cpp.

References face, FALSE, mFaces, and vector_append().

Referenced by addHole(), and generate().

LLProfile::Face * LLProfile::addHole ( BOOL  flat,
F32  sides,
F32  offset,
F32  box_hollow,
F32  ang_scale,
S32  split = 0 
) [protected]

Definition at line 431 of file llvolume.cpp.

References addFace(), face, genNGon(), i, j, LL_FACE_INNER_SIDE, llfloor(), mFaces, mProfile, mTotal, mTotalOut, and S32.

Referenced by generate().

BOOL LLProfile::generate ( BOOL  path_open,
F32  detail = 1.0f,
S32  split = 0,
BOOL  is_sculpted = FALSE 

Definition at line 492 of file llvolume.cpp.

References addCap(), addFace(), addHole(), end, f, 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, mParams, mProfile, mTotal, mTotalOut, S32, sculpt_sides(), and TRUE.

Referenced by LLVolume::generate(), and LLVolume::sculpt().

void LLProfile::genNGon ( S32  sides,
F32  offset = 0.0f,
F32  bevel = 0.0f,
F32  ang_scale = 1.f,
S32  split = 0 
) [protected]

Definition at line 185 of file llvolume.cpp.

References end, f, F_PI, FALSE, LLProfileParams::getBegin(), LLProfileParams::getEnd(), i, isHollow(), lerp(), llround(), mConcave, mMaxX, mMinX, mOpen, mParams, mProfile, mTotal, LLVector3::mV, p, S32, LLVector3::setVec(), t, TRUE, and VX.

Referenced by addHole(), and generate().

void LLProfile::genNormals (  )  [protected]

Definition at line 330 of file llvolume.cpp.

References count, f, i1, i2, isConcave(), isHollow(), lerp(), LLVector3::magVecSquared(), mEdgeCenters, mEdgeNormals, mNormals, mProfile, mTotal, mTotalOut, LLVector3::mV, LLVector3::normVec(), S32, LLVector2::setVec(), VX, VY, VZ, and LLVector3::z_axis.

S32 LLProfile::getTotal (  )  const [inline]

Definition at line 653 of file llvolume.h.

References mTotal.

Referenced by LLVolumeFace::createCap(), LLVolumeFace::createSide(), LLVolumeFace::createUnCutCubeCap(), and LLVolume::getTriangleIndices().

S32 LLProfile::getTotalOut (  )  const [inline]

Definition at line 654 of file llvolume.h.

References mTotalOut.

Referenced by LLVolume::getTriangleIndices().

BOOL LLProfile::isConcave (  )  const [inline]

Definition at line 660 of file llvolume.h.

References mConcave.

Referenced by genNormals().

BOOL LLProfile::isFlat ( S32  face  )  const [inline]

Definition at line 656 of file llvolume.h.

References mCount, and mFaces.

BOOL LLProfile::isHollow (  )  const [inline]

Definition at line 655 of file llvolume.h.

References LLProfileParams::getHollow(), and mParams.

Referenced by LLVolume::createVolumeFaces(), LLVolume::generateFaceMask(), genNGon(), genNormals(), and LLVolume::getTriangleIndices().

BOOL LLProfile::isOpen (  )  const [inline]

Definition at line 657 of file llvolume.h.

References mOpen.

Referenced by LLVolumeFace::createSide(), LLVolume::createVolumeFaces(), LLVolume::generateFaceMask(), and LLVolume::getTriangleIndices().

void LLProfile::setDirty (  )  [inline]

Definition at line 658 of file llvolume.h.

References mDirty, and TRUE.

Referenced by LLVolume::setDirty().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const LLProfile profile 
) [friend]

Definition at line 3925 of file llvolume.cpp.

Member Data Documentation

BOOL LLProfile::mConcave [protected]

Definition at line 694 of file llvolume.h.

Referenced by genNGon(), and isConcave().

BOOL LLProfile::mDirty [protected]

Definition at line 695 of file llvolume.h.

Referenced by generate(), operator<<(), and setDirty().

std::vector<LLVector3> LLProfile::mEdgeCenters

Definition at line 678 of file llvolume.h.

Referenced by genNormals().

std::vector<LLVector3> LLProfile::mEdgeNormals

Definition at line 677 of file llvolume.h.

Referenced by genNormals().

std::vector<Face> LLProfile::mFaces

Definition at line 676 of file llvolume.h.

Referenced by addCap(), addFace(), addHole(), LLVolume::createVolumeFaces(), LLVolume::generate(), generate(), LLVolume::getNumFaces(), LLVolume::isCap(), LLVolume::isFaceMaskValid(), isFlat(), LLVolume::isFlat(), and LLVolume::sculpt().

F32 LLProfile::mMaxX

Definition at line 679 of file llvolume.h.

Referenced by genNGon().

F32 LLProfile::mMinX

Definition at line 680 of file llvolume.h.

Referenced by genNGon().

std::vector<LLVector2> LLProfile::mNormals

Definition at line 675 of file llvolume.h.

Referenced by genNormals().

BOOL LLProfile::mOpen [protected]

Definition at line 693 of file llvolume.h.

Referenced by generate(), genNGon(), isOpen(), and operator<<().

const LLProfileParams& LLProfile::mParams

Definition at line 662 of file llvolume.h.

Referenced by LLVolumeFace::createCap(), LLVolume::generate(), generate(), LLVolume::generateFaceMask(), genNGon(), LLVolume::getProfileType(), and isHollow().

std::vector<LLVector3> LLProfile::mProfile

Definition at line 674 of file llvolume.h.

Referenced by addHole(), LLVolumeFace::createCap(), LLVolumeFace::createSide(), LLVolumeFace::createUnCutCubeCap(), LLVolume::generate(), generate(), genNGon(), genNormals(), LLVolume::getTriangleIndices(), and LLVolume::sculpt().

S32 LLProfile::mTotal [protected]

Definition at line 698 of file llvolume.h.

Referenced by addCap(), addHole(), generate(), genNGon(), genNormals(), getTotal(), and operator<<().

S32 LLProfile::mTotalOut [protected]

Definition at line 697 of file llvolume.h.

Referenced by addHole(), generate(), genNormals(), getTotalOut(), and operator<<().

The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:40 2010 for Second Life Viewer by  doxygen 1.4.7