Index: doc/contributions.txt =================================================================== --- doc/contributions.txt (revision 1185) +++ doc/contributions.txt (working copy) @@ -395,6 +395,8 @@ Zipherius Turas VWR-76 VWR-77 +Zwagoth Klaar + VWR-9203 Kerutsen Sellery VWR-1350 Index: indra/llmath/llvolume.cpp =================================================================== --- indra/llmath/llvolume.cpp (revision 1185) +++ indra/llmath/llvolume.cpp (working copy) @@ -2002,8 +2002,14 @@ } } +//ZWAGOTH // create the vertices from the map -void LLVolume::sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, U8 sculpt_type) +void LLVolume::sculptGenerateMapVertices(U16 sculpt_width, + U16 sculpt_height, + S8 sculpt_components, + const U8* sculpt_data, + U8 sculpt_type, + BOOL is_flexible) { U8 sculpt_stitching = sculpt_type & LL_SCULPT_TYPE_MASK; BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT; @@ -2082,6 +2088,13 @@ pt.mPos = sculpt_xy_to_vector(x, y, sculpt_width, sculpt_height, sculpt_components, sculpt_data); + //ZWAGOTH + if(is_flexible) + { + pt.mPos = pt.mPos * mPathp->mPath[s].mRot; + pt.mPos += mPathp->mPath[s].mPos; + } + if (sculpt_mirror) { pt.mPos.mV[VX] *= -1.f; @@ -2144,8 +2157,14 @@ s = vertices * vertices / t; } +//ZWAGOTH // sculpt replaces generate() for sculpted surfaces -void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level) +void LLVolume::sculpt(U16 sculpt_width, + U16 sculpt_height, + S8 sculpt_components, + const U8* sculpt_data, + S32 sculpt_level, + BOOL is_flexible) { LLMemType m1(LLMemType::MTYPE_VOLUME); U8 sculpt_type = mParams.getSculptType(); @@ -2189,7 +2208,8 @@ } else { - sculptGenerateMapVertices(sculpt_width, sculpt_height, sculpt_components, sculpt_data, sculpt_type); + //ZWAGOTH + sculptGenerateMapVertices(sculpt_width, sculpt_height, sculpt_components, sculpt_data, sculpt_type, is_flexible); } for (S32 i = 0; i < (S32)mProfilep->mFaces.size(); i++) Index: indra/llmath/llvolume.h =================================================================== --- indra/llmath/llvolume.h (revision 1185) +++ indra/llmath/llvolume.h (working copy) @@ -945,10 +945,22 @@ U32 mFaceMask; // bit array of which faces exist in this volume LLVector3 mLODScaleBias; // vector for biasing LOD based on scale - void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level); + //ZWAGOTH + void sculpt(U16 sculpt_width, + U16 sculpt_height, + S8 sculpt_components, + const U8* sculpt_data, + S32 sculpt_level, + BOOL is_flexible); private: 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); + //ZWAGOTH + void sculptGenerateMapVertices(U16 sculpt_width, + U16 sculpt_height, + S8 sculpt_components, + const U8* sculpt_data, + U8 sculpt_type, + BOOL is_flexible); void sculptGeneratePlaceholder(); void sculptCalcMeshResolution(U16 width, U16 height, U8 type, S32& s, S32& t); Index: indra/newview/llflexibleobject.cpp =================================================================== --- indra/newview/llflexibleobject.cpp (revision 1185) +++ indra/newview/llflexibleobject.cpp (working copy) @@ -581,11 +581,13 @@ mSection[i].mdPosition = (mSection[i].mPosition - mSection[i-1].mPosition) * inv_section_length; // Create points + // ZWAGOTH + S32 path_jump = isSculptedFlex() ? 2 : 1; S32 num_render_sections = 1<getPathLength() != num_render_sections+1) + if (path->getPathLength() != num_render_sections*path_jump+1) { ((LLVOVolume*) mVO)->mVolumeChanged = TRUE; - volume->resizePath(num_render_sections+1); + volume->resizePath(num_render_sections*path_jump+1); } LLPath::PathPt *new_point; @@ -611,10 +613,11 @@ LLVector4(y_axis, 0.f), LLVector4(z_axis, 0.f), LLVector4(delta_pos, 1.f)); - + + //ZWAGOTH for (i=0; i<=num_render_sections; ++i) { - new_point = &path->mPath[i]; + new_point = &path->mPath[i*path_jump]; LLVector3 pos = newSection[i].mPosition * rel_xform; LLQuaternion rot = mSection[i].mAxisRotation * newSection[i].mRotation * delta_rot; @@ -626,9 +629,27 @@ new_point->mRot = rot; new_point->mScale = newSection[i].mScale; - new_point->mTexT = ((F32)i)/(num_render_sections); + new_point->mTexT = ((F32)i*path_jump)/(num_render_sections*path_jump); } + //ZWAGOTH + if(isSculptedFlex()) + { + LLPath::PathPt *prev_point, *next_point; + for(i=1; i<=(num_render_sections*path_jump); i+=path_jump) + { + new_point = &path->mPath[i]; + prev_point = &path->mPath[i-1]; + next_point = &path->mPath[i+1]; + + new_point->mPos = lerp(prev_point->mPos,next_point->mPos,0.5f); + new_point->mRot = lerp(0.5f,prev_point->mRot,next_point->mRot); + new_point->mScale = lerp(prev_point->mScale,next_point->mScale,0.5); + new_point->mTexT = ((F32)i)/(num_render_sections*path_jump); + } + } + + mLastSegmentRotation = parentSegmentRotation; } @@ -642,8 +663,17 @@ void LLVolumeImplFlexible::doFlexibleRebuild() { - LLVolume* volume = mVO->getVolume(); - volume->regen(); + //ZWAGOTH + if(((LLVOVolume*)mVO)->isSculpted()) + { + LLVOVolume* vovol = (LLVOVolume*)mVO; + vovol->sculpt(); + } + else + { + LLVolume* volume = mVO->getVolume(); + volume->regen(); + } mUpdated = TRUE; } Index: indra/newview/llflexibleobject.h =================================================================== --- indra/newview/llflexibleobject.h (revision 1185) +++ indra/newview/llflexibleobject.h (working copy) @@ -99,6 +99,9 @@ void doFlexibleUpdate(); // Called to update the simulation void doFlexibleRebuild(); // Called to rebuild the geometry void preRebuild(); + //ZWAGOTH + BOOL isSculptedFlex() { return (((LLVOVolume*)mVO)->isSculpted() && ((LLVOVolume*)mVO)->isFlexible()); } +// S32 getMaxFlexSections() { return (FLEXIBLE_OBJECT_MAX_SECTIONS * (isSculptedFlex() ? 2 : 1)); } //void setAttributes( LLFlexibleObjectData ); void setParentPositionAndRotationDirectly( LLVector3 p, LLQuaternion r ); Index: indra/newview/llfloaterimagepreview.cpp =================================================================== --- indra/newview/llfloaterimagepreview.cpp (revision 1185) +++ indra/newview/llfloaterimagepreview.cpp (working copy) @@ -809,7 +809,8 @@ if (imagep) { - mVolume->sculpt(imagep->getWidth(), imagep->getHeight(), imagep->getComponents(), imagep->getData(), 0); + //ZWAGOTH + mVolume->sculpt(imagep->getWidth(), imagep->getHeight(), imagep->getComponents(), imagep->getData(), 0, FALSE); } } Index: indra/newview/llvovolume.cpp =================================================================== --- indra/newview/llvovolume.cpp (revision 1185) +++ indra/newview/llvovolume.cpp (working copy) @@ -768,7 +768,7 @@ return; } - if (current_discard == discard_level) // no work to do here + if (current_discard == discard_level && !isFlexible()) // no work to do here return; LLPointer raw_image = new LLImageRaw(); @@ -796,7 +796,7 @@ sculpt_data = raw_image->getData(); } - getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level); + getVolume()->sculpt(sculpt_width, sculpt_height, sculpt_components, sculpt_data, discard_level, isFlexible()); } } @@ -1626,7 +1626,8 @@ BOOL LLVOVolume::canBeFlexible() const { U8 path = getVolume()->getParams().getPathParams().getCurveType(); - return (path == LL_PCODE_PATH_FLEXIBLE || path == LL_PCODE_PATH_LINE); + //ZWAGOTH + return (path == LL_PCODE_PATH_FLEXIBLE || path == LL_PCODE_PATH_LINE || isSculpted()); } BOOL LLVOVolume::setIsFlexible(BOOL is_flexible) Index: indra/newview/skins/default/xui/en-us/floater_about.xml =================================================================== --- indra/newview/skins/default/xui/en-us/floater_about.xml (revision 1185) +++ indra/newview/skins/default/xui/en-us/floater_about.xml (working copy) @@ -9,7 +9,7 @@ word_wrap="true"> Second Life is brought to you by Philip, Tessa, Andrew, Cory, Ben, Bunny, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Hunter, Ian, Jeff, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, BillTodd, Ryan, Zach, Sarah, Nova, Otakon, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, DanceStar, Jeska, Hungry, Torley, Kona, Callum, Charity, Ventrella, Jack, Uncle, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Monroe, David, Tess, Lizzie, Patsy, Pony, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, James, Katie, Dawn, Katt, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn and many others. - Thank you to the following residents for helping to ensure that this is the best version yet: aaron23 decuir, Abra Miles, absolute balderdash, adelle fitzgerald, Aeron Kohime, Aki Shichiroji, Alger Meads, Alissa Sabre, AlwaysIcey Mapholisto, Arawn Spitteler, Aren Mandala, Arianna Wrigglesworth, Bagushii Kohime, Balpien Hammerer, Blinking2342 Blinker, byakuya runo, Capucchy Streeter, Chandra Jun, Coyote Pace, Crusher Soderstrom, Cummere Mayo, cyberrosa Rossini, Dael Ra, danana dodonpa, Darek Deluca, Davec Horsforth, django yifu, draco crane, Dre Dagostino, Ephyu Reino, etan quan, Fenrix Murakami, Fledhyris Proudhon, Fred Wardhani, Frederich Courier, garth fairchang, Gellan Glenelg, Geraldine Giha, GOLAN Eilde, gonzo joubert, Hachiro Yokosuka, Hampton Hax, harleywood guru, Hevenz Vansant, imnotgoing sideways, Jaden Giles, Jeanette Janus, Karl Dorance, keaton Akina, Khashai Steinbeck, KiPSOFT Tuqiri, kirstenlee Cinquetti, Kitty Barnett, Laurent Vesta, Lazure Ryba, Lima Vesperia, Linzi Bingyi, Lisa Lowe, LuDon Ninetails, Mark Rosenbaum, McCabe Maxsted, Michi Lumin, Midi Aeon, ml0rtd kit, Mo Eriksen, Morice Flanagan, Mysterion Aeon, Nad Gough, norgan torok, Pygar Bu, Qie Niangao, rachel corleone, Rado Arado, roberto salubrius, Royer Pessoa, samia bechir, Sasha Nurmi, Sean Heying, Selkit Diller, Shadow Pidgeon, simon kline, Smokie Ember, Soap Clawtooth, Strife Onizuka, Tal Chernov, Talan Hyun, tangletwigs fairymeadow, Tanya Spinotti, Tayra Dagostino, Teebone Aeon, Theremes Langdon, Thraxis Epsilon, tucor Capalini, Vasko Hawker, VenusMari Zapedzki, Vex Streeter, Viktoria Dovgal, Vincent Nacon, Viridian Exonar, Vivienne Schell, WarKirby Magojiro, Wilton Lundquist, Yukinoroh Kamachi, Zyzzy Zarf + Thank you to the following residents for helping to ensure that this is the best version yet: aaron23 decuir, Abra Miles, absolute balderdash, adelle fitzgerald, Aeron Kohime, Aki Shichiroji, Alger Meads, Alissa Sabre, AlwaysIcey Mapholisto, Arawn Spitteler, Aren Mandala, Arianna Wrigglesworth, Bagushii Kohime, Balpien Hammerer, Blinking2342 Blinker, byakuya runo, Capucchy Streeter, Chandra Jun, Coyote Pace, Crusher Soderstrom, Cummere Mayo, cyberrosa Rossini, Dael Ra, danana dodonpa, Darek Deluca, Davec Horsforth, django yifu, draco crane, Dre Dagostino, Ephyu Reino, etan quan, Fenrix Murakami, Fledhyris Proudhon, Fred Wardhani, Frederich Courier, garth fairchang, Gellan Glenelg, Geraldine Giha, GOLAN Eilde, gonzo joubert, Hachiro Yokosuka, Hampton Hax, harleywood guru, Hevenz Vansant, imnotgoing sideways, Jaden Giles, Jeanette Janus, Karl Dorance, keaton Akina, Khashai Steinbeck, KiPSOFT Tuqiri, kirstenlee Cinquetti, Kitty Barnett, Laurent Vesta, Lazure Ryba, Lima Vesperia, Linzi Bingyi, Lisa Lowe, LuDon Ninetails, Mark Rosenbaum, McCabe Maxsted, Michi Lumin, Midi Aeon, ml0rtd kit, Mo Eriksen, Morice Flanagan, Mysterion Aeon, Nad Gough, norgan torok, Pygar Bu, Qie Niangao, rachel corleone, Rado Arado, roberto salubrius, Royer Pessoa, samia bechir, Sasha Nurmi, Sean Heying, Selkit Diller, Shadow Pidgeon, simon kline, Smokie Ember, Soap Clawtooth, Strife Onizuka, Tal Chernov, Talan Hyun, tangletwigs fairymeadow, Tanya Spinotti, Tayra Dagostino, Teebone Aeon, Theremes Langdon, Thraxis Epsilon, tucor Capalini, Vasko Hawker, VenusMari Zapedzki, Vex Streeter, Viktoria Dovgal, Vincent Nacon, Viridian Exonar, Vivienne Schell, WarKirby Magojiro, Wilton Lundquist, Yukinoroh Kamachi, Zwagoth Klaar, Zyzzy Zarf 3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion APR Copyright (C) 2000-2004 The Apache Software Foundation