IChannelContainer.h

Module description

Functions

virtual Class_ID GetClassID ()=0
 Returns the unique ID for the particle container class. More...
 
virtual int NumChannels () const =0
 Returns number of channels in the container. More...
 
virtual IObject *& GetChannel (int i)=0
 Returns i-th channel in the container. More...
 
virtual IObjectGetChannel (Interface_ID id, Object *privateOwner=NULL, INode *creatorAction=NULL)=0
 Returns a channel with the given interface id. More...
 
IObjectGetPublicChannel (int id_PartA, int id_PartB)
 FnPub alternative for the method virtual IObject* GetChannel. More...
 
IObjectGetPrivateChannel (int id_PartA, int id_PartB, Object *privateOwner, INode *creatorAction)
 FnPub alternative for method virtual IObject* GetChannel. More...
 
virtual bool AddChannel (IObject *channel)=0
 Returns true if the channel has been added. More...
 
virtual IObjectEnsureChannel (Interface_ID &iChanID, Class_ID &channelClassID, bool isWrapper, Interface_ID &wrappingReadID, Interface_ID &wrappingWriteID, bool isTransferable=TRUE, INode *creatorAction=NULL, Object *privateOwner=NULL, bool *initChannel=NULL)=0
 Returns a channel object if a channel with the given interface id is in the container. More...
 
virtual BaseInterfaceEnsureInterface (Interface_ID &iChanID, Class_ID &channelClassID, bool isWrapper, Interface_ID &wrappingReadID, Interface_ID &wrappingWriteID, bool isTransferable=TRUE, INode *creatorAction=NULL, Object *privateOwner=NULL, bool *initChannel=NULL)=0
 Returns an interface if the interface with the given interface id is in the container. More...
 
virtual BaseInterfaceGetPrivateInterface (Interface_ID id, Object *privateOwner)=0
 Returns an interface of a channel with the given interface id and private owner. More...
 
virtual int RemoveNonTransferableChannels (INode *nextParticleGroup=NULL)=0
 Returns an interface of a channel with the given interface id and private owner parameters:
iChanID: interface id of channel to be present in the container
privateOwner: the parameter is used to identify a private owner of the channel. More...
 
virtual IObjectClone ()=0
 Makes a clone copy of the whole container (all channels), returns new container. More...
 
virtual bool Copy (IObject *container)=0
 Makes a copy from the other container, returns true if successful. More...
 
virtual IOResult Save (ISave *isave) const =0
 Saves content of the channel to file. More...
 
virtual IOResult Load (ILoad *iload)=0
 Loads content of the channel from file. More...
 
virtual int MemoryUsed () const =0
 Returns amount of memory used (in bytes) by the channel container to store the information. More...
 
FPInterfaceDescGetDesc ()
 
virtual bool SetUVVert (int particleIndex, const UVVert &value)=0
 sets all vertices of the particle have the same UVVert value. More...
 
virtual bool SetUVVert (int particleIndex, const TabUVVert *tab)=0
 copies UVVert data to be texture mapping for the particle. More...
 
virtual bool SetUVVert (Tab< int > &particleIndices, const UVVert &value)=0
 copies UVVert data to be a shared value with indices in "particleIndeces" More...
 
virtual bool SetUVVert (Tab< int > &particleIndices, const TabUVVert *tab)=0
 copies UVVert data to be a shared value with indices in "particleIndeces" More...
 
virtual bool SetUVVert (const UVVert &value)=0
 copies UVVert data to a global value for all particles More...
 
virtual bool SetUVVert (const TabUVVert *tab)=0
 copies UVVert data to a global value for all particles More...
 
virtual bool CopyUVVert (int fromParticle, int toParticle)=0
 copy UVVert data from fromParticle to toParticle More...
 
virtual bool CopyUVVert (int fromParticle, Tab< int > &toParticles)=0
 copy UVVert data from fromParticle to toParticles More...
 
virtual bool CopyUVVert (int fromParticle)=0
 copy UVVert data from fromParticle to all particles More...
 
virtual bool SetTVFace (int particleIndex, const TabTVFace *tab)=0
 copies TVFace data to be texture facing for the particle. More...
 
virtual bool SetTVFace (Tab< int > &particleIndices, const TabTVFace *tab)=0
 copies TVFace data to be a shared value with indices in "particleIndeces" More...
 
virtual bool SetTVFace (const TabTVFace *tab)=0
 copies TVFace data to a global value for all particles More...
 
virtual bool CopyTVFace (int fromParticle, int toParticle)=0
 copy TVFace data from fromParticle to toParticle More...
 
virtual bool CopyTVFace (int fromParticle, Tab< int > &toParticles)=0
 copy TVFace data from fromParticle to toParticles More...
 
virtual bool CopyTVFace (int fromParticle)=0
 copy TVFace data from fromParticle to all particles More...
 
virtual IObjectGetUVVertChannel () const =0
 returns an object of TabUVVert channel More...
 
virtual IObjectGetTVFaceChannel () const =0
 returns an object of TabTVFace channel More...
 
bool SetMap (int particleIndex, const UVVert &value)
 sets all vertices of the particle have the same map value. More...
 
bool SetMap (int particleIndex, const TabUVVert *tabUVVert, const TabTVFace *tabTVFace=NULL)
 copies map data to be texture mapping for the particle. More...
 
bool SetMap (Tab< int > &particleIndices, const UVVert &value)
 copies map data to be a shared value with indices in "particleIndeces" More...
 
bool SetMap (Tab< int > &particleIndices, const TabUVVert *tabUVVert, const TabTVFace *tabTVFace=NULL)
 copies map data to be a shared value with indices in "particleIndeces" More...
 
bool SetMap (const UVVert &value)
 copies map data to a global value for all particles More...
 
bool SetMap (const TabUVVert *tabUVVert, const TabTVFace *tabTVFace=NULL)
 copies map data to a global value for all particles More...
 
bool CopyMap (int fromParticle, int toParticle)
 copy map data from fromParticle to toParticle More...
 
bool CopyMap (int fromParticle, Tab< int > &toParticles)
 copy map data from fromParticle to toParticles More...
 
bool CopyMap (int fromParticle)
 copy map data from fromParticle to all particles More...
 
FPInterfaceDescGetDesc ()
 

Function Documentation

Class_ID GetClassID ( )
pure virtual

Returns the unique ID for the particle container class.

ID is used for constructing the container when loading since the particle container class is not inherited from class Animatable

int NumChannels ( ) const
pure virtual

Returns number of channels in the container.

IObject *& GetChannel ( int  i)
pure virtual

Returns i-th channel in the container.

IObject * GetChannel ( Interface_ID  id,
Object privateOwner = NULL,
INode creatorAction = NULL 
)
pure virtual

Returns a channel with the given interface id.

If privateOwner is NULL, then the channel is public. If privateOwner is specified, then the channel is private with the given private owner.

IObject * GetPublicChannel ( int  id_PartA,
int  id_PartB 
)
inline

FnPub alternative for the method virtual IObject* GetChannel.

Essentially takes in the two (2) components that make up the full Interface_ID CHANNELCONTAINER_INTERFACE

Parameters
id_PartACorresponds to 0x74f93c00. Look at #define CHANNELCONTAINER_INTERFACE Interface_ID(0x74f93c00, 0x1eb34600)
id_PartBCorresponds to 0x1eb34600. Look at #define CHANNELCONTAINER_INTERFACE Interface_ID(0x74f93c00, 0x1eb34600)
81  { return GetChannel( Interface_ID(id_PartA, id_PartB), NULL); }
#define NULL
Definition: autoptr.h:18
Definition: maxtypes.h:202
virtual IObject *& GetChannel(int i)=0
Returns i-th channel in the container.
IObject * GetPrivateChannel ( int  id_PartA,
int  id_PartB,
Object privateOwner,
INode creatorAction 
)
inline

FnPub alternative for method virtual IObject* GetChannel.

87  { return GetChannel( Interface_ID(id_PartA, id_PartB), privateOwner, creatorAction); }
Definition: maxtypes.h:202
virtual IObject *& GetChannel(int i)=0
Returns i-th channel in the container.
bool AddChannel ( IObject channel)
pure virtual

Returns true if the channel has been added.

The channel may be rejected if there are duplicate interfaces in the added channel and in the container. The ParticleChannelReadWrite and ParticleChannelAmount interfaces don't count since every channel has them.

IObject * EnsureChannel ( Interface_ID iChanID,
Class_ID channelClassID,
bool  isWrapper,
Interface_ID wrappingReadID,
Interface_ID wrappingWriteID,
bool  isTransferable = TRUE,
INode creatorAction = NULL,
Object privateOwner = NULL,
bool *  initChannel = NULL 
)
pure virtual

Returns a channel object if a channel with the given interface id is in the container.

If such channel doesn't exist, that container makes an attempt to create and add a channel for the interface according to the specifications. The method is not for FnPub intentionally.

Parameters
iChanIDinterface id of channel to be present in the container
channelClassIDif interface is not present then create particle channel with the classID
isWrapperif true then the created particle channel is wrapper
wrappingReadIDread ID for wrapping the particle channel
wrappingWriteIDwrite ID for wrapping the particle channel
isTransferableif true then the channel is transferable (contrary to temporary)
creatorActionthe parameter is used to record an action that created the channel
this record can be used later on to identify if the action needs to initialize the channel values for new particles
privateOwnerthe parameter is used to set a private owner of the channel. Only the action with the same object pointer may access this channel
initChannelif the channel was created by the same action node then it's responsibility of the action to initialize values
BaseInterface * EnsureInterface ( Interface_ID iChanID,
Class_ID channelClassID,
bool  isWrapper,
Interface_ID wrappingReadID,
Interface_ID wrappingWriteID,
bool  isTransferable = TRUE,
INode creatorAction = NULL,
Object privateOwner = NULL,
bool *  initChannel = NULL 
)
pure virtual

Returns an interface if the interface with the given interface id is in the container.

If such interface doesn't exist, that container makes an attempt to create and add a channel for the interface according to the specifications. The method is not for FnPub intentionally.

Parameters
iChanIDinterface id of channel to be present in the container
channelClassIDif interface is not present then create particle channel with the classID
isWrapperif true then the created particle channel is wrapper
wrappingReadIDread ID for wrapping the particle channel
wrappingWriteIDwrite ID for wrapping the particle channel
isTransferableif true then the channel is transferable (contrary to temporary)
creatorActionthe parameter is used to record an action that created the channel
this record can be used later on to identify if the action needs to initialize the channel values for new particles
privateOwnerthe parameter is used to set a private owner of the channel. Only the action with the same object pointer may access this channel
initChannelif the channel was created by the same action node then it's responsibility of the action to initialize values
BaseInterface * GetPrivateInterface ( Interface_ID  id,
Object privateOwner 
)
pure virtual

Returns an interface of a channel with the given interface id and private owner.

Parameters
idinterface id of channel to be present in the container.
privateOwnerthe parameter is used to identify a private owner of the channel.
int RemoveNonTransferableChannels ( INode nextParticleGroup = NULL)
pure virtual

Returns an interface of a channel with the given interface id and private owner parameters:
iChanID: interface id of channel to be present in the container
privateOwner: the parameter is used to identify a private owner of the channel.

IObject * Clone ( )
pure virtual

Makes a clone copy of the whole container (all channels), returns new container.

bool Copy ( IObject container)
pure virtual

Makes a copy from the other container, returns true if successful.

IOResult Save ( ISave isave) const
pure virtual

Saves content of the channel to file.

IOResult Load ( ILoad iload)
pure virtual

Loads content of the channel from file.

int MemoryUsed ( ) const
pure virtual

Returns amount of memory used (in bytes) by the channel container to store the information.

This is a total sum of the memory used by all channels and the data from the container itself.

FPInterfaceDesc * GetDesc ( )
inlinevirtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

virtual FPInterfaceDesc * GetDescByID(Interface_ID id)
Definition: ifnpub.h:613
#define CHANNELCONTAINER_INTERFACE
Definition: IChannelContainer.h:18
bool SetUVVert ( int  particleIndex,
const UVVert value 
)
pure virtual

sets all vertices of the particle have the same UVVert value.

returns true if successful.

bool SetUVVert ( int  particleIndex,
const TabUVVert tab 
)
pure virtual

copies UVVert data to be texture mapping for the particle.

returns true if successful.

bool SetUVVert ( Tab< int > &  particleIndices,
const UVVert value 
)
pure virtual

copies UVVert data to be a shared value with indices in "particleIndeces"

bool SetUVVert ( Tab< int > &  particleIndices,
const TabUVVert tab 
)
pure virtual

copies UVVert data to be a shared value with indices in "particleIndeces"

bool SetUVVert ( const UVVert value)
pure virtual

copies UVVert data to a global value for all particles

bool SetUVVert ( const TabUVVert tab)
pure virtual

copies UVVert data to a global value for all particles

bool CopyUVVert ( int  fromParticle,
int  toParticle 
)
pure virtual

copy UVVert data from fromParticle to toParticle

bool CopyUVVert ( int  fromParticle,
Tab< int > &  toParticles 
)
pure virtual

copy UVVert data from fromParticle to toParticles

bool CopyUVVert ( int  fromParticle)
pure virtual

copy UVVert data from fromParticle to all particles

bool SetTVFace ( int  particleIndex,
const TabTVFace tab 
)
pure virtual

copies TVFace data to be texture facing for the particle.

returns true if successful.

bool SetTVFace ( Tab< int > &  particleIndices,
const TabTVFace tab 
)
pure virtual

copies TVFace data to be a shared value with indices in "particleIndeces"

bool SetTVFace ( const TabTVFace tab)
pure virtual

copies TVFace data to a global value for all particles

bool CopyTVFace ( int  fromParticle,
int  toParticle 
)
pure virtual

copy TVFace data from fromParticle to toParticle

bool CopyTVFace ( int  fromParticle,
Tab< int > &  toParticles 
)
pure virtual

copy TVFace data from fromParticle to toParticles

bool CopyTVFace ( int  fromParticle)
pure virtual

copy TVFace data from fromParticle to all particles

IObject * GetUVVertChannel ( ) const
pure virtual

returns an object of TabUVVert channel

IObject * GetTVFaceChannel ( ) const
pure virtual

returns an object of TabTVFace channel

bool SetMap ( int  particleIndex,
const UVVert value 
)
inline

sets all vertices of the particle have the same map value.

returns true if successful.

212  { return (SetUVVert(particleIndex, value) && SetTVFace(NULL)); }
virtual bool SetUVVert(int particleIndex, const UVVert &value)=0
sets all vertices of the particle have the same UVVert value.
#define NULL
Definition: autoptr.h:18
virtual bool SetTVFace(int particleIndex, const TabTVFace *tab)=0
copies TVFace data to be texture facing for the particle.
bool SetMap ( int  particleIndex,
const TabUVVert tabUVVert,
const TabTVFace tabTVFace = NULL 
)
inline

copies map data to be texture mapping for the particle.

returns true if successful.

218  { return (SetUVVert(particleIndex, tabUVVert) && SetTVFace(particleIndex, tabTVFace)); }
virtual bool SetUVVert(int particleIndex, const UVVert &value)=0
sets all vertices of the particle have the same UVVert value.
virtual bool SetTVFace(int particleIndex, const TabTVFace *tab)=0
copies TVFace data to be texture facing for the particle.
bool SetMap ( Tab< int > &  particleIndices,
const UVVert value 
)
inline

copies map data to be a shared value with indices in "particleIndeces"

224  { return (SetUVVert(particleIndices, value) && SetTVFace(particleIndices, NULL)); }
virtual bool SetUVVert(int particleIndex, const UVVert &value)=0
sets all vertices of the particle have the same UVVert value.
#define NULL
Definition: autoptr.h:18
virtual bool SetTVFace(int particleIndex, const TabTVFace *tab)=0
copies TVFace data to be texture facing for the particle.
bool SetMap ( Tab< int > &  particleIndices,
const TabUVVert tabUVVert,
const TabTVFace tabTVFace = NULL 
)
inline

copies map data to be a shared value with indices in "particleIndeces"

230  { return (SetUVVert(particleIndices, tabUVVert) && SetTVFace(particleIndices, tabTVFace)); }
virtual bool SetUVVert(int particleIndex, const UVVert &value)=0
sets all vertices of the particle have the same UVVert value.
virtual bool SetTVFace(int particleIndex, const TabTVFace *tab)=0
copies TVFace data to be texture facing for the particle.
bool SetMap ( const UVVert value)
inline

copies map data to a global value for all particles

236  { return (SetUVVert(value) && SetTVFace(NULL)); }
virtual bool SetUVVert(int particleIndex, const UVVert &value)=0
sets all vertices of the particle have the same UVVert value.
#define NULL
Definition: autoptr.h:18
virtual bool SetTVFace(int particleIndex, const TabTVFace *tab)=0
copies TVFace data to be texture facing for the particle.
bool SetMap ( const TabUVVert tabUVVert,
const TabTVFace tabTVFace = NULL 
)
inline

copies map data to a global value for all particles

242  { return (SetUVVert(tabUVVert) && SetTVFace(tabTVFace)); }
virtual bool SetUVVert(int particleIndex, const UVVert &value)=0
sets all vertices of the particle have the same UVVert value.
virtual bool SetTVFace(int particleIndex, const TabTVFace *tab)=0
copies TVFace data to be texture facing for the particle.
bool CopyMap ( int  fromParticle,
int  toParticle 
)
inline

copy map data from fromParticle to toParticle

248  { return (CopyUVVert(fromParticle, toParticle) && CopyTVFace(fromParticle, toParticle)); }
virtual bool CopyTVFace(int fromParticle, int toParticle)=0
copy TVFace data from fromParticle to toParticle
virtual bool CopyUVVert(int fromParticle, int toParticle)=0
copy UVVert data from fromParticle to toParticle
bool CopyMap ( int  fromParticle,
Tab< int > &  toParticles 
)
inline

copy map data from fromParticle to toParticles

254  { return (CopyUVVert(fromParticle, toParticles) && CopyTVFace(fromParticle, toParticles)); }
virtual bool CopyTVFace(int fromParticle, int toParticle)=0
copy TVFace data from fromParticle to toParticle
virtual bool CopyUVVert(int fromParticle, int toParticle)=0
copy UVVert data from fromParticle to toParticle
bool CopyMap ( int  fromParticle)
inline

copy map data from fromParticle to all particles

260  { return (CopyUVVert(fromParticle) && CopyTVFace(fromParticle)); }
virtual bool CopyTVFace(int fromParticle, int toParticle)=0
copy TVFace data from fromParticle to toParticle
virtual bool CopyUVVert(int fromParticle, int toParticle)=0
copy UVVert data from fromParticle to toParticle
FPInterfaceDesc * GetDesc ( )
inlinevirtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

#define PARTICLECHANNELMAPW_INTERFACE
Definition: IParticleChannelMap.h:24
virtual FPInterfaceDesc * GetDescByID(Interface_ID id)
Definition: ifnpub.h:613