About Store Forum Documentation Contact
Donations:
179$/mo



Post Reply 
How does mesh editor center?
Author Message
Zervox Offline
Member

Post: #1
How does mesh editor center?
I was wondering how the mesh editor's center function works? Code to do the same would be great.
(This post was last modified: 05-03-2012 11:28 AM by Zervox.)
05-02-2012 08:56 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: How does mesh editor center?
Code:
static Box GetMSPBox()
{
   Box box=0;
   if(ME.mesh    .is        ()) return ME.mesh.box;
   if(ME.skeleton.bones.elms()) return ME.skeleton;
      ME.phys.getBox     (box); return box;
}
static Box GetPhysBox() {Box box=0; ME.phys.getBox(box); return box;}

static void MeshCenter    () {ME.transform(Matrix ().setPos       (-GetMSPBox ().center()), -1         );}
static void MeshCenterPhys() {ME.transform(Matrix ().setPos       (-GetPhysBox().center()), -1         );}
05-04-2012 05:11 AM
Find all posts by this user Quote this message in a reply
aceio76 Offline
Silver Supporter

Post: #3
RE: How does mesh editor center?
This is good stuff, thanks Esenthel.

www.thinkplaystudios.com
05-04-2012 12:54 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Zervox Offline
Member

Post: #4
RE: How does mesh editor center?
I agree thanks : )
05-04-2012 01:04 PM
Find all posts by this user Quote this message in a reply
Post Reply