#include <scene_group.h>
Instance part
Definition at line 85 of file scene_group.h.
Public Member Functions | |
CInstance () | |
Constructor. | |
void | serial (NLMISC::IStream &f) |
Serial the instance. | |
Data Fields | |
bool | AvoidStaticLightPreCompute |
std::vector< uint32 > | Clusters |
The clusters the instance belongs to. | |
bool | DontAddToScene |
bool | DontCastShadow |
Precomputed Lighting. | |
bool | DontCastShadowForExterior |
bool | DontCastShadowForInterior |
std::string | InstanceName |
uint8 | Light [NumStaticLightPerInstance] |
uint8 | LocalAmbientId |
std::string | Name |
Name of the Shape Instance. | |
sint32 | nParent |
The parent instance (-1 if root). | |
NLMISC::CVector | Pos |
NLMISC::CQuat | Rot |
Transformations. | |
NLMISC::CVector | Scale |
bool | StaticLightEnabled |
uint8 | SunContribution |
|
Constructor.
Definition at line 53 of file scene_group.cpp. References AvoidStaticLightPreCompute, DontAddToScene, DontCastShadow, DontCastShadowForExterior, DontCastShadowForInterior, LocalAmbientId, and StaticLightEnabled.
00054 { 00055 DontAddToScene = false; 00056 AvoidStaticLightPreCompute= false; 00057 StaticLightEnabled= false; 00058 DontCastShadow= false; 00059 LocalAmbientId= 0xFF; 00060 DontCastShadowForInterior= false; 00061 DontCastShadowForExterior= false; 00062 } |
|
Serial the instance.
Definition at line 65 of file scene_group.cpp. References AvoidStaticLightPreCompute, Clusters, DontAddToScene, DontCastShadow, DontCastShadowForExterior, DontCastShadowForInterior, InstanceName, NLMISC::IStream::isReading(), LocalAmbientId, nlassert, nParent, Rot, Scale, NLMISC::IStream::serial(), NLMISC::IStream::serialCont(), NLMISC::IStream::serialVersion(), sint, and StaticLightEnabled.
00066 { 00067 /* 00068 Version 6: 00069 - DontCastShadowForExterior 00070 Version 5: 00071 - DontCastShadowForInterior 00072 Version 4: 00073 - LocalAmbientId. 00074 Version 3: 00075 - StaticLight. 00076 Version 2: 00077 - gameDev data. 00078 Version 1: 00079 - Clusters 00080 */ 00081 // Serial a version number 00082 sint version=f.serialVersion (6); 00083 00084 00085 // DontCastShadowForExterior 00086 if (version >= 6) 00087 f.serial(DontCastShadowForExterior); 00088 else 00089 DontCastShadowForExterior= false; 00090 00091 // DontCastShadowForInterior 00092 if (version >= 5) 00093 f.serial(DontCastShadowForInterior); 00094 else 00095 DontCastShadowForInterior= false; 00096 00097 // Serial the LocalAmbientId. 00098 if (version >= 4) 00099 { 00100 f.serial(LocalAmbientId); 00101 } 00102 else if(f.isReading()) 00103 { 00104 LocalAmbientId= 0xFF; 00105 } 00106 00107 // Serial the StaticLight 00108 if (version >= 3) 00109 { 00110 f.serial (AvoidStaticLightPreCompute); 00111 f.serial (DontCastShadow); 00112 f.serial (StaticLightEnabled); 00113 f.serial (SunContribution); 00114 nlassert(CInstanceGroup::NumStaticLightPerInstance==2); 00115 f.serial (Light[0]); 00116 f.serial (Light[1]); 00117 } 00118 else if(f.isReading()) 00119 { 00120 AvoidStaticLightPreCompute= false; 00121 StaticLightEnabled= false; 00122 DontCastShadow= false; 00123 } 00124 00125 // Serial the gamedev data 00126 if (version >= 2) 00127 { 00128 f.serial (InstanceName); 00129 f.serial (DontAddToScene); 00130 } 00131 00132 // Serial the clusters 00133 if (version >= 1) 00134 f.serialCont (Clusters); 00135 00136 // Serial the name 00137 f.serial (Name); 00138 00139 // Serial the position vector 00140 f.serial (Pos); 00141 00142 // Serial the rotation vector 00143 f.serial (Rot); 00144 00145 // Serial the scale vector 00146 f.serial (Scale); 00147 00148 // Serial the parent location in the vector (-1 if no parent) 00149 f.serial (nParent); 00150 } |
|
Definition at line 110 of file scene_group.h. Referenced by CInstance(), and serial(). |
|
The clusters the instance belongs to.
Definition at line 95 of file scene_group.h. Referenced by serial(). |
|
Definition at line 104 of file scene_group.h. Referenced by NL3D::CInstanceGroup::addToSceneAsync(), NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), CInstance(), serial(), and NL3D::CInstanceGroup::stopAddToSceneAsync(). |
|
Precomputed Lighting.
Definition at line 108 of file scene_group.h. Referenced by CInstance(), and serial(). |
|
This is the opposite of DontCastShadowForInterior. zone_lighter or zone_ig_lighter test it and if true, assume this instance dont cast shadow Definition at line 129 of file scene_group.h. Referenced by CInstance(), and serial(). |
|
if true (false by default), the instance don't cast shadow, but ONLY FOR ig_lighter.exe (ig_lighter_lib) (zone_lighter and zone_ig_lighter ignore it). This is a special trick for the "Matis Serre" where the exterior mesh cast shadow in the interior, but is not visible in the interior in realTime because of cluster clipping.... omg :( Definition at line 125 of file scene_group.h. Referenced by CInstance(), and serial(). |
|
Definition at line 103 of file scene_group.h. Referenced by NL3D::CInstanceGroup::addToSceneAsync(), NL3D::CInstanceGroup::getShapeName(), serial(), and NL3D::CInstanceGroup::stopAddToSceneAsync(). |
|
Definition at line 115 of file scene_group.h. Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), NL3D::CInstanceGroup::buildPointLightList(), and NL3D::CInstanceLighter::processIGPointLightRT(). |
|
Id of the ambiant Light to take for this instance. Ambient light are stored too in ig->getPointLigths() If 0xFF => take Ambient of the sun. Definition at line 119 of file scene_group.h. Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), NL3D::CInstanceGroup::buildPointLightList(), CInstance(), NL3D::CInstanceLighter::processIGPointLightRT(), and serial(). |
|
Name of the Shape Instance.
Definition at line 89 of file scene_group.h. Referenced by NL3D::CInstanceGroup::addToSceneAsync(), NL3D::CInstanceGroup::getShapeName(), and NL3D::CInstanceGroup::stopAddToSceneAsync(). |
|
The parent instance (-1 if root).
Definition at line 92 of file scene_group.h. Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), and serial(). |
|
Definition at line 99 of file scene_group.h. Referenced by NL3D::CInstanceGroup::addToSceneAsync(), and NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(). |
|
Transformations.
Definition at line 98 of file scene_group.h. Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), and serial(). |
|
Definition at line 100 of file scene_group.h. Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), and serial(). |
|
Definition at line 112 of file scene_group.h. Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(), NL3D::CInstanceGroup::buildPointLightList(), CInstance(), and serial(). |
|
Definition at line 113 of file scene_group.h. Referenced by NL3D::CInstanceGroup::addToSceneWhenAllShapesLoaded(). |