Jump to content

SIM_Solver, SIM_data and memory cache


Recommended Posts

Hello,

I'm quite new to HDK so apologies if this is a stupd question. I'm writing a new SIM_Solver with same custom SIM_Data. There is no geometry data involved but only custom data. When I simulate for the first time my scene, the solver is called correctly at each frame and it starts to cache te result in memory. And here I get lost. I can't find which method it uses the cache the data in memory. All the examples in the devkit are using geometry data so I think houdini caches the geoemtry in memory. But with my custom data what I need to do to cache it in memory?

 

Thank you

Alan

 

This is the declaration of my sim data:

class SIM_AgentGroup : public SIM_Data,
    public SIM_OptionsUser
{
public:

    AtomsPtr<Atoms::AgentGroup>& agentGroup();

   const AtomsPtr<Atoms::AgentGroup>& agentGroup() const;

    void printOptions();

    SOP_Node* getInputSopNode();

protected:

    explicit SIM_AgentGroup(const SIM_DataFactory *factory);

    virtual ~SIM_AgentGroup();

    virtual void initializeSubclass();
    virtual void makeEqualSubclass(const SIM_Data *source);

private:

    static const SIM_DopDescription *getSIM_AgentGroupDopDescription();


    DECLARE_STANDARD_GETCASTTOTYPE();
    DECLARE_DATAFACTORY(SIM_AgentGroup,
    SIM_Data,
        "Agent Properties",
        getSIM_AgentGroupDopDescription());

private:

    AtomsPtr<Atoms::AgentGroup> m_agentGroup;
};

 

 

Edited by iaiotom
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...