object.h File Reference

#include "maxheap.h"
#include "inode.h"
#include "maxapi.h"
#include "plugapi.h"
#include "snap.h"
#include "genshape.h"
#include "hitdata.h"
#include "imtl.h"
#include "channels.h"
#include "LightTypeEnums.h"
#include "mesh.h"
#include "GraphicsTypes.h"
#include "GraphicsWindow.h"
#include "INodeTab.h"
#include "UVWMapTypes.h"
#include "AnimPropertyID.h"
#include "Graphics/IObjectDisplay2.h"
#include "Graphics/RenderItemHandle.h"

Classes

class  IdentityTM
 This class is another version of Matrix3 where the matrix is initialized to the identity by the default constructor. More...
 
class  View
 This class is passed in to GeomObject::GetRenderMesh() to allow objects to do view dependent rendering. More...
 
class  ObjectState
 The ObjectState is the structure that flows up the geometry pipeline. More...
 
class  LocalModData
 This class allows a modifier to store application specific data. More...
 
class  ModContext
 The ModContext stores information about the space the modifier was applied in, and allows the modifier to store data is needs for its operation. More...
 
class  ModContextList
 A modifier may be applied to several objects in the scene. More...
 
class  BaseObject
 This is the base class for objects and modifiers. More...
 
class  Deformer
 The callback object used by modifiers to deform "Deformable" objects. More...
 
class  XTCContainer
 This class represents a container class for XTCObjects. More...
 
class  IXTCAccess
 Provides an interface to access Extension Channels. More...
 
class  Object
 The object class is the base class for all objects. More...
 
class  IMultiPassCameraEffect
 The multipass camera effect allows modification of viewpoints and view directions or time for each pass of a multipass rendering. More...
 
struct  CameraState
 Note: The camera looks down the negative Z axis, with X to the right and Y up. More...
 
class  CameraObject
 This is a base class from which camera plug-ins may be derived. More...
 
struct  LightState
 This structure describes the properties of a light. More...
 
class  LightRayTraversal
 This is a callback class that can be given to a ObjLightDesc to have a ray traced through the light volume. More...
 
class  IlluminateComponents
 Provides the components of the Illuminate function to Shaders, Materials and Render Elements. More...
 
class  IIlluminationComponents
 this is the interface to use illumination by components this may be supported by a light object returned by lightObjDesc::GetInterface( IID_IIlluminationComponents ); More...
 
class  ObjLightDesc
 A light must be able to create one of these objects to give to the renderer. More...
 
class  LightObject
 This is the base class from which plug-in lights may be derived. More...
 
class  HelperObject
 This is used as a base class to create helper object plug-ins. More...
 
class  ConstObject
 This is a base class used to create construction grid objects. More...
 
class  GeomObject
 This is the base class for the creation of Geometric Object plug-ins. More...
 
class  ForceField
 A Space Warp modifier usually uses an instance of this class and implements the Force() method. More...
 
class  CollisionObject
 A collision object can be applied to a particle system by a Space Warp. More...
 
class  ParticleObject
 This is the base class for creating particle system plug-ins. More...
 
class  IShapeRectRenderParams
 Rectangular Shape Render Parameters API This interface gives access to the new Renderable SPline parameters for Rectangular Shapes The IShapeRectRenderParams interface can be retrieved like this: IShapeRectRenderParams* rparams = (IShapeRectRenderParams*)obj->GetProperty(SHAPE_RECT_RENDERPARAMS_PROPID); Note that this interface contains VPT and non VPT parameters. More...
 
class  ShapeObject
 ShapeObjects are open or closed hierarchical shapes made up of one or more pieces. More...
 
class  WSMObject
 This class is a base class used to derived the helper object for a space warp modifier (WSM Modifier). More...
 
class  ModContextEnumProc
 Callback object used with Modifier::EnumModContexts(). More...
 
class  Modifier
 This is the class from which you may derive Object Space and Space Warp (World Space) Modifier plug-ins. More...
 
class  OSModifier
 This is a base class developers creating object space modifiers may derives their plug-ins from. More...
 
class  WSModifier
 This is a base class for creating world space modifiers. More...
 
class  PolyLineProc
 This is a callback used to draw a series of lines. More...
 
class  DrawLineProc
 This class provides a simplified way to draw a connected series of lines to the GraphicsWindow passed to the class constructor. More...
 
class  BoxLineProc
 This class provides a bounding box and a matrix. More...
 
class  HitRecord
 This class provides a data structure used during sub-object hit-testing. More...
 
class  HitLog
 This class provides a data structure for keeping a log of hits during sub-object hit-testing. More...
 
class  ObjectConverter
 This virtual class is implemented by applications that want to supply a conversion method from one object type to another. More...
 
class  ITimeBasedConverter
 
class  ISubObjType
 Developers have to return a class derived from this class with implementations for all the methods when implementing sub-objects for objects and modifiers (see BaseObject::GetSubObjType()). More...
 
class  GenSubObjType
 This class provides a generic implementation for sub-object types. More...
 

Macros

#define HITTYPE_POINT   1
 Hit test by a single pick point. More...
 
#define HITTYPE_BOX   2
 Hit test by a rectangular area. More...
 
#define HITTYPE_CIRCLE   3
 Hit test by circular selection area. More...
 
#define HITTYPE_SOLID   4
 Hit test a face as if it was solid, even in wireframe mode. More...
 
#define HITTYPE_FENCE   5
 Hit testing by an arbitrary polygon fence. More...
 
#define HITTYPE_LASSO   6
 
#define HITTYPE_PAINT   7
 
#define HIT_SELONLY   (1<<0)
 Hit test selected items only. More...
 
#define HIT_UNSELONLY   (1<<2)
 Hit test unselected items only. More...
 
#define HIT_ABORTONHIT   (1<<3)
 Abort the process of hit testing after finding any hit. More...
 
#define HIT_SELSOLID   (1<<4)
 This treats selected items as solid and unselected items as not solid. More...
 
#define HIT_ANYSOLID   (1<<5)
 This treats any item as solid. More...
 
#define HIT_TRANSFORMGIZMO   (1<<6)
 This forces hit testing for the transform gizmos. More...
 
#define HIT_SWITCH_GIZMO   (1<<7)
 This forces hit testing for the Switch axis when hit. More...
 
#define HIT_MANIP_SUBHIT   (1<<8)
 This forces hit testing for sub-manipulators. More...
 
#define HITFLTR_ALL   (1<<10)
 For hit testing everything which can be combined into the flags parameter. More...
 
#define HITFLTR_OBJECTS   (1<<11)
 For hit testing just objects which can be combined into the flags parameter. More...
 
#define HITFLTR_CAMERAS   (1<<12)
 For hit testing just cameras which can be combined into the flags parameter. More...
 
#define HITFLTR_LIGHTS   (1<<13)
 For hit testing just lights which can be combined into the flags parameter. More...
 
#define HITFLTR_HELPERS   (1<<14)
 For hit testing just helpers which can be combined into the flags parameter. More...
 
#define HITFLTR_WSMOBJECTS   (1<<15)
 For hit testing just world space objects which can be combined into the flags parameter. More...
 
#define HITFLTR_SPLINES   (1<<16)
 For hit testing just splines which can be combined into the flags parameter. More...
 
#define HITFLTR_BONES   (1<<17)
 For hit testing just bones which can be combined into the flags parameter. More...
 
#define HIT_SCENEXREFS   (1<<18)
 For hit testing scene xrefs. More...
 
#define HIT_MANAGER_HIDDEN_SCENEXREFS   (1<<19)
 For hit testing scene xrefs hidden in the manager (identified by the XREF_SCENE_HIDEINMANAGERUI XRef flag e.g. More...
 
#define HITFLAG_STARTUSERBIT   24
 Starting at this bit through the 31st bit can be used by plug-ins for sub-object hit testing. More...
 
#define BASEOBJAPPDATACID   Class_ID(0x48a057d2, 0x44f70d8a)
 
#define BASEOBJAPPDATALASTSELCID   Class_ID(0x1cef158c, 0x1da8486f)
 
#define BASEOBJAPPDATACURSELCID   Class_ID(0x5b3b25fc, 0x35af6260)
 
#define BASEOBJAPPDATASCID   USERDATATYPE_CLASS_ID
 
#define RENDER_MESH_DISPLACEMENT_MAP   1
 Indicates that Displacement Mapping is enabled. More...
 
#define NEWSET_MERGE   1
 The sets should be merged. More...
 
#define NEWSET_INTERSECTION   2
 The sets should be intersected – that is the items common to both sets should appear in the new set. More...
 
#define NEWSET_SUBTRACT   3
 The new set should be the result of subtracting the 1st thru nth set from the 0th set. More...
 
#define USE_DAMAGE_RECT   (1<<0)
 If this flag is set, only the damaged area needs to be displayed. More...
 
#define DISP_SHOWSUBOBJECT   (1<<1)
 This indicates if an item should display its sub-object selection state. More...
 
#define IXTCACCESS_INTERFACE_ID   Interface_ID(0x60b033d7, 0x3e1d4d0d)
 
#define CAM_HITHER_CLIP   1
 The hither/near distance. More...
 
#define CAM_YON_CLIP   2
 The yon/far distance. More...
 
#define ENV_NEAR_RANGE   0
 The near distance. More...
 
#define ENV_FAR_RANGE   1
 The far distance. More...
 
#define LIGHT_ATTEN_START   0
 The start range radius. More...
 
#define LIGHT_ATTEN_END   1
 The end range radius. More...
 
#define TRAVERSE_LOWFILTSHADOWS   (1<<0)
 This is a simple filtering where the system samples a point in the shadow map and then some of the neighboring points. More...
 
#define TRAVERSE_HIFILTSHADOWS   (1<<1)
 This is a higher resolution sampling. More...
 
#define TRAVERSE_USESAMPLESIZE   (1<<2)
 This produces the highest quality. More...
 
#define IID_IIlluminationComponents   Interface_ID(0xdae00001, 0x0)
 
#define LIGHTSHADOW_NONE   0
 
#define LIGHTSHADOW_MAPPED   1
 
#define LIGHTSHADOW_RAYTRACED   2
 
#define GRID_PLANE_NONE   -1
 
#define GRID_PLANE_TOP   0
 
#define GRID_PLANE_LEFT   1
 
#define GRID_PLANE_FRONT   2
 
#define GRID_PLANE_BOTTOM   3
 
#define GRID_PLANE_RIGHT   4
 
#define GRID_PLANE_BACK   5
 
#define PARTCENTER_HEAD   1
 Particle geometry lies behind the particle position. More...
 
#define PARTCENTER_CENTER   2
 Particle geometry is centered around particle position. More...
 
#define PARTCENTER_TAIL   3
 Particle geometry lies in front of the particle position. More...
 
#define GENMESH_DEFAULT   -1
 Use whatever is stored in the ShapeObject's UseViewport flag. More...
 
#define GENMESH_VIEWPORT   0
 
#define GENMESH_RENDER   1
 
#define SHAPE_OBJ_NUM_REFS   1
 
#define SHAPE_OBJ_NUM_SUBS   1
 
#define USERPBLOCK   SHAPE_OBJ_NUM_REFS
 User's parameter block. More...
 
#define IPBLOCK   (SHAPE_OBJ_NUM_REFS + 1)
 Interpolations parameter block. More...
 
#define SHAPE_RECT_RENDERPARAMS_PROPID   PROPID_USER+10
 
#define SPACEWARP_CAT_GEOMDEF   1
 
#define SPACEWARP_CAT_MODBASED   2
 
#define SPACEWARP_CAT_PARTICLE   3
 
#define INTERFACE_TIME_BASED_CONVERTER   Interface_ID(0x1e064bad,0x716643db)
 

Typedefs

typedef short MtlIndex
 
typedef short TextMapIndex
 
typedef ObjectObjectHandle
 
typedef Tab< TextMapIndexTextMapIndexTab
 
typedef TextMapIndexTab TextTab
 

Enumerations

enum  { OBJECT_LOCKED = 0x08000000 }
 

Functions

CoreExport void setHitType (int t)
 
CoreExport int getHitType (void)
 
CoreExport BOOL doingXORDraw (void)
 
CoreExport void GetPolygonCount (TimeValue t, Object *pObj, int &numFaces, int &numVerts)
 This global function (not part of class Object) may be used to count the number of faces and vertices in an object. More...
 
CoreExport void GetTriMeshFaceCount (TimeValue t, Object *pObj, int &numFaces, int &numVerts)
 This function is to count trifaces of a mesh It works similar to GetPolygonCount(), where GetPolygonCount will count EditablePoly object's Polys as 1 Poly, instead of several trifaces. More...
 
CoreExport void SetShapeObjectCCSThreshold (float angle)
 
CoreExport void MakeHitRegion (HitRegion &hr, int type, int crossing, int epsi, IPoint2 *p)
 
CoreExport void DoModifiedBox (Box3 &box, Deformer &def, PolyLineProc &lp)
 
CoreExport void DoModifiedLimit (Box3 &box, float z, int axis, Deformer &def, PolyLineProc &lp)
 
CoreExport void DrawCenterMark (PolyLineProc &lp, Box3 &box)
 
CoreExport void DoSphericalMapIcon (BOOL sel, float radius, PolyLineProc &lp)
 
CoreExport void DoCylindricalMapIcon (BOOL sel, float radius, float height, PolyLineProc &lp)
 
CoreExport void DoPlanarMapIcon (BOOL sel, float width, float length, PolyLineProc &lp)
 
CoreExport ObjectMakeObjectDerivedObject (Object *obj)
 Creates a new empty derived object, sets it to point at the given object and returns a pointer to the derived object. More...
 
CoreExport const MCHARGetSpaceWarpCatString (int id)
 
CoreExport bool RegisterObjectConverter (ObjectConverter *conv)
 Registers an object converter with the system. More...
 
CoreExport int CanConvertTriObject (Class_ID to)
 Indicates if a TriObject can convert to the specified class ID. More...
 
CoreExport int CanConvertPatchObject (Class_ID to)
 Indicates if a PatchObject can convert to the specified class ID. More...
 
CoreExport int CanConvertSplineShape (Class_ID to)
 Indicates if a SplineObject can convert to the specified class ID. More...
 
CoreExport void RegisterStaticEditTri (Object *triob)
 This method will register the object passed as the editable tri object. More...
 
CoreExport void RegisterCollapseType (Class_ID cid, MSTR name, bool canSelfConvert=false)
 Registers a class ID of an object that the user can collapse other objects to. More...
 

Variables

CoreExport IdentityTM idTM
 
CoreExport Class_ID defObjectClassID
 Class ID of general deformable object. More...
 
CoreExport Class_ID mapObjectClassID
 Class ID of general texture-mappable object. More...
 
CoreExport ChannelMask chMask []
 an array of channel masks for all the channels "within" the Object. More...
 

Macro Definition Documentation

#define BASEOBJAPPDATACID   Class_ID(0x48a057d2, 0x44f70d8a)
#define BASEOBJAPPDATALASTSELCID   Class_ID(0x1cef158c, 0x1da8486f)
#define BASEOBJAPPDATACURSELCID   Class_ID(0x5b3b25fc, 0x35af6260)
#define BASEOBJAPPDATASCID   USERDATATYPE_CLASS_ID
#define IXTCACCESS_INTERFACE_ID   Interface_ID(0x60b033d7, 0x3e1d4d0d)
#define IID_IIlluminationComponents   Interface_ID(0xdae00001, 0x0)
#define SHAPE_RECT_RENDERPARAMS_PROPID   PROPID_USER+10
#define INTERFACE_TIME_BASED_CONVERTER   Interface_ID(0x1e064bad,0x716643db)

Typedef Documentation

typedef short MtlIndex
typedef short TextMapIndex
typedef Object* ObjectHandle

Enumeration Type Documentation

anonymous enum
Enumerator
OBJECT_LOCKED 
1208 { OBJECT_LOCKED = 0x08000000 };
Definition: object.h:1208

Function Documentation

CoreExport void setHitType ( int  t)
CoreExport int getHitType ( void  )
CoreExport BOOL doingXORDraw ( void  )
CoreExport void GetPolygonCount ( TimeValue  t,
Object pObj,
int numFaces,
int numVerts 
)

This global function (not part of class Object) may be used to count the number of faces and vertices in an object.

It uses Object::PolygonCount() if it is supported, and converts to TriObject and counts faces and vertices otherwise.

Parameters
ttime at which to compute the number of faces and vertices.
pObjto the object to check.
numFacesnumber of faces is returned here.
numVertsnumber of vertices is returned here.
CoreExport void GetTriMeshFaceCount ( TimeValue  t,
Object pObj,
int numFaces,
int numVerts 
)

This function is to count trifaces of a mesh It works similar to GetPolygonCount(), where GetPolygonCount will count EditablePoly object's Polys as 1 Poly, instead of several trifaces.

It also will not count splines unless their renderable property is true

CoreExport void SetShapeObjectCCSThreshold ( float  angle)
CoreExport void MakeHitRegion ( HitRegion hr,
int  type,
int  crossing,
int  epsi,
IPoint2 p 
)
CoreExport void DoModifiedBox ( Box3 box,
Deformer def,
PolyLineProc lp 
)
CoreExport void DoModifiedLimit ( Box3 box,
float  z,
int  axis,
Deformer def,
PolyLineProc lp 
)
CoreExport void DrawCenterMark ( PolyLineProc lp,
Box3 box 
)
CoreExport void DoSphericalMapIcon ( BOOL  sel,
float  radius,
PolyLineProc lp 
)
CoreExport void DoCylindricalMapIcon ( BOOL  sel,
float  radius,
float  height,
PolyLineProc lp 
)
CoreExport void DoPlanarMapIcon ( BOOL  sel,
float  width,
float  length,
PolyLineProc lp 
)
CoreExport Object* MakeObjectDerivedObject ( Object obj)

Creates a new empty derived object, sets it to point at the given object and returns a pointer to the derived object.

Parameters
objobject reference of the derived object will point at this object.
Returns
A pointer to the derived object.
CoreExport const MCHAR* GetSpaceWarpCatString ( int  id)
CoreExport bool RegisterObjectConverter ( ObjectConverter conv)

Registers an object converter with the system.

Parameters
convto the ObjectConverter instance to register.
Returns
Returns true if the converter could be added; false if not.
CoreExport int CanConvertTriObject ( Class_ID  to)

Indicates if a TriObject can convert to the specified class ID.

Note: this actually checks if an Editable Mesh object can convert to the specified type, since an Editable Mesh is what you get when you call CreateNewTriObject ().

This method may be used in an object's CanConvertToType() and ConvertToType() methods. If your object supports conversion to a TriObject, but doesn't support conversion to the given class ID, you can use this method to find out if TriObjects can be used as an "intermediary". If so, you can construct a temporary TriObject, convert it to the given class ID, and call the temporary TriObject's DeleteThis() method.

Parameters
toClass ID to convert to.
Returns
Nonzero if the TriObject can be converted to the specified objec type; otherwise zero.
CoreExport int CanConvertPatchObject ( Class_ID  to)

Indicates if a PatchObject can convert to the specified class ID.

Parameters
toClass ID to convert to.
Returns
Nonzero if the PatchObject can be converted to the specified objec type; otherwise zero.
CoreExport int CanConvertSplineShape ( Class_ID  to)

Indicates if a SplineObject can convert to the specified class ID.

Parameters
toClass ID to convert to.
Returns
Nonzero if the SplineObject can be converted to the specified objec type; otherwise zero.
CoreExport void RegisterStaticEditTri ( Object triob)

This method will register the object passed as the editable tri object.

Parameters
triobobject to register as the editable tri object.
CoreExport void RegisterCollapseType ( Class_ID  cid,
MSTR  name,
bool  canSelfConvert = false 
)

Registers a class ID of an object that the user can collapse other objects to.

The type will only appear if the current object returns nonzero from CanConvertTo(cid).

Parameters
cidclass ID the object will collapse to.
namename of the collapse-to object type (such as "Editable Poly").
canSelfConvertwhether an object should be allowed to collapse to itself. (false is generally preferred, so that the collapse-to menu only has relevant entries.)

Variable Documentation

CoreExport Class_ID defObjectClassID

Class ID of general deformable object.

CoreExport Class_ID mapObjectClassID

Class ID of general texture-mappable object.

an array of channel masks for all the channels "within" the Object.