Fixed: Compilation
This commit is contained in:
parent
bb89ed670a
commit
554d782150
42 changed files with 111 additions and 70 deletions
|
@ -19,6 +19,8 @@
|
||||||
|
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "nel/misc/bit_set.h"
|
#include "nel/misc/bit_set.h"
|
||||||
|
#include "nel/misc/smart_ptr.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
|
@ -21,13 +21,17 @@
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "nel/misc/smart_ptr.h"
|
#include "nel/misc/smart_ptr.h"
|
||||||
#include "nel/3d/animatable.h"
|
#include "nel/3d/animatable.h"
|
||||||
|
|
||||||
#include "nel/3d/track.h"
|
#include "nel/3d/track.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
|
||||||
namespace NL3D
|
namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class CScene;
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
/**
|
/**
|
||||||
* An animated lightmap
|
* An animated lightmap
|
||||||
|
|
|
@ -88,7 +88,7 @@ private:
|
||||||
public:
|
public:
|
||||||
std::string MeshName;
|
std::string MeshName;
|
||||||
public:
|
public:
|
||||||
CMeshLoad (const std::string &meshName, IShape **ppShp, IDriver *pDriver, const CVector &position, uint selectedTexture);
|
CMeshLoad (const std::string &meshName, IShape **ppShp, IDriver *pDriver, const NLMISC::CVector &position, uint selectedTexture);
|
||||||
void run (void);
|
void run (void);
|
||||||
void getName (std::string &result) const;
|
void getName (std::string &result) const;
|
||||||
};
|
};
|
||||||
|
@ -122,7 +122,7 @@ private:
|
||||||
CTextureFile *TextureFile;
|
CTextureFile *TextureFile;
|
||||||
bool *Signal;
|
bool *Signal;
|
||||||
public:
|
public:
|
||||||
CTextureLoad(CTextureFile *textureFile, bool *psgn, const CVector &position)
|
CTextureLoad(CTextureFile *textureFile, bool *psgn, const NLMISC::CVector &position)
|
||||||
: TextureFile(textureFile), Signal(psgn)
|
: TextureFile(textureFile), Signal(psgn)
|
||||||
{
|
{
|
||||||
Position = position;
|
Position = position;
|
||||||
|
|
|
@ -152,7 +152,7 @@ private:
|
||||||
struct CTextureLodToSort
|
struct CTextureLodToSort
|
||||||
{
|
{
|
||||||
CTextureLod *Lod;
|
CTextureLod *Lod;
|
||||||
CVector Position;
|
NLMISC::CVector Position;
|
||||||
bool operator<(const CTextureLodToSort &other) const
|
bool operator<(const CTextureLodToSort &other) const
|
||||||
{
|
{
|
||||||
return Lod->Weight<other.Lod->Weight;
|
return Lod->Weight<other.Lod->Weight;
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "nel/misc/vector.h"
|
#include "nel/misc/vector.h"
|
||||||
#include "nel/misc/plane.h"
|
#include "nel/misc/plane.h"
|
||||||
|
#include "nel/misc/aabbox.h"
|
||||||
|
|
||||||
|
|
||||||
namespace NL3D {
|
namespace NL3D {
|
||||||
|
@ -39,16 +40,16 @@ public:
|
||||||
|
|
||||||
/** build the camera collision as a cone or a cylinder
|
/** build the camera collision as a cone or a cylinder
|
||||||
*/
|
*/
|
||||||
void build(const CVector &start, const CVector &end, float radius, bool cone);
|
void build(const NLMISC::CVector &start, const NLMISC::CVector &end, float radius, bool cone);
|
||||||
|
|
||||||
/** build the camera collision as a simple ray
|
/** build the camera collision as a simple ray
|
||||||
*/
|
*/
|
||||||
void buildRay(const CVector &start, const CVector &end);
|
void buildRay(const NLMISC::CVector &start, const NLMISC::CVector &end);
|
||||||
|
|
||||||
/** compute the intersection of the Camera Volume against the triangle, and minimize
|
/** compute the intersection of the Camera Volume against the triangle, and minimize
|
||||||
* minDist (actual square of distance) with min sqr distance of the poly.
|
* minDist (actual square of distance) with min sqr distance of the poly.
|
||||||
*/
|
*/
|
||||||
void minimizeDistanceAgainstTri(const CVector &p0, const CVector &p1, const CVector &p2, float &sqrMinDist);
|
void minimizeDistanceAgainstTri(const NLMISC::CVector &p0, const NLMISC::CVector &p1, const NLMISC::CVector &p2, float &sqrMinDist);
|
||||||
|
|
||||||
/** Compute into this the camera collision 'other' mul by 'matrix'
|
/** Compute into this the camera collision 'other' mul by 'matrix'
|
||||||
* NB: for cone Radius, suppose uniform scale, else will have strange result (a uniform scale is deduced)
|
* NB: for cone Radius, suppose uniform scale, else will have strange result (a uniform scale is deduced)
|
||||||
|
@ -69,9 +70,9 @@ private:
|
||||||
enum {MaxNPlanes=6};
|
enum {MaxNPlanes=6};
|
||||||
|
|
||||||
// The start of the camera raycast
|
// The start of the camera raycast
|
||||||
CVector _Start;
|
NLMISC::CVector _Start;
|
||||||
// The end of the camera raycast
|
// The end of the camera raycast
|
||||||
CVector _End;
|
NLMISC::CVector _End;
|
||||||
// The radius (at end only if cone)
|
// The radius (at end only if cone)
|
||||||
float _Radius;
|
float _Radius;
|
||||||
// cone or cylinder?
|
// cone or cylinder?
|
||||||
|
@ -83,8 +84,8 @@ private:
|
||||||
NLMISC::CAABBox _BBox;
|
NLMISC::CAABBox _BBox;
|
||||||
|
|
||||||
// Temp Data for minimizeDistanceAgainstTri
|
// Temp Data for minimizeDistanceAgainstTri
|
||||||
CVector _ArrayIn[3+MaxNPlanes];
|
NLMISC::CVector _ArrayIn[3+MaxNPlanes];
|
||||||
CVector _ArrayOut[3+MaxNPlanes];
|
NLMISC::CVector _ArrayOut[3+MaxNPlanes];
|
||||||
|
|
||||||
// The pyramid representing the camera collision volume. Nb: local to start for precision problems
|
// The pyramid representing the camera collision volume. Nb: local to start for precision problems
|
||||||
NLMISC::CPlane _Pyramid[MaxNPlanes];
|
NLMISC::CPlane _Pyramid[MaxNPlanes];
|
||||||
|
@ -97,10 +98,10 @@ private:
|
||||||
float _MaxRadiusProj;
|
float _MaxRadiusProj;
|
||||||
float _OODeltaRadiusProj;
|
float _OODeltaRadiusProj;
|
||||||
float _RayLen;
|
float _RayLen;
|
||||||
CVector _RayNorm;
|
NLMISC::CVector _RayNorm;
|
||||||
|
|
||||||
// simpler method for simple ray
|
// simpler method for simple ray
|
||||||
void intersectRay(const CVector &p0, const CVector &p1, const CVector &p2, float &sqrMinDist);
|
void intersectRay(const NLMISC::CVector &p0, const NLMISC::CVector &p1, const NLMISC::CVector &p2, float &sqrMinDist);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ namespace NL3D
|
||||||
class UDriver;
|
class UDriver;
|
||||||
class UCamera;
|
class UCamera;
|
||||||
class CCloudScape;
|
class CCloudScape;
|
||||||
|
class CScene;
|
||||||
|
|
||||||
/// implementation of UWaterInstance methods
|
/// implementation of UWaterInstance methods
|
||||||
class CCloudScapeUser : public UCloudScape
|
class CCloudScapeUser : public UCloudScape
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
static void releaseInstance();
|
static void releaseInstance();
|
||||||
|
|
||||||
/// convert a HLS (0..255) to a RGBA.
|
/// convert a HLS (0..255) to a RGBA.
|
||||||
CRGBA convert(uint H, uint L, uint S);
|
NLMISC::CRGBA convert(uint H, uint L, uint S);
|
||||||
|
|
||||||
/// convert a RGBA bitmap into another RGBA, with HLS decal (0..255, -255..+255, -255..+255).
|
/// convert a RGBA bitmap into another RGBA, with HLS decal (0..255, -255..+255, -255..+255).
|
||||||
void convertRGBABitmap(NLMISC::CBitmap &dst, const NLMISC::CBitmap &src, uint8 dh, sint dl, sint ds);
|
void convertRGBABitmap(NLMISC::CBitmap &dst, const NLMISC::CBitmap &src, uint8 dh, sint dl, sint ds);
|
||||||
|
@ -75,7 +75,7 @@ private:
|
||||||
uint8 H,L,S,A;
|
uint8 H,L,S,A;
|
||||||
};
|
};
|
||||||
|
|
||||||
CRGBA _HueTable[HueTableSize];
|
NLMISC::CRGBA _HueTable[HueTableSize];
|
||||||
CHLSA _Color16ToHLS[65536];
|
CHLSA _Color16ToHLS[65536];
|
||||||
|
|
||||||
/// Constructor
|
/// Constructor
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
namespace NL3D
|
namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
class CInstanceGroup;
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
/**
|
/**
|
||||||
|
@ -106,14 +107,14 @@ public:
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// Debug: build a colored Grid mesh of SunContribution.
|
/// Debug: build a colored Grid mesh of SunContribution.
|
||||||
void buildSunDebugMesh(CMesh::CMeshBuild &meshBuild, CMeshBase::CMeshBaseBuild &meshBaseBuild, const CVector &deltaPos=CVector::Null);
|
void buildSunDebugMesh(CMesh::CMeshBuild &meshBuild, CMeshBase::CMeshBaseBuild &meshBaseBuild, const NLMISC::CVector &deltaPos= NLMISC::CVector::Null);
|
||||||
|
|
||||||
/// Debug: build a colored Grid mesh of PointLight. R= pointLight1 id. G= PointLight2 id. B= The multiplier used to show Ids.
|
/// Debug: build a colored Grid mesh of PointLight. R= pointLight1 id. G= PointLight2 id. B= The multiplier used to show Ids.
|
||||||
void buildPLDebugMesh(CMesh::CMeshBuild &meshBuild, CMeshBase::CMeshBaseBuild &meshBaseBuild, const CVector &deltaPos, const CInstanceGroup &igOut);
|
void buildPLDebugMesh(CMesh::CMeshBuild &meshBuild, CMeshBase::CMeshBaseBuild &meshBaseBuild, const NLMISC::CVector &deltaPos, const CInstanceGroup &igOut);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void addDebugMeshFaces(CMesh::CMeshBuild &meshBuild, CSurface &surface, uint vId0,
|
void addDebugMeshFaces(CMesh::CMeshBuild &meshBuild, CSurface &surface, uint vId0,
|
||||||
const std::vector<CRGBA> &colors);
|
const std::vector<NLMISC::CRGBA> &colors);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
float a31, a32, a33, a34;
|
float a31, a32, a33, a34;
|
||||||
|
|
||||||
// Copy from a matrix.
|
// Copy from a matrix.
|
||||||
void set(const CMatrix &mat)
|
void set(const NLMISC::CMatrix &mat)
|
||||||
{
|
{
|
||||||
const float *m =mat.get();
|
const float *m =mat.get();
|
||||||
a11= m[0]; a12= m[4]; a13= m[8] ; a14= m[12];
|
a11= m[0]; a12= m[4]; a13= m[8] ; a14= m[12];
|
||||||
|
@ -57,14 +57,14 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// mulSetvector. NB: in should be different as v!! (else don't work).
|
// mulSetvector. NB: in should be different as v!! (else don't work).
|
||||||
void mulSetVector(const CVector &in, CVector &out)
|
void mulSetVector(const NLMISC::CVector &in, NLMISC::CVector &out)
|
||||||
{
|
{
|
||||||
out.x= (a11*in.x + a12*in.y + a13*in.z);
|
out.x= (a11*in.x + a12*in.y + a13*in.z);
|
||||||
out.y= (a21*in.x + a22*in.y + a23*in.z);
|
out.y= (a21*in.x + a22*in.y + a23*in.z);
|
||||||
out.z= (a31*in.x + a32*in.y + a33*in.z);
|
out.z= (a31*in.x + a32*in.y + a33*in.z);
|
||||||
}
|
}
|
||||||
// mulSetpoint. NB: in should be different as v!! (else don't work).
|
// mulSetpoint. NB: in should be different as v!! (else don't work).
|
||||||
void mulSetPoint(const CVector &in, CVector &out)
|
void mulSetPoint(const NLMISC::CVector &in, NLMISC::CVector &out)
|
||||||
{
|
{
|
||||||
out.x= (a11*in.x + a12*in.y + a13*in.z + a14);
|
out.x= (a11*in.x + a12*in.y + a13*in.z + a14);
|
||||||
out.y= (a21*in.x + a22*in.y + a23*in.z + a24);
|
out.y= (a21*in.x + a22*in.y + a23*in.z + a24);
|
||||||
|
@ -73,14 +73,14 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// mulSetvector. NB: in should be different as v!! (else don't work).
|
// mulSetvector. NB: in should be different as v!! (else don't work).
|
||||||
void mulSetVector(const CVector &in, float scale, CVector &out)
|
void mulSetVector(const NLMISC::CVector &in, float scale, NLMISC::CVector &out)
|
||||||
{
|
{
|
||||||
out.x= (a11*in.x + a12*in.y + a13*in.z) * scale;
|
out.x= (a11*in.x + a12*in.y + a13*in.z) * scale;
|
||||||
out.y= (a21*in.x + a22*in.y + a23*in.z) * scale;
|
out.y= (a21*in.x + a22*in.y + a23*in.z) * scale;
|
||||||
out.z= (a31*in.x + a32*in.y + a33*in.z) * scale;
|
out.z= (a31*in.x + a32*in.y + a33*in.z) * scale;
|
||||||
}
|
}
|
||||||
// mulSetpoint. NB: in should be different as v!! (else don't work).
|
// mulSetpoint. NB: in should be different as v!! (else don't work).
|
||||||
void mulSetPoint(const CVector &in, float scale, CVector &out)
|
void mulSetPoint(const NLMISC::CVector &in, float scale, NLMISC::CVector &out)
|
||||||
{
|
{
|
||||||
out.x= (a11*in.x + a12*in.y + a13*in.z + a14) * scale;
|
out.x= (a11*in.x + a12*in.y + a13*in.z + a14) * scale;
|
||||||
out.y= (a21*in.x + a22*in.y + a23*in.z + a24) * scale;
|
out.y= (a21*in.x + a22*in.y + a23*in.z + a24) * scale;
|
||||||
|
@ -89,14 +89,14 @@ public:
|
||||||
|
|
||||||
|
|
||||||
// mulAddvector. NB: in should be different as v!! (else don't work).
|
// mulAddvector. NB: in should be different as v!! (else don't work).
|
||||||
void mulAddVector(const CVector &in, float scale, CVector &out)
|
void mulAddVector(const NLMISC::CVector &in, float scale, NLMISC::CVector &out)
|
||||||
{
|
{
|
||||||
out.x+= (a11*in.x + a12*in.y + a13*in.z) * scale;
|
out.x+= (a11*in.x + a12*in.y + a13*in.z) * scale;
|
||||||
out.y+= (a21*in.x + a22*in.y + a23*in.z) * scale;
|
out.y+= (a21*in.x + a22*in.y + a23*in.z) * scale;
|
||||||
out.z+= (a31*in.x + a32*in.y + a33*in.z) * scale;
|
out.z+= (a31*in.x + a32*in.y + a33*in.z) * scale;
|
||||||
}
|
}
|
||||||
// mulAddpoint. NB: in should be different as v!! (else don't work).
|
// mulAddpoint. NB: in should be different as v!! (else don't work).
|
||||||
void mulAddPoint(const CVector &in, float scale, CVector &out)
|
void mulAddPoint(const NLMISC::CVector &in, float scale, NLMISC::CVector &out)
|
||||||
{
|
{
|
||||||
out.x+= (a11*in.x + a12*in.y + a13*in.z + a14) * scale;
|
out.x+= (a11*in.x + a12*in.y + a13*in.z + a14) * scale;
|
||||||
out.y+= (a21*in.x + a22*in.y + a23*in.z + a24) * scale;
|
out.y+= (a21*in.x + a22*in.y + a23*in.z + a24) * scale;
|
||||||
|
|
|
@ -124,7 +124,7 @@ private:
|
||||||
double _LastSceneTime;
|
double _LastSceneTime;
|
||||||
|
|
||||||
// maximum amplitude vector for each level. Stored in mesh because same for all instances.
|
// maximum amplitude vector for each level. Stored in mesh because same for all instances.
|
||||||
CVector _MaxDeltaPos[HrcDepth];
|
NLMISC::CVector _MaxDeltaPos[HrcDepth];
|
||||||
float _MaxVertexMove;
|
float _MaxVertexMove;
|
||||||
|
|
||||||
// MBR Cache
|
// MBR Cache
|
||||||
|
|
|
@ -87,7 +87,7 @@ private:
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CParticleSystemModel *Model;
|
CParticleSystemModel *Model;
|
||||||
CMatrix OldAncestorMatOrRelPos; // last matrix of ancestor skeleton or relative matrix of ps to its ancestor (see flag below)
|
NLMISC::CMatrix OldAncestorMatOrRelPos; // last matrix of ancestor skeleton or relative matrix of ps to its ancestor (see flag below)
|
||||||
bool IsRelMatrix; // gives usage of the field OldAncestorMatOrRelPos
|
bool IsRelMatrix; // gives usage of the field OldAncestorMatOrRelPos
|
||||||
bool HasAncestorSkeleton; // has the system an ancestor skeleton ?
|
bool HasAncestorSkeleton; // has the system an ancestor skeleton ?
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Simple Definition of a mesh used to test against Ray
|
// Simple Definition of a mesh used to test against Ray
|
||||||
std::vector<CVector> Vertices;
|
std::vector<NLMISC::CVector> Vertices;
|
||||||
std::vector<uint32> Triangles;
|
std::vector<uint32> Triangles;
|
||||||
|
|
||||||
/// Empty?
|
/// Empty?
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include "nel/3d/shadow_map_manager.h"
|
#include "nel/3d/shadow_map_manager.h"
|
||||||
#include "nel/3d/u_scene.h"
|
#include "nel/3d/u_scene.h"
|
||||||
#include "nel/3d/vertex_program.h"
|
#include "nel/3d/vertex_program.h"
|
||||||
|
#include "nel/3d/transform.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "nel/misc/smart_ptr.h"
|
#include "nel/misc/smart_ptr.h"
|
||||||
#include "nel/misc/vector.h"
|
#include "nel/misc/vector.h"
|
||||||
#include "nel/misc/aabbox.h"
|
#include "nel/misc/aabbox.h"
|
||||||
|
#include "nel/misc/class_id.h"
|
||||||
|
|
||||||
#include "nel/3d/texture.h"
|
#include "nel/3d/texture.h"
|
||||||
#include "nel/3d/shape.h"
|
#include "nel/3d/shape.h"
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
* The usage of this matrix is for UV projection: XYZ= WorldProjectionMatrix * UVW.
|
* The usage of this matrix is for UV projection: XYZ= WorldProjectionMatrix * UVW.
|
||||||
* NB: Vj (ie for W) is mapped such that Vp means NearClip of the shadow and Vp+Vj means FarClip of the shadow
|
* NB: Vj (ie for W) is mapped such that Vp means NearClip of the shadow and Vp+Vj means FarClip of the shadow
|
||||||
*/
|
*/
|
||||||
CMatrix LocalProjectionMatrix;
|
NLMISC::CMatrix LocalProjectionMatrix;
|
||||||
|
|
||||||
/** Computed at shadow casting time. They are clipping planes used to clip receivers (mirror of the OBB).
|
/** Computed at shadow casting time. They are clipping planes used to clip receivers (mirror of the OBB).
|
||||||
* Receivers may use them to clip sub received parts (as they which)
|
* Receivers may use them to clip sub received parts (as they which)
|
||||||
|
@ -63,7 +63,7 @@ public:
|
||||||
/** Computed at shadow casting time. This is the LocalPos Bouding Box containing the shadow (AxisAligned).
|
/** Computed at shadow casting time. This is the LocalPos Bouding Box containing the shadow (AxisAligned).
|
||||||
* \see generateClipInfoFromMatrix()
|
* \see generateClipInfoFromMatrix()
|
||||||
*/
|
*/
|
||||||
CAABBox LocalBoundingBox;
|
NLMISC::CAABBox LocalBoundingBox;
|
||||||
|
|
||||||
|
|
||||||
// Filled by ShadowMapManager. This is the Last Frame Id we had update the texture.
|
// Filled by ShadowMapManager. This is the Last Frame Id we had update the texture.
|
||||||
|
@ -114,13 +114,13 @@ public:
|
||||||
* driver->setupModelMatrix(localPosMatrix);
|
* driver->setupModelMatrix(localPosMatrix);
|
||||||
* Then render his mesh.
|
* Then render his mesh.
|
||||||
*/
|
*/
|
||||||
void buildCasterCameraMatrix(const CVector &lightDir, const CMatrix &localPosMatrix, const CAABBox &bbShape, CMatrix &cameraMatrix);
|
void buildCasterCameraMatrix(const NLMISC::CVector &lightDir, const NLMISC::CMatrix &localPosMatrix, const NLMISC::CAABBox &bbShape, NLMISC::CMatrix &cameraMatrix);
|
||||||
|
|
||||||
/** From the Camera matrix computed with buildCasterCameraMatrix, compute the LocalProjectionMatrix, which modify the
|
/** From the Camera matrix computed with buildCasterCameraMatrix, compute the LocalProjectionMatrix, which modify the
|
||||||
* J axis according to backPoint and Shadow Depth.
|
* J axis according to backPoint and Shadow Depth.
|
||||||
* NB: automatically calls the buildClipInfoFromMatrix() method
|
* NB: automatically calls the buildClipInfoFromMatrix() method
|
||||||
*/
|
*/
|
||||||
void buildProjectionInfos(const CMatrix &cameraMatrix, const CVector &backPoint, float shadowMaxDepth);
|
void buildProjectionInfos(const NLMISC::CMatrix &cameraMatrix, const NLMISC::CVector &backPoint, float shadowMaxDepth);
|
||||||
|
|
||||||
/** The ShadowMap Caster can call this method after setting LocalProjectionMatrix. It computes auto the
|
/** The ShadowMap Caster can call this method after setting LocalProjectionMatrix. It computes auto the
|
||||||
* LocalClipPlanes and LocalBoundingBox from it. NB: don't use it if you use buildProjectionInfos().
|
* LocalClipPlanes and LocalBoundingBox from it. NB: don't use it if you use buildProjectionInfos().
|
||||||
|
@ -158,13 +158,13 @@ class CShadowMapProjector
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CShadowMapProjector();
|
CShadowMapProjector();
|
||||||
void setWorldSpaceTextMat(const CMatrix &ws);
|
void setWorldSpaceTextMat(const NLMISC::CMatrix &ws);
|
||||||
void applyToMaterial(const CMatrix &receiverWorldMatrix, CMaterial &material);
|
void applyToMaterial(const NLMISC::CMatrix &receiverWorldMatrix, CMaterial &material);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CMatrix _WsTextMat;
|
NLMISC::CMatrix _WsTextMat;
|
||||||
CMatrix _XYZToUWVMatrix;
|
NLMISC::CMatrix _XYZToUWVMatrix;
|
||||||
CMatrix _XYZToWUVMatrix;
|
NLMISC::CMatrix _XYZToWUVMatrix;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
namespace NL3D {
|
namespace NL3D {
|
||||||
|
|
||||||
|
|
||||||
class CTransform;
|
class CTransform;
|
||||||
|
class CScene;
|
||||||
|
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -33,9 +33,9 @@ namespace NL3D
|
||||||
class CShadowVertex
|
class CShadowVertex
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CVector Vertex;
|
NLMISC::CVector Vertex;
|
||||||
uint32 MatrixId;
|
uint32 MatrixId;
|
||||||
void serial(NLMISC::IStream &f)
|
void serial(NLMISC::IStream &f)
|
||||||
{
|
{
|
||||||
(void)f.serialVersion(0);
|
(void)f.serialVersion(0);
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ public:
|
||||||
* if don't intersect, dist2D="nearest distance to the ray", and distZ=0
|
* if don't intersect, dist2D="nearest distance to the ray", and distZ=0
|
||||||
* \param computeDist2D if false and don't intersect, then return dist2D=FLT_MAX, and distZ=0
|
* \param computeDist2D if false and don't intersect, then return dist2D=FLT_MAX, and distZ=0
|
||||||
*/
|
*/
|
||||||
bool getRayIntersection(const CMatrix &toRaySpace, class CSkeletonModel &skeleton,
|
bool getRayIntersection(const NLMISC::CMatrix &toRaySpace, class CSkeletonModel &skeleton,
|
||||||
const std::vector<uint32> &matrixInfluences, float &dist2D, float &distZ, bool computeDist2D);
|
const std::vector<uint32> &matrixInfluences, float &dist2D, float &distZ, bool computeDist2D);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -54,7 +54,7 @@ public:
|
||||||
virtual NLMISC::CQuat getOrientation() const = 0;
|
virtual NLMISC::CQuat getOrientation() const = 0;
|
||||||
|
|
||||||
/// Set the GUI reference
|
/// Set the GUI reference
|
||||||
virtual void setInterfaceMatrix(const NL3D::CMatrix &matrix) = 0;
|
virtual void setInterfaceMatrix(const NLMISC::CMatrix &matrix) = 0;
|
||||||
|
|
||||||
/// Get GUI center (1 = width, 1 = height, 0 = center)
|
/// Get GUI center (1 = width, 1 = height, 0 = center)
|
||||||
virtual void getInterface2DShift(uint cid, float &x, float &y, float distance) const = 0;
|
virtual void getInterface2DShift(uint cid, float &x, float &y, float distance) const = 0;
|
||||||
|
|
|
@ -44,16 +44,16 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// Target controled or direction controled. Default to DirectionMode
|
/// Target controled or direction controled. Default to DirectionMode
|
||||||
TMode Mode;
|
TMode Mode;
|
||||||
|
|
||||||
/// \name Target and Direction specific
|
/// \name Target and Direction specific
|
||||||
// @{
|
// @{
|
||||||
/// For TargetMode, the world Position of the target.
|
/// For TargetMode, the world Position of the target.
|
||||||
CVector WorldTarget;
|
NLMISC::CVector WorldTarget;
|
||||||
/// For TargetMode only, the Pos of eyes relative to the bone controlled. Default to (0,0,0)
|
/// For TargetMode only, the Pos of eyes relative to the bone controlled. Default to (0,0,0)
|
||||||
CVector EyePos;
|
NLMISC::CVector EyePos;
|
||||||
/// For DirectionMode, the WorldRotation to apply to the bone. NB: modified in execute() if TargetMode
|
/// For DirectionMode, the WorldRotation to apply to the bone. NB: modified in execute() if TargetMode
|
||||||
CQuat CurrentWorldDirection;
|
NLMISC::CQuat CurrentWorldDirection;
|
||||||
// @}
|
// @}
|
||||||
|
|
||||||
/// \name Common
|
/// \name Common
|
||||||
|
@ -61,13 +61,13 @@ public:
|
||||||
/** This enable or disable the ctrl. When disabled or enabled, the ctrl ensure
|
/** This enable or disable the ctrl. When disabled or enabled, the ctrl ensure
|
||||||
* that the movement does not "pop", respecting MaxAngularVelocity. Default to true.
|
* that the movement does not "pop", respecting MaxAngularVelocity. Default to true.
|
||||||
*/
|
*/
|
||||||
bool Enabled;
|
bool Enabled;
|
||||||
/// This give The World Orientation when the Mesh is in bind Pos (default to "LookBack").
|
/// This give The World Orientation when the Mesh is in bind Pos (default to "LookBack").
|
||||||
CQuat DefaultWorldDirection;
|
NLMISC::CQuat DefaultWorldDirection;
|
||||||
/// The Maximum angle of rotation that can be performed between the Default Direction and Current Direction. Default to Pi/3
|
/// The Maximum angle of rotation that can be performed between the Default Direction and Current Direction. Default to Pi/3
|
||||||
float MaxAngle;
|
float MaxAngle;
|
||||||
/// The Maximum Angular Velocity the ctrl can perform. Default to 2*Pi per second.
|
/// The Maximum Angular Velocity the ctrl can perform. Default to 2*Pi per second.
|
||||||
float MaxAngularVelocity;
|
float MaxAngularVelocity;
|
||||||
// @}
|
// @}
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,19 +77,19 @@ public:
|
||||||
virtual ~CTargetAnimCtrl();
|
virtual ~CTargetAnimCtrl();
|
||||||
|
|
||||||
/// Called at compute() time.
|
/// Called at compute() time.
|
||||||
virtual void execute(CSkeletonModel *model, CBone *bone);
|
virtual void execute(CSkeletonModel *model, CBone *bone);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/// The last rotation computed (in LocalSkeleton Space). Used to smooth transition
|
/// The last rotation computed (in LocalSkeleton Space). Used to smooth transition
|
||||||
CQuat _LastLSRotation;
|
NLMISC::CQuat _LastLSRotation;
|
||||||
|
|
||||||
/// This tells that a Enable/Disable transition is in progress.
|
/// This tells that a Enable/Disable transition is in progress.
|
||||||
bool _LastEnabled;
|
bool _LastEnabled;
|
||||||
bool _EnableToDisableTransition;
|
bool _EnableToDisableTransition;
|
||||||
|
|
||||||
CQuat getCurrentLSRotationFromBone(CSkeletonModel *model, CBone *bone);
|
NLMISC::CQuat getCurrentLSRotationFromBone(CSkeletonModel *model, CBone *bone);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,16 +54,16 @@ public:
|
||||||
bool isSharingEnabled() const { return !_DisableSharing; }
|
bool isSharingEnabled() const { return !_DisableSharing; }
|
||||||
|
|
||||||
// set the ambiant/ diffuse color to be added to the embossed texture
|
// set the ambiant/ diffuse color to be added to the embossed texture
|
||||||
void setAmbient(CRGBA ambient) { _Ambient = ambient; touch(); }
|
void setAmbient(NLMISC::CRGBA ambient) { _Ambient = ambient; touch(); }
|
||||||
void setDiffuse(CRGBA diffuse) { _Diffuse = diffuse; touch(); }
|
void setDiffuse(NLMISC::CRGBA diffuse) { _Diffuse = diffuse; touch(); }
|
||||||
// Set the direction of light (usually should be normalized). The bitmap is in the x,y plane
|
// Set the direction of light (usually should be normalized). The bitmap is in the x,y plane
|
||||||
void setLightDir(const NLMISC::CVector &lightDir) { _LightDir = lightDir; touch(); }
|
void setLightDir(const NLMISC::CVector &lightDir) { _LightDir = lightDir; touch(); }
|
||||||
// set a factor for the slope
|
// set a factor for the slope
|
||||||
void setSlopeFactor(float factor) { _SlopeFactor = factor; touch(); }
|
void setSlopeFactor(float factor) { _SlopeFactor = factor; touch(); }
|
||||||
//
|
//
|
||||||
CRGBA getAmbient() const { return _Ambient; }
|
NLMISC::CRGBA getAmbient() const { return _Ambient; }
|
||||||
CRGBA getDiffuse() const { return _Diffuse; }
|
NLMISC::CRGBA getDiffuse() const { return _Diffuse; }
|
||||||
const CVector &getLightDir() const { return _LightDir; }
|
const NLMISC::CVector &getLightDir() const { return _LightDir; }
|
||||||
float getSlopeFactor() const { return _SlopeFactor; }
|
float getSlopeFactor() const { return _SlopeFactor; }
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,8 +75,8 @@ protected:
|
||||||
// inherited from ITexture. Generate this bumpmap pixels
|
// inherited from ITexture. Generate this bumpmap pixels
|
||||||
virtual void doGenerate(bool async = false);
|
virtual void doGenerate(bool async = false);
|
||||||
NLMISC::CSmartPtr<ITexture> _HeightMap;
|
NLMISC::CSmartPtr<ITexture> _HeightMap;
|
||||||
CRGBA _Ambient;
|
NLMISC::CRGBA _Ambient;
|
||||||
CRGBA _Diffuse;
|
NLMISC::CRGBA _Diffuse;
|
||||||
NLMISC::CVector _LightDir;
|
NLMISC::CVector _LightDir;
|
||||||
bool _DisableSharing;
|
bool _DisableSharing;
|
||||||
float _SlopeFactor;
|
float _SlopeFactor;
|
||||||
|
|
|
@ -32,6 +32,7 @@ using NLMISC::CQuat;
|
||||||
|
|
||||||
class ILogicInfo;
|
class ILogicInfo;
|
||||||
class CCluster;
|
class CCluster;
|
||||||
|
class ITransformable;
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
/// PointLights. Used at CVegetableManager::updateLighting() to get current colors of pointLights.
|
/// PointLights. Used at CVegetableManager::updateLighting() to get current colors of pointLights.
|
||||||
CPointLightNamed *PointLight[MaxNumLight];
|
CPointLightNamed *PointLight[MaxNumLight];
|
||||||
/// Direction of the light. the direction to the instance should be precomputed.
|
/// Direction of the light. the direction to the instance should be precomputed.
|
||||||
CVector Direction[MaxNumLight];
|
NLMISC::CVector Direction[MaxNumLight];
|
||||||
/// Factor to be multiplied by color of the light. Actually it is the attenuation factor.
|
/// Factor to be multiplied by color of the light. Actually it is the attenuation factor.
|
||||||
uint PointLightFactor[MaxNumLight];
|
uint PointLightFactor[MaxNumLight];
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
//
|
//
|
||||||
#include "nel/3d/texture_cube.h"
|
#include "nel/3d/texture_cube.h"
|
||||||
#include "nel/3d/texture_blank.h"
|
#include "nel/3d/texture_blank.h"
|
||||||
|
#include "nel/3d/animation_time.h"
|
||||||
|
|
||||||
|
|
||||||
namespace NL3D
|
namespace NL3D
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "nel/3d/coarse_mesh_build.h"
|
#include "nel/3d/coarse_mesh_build.h"
|
||||||
|
|
||||||
#include "nel/3d/mesh.h"
|
#include "nel/3d/mesh.h"
|
||||||
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#include "nel/3d/texture_file.h"
|
#include "nel/3d/texture_file.h"
|
||||||
#include "nel/misc/hierarchical_timer.h"
|
#include "nel/misc/hierarchical_timer.h"
|
||||||
#include "nel/3d/clip_trav.h"
|
#include "nel/3d/clip_trav.h"
|
||||||
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
#include "nel/misc/fast_mem.h"
|
#include "nel/misc/fast_mem.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "nel/3d/material.h"
|
#include "nel/3d/material.h"
|
||||||
#include "nel/3d/frustum.h"
|
#include "nel/3d/frustum.h"
|
||||||
#include "nel/3d/viewport.h"
|
#include "nel/3d/viewport.h"
|
||||||
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
#include "nel/misc/smart_ptr.h"
|
#include "nel/misc/smart_ptr.h"
|
||||||
#include "nel/misc/debug.h"
|
#include "nel/misc/debug.h"
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
#include "nel/3d/water_env_map_user.h"
|
#include "nel/3d/water_env_map_user.h"
|
||||||
#include "nel/3d/water_pool_manager.h"
|
#include "nel/3d/water_pool_manager.h"
|
||||||
#include "nel/3d/u_camera.h"
|
#include "nel/3d/u_camera.h"
|
||||||
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
#include "nel/misc/hierarchical_timer.h"
|
#include "nel/misc/hierarchical_timer.h"
|
||||||
#include "nel/misc/event_emitter.h"
|
#include "nel/misc/event_emitter.h"
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,9 @@
|
||||||
#include "nel/3d/occlusion_query.h"
|
#include "nel/3d/occlusion_query.h"
|
||||||
#include "nel/3d/mesh.h"
|
#include "nel/3d/mesh.h"
|
||||||
#include "nel/3d/viewport.h"
|
#include "nel/3d/viewport.h"
|
||||||
#include "nel/misc/common.h"
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
|
#include "nel/misc/common.h"
|
||||||
|
|
||||||
|
|
||||||
namespace NL3D {
|
namespace NL3D {
|
||||||
|
|
|
@ -24,8 +24,11 @@
|
||||||
#include "nel/3d/landscape.h"
|
#include "nel/3d/landscape.h"
|
||||||
#include "nel/3d/landscape_profile.h"
|
#include "nel/3d/landscape_profile.h"
|
||||||
#include "nel/3d/patchdlm_context.h"
|
#include "nel/3d/patchdlm_context.h"
|
||||||
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
#include "nel/misc/vector.h"
|
#include "nel/misc/vector.h"
|
||||||
#include "nel/misc/common.h"
|
#include "nel/misc/common.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,9 @@
|
||||||
#include "nel/3d/play_list_user.h"
|
#include "nel/3d/play_list_user.h"
|
||||||
#include "nel/3d/animation_set_user.h"
|
#include "nel/3d/animation_set_user.h"
|
||||||
#include "nel/3d/u_transform.h"
|
#include "nel/3d/u_transform.h"
|
||||||
#include "nel/misc/hierarchical_timer.h"
|
#include "nel/3d/transform.h"
|
||||||
|
|
||||||
|
#include "nel/misc/hierarchical_timer.h"
|
||||||
#include "nel/misc/debug.h"
|
#include "nel/misc/debug.h"
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#include "nel/3d/ps_iterator.h"
|
#include "nel/3d/ps_iterator.h"
|
||||||
#include "nel/3d/driver.h"
|
#include "nel/3d/driver.h"
|
||||||
#include "nel/3d/particle_system.h"
|
#include "nel/3d/particle_system.h"
|
||||||
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
#include "nel/misc/fast_mem.h"
|
#include "nel/misc/fast_mem.h"
|
||||||
|
|
||||||
namespace NL3D
|
namespace NL3D
|
||||||
|
|
|
@ -21,8 +21,9 @@
|
||||||
#include "nel/3d/driver.h"
|
#include "nel/3d/driver.h"
|
||||||
#include "nel/3d/ps_iterator.h"
|
#include "nel/3d/ps_iterator.h"
|
||||||
#include "nel/3d/particle_system.h"
|
#include "nel/3d/particle_system.h"
|
||||||
#include "nel/misc/quat.h"
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
|
#include "nel/misc/quat.h"
|
||||||
|
|
||||||
|
|
||||||
namespace NL3D
|
namespace NL3D
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#include "nel/3d/driver.h"
|
#include "nel/3d/driver.h"
|
||||||
#include "nel/3d/ps_iterator.h"
|
#include "nel/3d/ps_iterator.h"
|
||||||
#include "nel/3d/particle_system.h"
|
#include "nel/3d/particle_system.h"
|
||||||
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
#include "nel/misc/fast_floor.h"
|
#include "nel/misc/fast_floor.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "nel/3d/ps_iterator.h"
|
#include "nel/3d/ps_iterator.h"
|
||||||
#include "nel/3d/particle_system.h"
|
#include "nel/3d/particle_system.h"
|
||||||
#include "nel/3d/driver.h"
|
#include "nel/3d/driver.h"
|
||||||
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,12 +29,11 @@
|
||||||
#include "nel/3d/particle_system_shape.h"
|
#include "nel/3d/particle_system_shape.h"
|
||||||
#include "nel/3d/particle_system_model.h"
|
#include "nel/3d/particle_system_model.h"
|
||||||
#include "nel/3d/ps_iterator.h"
|
#include "nel/3d/ps_iterator.h"
|
||||||
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
#include "nel/misc/stream.h"
|
#include "nel/misc/stream.h"
|
||||||
#include "nel/misc/path.h"
|
#include "nel/misc/path.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace NL3D
|
namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
#include "nel/3d/ps_ribbon_base.h"
|
#include "nel/3d/ps_ribbon_base.h"
|
||||||
#include "nel/3d/particle_system.h"
|
#include "nel/3d/particle_system.h"
|
||||||
|
|
||||||
|
using namespace NLMISC;
|
||||||
|
|
||||||
namespace NL3D
|
namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "nel/3d/particle_system.h"
|
#include "nel/3d/particle_system.h"
|
||||||
#include "nel/3d/ps_macro.h"
|
#include "nel/3d/ps_macro.h"
|
||||||
#include "nel/3d/driver.h"
|
#include "nel/3d/driver.h"
|
||||||
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
namespace NL3D
|
namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "nel/3d/texture_grouped.h"
|
#include "nel/3d/texture_grouped.h"
|
||||||
#include "nel/3d/ps_iterator.h"
|
#include "nel/3d/ps_iterator.h"
|
||||||
#include "nel/3d/particle_system.h"
|
#include "nel/3d/particle_system.h"
|
||||||
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
|
|
||||||
namespace NL3D
|
namespace NL3D
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#include "nel/3d/u_ps_sound_interface.h"
|
#include "nel/3d/u_ps_sound_interface.h"
|
||||||
#include "nel/3d/ps_attrib_maker.h"
|
#include "nel/3d/ps_attrib_maker.h"
|
||||||
|
|
||||||
|
using namespace NLMISC;
|
||||||
|
|
||||||
namespace NL3D
|
namespace NL3D
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
#include "nel/3d/ray_mesh.h"
|
#include "nel/3d/ray_mesh.h"
|
||||||
#include "nel/misc/vector_2f.h"
|
#include "nel/misc/vector_2f.h"
|
||||||
#include "nel/misc/fast_mem.h"
|
#include "nel/misc/fast_mem.h"
|
||||||
|
#include "nel/misc/plane.h"
|
||||||
|
|
||||||
#include "nel/3d/matrix_3x4.h"
|
#include "nel/3d/matrix_3x4.h"
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
#include "std3d.h"
|
#include "std3d.h"
|
||||||
#include "nel/3d/texture_emboss.h"
|
#include "nel/3d/texture_emboss.h"
|
||||||
|
|
||||||
|
using namespace NLMISC;
|
||||||
|
|
||||||
namespace NL3D {
|
namespace NL3D {
|
||||||
|
|
||||||
// ***********************************************************************************************************
|
// ***********************************************************************************************************
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include "nel/3d/vegetablevb_allocator.h"
|
#include "nel/3d/vegetablevb_allocator.h"
|
||||||
#include "nel/3d/vegetable_def.h"
|
#include "nel/3d/vegetable_def.h"
|
||||||
|
#include "nel/3d/debug_vb.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
Loading…
Reference in a new issue