|
Vertex Lighting |
Vertex lighting is the alternative to lightmapped interiors
|
| void | rebuildVertexColors () |
| | Rebuilds the vertex colors for alarm and normal states for all detail levels.
|
| Vector< ColorI > * | getVertexColorsNormal (U32 detail) |
| | Returns the normal vertex lighting colors for a detail level.
|
| Vector< ColorI > * | getVertexColorsAlarm (U32 detail) |
| | Returns the alarm vertex lighting colors for a detail level.
|
| Vector< Vector< ColorI > * > | mVertexColorsNormal |
| | Vertex colors under normal lighting per detail level.
|
| Vector< Vector< ColorI > * > | mVertexColorsAlarm |
| | Vertex colors under alarm lighting per detail level.
|
Public Member Functions |
| | InteriorInstance () |
| | ~InteriorInstance () |
| bool | buildPolyList (AbstractPolyList *polyList, const Box3F &box, const SphereF &sphere) |
| | Builds a list of polygons which intersect a bounding volume.
|
| bool | castRay (const Point3F &start, const Point3F &end, RayInfo *info) |
| | Casts a ray and obtain collision information, returns true if RayInfo is modified.
|
| virtual void | setTransform (const MatrixF &mat) |
| | Sets the Object -> World transform.
|
| void | buildConvex (const Box3F &box, Convex *convex) |
| | Builds a convex hull for this object.
|
| void | renewOverlays () |
| | Reloads material information if the interior skin changes.
|
| void | setSkinBase (const char *newBase) |
| | Sets the interior skin to something different.
|
| | DECLARE_CONOBJECT (InteriorInstance) |
| bool | readLightmaps (GBitmap ****lightmaps) |
| | Reads the lightmaps of the interior into the provided pointer.
|
| void | addChildren () |
| | Not yet implemented.
|
| LM_HANDLE | getLMHandle () |
| | Returns the Light Manager handle.
|
| AudioProfile * | getAudioProfile () |
| | Returns the audio profile.
|
| AudioEnvironment * | getAudioEnvironment () |
| | Returns the audio environment.
|
| bool | getPointInsideScale (const Point3F &pos, F32 *pScale) |
| | This is used to determine just how 'inside' a point is in an interior.
|
| Resource< InteriorResource > & | getResource () |
| | Returns the interior resource.
|
| U32 | getCRC () |
| | Returns the CRC for validation.
|
|
| bool | inAlarmState () |
| | This returns true if the interior is in an alarm state.
|
| void | setAlarmMode (const bool alarm) |
| | This sets the alarm mode of the interior.
|
| void | activateLight (const char *pLightName) |
| | Activates a light with the given name on all detail levels of the interior.
|
| void | deactivateLight (const char *pLightName) |
| | Deactivates a light with the given name on all detail levels of the interior.
|
| void | echoTriggerableLights () |
| | Echos out all the lights in the interior, starting with triggerable then animated lights.
|
|
| U32 | getNumDetailLevels () |
| | Returns the number of detail levels for an object.
|
| Interior * | getDetailLevel (const U32 level) |
| | Gets the interior associated with a particular detail level.
|
| void | setDetailLevel (S32 level=-1) |
| | Sets the detail level to render manually.
|
Static Public Member Functions |
| static void | init () |
| static void | destroy () |
| static void | initPersistFields () |
| | Register dynamic fields in a subclass of ConsoleObject.
|
| static void | consoleInit () |
| | Register global constant variables and do other one-time initialization tasks in a subclass of ConsoleObject.
|
| static bool | getRenderDynamicLights () |
| | Returns true if the interiors are rendering dynamic lighting.
|
| static void | setRenderDynamicLights (bool val) |
| | Turns on or off dynamic lighting of interiors.
|
Static Public Attributes |
| static bool | smDontRestrictOutside |
| static F32 | smDetailModification |
Protected Member Functions |
| bool | onAdd () |
| | Called when the object is added to the sim.
|
| void | onRemove () |
| | Called when the object is removed from the sim.
|
| void | inspectPreApply () |
| | Called before any property of the object is changed in the world editor.
|
| void | inspectPostApply () |
| | Called after any property of the object is changed in the world editor.
|
| void | setLightUpdatedTime (const U32) |
| U32 | getLightUpdatedTime () const |
| bool | onSceneAdd (SceneGraph *graph) |
| | Called when this is added to the SceneGraph.
|
| void | onSceneRemove () |
| | Called when this is removed from the SceneGraph.
|
| U32 | getPointZone (const Point3F &p) |
| | Returns the zone containing p.
|
| bool | getOverlappingZones (SceneObject *obj, U32 *zones, U32 *numZones) |
| | If an object exists in multiple zones, this method will give you the number and indices of these zones (storing them in the provided variables).
|
| U32 | calcDetailLevel (SceneState *, const Point3F &) |
| bool | prepRenderImage (SceneState *state, const U32 stateKey, const U32 startZone, const bool modifyBaseZoneState) |
| | Called when the SceneGraph is ready for the registration of RenderImages.
|
| void | renderObject (SceneState *state, SceneRenderImage *image) |
| | Called when the object is supposed to render itself.
|
| bool | scopeObject (const Point3F &rootPosition, const F32 rootDistance, bool *zoneScopeState) |
| | This is called on a zone managing object to scope all the zones managed.
|
Protected Attributes |
| U32 | mLightUpdatedTime |
Static Protected Attributes |
| static U32 | smLightUpdatePeriod |
| static bool | smRenderDynamicLights |
Private Types |
| typedef SceneObject | Parent |
| enum | UpdateMaskBits {
InitMask = BIT(0),
TransformMask = BIT(1),
AlarmMask = BIT(2),
_lightupdate0 = BIT(3),
_lightupdate1 = BIT(4),
_lightupdate2 = BIT(5),
_lightupdate3 = BIT(6),
_lightupdate4 = BIT(7),
_lightupdate5 = BIT(8),
_lightupdate6 = BIT(9),
_lightupdate7 = BIT(10),
SkinBaseMask = BIT(11),
AudioMask = BIT(12),
NextFreeMask = BIT(13)
} |
| enum | Constants {
LightUpdateBitStart = 3,
LightUpdateBitEnd = 10
} |
| enum | AlarmState {
Normal = 0,
Alarm = 1
} |
Private Member Functions |
| U32 | packUpdate (NetConnection *conn, U32 mask, BitStream *stream) |
| | Instructs this object to pack its state for transfer over the network.
|
| void | unpackUpdate (NetConnection *conn, BitStream *stream) |
| | Instructs this object to read state data previously packed with packUpdate.
|
| void | createTriggerTransform (const InteriorResTrigger *trigger, MatrixF *transform) |
| | Creates a transform based on an trigger area.
|
|
These should not be called directly. Use the public activateLight(const char *) method instead because unless the detail level is rendering and it's much easier to not manage the lights on a per-detail level basis.
|
| void | activateLight (const U32 detail, const U32 lightIndex) |
| | Activates a specific light for a detail level.
|
| void | deactivateLight (const U32 detail, const U32 lightIndex) |
| | Deactivates a specific light for a detail level.
|
|
| void | updateLightTime (const U32 detail, const U32 lightIndex, const U32 ms) |
| | Steps the animated light simulation by a delta.
|
| void | downloadLightmaps (SceneState *state, Interior *pInterior, LightInfo &rLightInfo) |
| | This loops through all the surfaces in an interior and calls updateLightMap on them.
|
| void | installLight (const U32 detail, const U32 lightIndex) |
| | This will set up a particular light in a particular detail level.
|
| void | updateLoopingLight (Interior *interior, LightInfo::Light &light, const U32 lightIndex, const U32 ms) |
| | Called by updateLightTime to update a light with a looping animation.
|
| void | updateFlickerLight (Interior *interior, LightInfo::Light &light, const U32 lightIndex, const U32 ms) |
| | Called by updateLightTime to update a light with a flicker animation.
|
| void | updateRampLight (Interior *interior, LightInfo::Light &light, const U32 lightIndex, const U32 ms) |
| | Called by updateLightTime to update a light with a fade-up (ramp) animation light.
|
| void | updateAllLights (const U32 ms) |
| | Updates the animation for all lights.
|
| void | updateLightMap (Interior *pInterior, LightInfo &rLightInfo, const U32 surfaceIndex) |
| | Takes the original lightmap and adds the animated lights to it and then binds the texture to it.
|
| void | intensityMapMerge (U8 *lightMap, const U32 width, const U32 height, const U8 *intensityMap, const ColorI &color) |
| | lightMap is a 24-bit RGB texture, intensityMap is an 8 bit intensity map.
|
Static Private Member Functions |
|
This is for managing light updates across the network
|
| static U32 | makeUpdateKey (const U32 detail, const U32 lightIndex) |
| | Creates an update key for the LightGrouper.
|
| static U32 | detailFromUpdateKey (const U32 key) |
| | Takes an update key and returns the detail level part of it.
|
| static U32 | indexFromUpdateKey (const U32 key) |
| | Takes an update key and returns the light index part of it 2param key Update key.
|
Private Attributes |
| Convex * | mConvexList |
| StringTableEntry | mInteriorFileName |
| | File name of the interior this instance encapuslates.
|
| U32 | mInteriorFileHash |
| | Hash for interior file name, used for sorting.
|
| Resource< InteriorResource > | mInteriorRes |
| | Interior managed by resource manager.
|
| Vector< MaterialList * > | mMaterialMaps |
| | Materials for this interior.
|
| StringTableEntry | mSkinBase |
| | Skin for this interior.
|
| Vector< Vector< InteriorSubObject * > > | mInteriorSubObjects |
| | Sub objects of this interior.
|
| bool | mShowTerrainInside |
| | Enables or disables terrain showing through the interior.
|
| LM_HANDLE | mLMHandle |
| | Handle to the light manager.
|
| AudioProfile * | mAudioProfile |
| | Audio profile.
|
| AudioEnvironment * | mAudioEnvironment |
| | Audio environment.
|
| S32 | mForcedDetailLevel |
| | Forced LOD, if -1 auto LOD.
|
| U32 | mCRC |
| | CRC for the interior.
|
| bool | mAlarmState |
| | Alarm state of the interior.
|
| Vector< LightInfo > | mLightInfo |
| | Light info, one per detail level.
|
| LightUpdateGrouper * | mUpdateGrouper |
| | Designed to group net updates for lights to reduce traffic.
|
Friends |
| class | SceneLighting |
| class | FloorPlan |
Data Structures |
| struct | LightInfo |