Public Member Functions

IGameProperty Class Reference

This reference page is linked to from the following overview topics: 3DXI Property Containers, 3DXI Lights and Cameras, 3DXI Materials and Textures, 3DXI IK Chains, 3DXI Custom User Data.


Search for all occurrences

Detailed Description

Main property definition.

IGameProperty provides a wrapper around the standard 3ds Max ParamBlock system. It works for both IParamBlock and IParamBlock2, all paramblocks parameters are supported directly. It provides access to IGameControl and also data access for floats, ints, strings, etc. It performs the type checking, so the Paramblock system will not assert in case of the wrong data type requested. The access to User Properties is provided by look up from the IGameProp.xml file.

#include <IGameProperty.h>

Inheritance diagram for IGameProperty:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual  ~IGameProperty ()
  Destructor.
virtual const MCHAR *  GetName ()=0
  The name of the Property.
virtual bool  IsPBlock2 ()=0
  Check if the parameter is a IParamBlock2 based.
virtual bool  IsPropAnimated ()=0
  Check if the parameter animated.
virtual IGameControl GetIGameControl ()=0
  The controller for the Property.
virtual IParamBlock2 GetMaxParamBlock2 ()=0
  Direct access to the IParamBlock2.
virtual IParamBlock GetMaxParamBlock ()=0
  Direct access to the IParamBlock.
virtual bool  IsParamBlock ()=0
  Check if the parameter is IParamBlock or IParamBlock2 based.
virtual PropType  GetType ()=0
  The data type of the Property.
virtual bool  IsParameterSupported ()=0
  Check if User Parameter has a entry in the IGameProp.xml file.
MAX_DEPRECATED int  GetParamBlockIndex ()
  Deprecated in 3ds Max 2012. Use GetParamIndex or GetParamID instead.
virtual int  GetParamIndex ()=0
  The index of the parameter.
virtual ParamID  GetParamID ()=0
  The ParamID of the parameter.
virtual bool  GetPropertyValue (float &f, TimeValue t=TIME_NegInfinity, bool p=false)=0
  Access to the actual Parameter Data.
virtual bool  GetPropertyValue (int &i, TimeValue t=TIME_NegInfinity)=0
  Access to the actual Parameter Data.
virtual bool  GetPropertyValue (Point3 &p, TimeValue t=TIME_NegInfinity)=0
  Access to the actual Parameter Data.
virtual bool  GetPropertyValue (Point4 &p, TimeValue t=TIME_NegInfinity)=0
  Access to the actual Parameter Data This function is only available in 3ds Max 6.0 and above
virtual bool  GetPropertyValue (const MCHAR *&v, TimeValue t=TIME_NegInfinity)=0
  Access to the actual Parameter Data.

Constructor & Destructor Documentation

virtual ~IGameProperty ( ) [inline, virtual]

Destructor.

{;}

Member Function Documentation

virtual const MCHAR* GetName ( ) [pure virtual]

The name of the Property.

The name as defined in MAXScript or User Property defined in IGameProp.xml file

Returns:
The parameter name
virtual bool IsPBlock2 ( ) [pure virtual]

Check if the parameter is a IParamBlock2 based.

Returns:
TRUE if IParamBlock2, FALSE if IParamBlock
virtual bool IsPropAnimated ( ) [pure virtual]

Check if the parameter animated.

Use this check to determing whether or not to access the controller

Returns:
TRUE if animated
virtual IGameControl* GetIGameControl ( ) [pure virtual]

The controller for the Property.

Returns:
A pointer to IGameControl
virtual IParamBlock2* GetMaxParamBlock2 ( ) [pure virtual]

Direct access to the IParamBlock2.

Returns:
a pointer to IParamBlock2
virtual IParamBlock* GetMaxParamBlock ( ) [pure virtual]

Direct access to the IParamBlock.

Returns:
a pointer to IParamBlock
virtual bool IsParamBlock ( ) [pure virtual]

Check if the parameter is IParamBlock or IParamBlock2 based.

Specifies whether this parameter is based on either IParamBlock or IParamBlock2. This is useful as some IGameProperties are based on Non paramblocks. For example node/user data is accessed as an IGame Property but in 3ds Max has no Paramblock representation

Returns:
TRUE if it is based on a either IParamBlock or IParamBlock2.
virtual PropType GetType ( ) [pure virtual]

The data type of the Property.

This is used to find out the data type of the property, so the correct GetPropertyValue method can be used

Returns:
The data type. Returned value corresponds to PropType enumeration.
See also:
PropType
virtual bool IsParameterSupported ( ) [pure virtual]

Check if User Parameter has a entry in the IGameProp.xml file.

All parameter blocks parameters are supported directly. Use this check to decide whether a User Property is defined in the IGameProp.xml file

Returns:
True if User Parameter has a entry in the IGameProp.xml file
MAX_DEPRECATED int GetParamBlockIndex ( )

Deprecated in 3ds Max 2012. Use GetParamIndex or GetParamID instead.

virtual int GetParamIndex ( ) [pure virtual]

The index of the parameter.

Replacement for the old GetParamBlockIndex method. This method gets the actual index of the parameter as used by the Parameter block system. The Parameter block system treats ParamID's and their related indexes very differently. Therefore incorrectly mixing Parameter integer index's and and ParamID's can cause very subtle and difficult to find bugs. Previous implementations of the old GetParamBlockIndex method returned a ParamID cast to an int which was incorrect (If the data was based off of Parameter Block 2). Fixing it would cause silent behavior changes which may have gone unnoticed. Therefore this method was introduced to forcefully clarify the difference between accessing the ParamID versus the index of the Parameter.

Returns:
The index in the parameter block
virtual ParamID GetParamID ( ) [pure virtual]

The ParamID of the parameter.

This replaces the old method GetParamBlockIndex which previously had incorrect behavior.

Returns:
The ParamID of the parameter, not the index.
virtual bool GetPropertyValue ( float &  f,
TimeValue  t = TIME_NegInfinity,
bool  p = false 
) [pure virtual]

Access to the actual Parameter Data.

Parameters:
&f The float to receive the data
t The time to retrieve the value, defaulted to the static frame. This is set by IGameScene::SetStaticFrame
p The flag indicating if percent fraction value (TYPE_PCNT_FRAC) should be converted (0.1 to 10), default:false
Returns:
TRUE if succesful
virtual bool GetPropertyValue ( int &  i,
TimeValue  t = TIME_NegInfinity 
) [pure virtual]

Access to the actual Parameter Data.

Parameters:
&i The int to receive the data
t The time to retrieve the value, defaulted to the static frame. This is set by IGameScene::SetStaticFrame
Returns:
TRUE if succesful
virtual bool GetPropertyValue ( Point3 p,
TimeValue  t = TIME_NegInfinity 
) [pure virtual]

Access to the actual Parameter Data.

Parameters:
&p The Point3 to receive the data
t The time to retrieve the value, defaulted to the static frame. This is set by IGameScene::SetStaticFrame
Returns:
TRUE if succesful
virtual bool GetPropertyValue ( Point4 p,
TimeValue  t = TIME_NegInfinity 
) [pure virtual]

Access to the actual Parameter Data This function is only available in 3ds Max 6.0 and above

Parameters:
&p The Point4 to receive the data
t The time to retrieve the value, defaulted to the static frame. This is set by IGameScene::SetStaticFrame
Returns:
TRUE if succesful
virtual bool GetPropertyValue ( const MCHAR *&  v,
TimeValue  t = TIME_NegInfinity 
) [pure virtual]

Access to the actual Parameter Data.

Parameters:
v The MCHAR to receive the data
t The time to retrieve the value, defaulted to the static frame. This is set by IGameScene::SetStaticFrame
Returns:
TRUE if successful

IGameProperty IGameProperty IGameProperty IGameProperty IGameProperty IGameProperty IGameProperty IGameProperty IGameProperty IGameProperty
IGameProperty IGameProperty IGameProperty IGameProperty IGameProperty IGameProperty IGameProperty IGameProperty IGameProperty IGameProperty