3ds Max C++ API Reference
IChannelContainer.h

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 ()
 

Detailed Description

Function Documentation

◆ GetClassID()

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

◆ NumChannels()

int NumChannels ( ) const
pure virtual

Returns number of channels in the container.

◆ GetChannel() [1/2]

IObject *& GetChannel ( int  i)
pure virtual

Returns i-th channel in the container.

◆ GetChannel() [2/2]

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.

◆ GetPublicChannel()

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:128
virtual IObject *& GetChannel(int i)=0
Returns i-th channel in the container.

◆ GetPrivateChannel()

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); }

◆ AddChannel()

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.

◆ EnsureChannel()

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

◆ EnsureInterface()

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

◆ GetPrivateInterface()

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.

◆ RemoveNonTransferableChannels()

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.

◆ Clone()

IObject * Clone ( )
pure virtual

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

◆ Copy()

bool Copy ( IObject container)
pure virtual

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

◆ Save()

IOResult Save ( ISave isave) const
pure virtual

Saves content of the channel to file.

◆ Load()

IOResult Load ( ILoad iload)
pure virtual

Loads content of the channel from file.

◆ MemoryUsed()

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.

◆ GetDesc() [1/2]

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

Implements FPInterface.

#define CHANNELCONTAINER_INTERFACE
Definition: IChannelContainer.h:18
virtual FPInterfaceDesc * GetDescByID(Interface_ID id)
Definition: ifnpub.h:613

◆ SetUVVert() [1/6]

bool SetUVVert ( int  particleIndex,
const UVVert value 
)
pure virtual

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

returns true if successful.

◆ SetUVVert() [2/6]

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

copies UVVert data to be texture mapping for the particle.

returns true if successful.

◆ SetUVVert() [3/6]

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

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

◆ SetUVVert() [4/6]

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

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

◆ SetUVVert() [5/6]

bool SetUVVert ( const UVVert value)
pure virtual

copies UVVert data to a global value for all particles

◆ SetUVVert() [6/6]

bool SetUVVert ( const TabUVVert tab)
pure virtual

copies UVVert data to a global value for all particles

◆ CopyUVVert() [1/3]

bool CopyUVVert ( int  fromParticle,
int  toParticle 
)
pure virtual

copy UVVert data from fromParticle to toParticle

◆ CopyUVVert() [2/3]

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

copy UVVert data from fromParticle to toParticles

◆ CopyUVVert() [3/3]

bool CopyUVVert ( int  fromParticle)
pure virtual

copy UVVert data from fromParticle to all particles

◆ SetTVFace() [1/3]

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

copies TVFace data to be texture facing for the particle.

returns true if successful.

◆ SetTVFace() [2/3]

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

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

◆ SetTVFace() [3/3]

bool SetTVFace ( const TabTVFace tab)
pure virtual

copies TVFace data to a global value for all particles

◆ CopyTVFace() [1/3]

bool CopyTVFace ( int  fromParticle,
int  toParticle 
)
pure virtual

copy TVFace data from fromParticle to toParticle

◆ CopyTVFace() [2/3]

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

copy TVFace data from fromParticle to toParticles

◆ CopyTVFace() [3/3]

bool CopyTVFace ( int  fromParticle)
pure virtual

copy TVFace data from fromParticle to all particles

◆ GetUVVertChannel()

IObject * GetUVVertChannel ( ) const
pure virtual

returns an object of TabUVVert channel

◆ GetTVFaceChannel()

IObject * GetTVFaceChannel ( ) const
pure virtual

returns an object of TabTVFace channel

◆ SetMap() [1/6]

bool SetMap ( int  particleIndex,
const UVVert value 
)
inline

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

returns true if successful.

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

◆ SetMap() [2/6]

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.

219  { return (SetUVVert(particleIndex, tabUVVert) && SetTVFace(particleIndex, tabTVFace)); }

◆ SetMap() [3/6]

bool SetMap ( Tab< int > &  particleIndices,
const UVVert value 
)
inline

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

225  { return (SetUVVert(particleIndices, value) && SetTVFace(particleIndices, NULL)); }

◆ SetMap() [4/6]

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"

231  { return (SetUVVert(particleIndices, tabUVVert) && SetTVFace(particleIndices, tabTVFace)); }

◆ SetMap() [5/6]

bool SetMap ( const UVVert value)
inline

copies map data to a global value for all particles

237  { return (SetUVVert(value) && SetTVFace(NULL)); }

◆ SetMap() [6/6]

bool SetMap ( const TabUVVert tabUVVert,
const TabTVFace tabTVFace = NULL 
)
inline

copies map data to a global value for all particles

243  { return (SetUVVert(tabUVVert) && SetTVFace(tabTVFace)); }

◆ CopyMap() [1/3]

bool CopyMap ( int  fromParticle,
int  toParticle 
)
inline

copy map data from fromParticle to toParticle

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

◆ CopyMap() [2/3]

bool CopyMap ( int  fromParticle,
Tab< int > &  toParticles 
)
inline

copy map data from fromParticle to toParticles

255  { return (CopyUVVert(fromParticle, toParticles) && CopyTVFace(fromParticle, toParticles)); }

◆ CopyMap() [3/3]

bool CopyMap ( int  fromParticle)
inline

copy map data from fromParticle to all particles

261  { return (CopyUVVert(fromParticle) && CopyTVFace(fromParticle)); }

◆ GetDesc() [2/2]

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

Implements FPInterface.

#define PARTICLECHANNELMAPW_INTERFACE
Definition: IParticleChannelMap.h:24