Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: NevilleKemp

26. May 2012, 06:19:08 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)AbsoluteParticleSystemNode vs RelativeParticleSystemNode
Pages: [1]
Print
Author Topic: AbsoluteParticleSystemNode vs RelativeParticleSystemNode  (Read 218 times)
gbrinon
Just dropped in

Offline Offline

Posts: 24



View Profile
« on: 13. November 2011, 10:45:20 am »

Hello, i have a little problem with particle system.
When i use the RelativeParticleSystemNode it works but i don't like the way it looks : when the model turn all the particles already produced turns with it. I decided to use the AbsoluteParticleSystemNode because i hope it will resolve this problem.
The problem is : when i replace RelativeParticleSystemNode by AbsoluteParticleSystemNode : no particles seems to be produced.
Can you see where i am wrong ?

Quote

public ParticleSysItem(GraphicsCore GCore, ParticleSystem ps)
{
   this._pSys = ps;
   //this._pSysNode = new RelativeParticleSystemNode();
   this._pSysNode = new AbsoluteParticleSystemNode();
   
   TransformationDirectives rotDirecs = new TransformationDirectives( -0.0f, 0.0f, 0.0f );           
   TransformationDirectives transDirecs = new TransformationDirectives( 0.0f, 0.0f, 0.0f );
   
   this._trans = new TranslatableGroup( transDirecs );
   GCore.getAnimator().addAnimatableObject( this._trans );
   
   this._rg = new RotatableGroup( rotDirecs );
   this._trans.addChild(this._rg);
   this._rg.addChild( this._pSysNode );
   
   
   this._pSysNode.setShowGeneratorsAndPointMasses( true );
   this._pSysNode.setParticleSystem( this._pSys );
}

public TranslatableGroup getPGroup()
{
   return this._trans;
}


public void addNewParticleSystem(RotatableGroup mother, String name, int id)
{
   String handle = getPSHandle( name );

   if ( handle == null )
      return;
   
   ParticleSystem ps = this._pManager.getCopyAttached( handle );

   ps.getModifiers().add( this._pm );
   ParticleSysItem pItem = new ParticleSysItem(this._GCore, ps);
   mother.addChild( pItem.getPGroup() );

   this._particleSystemNodes.put( id, pItem);
   return ;
}


// When create a model, i call this line : this._rg is the node of the model
GCore._pSysManager.addNewParticleSystem(this._rg, "test", this._oInf._id);



Thanks
Logged

Guillaume
HEMERA project on XITH3D
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 13. November 2011, 12:31:30 pm »

I suggest, you directly contact the author. That would be Guilherme Gomes.
Logged
gbrinon
Just dropped in

Offline Offline

Posts: 24



View Profile
« Reply #2 on: 15. November 2011, 02:45:42 pm »

I tried, for the moment he does not answer.
I hope i have the right email adress : (censored)

Does someone already successfuly used the AbsoluteParticleSystemNode ? (and how ?  Embarrassed)
« Last Edit: 15. November 2011, 04:10:47 pm by Marvin Fröhlich » Logged

Guillaume
HEMERA project on XITH3D
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #3 on: 15. November 2011, 04:11:24 pm »

At least some more spammers have it now Angry

But I think, it should be correct.
Logged
gbrinon
Just dropped in

Offline Offline

Posts: 24



View Profile
« Reply #4 on: 16. November 2011, 11:10:14 am »

Arg, i'm sorry. His email adress was not hard to find on google so i didn't thought it was a problem.
Logged

Guillaume
HEMERA project on XITH3D
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #5 on: 16. November 2011, 02:02:12 pm »

Try it on Facebook.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic