Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Particles

    SDK Help
    0
    4
    285
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 01/12/2003 at 14:31, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.206 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi
      I want to be able to get each particle position of the particles that are emitting from an emitter. After many searches on this forum and the archieved forum I believe I have to use a ParticleTag. But I dont know *how* to use the ParticleTag. I thought it would mean just inheriting the ParticleTag class

          
          
          
          
          class MyParticle : public ParticleTag
          
          
          
          
          {
          
          
          
          
          }
          
          
          
      

      but that gives me an error
      'MyParticle' : no appropriate default constructor available
      What am i doing wrong?

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 05/12/2003 at 08:47, xxxxxxxx wrote:

        Hi Geespot,

        I currently don't do C++ but I remember the procedure in COFFEE. The particle tag is an invisible tag every standard C4D particle emitter has. It's its first tag I think. To access it you have to search for the first active tag of the emitter. If I remember correctly.

        cheers mnu

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 06/12/2003 at 01:00, xxxxxxxx wrote:

          Its fairly simple, quick snap of some code:

              
              
              
              
              if (op->GetType()==Oparticle)
              
              
              
              
              {
              
              
              
              
              ParticleTag *ptag=(ParticleTag* )op->GetTag(Tparticle);
              
              
              
              
              if (!ptag) return;
              
              
              
              
              LONG pcnt=op->GetParticleCount();
              
              
              
              
              for (LONG i=0;i<pcnt;i++)
              
              
              
              
              {
              
              
              
              
              Particle *pt=op->GetParticle(ptag,i);
              
              
              
              
              if ((pt->bits&(PARTICLE_VISIBLE|PARTICLE_ALIVE))!=(PARTICLE_VISIBLE|PARTICLE_ALIVE)) continue;  
              
          

          the key is to get the tag (which as mnu said is hidden), use GetTag() to do this. If found, then use the functions of the tag (ParticleTag) to get the particles.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 06/12/2003 at 06:20, xxxxxxxx wrote:

            Thank you to both. I was going about it the wrong way, which is why I was confused.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post