IGameLight Class Reference

IGameLight Class Referenceabstract

#include <IGameObject.h>

Class Description

Simple wrapper for light objects.

An IGame Wrapper around 3ds Max's lights. This is a generic interface for all the lights

+ Inheritance diagram for IGameLight:

Public Types

enum  LightType {
  IGAME_OMNI, IGAME_TSPOT, IGAME_DIR, IGAME_FSPOT,
  IGAME_TDIR, IGAME_UNKNOWN
}
 Various Light types used by 3ds Max. More...
 
- Public Types inherited from IGameObject
enum  ObjectTypes {
  IGAME_UNKNOWN, IGAME_LIGHT, IGAME_MESH, IGAME_SPLINE,
  IGAME_CAMERA, IGAME_HELPER, IGAME_BONE, IGAME_IKCHAIN,
  IGAME_XREF
}
 Various IGame Object types. More...
 
enum  MaxType {
  IGAME_MAX_UNKNOWN, IGAME_MAX_GEOM, IGAME_MAX_SHAPE, IGAME_MAX_LIGHT,
  IGAME_MAX_CAMERA, IGAME_MAX_BONE, IGAME_MAX_HELPER
}
 Various 3ds Max Object types. More...
 

Public Member Functions

virtual IGamePropertyGetLightColor ()=0
 Get the Light Color Data. More...
 
virtual IGamePropertyGetLightMultiplier ()=0
 Get the Light Multiplier Data. More...
 
virtual IGamePropertyGetLightAttenEnd ()=0
 Get the Light Attenuation End Data. More...
 
virtual IGamePropertyGetLightAttenStart ()=0
 Get the Light Attenuation Start Data. More...
 
virtual IGamePropertyGetLightFallOff ()=0
 Get the Light Falloff Data. More...
 
virtual IGamePropertyGetLightHotSpot ()=0
 Get the Light Hot spot Data. More...
 
virtual IGamePropertyGetLightAspectRatio ()=0
 Get the Light Aspect Ratio Data. More...
 
virtual IGamePropertyGetLightDecayStart ()=0
 Get the Light Decay Start Data. More...
 
virtual LightType GetLightType ()=0
 Get the Light type as defined in the UI. More...
 
virtual int GetLightOvershoot ()=0
 Get the Light overshoot. More...
 
virtual int GetLightDecayType ()=0
 Get the Decay Type of the Light. More...
 
virtual int GetSpotLightShape ()=0
 Get the shape of the Light. More...
 
virtual IGameNodeGetLightTarget ()=0
 Get the Target of the Light. More...
 
virtual bool IsLightOn ()=0
 Check if Light is On. More...
 
virtual bool IsExcludeListReversed ()=0
 Check Exclude List. More...
 
virtual int GetExcludedNodesCount ()=0
 Get the number of excluded nodes from the Light. More...
 
virtual IGameNodeGetExcludedNode (int index)=0
 Get the excluded node based on the index pass in. More...
 
- Public Member Functions inherited from IGameObject
 IGameObject ()
 Default constructor. More...
 
IGAMEEXPORT void GetBoundingBox (Box3 &bb)
 The bounding box of the object. More...
 
IGAMEEXPORT bool IsRenderable ()
 Check if object renderable. More...
 
virtual ObjectTypes GetIGameType ()=0
 The IGame object type. More...
 
IGAMEEXPORT ObjectGetMaxObject ()
 Access to the actual 3ds Max object. More...
 
IGAMEEXPORT MaxType GetMaxType ()
 The 3ds Max object type. More...
 
IGAMEEXPORT int GetNumModifiers ()
 The number of modifiers active on the object. More...
 
IGAMEEXPORT IGameModifierGetIGameModifier (int index)
 Access to IGame modifier. More...
 
IGAMEEXPORT IGameObject (INode *node)
 The IGameObject constructor. More...
 
IGAMEEXPORT bool CastShadows ()
 Check if Object casts shadows. More...
 
IGAMEEXPORT bool IsObjectSkinned ()
 Check if object skinned. More...
 
IGAMEEXPORT IGameSkinGetIGameSkin ()
 Access to the Skin interface. More...
 
IGAMEEXPORT bool IsObjectXRef ()
 Check if XRef object. More...
 
IGAMEEXPORT GMatrix GetIGameObjectTM ()
 Access to the ObjectTM. More...
 
virtual bool InitializeData ()
 Extract the 3ds Max data into IGame data. More...
 
virtual ~IGameObject ()=0
 
- Public Member Functions inherited from IExportEntity
virtual ~IExportEntity ()
 Destructor. More...
 
virtual IPropertyContainerGetIPropertyContainer ()
 Retrieve the Property Container. More...
 
virtual bool IsEntitySupported ()
 Is the Entity directly supported. More...
 
virtual const MCHARGetClassName ()=0
 Retrieves the name of the entity class. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
- Protected Member Functions inherited from IGameObject
void SetNode (INode *n)
 
- Protected Attributes inherited from IGameObject
INodegameNode
 
ObjectgameObject
 

Member Enumeration Documentation

enum LightType

Various Light types used by 3ds Max.

Enumerator
IGAME_OMNI 

Omnidirectional Light.

IGAME_TSPOT 

Targeted Spot Light.

IGAME_DIR 

Directional Light.

IGAME_FSPOT 

Free spot Light.

IGAME_TDIR 

Targeted Directional Light.

IGAME_UNKNOWN 

An unknown light type.

189  {
190  IGAME_OMNI,
191  IGAME_TSPOT,
192  IGAME_DIR,
193  IGAME_FSPOT,
194  IGAME_TDIR,
195  IGAME_UNKNOWN,
196  };
Targeted Directional Light.
Definition: IGameObject.h:194
Omnidirectional Light.
Definition: IGameObject.h:190
An unknown light type.
Definition: IGameObject.h:195
Free spot Light.
Definition: IGameObject.h:193
Directional Light.
Definition: IGameObject.h:192
Targeted Spot Light.
Definition: IGameObject.h:191

Member Function Documentation

virtual IGameProperty* GetLightColor ( )
pure virtual

Get the Light Color Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetLightMultiplier ( )
pure virtual

Get the Light Multiplier Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetLightAttenEnd ( )
pure virtual

Get the Light Attenuation End Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetLightAttenStart ( )
pure virtual

Get the Light Attenuation Start Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetLightFallOff ( )
pure virtual

Get the Light Falloff Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetLightHotSpot ( )
pure virtual

Get the Light Hot spot Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetLightAspectRatio ( )
pure virtual

Get the Light Aspect Ratio Data.

Returns
A pointer to IGameProperty
virtual IGameProperty* GetLightDecayStart ( )
pure virtual

Get the Light Decay Start Data.

Returns
A pointer to IGameProperty
virtual LightType GetLightType ( )
pure virtual

Get the Light type as defined in the UI.

Returns
The Light Type. Returned value corresponds to IGameLight::LightType Enum
virtual int GetLightOvershoot ( )
pure virtual

Get the Light overshoot.

Returns
TRUE if the Light supports overshoot
virtual int GetLightDecayType ( )
pure virtual

Get the Decay Type of the Light.

Returns
The Decay Type as integer
0 - None
1 - Inverse
2 - Inverse Square
virtual int GetSpotLightShape ( )
pure virtual

Get the shape of the Light.

Returns
The shape can be one of the following
RECT_LIGHT
CIRCLE_LIGHT
virtual IGameNode* GetLightTarget ( )
pure virtual

Get the Target of the Light.

If the light is of type Spot light then this provides access to the target

Returns
A pointer to IGameNode for the target. Return NULL for non target lights
virtual bool IsLightOn ( )
pure virtual

Check if Light is On.

Returns
True if the Light is on
virtual bool IsExcludeListReversed ( )
pure virtual

Check Exclude List.

Determines whether the exclude list actually maintains a list that is infact included by the light

Returns
TRUE if the light maintains an included list
virtual int GetExcludedNodesCount ( )
pure virtual

Get the number of excluded nodes from the Light.

This list contains nodes that should not be included in lighting calculations. It can also contain a list of only those lights that SHOULD be included. This all depends on the state of IsExcludedListReversed.

Returns
The total number of excluded nodes
virtual IGameNode* GetExcludedNode ( int  index)
pure virtual

Get the excluded node based on the index pass in.

Parameters
indexThe index of the node to access
Returns
An IGameNode pointer for the excluded node