Classes | |
struct | LightMapInfoT |
struct | SHLMapInfoT |
struct | TexInfoT |
Public Member Functions | |
FaceNodeT (LightMapManT &LMM, SHLMapManT &SMM) | |
The constructor for creating an "empty" face. More... | |
FaceNodeT (LightMapManT &LMM, SHLMapManT &SMM, const Polygon3T< double > &Poly_, MaterialT *Material_, const TexInfoT &TI_) | |
Constructor for creating a FaceNodeT from components. More... | |
FaceNodeT (const FaceNodeT &Other) | |
The copy constructor. More... | |
~FaceNodeT () | |
The destructor. More... | |
void | InitRenderMeshesAndMats (const ArrayT< Vector3dT > &SharedVertices, const float LightMapPatchSize) |
ArrayT< unsigned long > & | GetDrawIndices () |
Returns the DrawIndices. For CaBSP. More... | |
LightMapManT & | GetLightMapMan () const |
Returns the LightMapMan. For CaBSP. More... | |
SHLMapManT & | GetSHLMapMan () const |
Returns the SHLMapMan. For CaBSP. More... | |
bool | GetLightmapColorNearPosition (const Vector3dT &Pos, Vector3fT &LightMapColor, const float LightMapPatchSize) const |
Determines the lightmap color of this face near position Pos. More... | |
void | WriteTo (std::ostream &OutFile, aux::PoolT &Pool) const |
const BoundingBox3T< double > & | GetBoundingBox () const |
Returns the bounding box of the contents of this scene node. More... | |
bool | IsOpaque () const |
TODO / FIXME: This method is a hot-fix for getting the render order with translucent Bezier Patches right. More... | |
void | DrawAmbientContrib (const Vector3dT &ViewerPos) const |
Draws the contents of this scene node. More... | |
void | DrawStencilShadowVolumes (const Vector3dT &LightPos, const float LightRadius) const |
void | DrawLightSourceContrib (const Vector3dT &ViewerPos, const Vector3dT &LightPos) const |
void | DrawTranslucentContrib (const Vector3dT &ViewerPos) const |
void | InitDefaultLightMaps (const float LightMapPatchSize) |
If this NodeT uses lightmaps, this methods initializes default (full-bright) lightmaps for it at the proper size. More... | |
void | CreatePatchMeshes (ArrayT< PatchMeshT > &PatchMeshes, ArrayT< ArrayT< ArrayT< Vector3dT > > > &SampleCoords, const float LightMapPatchSize) const |
Creates the patch meshes for this NodeT for the purpose of radiosity computations (CaLight). More... | |
void | BackToLightMap (const PatchMeshT &PatchMesh, const float LightMapPatchSize) |
Takes the patches of the given patch mesh back into the lightmap of this node. More... | |
![]() | |
virtual | ~GenericNodeT () |
The virtual destructor, so that derived classes can safely be deleted via a GenericNodeT (base class) pointer. More... | |
Static Public Member Functions | |
static FaceNodeT * | CreateFromFile_cw (std::istream &InFile, aux::PoolT &Pool, LightMapManT &LMM, SHLMapManT &SMM) |
Named constructor. More... | |
![]() | |
static GenericNodeT * | CreateFromFile_cw (std::istream &InFile, aux::PoolT &Pool, LightMapManT &LMM, SHLMapManT &SMM, PlantDescrManT &PDM, const ArrayT< const TerrainT * > &ShTe, ModelManagerT &ModelMan) |
Reads a GenericNodeT from InFile. More... | |
Public Attributes | |
Polygon3T< double > | Polygon |
MaterialT * | Material |
The material that is assigned to this face. The pointer points into the MaterialManager-maintained list. More... | |
TexInfoT | TI |
LightMapInfoT | LightMapInfo |
SHLMapInfoT | SHLMapInfo |
Static Public Attributes | |
static const double | ROUND_EPSILON = 0.08 |
The maximum amount that is allowed for geometry-related rounding errors. More... | |
FaceNodeT::FaceNodeT | ( | LightMapManT & | LMM, |
SHLMapManT & | SMM | ||
) |
The constructor for creating an "empty" face.
Needed e.g. by the named constructor CreateFromFile_cw() below.
FaceNodeT::FaceNodeT | ( | LightMapManT & | LMM, |
SHLMapManT & | SMM, | ||
const Polygon3T< double > & | Poly_, | ||
MaterialT * | Material_, | ||
const TexInfoT & | TI_ | ||
) |
Constructor for creating a FaceNodeT from components.
This is currently only needed by the LoadWorld.cpp and LeakDetection.cpp files of the CaBSP tool.
FaceNodeT::FaceNodeT | ( | const FaceNodeT & | Other | ) |
The copy constructor.
FaceNodeT::~FaceNodeT | ( | ) |
The destructor.
|
virtual |
Takes the patches of the given patch mesh back into the lightmap of this node.
Reimplemented from cf::SceneGraph::GenericNodeT.
|
static |
Named constructor.
|
virtual |
Creates the patch meshes for this NodeT for the purpose of radiosity computations (CaLight).
The created patch meshes are just appended to the PatchMeshes array, i.e. the PatchMeshes array is not cleared by this function. The origins of the patches are chosen so that self-intersections due to rounding errors are impossible or at least unlikely.
PatchMeshes | The array the created patch meshes are appended to. The array is not initially cleared by this function. |
SampleCoords | For each patch of each appended patch mesh, an array of sample coordinates is appended by this function. The minimum number of samples returned per patch is normally one, namely the one identical to the patches coordinate. NOTE: There may be NO SAMPLES AT ALL for a patch if InsideFace==false for that patch, so the caller must not make any assumptions. The calling code may use that for example for computing initial sunlight information. The array is not initially cleared by this function. |
LightMapPatchSize | The size of the lightmap patches. |
Reimplemented from cf::SceneGraph::GenericNodeT.
|
virtual |
Draws the contents of this scene node.
ViewerPos | Position of the viewer. |
Reimplemented from cf::SceneGraph::GenericNodeT.
|
virtual |
Returns the bounding box of the contents of this scene node.
Reimplemented from cf::SceneGraph::GenericNodeT.
|
inline |
Returns the DrawIndices. For CaBSP.
bool FaceNodeT::GetLightmapColorNearPosition | ( | const Vector3dT & | Pos, |
Vector3fT & | LightMapColor, | ||
const float | LightMapPatchSize | ||
) | const |
Determines the lightmap color of this face near position Pos.
|
inline |
Returns the LightMapMan. For CaBSP.
|
inline |
Returns the SHLMapMan. For CaBSP.
|
virtual |
If this NodeT uses lightmaps, this methods initializes default (full-bright) lightmaps for it at the proper size.
This method is intended to be called by CaBSP, after it is completely done with changing the geometry of the node (the implementation would be part of the nodes constructor otherwise). The method may or may not use the LightMapManT for its purposes, the caller should not care.
Reimplemented from cf::SceneGraph::GenericNodeT.
|
virtual |
TODO / FIXME: This method is a hot-fix for getting the render order with translucent Bezier Patches right.
It should be removed again and the whole system should be replaced with something as in the Q3 renderer!
Reimplemented from cf::SceneGraph::GenericNodeT.
MaterialT* cf::SceneGraph::FaceNodeT::Material |
The material that is assigned to this face. The pointer points into the MaterialManager-maintained list.
|
static |
The maximum amount that is allowed for geometry-related rounding errors.