diff --git a/common/camera.cpp b/common/camera.cpp index bb33ab5f..29b567c8 100644 --- a/common/camera.cpp +++ b/common/camera.cpp @@ -22,7 +22,7 @@ static LC_OBJECT_KEY_INFO camera_key_info[LC_CK_COUNT] = { "Camera Up Vector", 3, LC_CK_UP } }; -Camera::Camera(bool Simple) +lcCamera::lcCamera(bool Simple) : Object(LC_OBJECT_CAMERA) { Initialize(); @@ -44,7 +44,7 @@ Camera::Camera(bool Simple) } } -Camera::Camera(float ex, float ey, float ez, float tx, float ty, float tz) +lcCamera::lcCamera(float ex, float ey, float ez, float tx, float ty, float tz) : Object(LC_OBJECT_CAMERA) { // Fix the up vector @@ -68,11 +68,11 @@ Camera::Camera(float ex, float ey, float ez, float tx, float ty, float tz) UpdatePosition(1); } -Camera::~Camera() +lcCamera::~lcCamera() { } -void Camera::Initialize() +void lcCamera::Initialize() { m_fovy = 30.0f; m_zNear = 1.0f; @@ -88,7 +88,7 @@ void Camera::Initialize() RegisterKeys(values, camera_key_info, LC_CK_COUNT); } -void Camera::CreateName(const lcArray& Cameras) +void lcCamera::CreateName(const lcArray& Cameras) { int i, max = 0; const char* Prefix = "Camera "; @@ -105,7 +105,7 @@ void Camera::CreateName(const lcArray& Cameras) ///////////////////////////////////////////////////////////////////////////// // Camera save/load -bool Camera::FileLoad(lcFile& file) +bool lcCamera::FileLoad(lcFile& file) { lcuint8 version, ch; @@ -263,7 +263,7 @@ bool Camera::FileLoad(lcFile& file) return true; } -void Camera::FileSave(lcFile& file) const +void lcCamera::FileSave(lcFile& file) const { file.WriteU8(LC_CAMERA_SAVE_VERSION); @@ -284,7 +284,7 @@ void Camera::FileSave(lcFile& file) const ///////////////////////////////////////////////////////////////////////////// // Camera operations -void Camera::Move(unsigned short nTime, bool bAddKey, float dx, float dy, float dz) +void lcCamera::Move(unsigned short nTime, bool bAddKey, float dx, float dy, float dz) { lcVector3 MoveVec(dx, dy, dz); @@ -324,7 +324,7 @@ void Camera::Move(unsigned short nTime, bool bAddKey, float dx, float dy, float mUpVector.Normalize(); } -void Camera::UpdatePosition(unsigned short nTime) +void lcCamera::UpdatePosition(unsigned short nTime) { if (!IsSimple()) CalculateKeys(nTime); @@ -336,7 +336,7 @@ void Camera::UpdatePosition(unsigned short nTime) mWorldView = lcMatrix44LookAt(mPosition, mTargetPosition, mUpVector); } -void Camera::CopyPosition(const Camera* camera) +void lcCamera::CopyPosition(const Camera* camera) { m_fovy = camera->m_fovy; m_zNear = camera->m_zNear; @@ -349,7 +349,7 @@ void Camera::CopyPosition(const Camera* camera) mUpVector = camera->mUpVector; } -void Camera::Render(View* View) +void lcCamera::Render(View* View) { float LineWidth = lcGetPreferences().mLineWidth; const lcMatrix44& ViewMatrix = View->mCamera->mWorldView; @@ -490,7 +490,7 @@ void Camera::Render(View* View) } } -void Camera::RayTest(lcObjectRayTest& ObjectRayTest) const +void lcCamera::RayTest(lcObjectRayTest& ObjectRayTest) const { lcVector3 Min = lcVector3(-0.3f, -0.3f, -0.3f); lcVector3 Max = lcVector3(0.3f, 0.3f, 0.3f); @@ -539,7 +539,7 @@ void Camera::RayTest(lcObjectRayTest& ObjectRayTest) const } } -void Camera::BoxTest(lcObjectBoxTest& ObjectBoxTest) const +void lcCamera::BoxTest(lcObjectBoxTest& ObjectBoxTest) const { lcVector3 Min(-0.3f, -0.3f, -0.3f); lcVector3 Max(0.3f, 0.3f, 0.3f); @@ -598,7 +598,7 @@ void Camera::BoxTest(lcObjectBoxTest& ObjectBoxTest) const } } -void Camera::LoadProjection(const lcProjection& projection) +void lcCamera::LoadProjection(const lcProjection& projection) { if (m_pTR != NULL) m_pTR->BeginTile(); @@ -613,7 +613,7 @@ void Camera::LoadProjection(const lcProjection& projection) glLoadMatrixf(mWorldView); } -void Camera::ZoomExtents(View* view, const lcVector3& Center, const lcVector3* Points, int NumPoints, unsigned short nTime, bool bAddKey) +void lcCamera::ZoomExtents(View* view, const lcVector3& Center, const lcVector3* Points, int NumPoints, unsigned short nTime, bool bAddKey) { int Viewport[4] = { 0, 0, view->mWidth, view->mHeight }; @@ -636,7 +636,7 @@ void Camera::ZoomExtents(View* view, const lcVector3& Center, const lcVector3* P UpdatePosition(nTime); } -void Camera::ZoomRegion(View* view, float Left, float Right, float Bottom, float Top, unsigned short nTime, bool bAddKey) +void lcCamera::ZoomRegion(View* view, float Left, float Right, float Bottom, float Top, unsigned short nTime, bool bAddKey) { int Viewport[4] = { 0, 0, view->mWidth, view->mHeight }; float Aspect = (float)Viewport[2]/(float)Viewport[3]; @@ -680,7 +680,7 @@ void Camera::ZoomRegion(View* view, float Left, float Right, float Bottom, float UpdatePosition(nTime); } -void Camera::DoZoom(int dy, int mouse, unsigned short nTime, bool bAddKey) +void lcCamera::DoZoom(int dy, int mouse, unsigned short nTime, bool bAddKey) { lcVector3 FrontVector(mPosition - mTargetPosition); FrontVector.Normalize(); @@ -705,7 +705,7 @@ void Camera::DoZoom(int dy, int mouse, unsigned short nTime, bool bAddKey) UpdatePosition(nTime); } -void Camera::DoPan(int dx, int dy, int mouse, unsigned short nTime, bool bAddKey) +void lcCamera::DoPan(int dx, int dy, int mouse, unsigned short nTime, bool bAddKey) { lcVector3 FrontVector(mPosition - mTargetPosition); lcVector3 SideVector = lcNormalize(lcCross(FrontVector, mUpVector)); @@ -724,7 +724,7 @@ void Camera::DoPan(int dx, int dy, int mouse, unsigned short nTime, bool bAddKey UpdatePosition(nTime); } -void Camera::DoRotate(int dx, int dy, int mouse, unsigned short nTime, bool bAddKey, float* center) +void lcCamera::DoRotate(int dx, int dy, int mouse, unsigned short nTime, bool bAddKey, float* center) { lcVector3 FrontVector(mPosition - mTargetPosition); lcVector3 CenterPosition(center[0], center[1], center[2]); @@ -758,7 +758,7 @@ void Camera::DoRotate(int dx, int dy, int mouse, unsigned short nTime, bool bAdd UpdatePosition(nTime); } -void Camera::DoRoll(int dx, int mouse, unsigned short nTime, bool bAddKey) +void lcCamera::DoRoll(int dx, int mouse, unsigned short nTime, bool bAddKey) { lcVector3 FrontVector(mPosition - mTargetPosition); lcMatrix44 Rotation = lcMatrix44FromAxisAngle(FrontVector, 2.0f * dx / (21 - mouse) * LC_DTOR); @@ -771,7 +771,7 @@ void Camera::DoRoll(int dx, int mouse, unsigned short nTime, bool bAddKey) UpdatePosition(nTime); } -void Camera::DoCenter(lcVector3& point, unsigned short nTime, bool bAddKey) +void lcCamera::DoCenter(lcVector3& point, unsigned short nTime, bool bAddKey) { lcAlign(mTargetPosition, mPosition, point); @@ -784,7 +784,7 @@ void Camera::DoCenter(lcVector3& point, unsigned short nTime, bool bAddKey) UpdatePosition(nTime); } -void Camera::SetViewpoint(LC_VIEWPOINT Viewpoint, unsigned short nTime, bool bAddKey) +void lcCamera::SetViewpoint(LC_VIEWPOINT Viewpoint, unsigned short nTime, bool bAddKey) { lcVector3 Positions[] = { @@ -823,7 +823,7 @@ void Camera::SetViewpoint(LC_VIEWPOINT Viewpoint, unsigned short nTime, bool bAd UpdatePosition(nTime); } -void Camera::StartTiledRendering(int tw, int th, int iw, int ih, float fAspect) +void lcCamera::StartTiledRendering(int tw, int th, int iw, int ih, float fAspect) { m_pTR = new TiledRender(); m_pTR->TileSize(tw, th, 0); @@ -831,7 +831,7 @@ void Camera::StartTiledRendering(int tw, int th, int iw, int ih, float fAspect) m_pTR->Perspective(m_fovy, fAspect, m_zNear, m_zFar); } -void Camera::GetTileInfo(int* row, int* col, int* width, int* height) +void lcCamera::GetTileInfo(int* row, int* col, int* width, int* height) { if (m_pTR != NULL) { @@ -842,7 +842,7 @@ void Camera::GetTileInfo(int* row, int* col, int* width, int* height) } } -bool Camera::EndTile() +bool lcCamera::EndTile() { if (m_pTR != NULL) { @@ -856,7 +856,7 @@ bool Camera::EndTile() return false; } -void Camera::SetFocalPoint(const lcVector3& focus, unsigned short nTime, bool bAddKey) +void lcCamera::SetFocalPoint(const lcVector3& focus, unsigned short nTime, bool bAddKey) { if (mProjection.GetType() == lcProjection::Ortho) { diff --git a/common/camera.h b/common/camera.h index e26e5846..905097c2 100644 --- a/common/camera.h +++ b/common/camera.h @@ -6,7 +6,6 @@ #include "lc_array.h" #include "lc_projection.h" -class Camera; class TiledRender; class View; @@ -56,12 +55,12 @@ enum LC_CK_TYPES LC_CK_COUNT }; -class Camera : public Object +class lcCamera : public lcObject { public: - Camera(bool Simple); - Camera(float ex, float ey, float ez, float tx, float ty, float tz); - virtual ~Camera(); + lcCamera(bool Simple); + lcCamera(float ex, float ey, float ez, float tx, float ty, float tz); + virtual ~lcCamera(); const char* GetName() const { diff --git a/common/lc_global.h b/common/lc_global.h index 23187bb4..467e2e47 100644 --- a/common/lc_global.h +++ b/common/lc_global.h @@ -10,6 +10,16 @@ #define LC_VERSION_TEXT "0.80.4" // Forward declarations. +class lcObject; +class lcPiece; +class lcCamera; +class lcLight; + +typedef lcObject Object; +typedef lcPiece Piece; +typedef lcCamera Camera; +typedef lcLight Light; + class lcVector2; class lcVector3; class lcVector4; diff --git a/common/lc_mainwindow.h b/common/lc_mainwindow.h index 39c59b2b..03d5fb55 100644 --- a/common/lc_mainwindow.h +++ b/common/lc_mainwindow.h @@ -4,8 +4,6 @@ #include "lc_basewindow.h" #include "lc_array.h" -class Object; -class Camera; class PiecePreview; #define LC_MAX_RECENT_FILES 4 diff --git a/common/lc_projection.h b/common/lc_projection.h index 68666f27..f0579c48 100644 --- a/common/lc_projection.h +++ b/common/lc_projection.h @@ -5,8 +5,6 @@ #include "opengl.h" #include "lc_math.h" -class Camera; - class lcProjection { public: diff --git a/common/light.cpp b/common/light.cpp index e168202e..789040ac 100644 --- a/common/light.cpp +++ b/common/light.cpp @@ -26,7 +26,7 @@ static LC_OBJECT_KEY_INFO light_key_info[LC_LK_COUNT] = }; // New omni light. -Light::Light(float px, float py, float pz) +lcLight::lcLight(float px, float py, float pz) : Object(LC_OBJECT_LIGHT) { Initialize(); @@ -40,7 +40,7 @@ Light::Light(float px, float py, float pz) } // New directional or spot light. -Light::Light(float px, float py, float pz, float tx, float ty, float tz) +lcLight::lcLight(float px, float py, float pz, float tx, float ty, float tz) : Object(LC_OBJECT_LIGHT) { Initialize(); @@ -53,7 +53,7 @@ Light::Light(float px, float py, float pz, float tx, float ty, float tz) UpdatePosition(1); } -void Light::Initialize() +void lcLight::Initialize() { mState = 0; memset(m_strName, 0, sizeof(m_strName)); @@ -80,11 +80,11 @@ void Light::Initialize() ChangeKey(1, true, &exponent, LC_LK_SPOT_EXPONENT); } -Light::~Light() +lcLight::~lcLight() { } -void Light::CreateName(const lcArray& Lights) +void lcLight::CreateName(const lcArray& Lights) { int i, max = 0; @@ -105,7 +105,7 @@ void Light::CreateName(const lcArray& Lights) sprintf(m_strName, "Light #%.2d", max+1); } -void Light::RayTest(lcObjectRayTest& ObjectRayTest) const +void lcLight::RayTest(lcObjectRayTest& ObjectRayTest) const { if (IsPointLight()) { @@ -152,7 +152,7 @@ void Light::RayTest(lcObjectRayTest& ObjectRayTest) const } } -void Light::BoxTest(lcObjectBoxTest& ObjectBoxTest) const +void lcLight::BoxTest(lcObjectBoxTest& ObjectBoxTest) const { if (IsPointLight()) { @@ -205,7 +205,7 @@ void Light::BoxTest(lcObjectBoxTest& ObjectBoxTest) const } } -void Light::Move(unsigned short nTime, bool bAddKey, float dx, float dy, float dz) +void lcLight::Move(unsigned short nTime, bool bAddKey, float dx, float dy, float dz) { lcVector3 MoveVec(dx, dy, dz); @@ -224,7 +224,7 @@ void Light::Move(unsigned short nTime, bool bAddKey, float dx, float dy, float d } } -void Light::UpdatePosition(unsigned short nTime) +void lcLight::UpdatePosition(unsigned short nTime) { CalculateKeys(nTime); @@ -257,7 +257,7 @@ void Light::UpdatePosition(unsigned short nTime) } } -void Light::Render(View* View) +void lcLight::Render(View* View) { float LineWidth = lcGetPreferences().mLineWidth; const lcMatrix44& ViewMatrix = View->mCamera->mWorldView; @@ -379,7 +379,7 @@ void Light::Render(View* View) } } -void Light::RenderCone(const lcMatrix44& ViewMatrix) +void lcLight::RenderCone(const lcMatrix44& ViewMatrix) { lcVector3 FrontVector(mTargetPosition - mPosition); lcVector3 UpVector(1, 1, 1); @@ -438,7 +438,7 @@ void Light::RenderCone(const lcMatrix44& ViewMatrix) glLoadMatrixf(lcMul(lcMatrix44Translation(lcVector3(0, 0, -Length)), LightViewMatrix)); } -void Light::RenderTarget() +void lcLight::RenderTarget() { float box[24][3] = { @@ -460,7 +460,7 @@ void Light::RenderTarget() glDrawArrays(GL_LINES, 0, 24); } -void Light::RenderSphere() +void lcLight::RenderSphere() { const int Slices = 6; const int NumIndices = 3 * Slices + 6 * Slices * (Slices - 2) + 3 * Slices; @@ -541,7 +541,7 @@ void Light::RenderSphere() glDrawElements(GL_TRIANGLES, NumIndices, GL_UNSIGNED_SHORT, Indices); } -bool Light::Setup(int LightIndex) +bool lcLight::Setup(int LightIndex) { GLenum LightName = (GLenum)(GL_LIGHT0 + LightIndex); diff --git a/common/light.h b/common/light.h index e67988e0..bfcb115c 100644 --- a/common/light.h +++ b/common/light.h @@ -4,8 +4,6 @@ #include "object.h" #include "lc_math.h" -class Light; -class LightTarget; class View; #define LC_LIGHT_HIDDEN 0x0001 @@ -41,12 +39,12 @@ enum LC_LK_TYPES LC_LK_COUNT }; -class Light : public Object +class lcLight : public lcObject { public: - Light(float px, float py, float pz); - Light(float px, float py, float pz, float tx, float ty, float tz); - virtual ~Light(); + lcLight(float px, float py, float pz); + lcLight(float px, float py, float pz, float tx, float ty, float tz); + virtual ~lcLight(); bool IsPointLight() const { diff --git a/common/object.cpp b/common/object.cpp index ae1c73f1..e0209301 100644 --- a/common/object.cpp +++ b/common/object.cpp @@ -10,7 +10,7 @@ #define LC_KEY_SAVE_VERSION 1 // LeoCAD 0.73 -Object::Object(lcObjectType ObjectType) +lcObject::lcObject(lcObjectType ObjectType) { m_pInstructionKeys = NULL; @@ -18,13 +18,13 @@ Object::Object(lcObjectType ObjectType) m_pKeyValues = NULL; } -Object::~Object() +lcObject::~lcObject() { delete []m_pKeyValues; RemoveKeys(); } -bool Object::FileLoad(lcFile& file) +bool lcObject::FileLoad(lcFile& file) { lcuint8 version = file.ReadU8(); @@ -57,7 +57,7 @@ bool Object::FileLoad(lcFile& file) return true; } -void Object::FileSave(lcFile& file) const +void lcObject::FileSave(lcFile& file) const { LC_OBJECT_KEY *node; lcuint32 n; @@ -100,7 +100,7 @@ static LC_OBJECT_KEY* AddNode(LC_OBJECT_KEY *node, unsigned short nTime, unsigne return newnode; } -void Object::RegisterKeys(float *values[], LC_OBJECT_KEY_INFO* info, int count) +void lcObject::RegisterKeys(float *values[], LC_OBJECT_KEY_INFO* info, int count) { int i; @@ -118,7 +118,7 @@ void Object::RegisterKeys(float *values[], LC_OBJECT_KEY_INFO* info, int count) m_nKeyInfoCount = count; } -void Object::RemoveKeys() +void lcObject::RemoveKeys() { LC_OBJECT_KEY *node, *prev; @@ -130,7 +130,7 @@ void Object::RemoveKeys() } } -void Object::ChangeKey(unsigned short nTime, bool bAddKey, const float *param, unsigned char nKeyType) +void lcObject::ChangeKey(unsigned short nTime, bool bAddKey, const float *param, unsigned char nKeyType) { LC_OBJECT_KEY *node, *poskey = NULL, *newpos = NULL; node = m_pInstructionKeys; @@ -162,7 +162,7 @@ void Object::ChangeKey(unsigned short nTime, bool bAddKey, const float *param, u newpos->param[i] = param[i]; } -void Object::CalculateKeys(unsigned short nTime) +void lcObject::CalculateKeys(unsigned short nTime) { // LC_OBJECT_KEY *next[m_nKeyInfoCount], *prev[m_nKeyInfoCount], *node; LC_OBJECT_KEY *next[32], *prev[32], *node; @@ -202,7 +202,7 @@ void Object::CalculateKeys(unsigned short nTime) } } -void Object::CalculateSingleKey(unsigned short nTime, int keytype, float *value) const +void lcObject::CalculateSingleKey(unsigned short nTime, int keytype, float *value) const { LC_OBJECT_KEY *prev = NULL, *node; @@ -225,7 +225,7 @@ void Object::CalculateSingleKey(unsigned short nTime, int keytype, float *value) value[j] = prev->param[j]; } -void Object::InsertTime(unsigned short start, unsigned short time) +void lcObject::InsertTime(unsigned short start, unsigned short time) { LC_OBJECT_KEY *node, *prev = NULL; unsigned short last; @@ -263,7 +263,7 @@ void Object::InsertTime(unsigned short start, unsigned short time) } } -void Object::RemoveTime(unsigned short start, unsigned short time) +void lcObject::RemoveTime(unsigned short start, unsigned short time) { LC_OBJECT_KEY *node, *prev = NULL; diff --git a/common/object.h b/common/object.h index edcb512d..57f875ab 100644 --- a/common/object.h +++ b/common/object.h @@ -4,11 +4,6 @@ #include "lc_math.h" #include "lc_array.h" -class Object; -class Piece; -class Camera; -class Light; - enum lcObjectType { LC_OBJECT_PIECE, @@ -34,7 +29,7 @@ struct LC_OBJECT_KEY_INFO struct lcObjectSection { - Object* Object; + lcObject* Object; lcuintptr Section; }; @@ -62,11 +57,11 @@ struct lcObjectBoxTest lcArray ObjectSections; }; -class Object +class lcObject { public: - Object(lcObjectType ObjectType); - virtual ~Object(); + lcObject(lcObjectType ObjectType); + virtual ~lcObject(); public: bool IsPiece() const diff --git a/common/piece.cpp b/common/piece.cpp index b5e987fe..11244a63 100644 --- a/common/piece.cpp +++ b/common/piece.cpp @@ -27,7 +27,7 @@ static LC_OBJECT_KEY_INFO piece_key_info[LC_PK_COUNT] = ///////////////////////////////////////////////////////////////////////////// // Piece construction/destruction -Piece::Piece(PieceInfo* pPieceInfo) +lcPiece::lcPiece(PieceInfo* pPieceInfo) : Object (LC_OBJECT_PIECE) { mPieceInfo = pPieceInfo; @@ -50,7 +50,7 @@ Piece::Piece(PieceInfo* pPieceInfo) ChangeKey(1, true, rot, LC_PK_ROTATION); } -Piece::~Piece() +lcPiece::~lcPiece() { if (mPieceInfo != NULL) mPieceInfo->Release(); @@ -60,13 +60,13 @@ Piece::~Piece() // Piece save/load // Use only when loading from a file -void Piece::SetPieceInfo(PieceInfo* pPieceInfo) +void lcPiece::SetPieceInfo(PieceInfo* pPieceInfo) { mPieceInfo = pPieceInfo; mPieceInfo->AddRef(); } -bool Piece::FileLoad(lcFile& file) +bool lcPiece::FileLoad(lcFile& file) { lcuint8 version, ch; @@ -244,7 +244,7 @@ bool Piece::FileLoad(lcFile& file) return true; } -void Piece::FileSave(lcFile& file) const +void lcPiece::FileSave(lcFile& file) const { file.WriteU8(LC_PIECE_SAVE_VERSION); @@ -283,7 +283,7 @@ void Piece::FileSave(lcFile& file) const file.WriteS32(i); } -void Piece::Initialize(float x, float y, float z, unsigned char nStep) +void lcPiece::Initialize(float x, float y, float z, unsigned char nStep) { m_nStepShow = nStep; @@ -294,7 +294,7 @@ void Piece::Initialize(float x, float y, float z, unsigned char nStep) UpdatePosition(1); } -void Piece::CreateName(const lcArray& Pieces) +void lcPiece::CreateName(const lcArray& Pieces) { int i, max = 0; @@ -311,7 +311,7 @@ void Piece::CreateName(const lcArray& Pieces) sprintf (m_strName, "%s #%.2d", mPieceInfo->m_strDescription, max+1); } -void Piece::InsertTime(unsigned short start, unsigned short time) +void lcPiece::InsertTime(unsigned short start, unsigned short time) { if (m_nStepShow >= start) m_nStepShow = lcMin(m_nStepShow + time, 255); @@ -322,7 +322,7 @@ void Piece::InsertTime(unsigned short start, unsigned short time) Object::InsertTime(start, time); } -void Piece::RemoveTime (unsigned short start, unsigned short time) +void lcPiece::RemoveTime (unsigned short start, unsigned short time) { if (m_nStepShow >= start) m_nStepShow = lcMax(m_nStepShow - time, 1); @@ -333,7 +333,7 @@ void Piece::RemoveTime (unsigned short start, unsigned short time) Object::RemoveTime(start, time); } -void Piece::RayTest(lcObjectRayTest& ObjectRayTest) const +void lcPiece::RayTest(lcObjectRayTest& ObjectRayTest) const { lcVector3 Min(mPieceInfo->m_fDimensions[3], mPieceInfo->m_fDimensions[4], mPieceInfo->m_fDimensions[5]); lcVector3 Max(mPieceInfo->m_fDimensions[0], mPieceInfo->m_fDimensions[1], mPieceInfo->m_fDimensions[2]); @@ -356,7 +356,7 @@ void Piece::RayTest(lcObjectRayTest& ObjectRayTest) const } } -void Piece::BoxTest(lcObjectBoxTest& ObjectBoxTest) const +void lcPiece::BoxTest(lcObjectBoxTest& ObjectBoxTest) const { lcVector3 Box[8] = { @@ -415,7 +415,7 @@ void Piece::BoxTest(lcObjectBoxTest& ObjectBoxTest) const } } -void Piece::Move(unsigned short nTime, bool bAddKey, float dx, float dy, float dz) +void lcPiece::Move(unsigned short nTime, bool bAddKey, float dx, float dy, float dz) { mPosition[0] += dx; mPosition[1] += dy; @@ -426,7 +426,7 @@ void Piece::Move(unsigned short nTime, bool bAddKey, float dx, float dy, float d mModelWorld.SetTranslation(mPosition); } -bool Piece::IsVisible(unsigned short nTime) +bool lcPiece::IsVisible(unsigned short nTime) { if (mState & LC_PIECE_HIDDEN) return false; @@ -440,7 +440,7 @@ bool Piece::IsVisible(unsigned short nTime) return false; } -void Piece::CompareBoundingBox(float box[6]) +void lcPiece::CompareBoundingBox(float box[6]) { lcVector3 Points[8] = { @@ -467,12 +467,12 @@ void Piece::CompareBoundingBox(float box[6]) } } -Group* Piece::GetTopGroup() +Group* lcPiece::GetTopGroup() { return m_pGroup ? m_pGroup->GetTopGroup() : NULL; } -void Piece::DoGroup(Group* pGroup) +void lcPiece::DoGroup(Group* pGroup) { if (m_pGroup != NULL && m_pGroup != (Group*)-1 && m_pGroup > (Group*)0xFFFF) m_pGroup->SetGroup(pGroup); @@ -480,7 +480,7 @@ void Piece::DoGroup(Group* pGroup) m_pGroup = pGroup; } -void Piece::UnGroup(Group* pGroup) +void lcPiece::UnGroup(Group* pGroup) { if ((m_pGroup == pGroup) || (pGroup == NULL)) m_pGroup = NULL; @@ -490,7 +490,7 @@ void Piece::UnGroup(Group* pGroup) } // Recalculates current position and connections -void Piece::UpdatePosition(unsigned short nTime) +void lcPiece::UpdatePosition(unsigned short nTime) { CalculateKeys(nTime); diff --git a/common/piece.h b/common/piece.h index e40390eb..10825c24 100644 --- a/common/piece.h +++ b/common/piece.h @@ -1,7 +1,6 @@ #ifndef _PIECE_H_ #define _PIECE_H_ -class Piece; class Group; class PieceInfo; @@ -28,11 +27,11 @@ enum LC_PK_TYPES LC_PK_COUNT }; -class Piece : public Object +class lcPiece : public lcObject { public: - Piece(PieceInfo* pPieceInfo); - ~Piece(); + lcPiece(PieceInfo* pPieceInfo); + ~lcPiece(); virtual bool IsSelected() const { diff --git a/common/project.h b/common/project.h index 5ead499f..0bc66f53 100644 --- a/common/project.h +++ b/common/project.h @@ -146,9 +146,6 @@ enum LC_OVERLAY_MODES LC_OVERLAY_ROTATE_VIEW_XYZ }; -class Piece; -class Camera; -class Light; class Group; class Terrain; class PieceInfo; diff --git a/common/terrain.h b/common/terrain.h index 3de45289..7a433a62 100644 --- a/common/terrain.h +++ b/common/terrain.h @@ -1,8 +1,6 @@ #ifndef _TERRAIN_H_ #define _TERRAIN_H_ -class Camera; - #define LC_TERRAIN_FLAT 0x01 // Flat terrain #define LC_TERRAIN_TEXTURE 0x02 // Use texture #define LC_TERRAIN_SMOOTH 0x04 // Smooth shading diff --git a/common/view.h b/common/view.h index 403ac944..13e728a7 100644 --- a/common/view.h +++ b/common/view.h @@ -4,7 +4,6 @@ #include "lc_glwidget.h" #include "lc_projection.h" -class Camera; class Project; class View : public lcGLWidget diff --git a/qt/lc_qmainwindow.h b/qt/lc_qmainwindow.h index 3a95c34f..b93ef6a4 100644 --- a/qt/lc_qmainwindow.h +++ b/qt/lc_qmainwindow.h @@ -11,8 +11,6 @@ class lcQGLWidget; class lcQPartsTree; class lcQColorList; class lcQPropertiesTree; -class Object; -class Camera; class View; class lcQMainWindow : public QMainWindow diff --git a/qt/lc_qpropertiestree.h b/qt/lc_qpropertiestree.h index 9e1cc8e7..9457cce4 100644 --- a/qt/lc_qpropertiestree.h +++ b/qt/lc_qpropertiestree.h @@ -1,7 +1,6 @@ #ifndef _LC_QPROPERTIESWIDGET_H_ #define _LC_QPROPERTIESWIDGET_H_ -class Object; struct lcPartProperties; class lcQPropertiesTreeDelegate;