Removed old object class names.
This commit is contained in:
+12
-12
@@ -23,7 +23,7 @@ static LC_OBJECT_KEY_INFO camera_key_info[LC_CK_COUNT] =
|
||||
};
|
||||
|
||||
lcCamera::lcCamera(bool Simple)
|
||||
: Object(LC_OBJECT_CAMERA)
|
||||
: lcObject(LC_OBJECT_CAMERA)
|
||||
{
|
||||
Initialize();
|
||||
|
||||
@@ -45,7 +45,7 @@ lcCamera::lcCamera(bool Simple)
|
||||
}
|
||||
|
||||
lcCamera::lcCamera(float ex, float ey, float ez, float tx, float ty, float tz)
|
||||
: Object(LC_OBJECT_CAMERA)
|
||||
: lcObject(LC_OBJECT_CAMERA)
|
||||
{
|
||||
// Fix the up vector
|
||||
lcVector3 UpVector(0, 0, 1), FrontVector(ex - tx, ey - ty, ez - tz), SideVector;
|
||||
@@ -88,7 +88,7 @@ void lcCamera::Initialize()
|
||||
RegisterKeys(values, camera_key_info, LC_CK_COUNT);
|
||||
}
|
||||
|
||||
void lcCamera::CreateName(const lcArray<Camera*>& Cameras)
|
||||
void lcCamera::CreateName(const lcArray<lcCamera*>& Cameras)
|
||||
{
|
||||
int i, max = 0;
|
||||
const char* Prefix = "Camera ";
|
||||
@@ -115,7 +115,7 @@ bool lcCamera::FileLoad(lcFile& file)
|
||||
return false;
|
||||
|
||||
if (version > 5)
|
||||
if (!Object::FileLoad(file))
|
||||
if (!lcObject::FileLoad(file))
|
||||
return false;
|
||||
|
||||
if (version == 4)
|
||||
@@ -267,7 +267,7 @@ void lcCamera::FileSave(lcFile& file) const
|
||||
{
|
||||
file.WriteU8(LC_CAMERA_SAVE_VERSION);
|
||||
|
||||
Object::FileSave(file);
|
||||
lcObject::FileSave(file);
|
||||
|
||||
lcuint8 ch = (lcuint8)strlen(m_strName);
|
||||
file.WriteU8(ch);
|
||||
@@ -330,7 +330,7 @@ void lcCamera::UpdatePosition(lcStep Step)
|
||||
mWorldView = lcMatrix44LookAt(mPosition, mTargetPosition, mUpVector);
|
||||
}
|
||||
|
||||
void lcCamera::CopyPosition(const Camera* camera)
|
||||
void lcCamera::CopyPosition(const lcCamera* camera)
|
||||
{
|
||||
m_fovy = camera->m_fovy;
|
||||
m_zNear = camera->m_zNear;
|
||||
@@ -495,7 +495,7 @@ void lcCamera::RayTest(lcObjectRayTest& ObjectRayTest) const
|
||||
float Distance;
|
||||
if (lcBoundingBoxRayMinIntersectDistance(Min, Max, Start, End, &Distance, NULL) && (Distance < ObjectRayTest.Distance))
|
||||
{
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<Camera*>(this);
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<lcCamera*>(this);
|
||||
ObjectRayTest.ObjectSection.Section = LC_CAMERA_SECTION_POSITION;
|
||||
ObjectRayTest.Distance = Distance;
|
||||
}
|
||||
@@ -511,7 +511,7 @@ void lcCamera::RayTest(lcObjectRayTest& ObjectRayTest) const
|
||||
|
||||
if (lcBoundingBoxRayMinIntersectDistance(Min, Max, Start, End, &Distance, NULL) && (Distance < ObjectRayTest.Distance))
|
||||
{
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<Camera*>(this);
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<lcCamera*>(this);
|
||||
ObjectRayTest.ObjectSection.Section = LC_CAMERA_SECTION_TARGET;
|
||||
ObjectRayTest.Distance = Distance;
|
||||
}
|
||||
@@ -527,7 +527,7 @@ void lcCamera::RayTest(lcObjectRayTest& ObjectRayTest) const
|
||||
|
||||
if (lcBoundingBoxRayMinIntersectDistance(Min, Max, Start, End, &Distance, NULL) && (Distance < ObjectRayTest.Distance))
|
||||
{
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<Camera*>(this);
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<lcCamera*>(this);
|
||||
ObjectRayTest.ObjectSection.Section = LC_CAMERA_SECTION_UPVECTOR;
|
||||
ObjectRayTest.Distance = Distance;
|
||||
}
|
||||
@@ -549,7 +549,7 @@ void lcCamera::BoxTest(lcObjectBoxTest& ObjectBoxTest) const
|
||||
if (lcBoundingBoxIntersectsVolume(Min, Max, LocalPlanes))
|
||||
{
|
||||
lcObjectSection& ObjectSection = ObjectBoxTest.ObjectSections.Add();
|
||||
ObjectSection.Object = const_cast<Camera*>(this);
|
||||
ObjectSection.Object = const_cast<lcCamera*>(this);
|
||||
ObjectSection.Section = LC_CAMERA_SECTION_POSITION;
|
||||
}
|
||||
|
||||
@@ -568,7 +568,7 @@ void lcCamera::BoxTest(lcObjectBoxTest& ObjectBoxTest) const
|
||||
if (lcBoundingBoxIntersectsVolume(Min, Max, LocalPlanes))
|
||||
{
|
||||
lcObjectSection& ObjectSection = ObjectBoxTest.ObjectSections.Add();
|
||||
ObjectSection.Object = const_cast<Camera*>(this);
|
||||
ObjectSection.Object = const_cast<lcCamera*>(this);
|
||||
ObjectSection.Section = LC_CAMERA_SECTION_TARGET;
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@ void lcCamera::BoxTest(lcObjectBoxTest& ObjectBoxTest) const
|
||||
if (lcBoundingBoxIntersectsVolume(Min, Max, LocalPlanes))
|
||||
{
|
||||
lcObjectSection& ObjectSection = ObjectBoxTest.ObjectSections.Add();
|
||||
ObjectSection.Object = const_cast<Camera*>(this);
|
||||
ObjectSection.Object = const_cast<lcCamera*>(this);
|
||||
ObjectSection.Section = LC_CAMERA_SECTION_UPVECTOR;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -67,7 +67,7 @@ public:
|
||||
return m_strName;
|
||||
}
|
||||
|
||||
void CreateName(const lcArray<Camera*>& Cameras);
|
||||
void CreateName(const lcArray<lcCamera*>& Cameras);
|
||||
|
||||
bool IsSimple() const
|
||||
{
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
|
||||
|
||||
void UpdatePosition(lcStep Step);
|
||||
void CopyPosition(const Camera* camera);
|
||||
void CopyPosition(const lcCamera* camera);
|
||||
void Render(View* View);
|
||||
|
||||
void ZoomExtents(View* view, const lcVector3& Center, const lcVector3* Points, int NumPoints, lcStep Step, bool AddKey);
|
||||
|
||||
@@ -112,8 +112,8 @@ struct lcArrayDialogOptions
|
||||
|
||||
struct lcEditGroupsDialogOptions
|
||||
{
|
||||
lcArray<Group*> PieceParents;
|
||||
lcArray<Group*> GroupParents;
|
||||
lcArray<lcGroup*> PieceParents;
|
||||
lcArray<lcGroup*> GroupParents;
|
||||
};
|
||||
|
||||
struct lcSelectDialogOptions
|
||||
|
||||
@@ -16,12 +16,6 @@ class lcCamera;
|
||||
class lcLight;
|
||||
class lcGroup;
|
||||
|
||||
typedef lcObject Object;
|
||||
typedef lcPiece Piece;
|
||||
typedef lcCamera Camera;
|
||||
typedef lcLight Light;
|
||||
typedef lcGroup Group;
|
||||
|
||||
class lcVector2;
|
||||
class lcVector3;
|
||||
class lcVector4;
|
||||
|
||||
@@ -56,8 +56,8 @@ class lcMainWindow : public lcBaseWindow
|
||||
void TogglePrintPreview();
|
||||
void ToggleFullScreen();
|
||||
|
||||
void UpdateFocusObject(Object* Focus);
|
||||
void UpdateSelectedObjects(int Flags, int SelectedCount, Object* Focus);
|
||||
void UpdateFocusObject(lcObject* Focus);
|
||||
void UpdateSelectedObjects(int Flags, int SelectedCount, lcObject* Focus);
|
||||
void UpdateAction(int NewAction);
|
||||
void UpdatePaste(bool Enabled);
|
||||
void UpdateCurrentStep();
|
||||
|
||||
+10
-10
@@ -27,7 +27,7 @@ static LC_OBJECT_KEY_INFO light_key_info[LC_LK_COUNT] =
|
||||
|
||||
// New omni light.
|
||||
lcLight::lcLight(float px, float py, float pz)
|
||||
: Object(LC_OBJECT_LIGHT)
|
||||
: lcObject(LC_OBJECT_LIGHT)
|
||||
{
|
||||
Initialize();
|
||||
|
||||
@@ -41,7 +41,7 @@ lcLight::lcLight(float px, float py, float pz)
|
||||
|
||||
// New directional or spot light.
|
||||
lcLight::lcLight(float px, float py, float pz, float tx, float ty, float tz)
|
||||
: Object(LC_OBJECT_LIGHT)
|
||||
: lcObject(LC_OBJECT_LIGHT)
|
||||
{
|
||||
Initialize();
|
||||
|
||||
@@ -93,13 +93,13 @@ void lcLight::FileSave(lcFile& file) const
|
||||
{
|
||||
}
|
||||
|
||||
void lcLight::CreateName(const lcArray<Light*>& Lights)
|
||||
void lcLight::CreateName(const lcArray<lcLight*>& Lights)
|
||||
{
|
||||
int i, max = 0;
|
||||
|
||||
for (int LightIdx = 0; LightIdx < Lights.GetSize(); LightIdx++)
|
||||
{
|
||||
Light* pLight = Lights[LightIdx];
|
||||
lcLight* pLight = Lights[LightIdx];
|
||||
|
||||
if (strncmp(pLight->m_strName, "Light ", 6) == 0)
|
||||
{
|
||||
@@ -122,7 +122,7 @@ void lcLight::RayTest(lcObjectRayTest& ObjectRayTest) const
|
||||
|
||||
if (lcSphereRayMinIntersectDistance(mPosition, 0.2f, ObjectRayTest.Start, ObjectRayTest.End, &Distance))
|
||||
{
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<Light*>(this);
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<lcLight*>(this);
|
||||
ObjectRayTest.ObjectSection.Section = LC_LIGHT_SECTION_POSITION;
|
||||
ObjectRayTest.Distance = Distance;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ void lcLight::RayTest(lcObjectRayTest& ObjectRayTest) const
|
||||
float Distance;
|
||||
if (lcBoundingBoxRayMinIntersectDistance(Min, Max, Start, End, &Distance, NULL) && (Distance < ObjectRayTest.Distance))
|
||||
{
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<Light*>(this);
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<lcLight*>(this);
|
||||
ObjectRayTest.ObjectSection.Section = LC_LIGHT_SECTION_POSITION;
|
||||
ObjectRayTest.Distance = Distance;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ void lcLight::RayTest(lcObjectRayTest& ObjectRayTest) const
|
||||
|
||||
if (lcBoundingBoxRayMinIntersectDistance(Min, Max, Start, End, &Distance, NULL) && (Distance < ObjectRayTest.Distance))
|
||||
{
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<Light*>(this);
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<lcLight*>(this);
|
||||
ObjectRayTest.ObjectSection.Section = LC_LIGHT_SECTION_TARGET;
|
||||
ObjectRayTest.Distance = Distance;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ void lcLight::BoxTest(lcObjectBoxTest& ObjectBoxTest) const
|
||||
return;
|
||||
|
||||
lcObjectSection& ObjectSection = ObjectBoxTest.ObjectSections.Add();
|
||||
ObjectSection.Object = const_cast<Light*>(this);
|
||||
ObjectSection.Object = const_cast<lcLight*>(this);
|
||||
ObjectSection.Section = LC_LIGHT_SECTION_POSITION;
|
||||
|
||||
return;
|
||||
@@ -190,7 +190,7 @@ void lcLight::BoxTest(lcObjectBoxTest& ObjectBoxTest) const
|
||||
if (lcBoundingBoxIntersectsVolume(Min, Max, LocalPlanes))
|
||||
{
|
||||
lcObjectSection& ObjectSection = ObjectBoxTest.ObjectSections.Add();
|
||||
ObjectSection.Object = const_cast<Light*>(this);
|
||||
ObjectSection.Object = const_cast<lcLight*>(this);
|
||||
ObjectSection.Section = LC_LIGHT_SECTION_POSITION;
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ void lcLight::BoxTest(lcObjectBoxTest& ObjectBoxTest) const
|
||||
if (lcBoundingBoxIntersectsVolume(Min, Max, LocalPlanes))
|
||||
{
|
||||
lcObjectSection& ObjectSection = ObjectBoxTest.ObjectSections.Add();
|
||||
ObjectSection.Object = const_cast<Light*>(this);
|
||||
ObjectSection.Object = const_cast<lcLight*>(this);
|
||||
ObjectSection.Section = LC_LIGHT_SECTION_TARGET;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -206,7 +206,7 @@ public:
|
||||
void UpdatePosition(lcStep Step);
|
||||
void Move(lcStep Step, bool AddKey, const lcVector3& Distance);
|
||||
bool Setup(int LightIndex);
|
||||
void CreateName(const lcArray<Light*>& Lights);
|
||||
void CreateName(const lcArray<lcLight*>& Lights);
|
||||
bool FileLoad(lcFile& file);
|
||||
void FileSave(lcFile& file) const;
|
||||
|
||||
|
||||
+12
-12
@@ -28,7 +28,7 @@ static LC_OBJECT_KEY_INFO piece_key_info[LC_PK_COUNT] =
|
||||
// Piece construction/destruction
|
||||
|
||||
lcPiece::lcPiece(PieceInfo* pPieceInfo)
|
||||
: Object (LC_OBJECT_PIECE)
|
||||
: lcObject (LC_OBJECT_PIECE)
|
||||
{
|
||||
mPieceInfo = pPieceInfo;
|
||||
mState = 0;
|
||||
@@ -76,7 +76,7 @@ bool lcPiece::FileLoad(lcFile& file)
|
||||
return false;
|
||||
|
||||
if (version > 8)
|
||||
if (!Object::FileLoad (file))
|
||||
if (!lcObject::FileLoad (file))
|
||||
return false;
|
||||
|
||||
if (version < 9)
|
||||
@@ -231,15 +231,15 @@ bool lcPiece::FileLoad(lcFile& file)
|
||||
lcint32 i = -1;
|
||||
if (version > 6)
|
||||
file.ReadS32(&i, 1);
|
||||
mGroup = (Group*)(long)i;
|
||||
mGroup = (lcGroup*)(long)i;
|
||||
}
|
||||
else
|
||||
{
|
||||
file.ReadU8(&ch, 1);
|
||||
if (ch == 0)
|
||||
mGroup = (Group*)-1;
|
||||
mGroup = (lcGroup*)-1;
|
||||
else
|
||||
mGroup = (Group*)(long)ch;
|
||||
mGroup = (lcGroup*)(long)ch;
|
||||
|
||||
file.ReadU8(&ch, 1);
|
||||
if (ch & 0x01)
|
||||
@@ -253,7 +253,7 @@ void lcPiece::FileSave(lcFile& file) const
|
||||
{
|
||||
file.WriteU8(LC_PIECE_SAVE_VERSION);
|
||||
|
||||
Object::FileSave (file);
|
||||
lcObject::FileSave (file);
|
||||
|
||||
file.WriteBuffer(mPieceInfo->m_strName, LC_PIECE_NAME_LEN);
|
||||
file.WriteU32(mColorCode);
|
||||
@@ -285,13 +285,13 @@ void lcPiece::Initialize(float x, float y, float z, lcStep Step)
|
||||
UpdatePosition(1);
|
||||
}
|
||||
|
||||
void lcPiece::CreateName(const lcArray<Piece*>& Pieces)
|
||||
void lcPiece::CreateName(const lcArray<lcPiece*>& Pieces)
|
||||
{
|
||||
int i, max = 0;
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < Pieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = Pieces[PieceIdx];
|
||||
lcPiece* Piece = Pieces[PieceIdx];
|
||||
|
||||
if (strncmp(Piece->m_strName, mPieceInfo->m_strDescription, strlen(mPieceInfo->m_strDescription)) == 0)
|
||||
if (sscanf(Piece->m_strName + strlen(mPieceInfo->m_strDescription), " #%d", &i) == 1)
|
||||
@@ -332,7 +332,7 @@ void lcPiece::InsertTime(lcStep Start, lcStep Time)
|
||||
}
|
||||
}
|
||||
|
||||
Object::InsertTime(Start, Time);
|
||||
lcObject::InsertTime(Start, Time);
|
||||
}
|
||||
|
||||
void lcPiece::RemoveTime(lcStep Start, lcStep Time)
|
||||
@@ -364,7 +364,7 @@ void lcPiece::RemoveTime(lcStep Start, lcStep Time)
|
||||
}
|
||||
}
|
||||
|
||||
Object::RemoveTime(Start, Time);
|
||||
lcObject::RemoveTime(Start, Time);
|
||||
}
|
||||
|
||||
void lcPiece::RayTest(lcObjectRayTest& ObjectRayTest) const
|
||||
@@ -385,7 +385,7 @@ void lcPiece::RayTest(lcObjectRayTest& ObjectRayTest) const
|
||||
|
||||
if (mPieceInfo->mMesh->MinIntersectDist(Start, End, ObjectRayTest.Distance, Intersection))
|
||||
{
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<Piece*>(this);
|
||||
ObjectRayTest.ObjectSection.Object = const_cast<lcPiece*>(this);
|
||||
ObjectRayTest.ObjectSection.Section = 0;
|
||||
}
|
||||
}
|
||||
@@ -444,7 +444,7 @@ void lcPiece::BoxTest(lcObjectBoxTest& ObjectBoxTest) const
|
||||
if (OutcodesOR == 0 || mPieceInfo->mMesh->IntersectsPlanes(LocalPlanes))
|
||||
{
|
||||
lcObjectSection& ObjectSection = ObjectBoxTest.ObjectSections.Add();
|
||||
ObjectSection.Object = const_cast<Piece*>(this);
|
||||
ObjectSection.Object = const_cast<lcPiece*>(this);
|
||||
ObjectSection.Section = 0;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -121,7 +121,7 @@ public:
|
||||
|
||||
bool IsVisible(lcStep Step);
|
||||
void Initialize(float x, float y, float z, lcStep Step);
|
||||
void CreateName(const lcArray<Piece*>& Pieces);
|
||||
void CreateName(const lcArray<lcPiece*>& Pieces);
|
||||
void CompareBoundingBox(float box[6]);
|
||||
void SetPieceInfo(PieceInfo* pPieceInfo);
|
||||
bool FileLoad(lcFile& file);
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
|
||||
protected:
|
||||
// Atributes
|
||||
Group* mGroup;
|
||||
lcGroup* mGroup;
|
||||
|
||||
lcStep mStepShow;
|
||||
lcStep mStepHide;
|
||||
|
||||
+119
-119
@@ -203,7 +203,7 @@ bool Project::FileLoad(lcFile* file, bool bUndo, bool bMerge)
|
||||
|
||||
if (fv < 0.6f) // old view
|
||||
{
|
||||
Camera* pCam = new Camera(false);
|
||||
lcCamera* pCam = new lcCamera(false);
|
||||
pCam->CreateName(mCameras);
|
||||
mCameras.Add(pCam);
|
||||
|
||||
@@ -256,7 +256,7 @@ bool Project::FileLoad(lcFile* file, bool bUndo, bool bMerge)
|
||||
{
|
||||
if (fv > 0.4f)
|
||||
{
|
||||
Piece* pPiece = new Piece(NULL);
|
||||
lcPiece* pPiece = new lcPiece(NULL);
|
||||
pPiece->FileLoad(*file);
|
||||
|
||||
if (bMerge)
|
||||
@@ -288,7 +288,7 @@ bool Project::FileLoad(lcFile* file, bool bUndo, bool bMerge)
|
||||
file->ReadU8(&group, 1);
|
||||
|
||||
PieceInfo* pInfo = Library->FindPiece(name, true);
|
||||
Piece* pPiece = new Piece(pInfo);
|
||||
lcPiece* pPiece = new lcPiece(pInfo);
|
||||
|
||||
pPiece->Initialize(pos[0], pos[1], pos[2], step);
|
||||
pPiece->SetColorCode(lcGetColorCodeFromOriginalColor(color));
|
||||
@@ -300,7 +300,7 @@ bool Project::FileLoad(lcFile* file, bool bUndo, bool bMerge)
|
||||
AxisAngle[3] *= LC_RTOD;
|
||||
|
||||
pPiece->ChangeKey(1, false, AxisAngle, LC_PK_ROTATION);
|
||||
// pPiece->SetGroup((Group*)group);
|
||||
// pPiece->SetGroup((lcGroup*)group);
|
||||
SystemPieceComboAdd(pInfo->m_strDescription);
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ bool Project::FileLoad(lcFile* file, bool bUndo, bool bMerge)
|
||||
|
||||
for (int PieceIdx = FirstNewPiece; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
i = LC_POINTER_TO_INT(Piece->GetGroup());
|
||||
Piece->SetGroup(NULL);
|
||||
@@ -450,11 +450,11 @@ bool Project::FileLoad(lcFile* file, bool bUndo, bool bMerge)
|
||||
|
||||
file->ReadS32(&count, 1);
|
||||
for (i = 0; i < count; i++)
|
||||
mCameras.Add(new Camera(false));
|
||||
mCameras.Add(new lcCamera(false));
|
||||
|
||||
if (count < 7)
|
||||
{
|
||||
Camera* pCam = new Camera(false);
|
||||
lcCamera* pCam = new lcCamera(false);
|
||||
for (i = 0; i < count; i++)
|
||||
pCam->FileLoad(*file);
|
||||
delete pCam;
|
||||
@@ -472,7 +472,7 @@ bool Project::FileLoad(lcFile* file, bool bUndo, bool bMerge)
|
||||
{
|
||||
file->ReadS32(&i, 1);
|
||||
|
||||
// Camera* pCam = m_pCameras;
|
||||
// lcCamera* pCam = m_pCameras;
|
||||
// while (i--)
|
||||
// pCam = pCam->m_pNext;
|
||||
// m_pViewCameras[count] = pCam;
|
||||
@@ -887,7 +887,7 @@ void Project::FileReadLDraw(lcFile* file, const lcMatrix44& CurrentTransform, in
|
||||
PieceInfo* pInfo = lcGetPiecesLibrary()->FindPiece(name, false);
|
||||
if (pInfo != NULL)
|
||||
{
|
||||
Piece* pPiece = new Piece(pInfo);
|
||||
lcPiece* pPiece = new lcPiece(pInfo);
|
||||
read = false;
|
||||
|
||||
float* Matrix = IncludeTransform;
|
||||
@@ -946,7 +946,7 @@ void Project::FileReadLDraw(lcFile* file, const lcMatrix44& CurrentTransform, in
|
||||
|
||||
PieceInfo* Info = lcGetPiecesLibrary()->CreatePlaceholder(name);
|
||||
|
||||
Piece* pPiece = new Piece(Info);
|
||||
lcPiece* pPiece = new lcPiece(Info);
|
||||
read = false;
|
||||
|
||||
float* Matrix = IncludeTransform;
|
||||
@@ -1047,7 +1047,7 @@ bool Project::DoSave(const char* FileName)
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if ((Piece->IsVisible(Step)) && (Piece->GetStepShow() == Step))
|
||||
{
|
||||
@@ -1456,7 +1456,7 @@ void Project::RenderScenePieces(View* view, bool DrawInterface)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (!Piece->IsVisible(mCurrentStep))
|
||||
continue;
|
||||
@@ -1502,7 +1502,7 @@ void Project::RenderScenePieces(View* view, bool DrawInterface)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (!Piece->IsVisible(mCurrentStep) || !Piece->IsSelected())
|
||||
continue;
|
||||
@@ -1595,7 +1595,7 @@ void Project::RenderSceneObjects(View* view)
|
||||
|
||||
for (int CameraIdx = 0; CameraIdx < mCameras.GetSize(); CameraIdx++)
|
||||
{
|
||||
Camera* pCamera = mCameras[CameraIdx];
|
||||
lcCamera* pCamera = mCameras[CameraIdx];
|
||||
|
||||
if ((pCamera == view->mCamera) || !pCamera->IsVisible())
|
||||
continue;
|
||||
@@ -1622,7 +1622,7 @@ void Project::RenderSceneObjects(View* view)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsVisible(mCurrentStep))
|
||||
Piece->CompareBoundingBox(bs);
|
||||
@@ -1986,7 +1986,7 @@ void Project::CalculateStep()
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
Piece->UpdatePosition(mCurrentStep);
|
||||
|
||||
if (Piece->IsSelected())
|
||||
@@ -2013,7 +2013,7 @@ bool Project::RemoveSelectedObjects()
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); )
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -2027,7 +2027,7 @@ bool Project::RemoveSelectedObjects()
|
||||
|
||||
for (int CameraIdx = 0; CameraIdx < mCameras.GetSize(); )
|
||||
{
|
||||
Camera* Camera = mCameras[CameraIdx];
|
||||
lcCamera* Camera = mCameras[CameraIdx];
|
||||
|
||||
if (Camera->IsSelected())
|
||||
{
|
||||
@@ -2053,7 +2053,7 @@ bool Project::RemoveSelectedObjects()
|
||||
|
||||
for (int LightIdx = 0; LightIdx < mLights.GetSize(); )
|
||||
{
|
||||
Light* Light = mLights[LightIdx];
|
||||
lcLight* Light = mLights[LightIdx];
|
||||
|
||||
if (Light->IsSelected())
|
||||
{
|
||||
@@ -2074,18 +2074,18 @@ void Project::UpdateSelection()
|
||||
{
|
||||
unsigned long flags = 0;
|
||||
int SelectedCount = 0;
|
||||
Object* Focus = NULL;
|
||||
lcObject* Focus = NULL;
|
||||
|
||||
if (mPieces.IsEmpty())
|
||||
flags |= LC_SEL_NO_PIECES;
|
||||
else
|
||||
{
|
||||
Group* pGroup = NULL;
|
||||
lcGroup* pGroup = NULL;
|
||||
bool first = true;
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -2132,7 +2132,7 @@ void Project::UpdateSelection()
|
||||
|
||||
for (int CameraIdx = 0; CameraIdx < mCameras.GetSize(); CameraIdx++)
|
||||
{
|
||||
Camera* pCamera = mCameras[CameraIdx];
|
||||
lcCamera* pCamera = mCameras[CameraIdx];
|
||||
|
||||
if (pCamera->IsSelected())
|
||||
{
|
||||
@@ -2146,7 +2146,7 @@ void Project::UpdateSelection()
|
||||
|
||||
for (int LightIdx = 0; LightIdx < mLights.GetSize(); LightIdx++)
|
||||
{
|
||||
Light* pLight = mLights[LightIdx];
|
||||
lcLight* pLight = mLights[LightIdx];
|
||||
|
||||
if (pLight->IsSelected())
|
||||
{
|
||||
@@ -2207,7 +2207,7 @@ void Project::FindPiece(bool FindFirst, bool SearchForward)
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsFocused() && Piece->IsVisible(mCurrentStep))
|
||||
{
|
||||
@@ -2218,7 +2218,7 @@ void Project::FindPiece(bool FindFirst, bool SearchForward)
|
||||
}
|
||||
|
||||
int CurrentIdx = StartIdx;
|
||||
Object* Focus = NULL;
|
||||
lcObject* Focus = NULL;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@@ -2235,7 +2235,7 @@ void Project::FindPiece(bool FindFirst, bool SearchForward)
|
||||
if (CurrentIdx == StartIdx)
|
||||
break;
|
||||
|
||||
Piece* Current = mPieces[CurrentIdx];
|
||||
lcPiece* Current = mPieces[CurrentIdx];
|
||||
|
||||
if (!Current->IsVisible(mCurrentStep))
|
||||
continue;
|
||||
@@ -2261,7 +2261,7 @@ void Project::ZoomExtents(int FirstView, int LastView)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsVisible(mCurrentStep))
|
||||
Piece->CompareBoundingBox(bs);
|
||||
@@ -2297,7 +2297,7 @@ void Project::GetPiecesUsed(lcArray<lcPiecesUsedEntry>& PiecesUsed) const
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->mPieceInfo->m_strDescription[0] == '~')
|
||||
continue;
|
||||
@@ -2355,7 +2355,7 @@ void Project::CreateImages(Image* images, int width, int height, lcStep from, lc
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
Piece->SetSelected(Piece->GetStepShow() == i);
|
||||
}
|
||||
}
|
||||
@@ -2383,7 +2383,7 @@ void Project::CreateHTMLPieceList(FILE* f, lcStep Step, bool bImages, const char
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if ((Piece->GetStepShow() == Step) || (Step == 0))
|
||||
ColorsUsed[Piece->mColorIndex]++;
|
||||
@@ -2412,7 +2412,7 @@ void Project::CreateHTMLPieceList(FILE* f, lcStep Step, bool bImages, const char
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if ((Piece->mPieceInfo == pInfo) && ((Piece->GetStepShow() == Step) || (Step == 0)))
|
||||
{
|
||||
@@ -2788,7 +2788,7 @@ void Project::Export3DStudio()
|
||||
int NumPieces = 0;
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* piece = mPieces[PieceIdx];
|
||||
lcPiece* piece = mPieces[PieceIdx];
|
||||
PieceInfo* Info = piece->mPieceInfo;
|
||||
lcMesh* Mesh = Info->mMesh;
|
||||
|
||||
@@ -3071,7 +3071,7 @@ void Project::ExportPOVRay(lcFile& POVFile)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* piece = mPieces[PieceIdx];
|
||||
lcPiece* piece = mPieces[PieceIdx];
|
||||
PieceInfo* Info = piece->mPieceInfo;
|
||||
|
||||
for (int CheckIdx = 0; CheckIdx < mPieces.GetSize(); CheckIdx++)
|
||||
@@ -3126,7 +3126,7 @@ void Project::ExportPOVRay(lcFile& POVFile)
|
||||
// Add pieces not included in LGEO.
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
PieceInfo* Info = Piece->mPieceInfo;
|
||||
int Index = Library->mPieces.FindIndex(Info);
|
||||
|
||||
@@ -3164,7 +3164,7 @@ void Project::ExportPOVRay(lcFile& POVFile)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
int Index = Library->mPieces.FindIndex(Piece->mPieceInfo);
|
||||
int Color;
|
||||
|
||||
@@ -3611,7 +3611,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
PieceInfo* pInfo;
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
bool bSkip = false;
|
||||
pInfo = Piece->mPieceInfo;
|
||||
|
||||
@@ -3885,7 +3885,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
const lcMatrix44& ModelWorld = Piece->mModelWorld;
|
||||
PieceInfo* pInfo = Piece->mPieceInfo;
|
||||
float* Verts = (float*)pInfo->mMesh->mVertexBuffer.mData;
|
||||
@@ -3902,7 +3902,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
PieceInfo* Info = Piece->mPieceInfo;
|
||||
|
||||
strcpy(buf, Piece->GetName());
|
||||
@@ -4027,7 +4027,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
lcMemFile* Clipboard = new lcMemFile();
|
||||
|
||||
int i = 0;
|
||||
// Light* pLight;
|
||||
// lcLight* pLight;
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
if (mPieces[PieceIdx]->IsSelected())
|
||||
@@ -4036,7 +4036,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
Piece->FileSave(*Clipboard);
|
||||
@@ -4056,7 +4056,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
for (int CameraIdx = 0; CameraIdx < mCameras.GetSize(); CameraIdx++)
|
||||
{
|
||||
Camera* pCamera = mCameras[CameraIdx];
|
||||
lcCamera* pCamera = mCameras[CameraIdx];
|
||||
|
||||
if (pCamera->IsSelected())
|
||||
pCamera->FileSave(*Clipboard);
|
||||
@@ -4091,7 +4091,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
file->Seek(0, SEEK_SET);
|
||||
SelectAndFocusNone(false);
|
||||
|
||||
lcArray<Piece*> PastedPieces;
|
||||
lcArray<lcPiece*> PastedPieces;
|
||||
int NumPieces;
|
||||
file->ReadBuffer(&NumPieces, sizeof(NumPieces));
|
||||
|
||||
@@ -4183,7 +4183,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
while (NumCameras--)
|
||||
{
|
||||
Camera* pCamera = new Camera(false);
|
||||
lcCamera* pCamera = new lcCamera(false);
|
||||
pCamera->FileLoad(*file);
|
||||
pCamera->CreateName(mCameras);
|
||||
pCamera->SetSelected(true);
|
||||
@@ -4215,7 +4215,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsVisible(mCurrentStep))
|
||||
Piece->SetSelected(true);
|
||||
@@ -4237,7 +4237,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsVisible(mCurrentStep))
|
||||
Piece->SetSelected(!Piece->IsSelected());
|
||||
@@ -4365,12 +4365,12 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
{
|
||||
if (m_pCurPiece == NULL)
|
||||
break;
|
||||
Piece* Last = mPieces.IsEmpty() ? NULL : mPieces[mPieces.GetSize() - 1];
|
||||
Piece* pPiece = new Piece(m_pCurPiece);
|
||||
lcPiece* Last = mPieces.IsEmpty() ? NULL : mPieces[mPieces.GetSize() - 1];
|
||||
lcPiece* pPiece = new lcPiece(m_pCurPiece);
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsFocused())
|
||||
{
|
||||
@@ -4539,7 +4539,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
if (Minifig.Parts[i] == NULL)
|
||||
continue;
|
||||
|
||||
Piece* pPiece = new Piece(Minifig.Parts[i]);
|
||||
lcPiece* pPiece = new lcPiece(Minifig.Parts[i]);
|
||||
|
||||
lcVector4& Position = Minifig.Matrices[i][3];
|
||||
lcVector4 Rotation = lcMatrix44ToAxisAngle(Minifig.Matrices[i]);
|
||||
@@ -4573,7 +4573,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
Piece->SetGroup(Group);
|
||||
@@ -4592,7 +4592,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -4627,7 +4627,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
ConvertFromUserUnits(Options.Offsets[1]);
|
||||
ConvertFromUserUnits(Options.Offsets[2]);
|
||||
|
||||
lcArray<Piece*> NewPieces;
|
||||
lcArray<lcPiece*> NewPieces;
|
||||
|
||||
for (int Step1 = 0; Step1 < Options.Counts[0]; Step1++)
|
||||
{
|
||||
@@ -4646,7 +4646,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* pPiece = mPieces[PieceIdx];
|
||||
lcPiece* pPiece = mPieces[PieceIdx];
|
||||
|
||||
if (!pPiece->IsSelected())
|
||||
continue;
|
||||
@@ -4676,7 +4676,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
lcVector4 AxisAngle = lcMatrix44ToAxisAngle(ModelWorld);
|
||||
AxisAngle[3] *= LC_RTOD;
|
||||
|
||||
Piece* NewPiece = new Piece(pPiece->mPieceInfo);
|
||||
lcPiece* NewPiece = new lcPiece(pPiece->mPieceInfo);
|
||||
NewPieces.Add(NewPiece);
|
||||
|
||||
NewPiece->Initialize(Position[0] + Offset[0], Position[1] + Offset[1], Position[2] + Offset[2], mCurrentStep);
|
||||
@@ -4689,7 +4689,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < NewPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = NewPieces[PieceIdx];
|
||||
lcPiece* Piece = NewPieces[PieceIdx];
|
||||
Piece->CreateName(mPieces);
|
||||
Piece->UpdatePosition(mCurrentStep);
|
||||
mPieces.Add(Piece);
|
||||
@@ -4746,7 +4746,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -4808,11 +4808,11 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
case LC_PIECE_GROUP_ADD:
|
||||
{
|
||||
Group* pGroup = NULL;
|
||||
lcGroup* pGroup = NULL;
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -4826,7 +4826,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsFocused())
|
||||
{
|
||||
@@ -4844,7 +4844,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsFocused())
|
||||
{
|
||||
@@ -4888,7 +4888,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -4906,7 +4906,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (!Piece->IsSelected())
|
||||
Piece->SetHidden(true);
|
||||
@@ -4930,7 +4930,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -4958,7 +4958,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -5097,7 +5097,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
Piece->InsertTime(mCurrentStep, 1);
|
||||
if (Piece->IsSelected() && !Piece->IsVisible(mCurrentStep))
|
||||
Piece->SetSelected(false);
|
||||
@@ -5120,7 +5120,7 @@ void Project::HandleCommand(LC_COMMANDS id)
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
Piece->RemoveTime(mCurrentStep, 1);
|
||||
if (Piece->IsSelected() && !Piece->IsVisible(mCurrentStep))
|
||||
Piece->SetSelected(false);
|
||||
@@ -5648,7 +5648,7 @@ void Project::SelectAndFocusNone(bool FocusOnly)
|
||||
{
|
||||
if (FocusOnly)
|
||||
{
|
||||
Object* FocusObject = GetFocusObject();
|
||||
lcObject* FocusObject = GetFocusObject();
|
||||
|
||||
if (FocusObject)
|
||||
FocusObject->SetFocused(FocusObject->GetFocusSection(), false);
|
||||
@@ -5666,14 +5666,14 @@ void Project::SelectAndFocusNone(bool FocusOnly)
|
||||
}
|
||||
}
|
||||
|
||||
void Project::SelectGroup(Group* TopGroup, bool Select)
|
||||
void Project::SelectGroup(lcGroup* TopGroup, bool Select)
|
||||
{
|
||||
if (!TopGroup)
|
||||
return;
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (!Piece->IsSelected() && Piece->IsVisible(mCurrentStep) && (Piece->GetTopGroup() == TopGroup))
|
||||
Piece->SetSelected(Select);
|
||||
@@ -5682,8 +5682,8 @@ void Project::SelectGroup(Group* TopGroup, bool Select)
|
||||
|
||||
void Project::FocusOrDeselectObject(const lcObjectSection& ObjectSection)
|
||||
{
|
||||
Object* FocusObject = GetFocusObject();
|
||||
Object* Object = ObjectSection.Object;
|
||||
lcObject* FocusObject = GetFocusObject();
|
||||
lcObject* Object = ObjectSection.Object;
|
||||
lcuint32 Section = ObjectSection.Section;
|
||||
|
||||
if (Object)
|
||||
@@ -5703,7 +5703,7 @@ void Project::FocusOrDeselectObject(const lcObjectSection& ObjectSection)
|
||||
bool IsSelected = Object->IsSelected();
|
||||
|
||||
if (Object->IsPiece() && (WasSelected != IsSelected))
|
||||
SelectGroup(((Piece*)Object)->GetTopGroup(), IsSelected);
|
||||
SelectGroup(((lcPiece*)Object)->GetTopGroup(), IsSelected);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5716,7 +5716,7 @@ void Project::FocusOrDeselectObject(const lcObjectSection& ObjectSection)
|
||||
gMainWindow->UpdateFocusObject(GetFocusObject());
|
||||
}
|
||||
|
||||
void Project::ClearSelectionAndSetFocus(Object* Object, lcuint32 Section)
|
||||
void Project::ClearSelectionAndSetFocus(lcObject* Object, lcuint32 Section)
|
||||
{
|
||||
SelectAndFocusNone(false);
|
||||
|
||||
@@ -5725,7 +5725,7 @@ void Project::ClearSelectionAndSetFocus(Object* Object, lcuint32 Section)
|
||||
Object->SetFocused(Section, true);
|
||||
|
||||
if (Object->IsPiece())
|
||||
SelectGroup(((Piece*)Object)->GetTopGroup(), true);
|
||||
SelectGroup(((lcPiece*)Object)->GetTopGroup(), true);
|
||||
}
|
||||
|
||||
UpdateSelection();
|
||||
@@ -5749,7 +5749,7 @@ void Project::AddToSelection(const lcArray<lcObjectSection>& ObjectSections)
|
||||
Object->SetSelected(ObjectSections[ObjectIdx].Section, true);
|
||||
|
||||
if (!WasSelected && Object->GetType() == LC_OBJECT_PIECE)
|
||||
SelectGroup(((Piece*)Object)->GetTopGroup(), true);
|
||||
SelectGroup(((lcPiece*)Object)->GetTopGroup(), true);
|
||||
}
|
||||
|
||||
UpdateSelection();
|
||||
@@ -5764,7 +5764,7 @@ bool Project::GetSelectionCenter(lcVector3& Center) const
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -5802,7 +5802,7 @@ void Project::ConvertFromUserUnits(lcVector3& Value) const
|
||||
|
||||
bool Project::GetFocusPosition(lcVector3& Position) const
|
||||
{
|
||||
Object* FocusObject = GetFocusObject();
|
||||
lcObject* FocusObject = GetFocusObject();
|
||||
|
||||
if (FocusObject)
|
||||
{
|
||||
@@ -5817,11 +5817,11 @@ bool Project::GetFocusPosition(lcVector3& Position) const
|
||||
}
|
||||
|
||||
// Returns the object that currently has focus.
|
||||
Object* Project::GetFocusObject() const
|
||||
lcObject* Project::GetFocusObject() const
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsFocused())
|
||||
return Piece;
|
||||
@@ -5829,7 +5829,7 @@ Object* Project::GetFocusObject() const
|
||||
|
||||
for (int CameraIdx = 0; CameraIdx < mCameras.GetSize(); CameraIdx++)
|
||||
{
|
||||
Camera* Camera = mCameras[CameraIdx];
|
||||
lcCamera* Camera = mCameras[CameraIdx];
|
||||
|
||||
if (Camera->IsFocused())
|
||||
return Camera;
|
||||
@@ -5837,7 +5837,7 @@ Object* Project::GetFocusObject() const
|
||||
|
||||
for (int LightIdx = 0; LightIdx < mLights.GetSize(); LightIdx++)
|
||||
{
|
||||
Light* Light = mLights[LightIdx];
|
||||
lcLight* Light = mLights[LightIdx];
|
||||
|
||||
if (Light->IsFocused())
|
||||
return Light;
|
||||
@@ -5867,7 +5867,7 @@ bool Project::AnyObjectsSelected(bool PiecesOnly) const
|
||||
}
|
||||
|
||||
// Find a good starting position/orientation relative to an existing piece.
|
||||
void Project::GetPieceInsertPosition(Piece* OffsetPiece, lcVector3& Position, lcVector4& Rotation)
|
||||
void Project::GetPieceInsertPosition(lcPiece* OffsetPiece, lcVector3& Position, lcVector4& Rotation)
|
||||
{
|
||||
lcVector3 Dist(0, 0, OffsetPiece->mPieceInfo->m_fDimensions[2] - m_pCurPiece->m_fDimensions[5]);
|
||||
SnapVector(Dist);
|
||||
@@ -5880,7 +5880,7 @@ void Project::GetPieceInsertPosition(Piece* OffsetPiece, lcVector3& Position, lc
|
||||
void Project::GetPieceInsertPosition(View* view, lcVector3& Position, lcVector4& Rotation)
|
||||
{
|
||||
// Check if the mouse is over a piece.
|
||||
Piece* HitPiece = (Piece*)view->FindObjectUnderPointer(true).Object;
|
||||
lcPiece* HitPiece = (lcPiece*)view->FindObjectUnderPointer(true).Object;
|
||||
|
||||
if (HitPiece)
|
||||
{
|
||||
@@ -5910,7 +5910,7 @@ void Project::RayTest(lcObjectRayTest& ObjectRayTest) const
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsVisible(mCurrentStep))
|
||||
Piece->RayTest(ObjectRayTest);
|
||||
@@ -5921,7 +5921,7 @@ void Project::RayTest(lcObjectRayTest& ObjectRayTest) const
|
||||
|
||||
for (int CameraIdx = 0; CameraIdx < mCameras.GetSize(); CameraIdx++)
|
||||
{
|
||||
Camera* Camera = mCameras[CameraIdx];
|
||||
lcCamera* Camera = mCameras[CameraIdx];
|
||||
|
||||
if (Camera != ObjectRayTest.ViewCamera && Camera->IsVisible())
|
||||
Camera->RayTest(ObjectRayTest);
|
||||
@@ -5936,7 +5936,7 @@ void Project::BoxTest(lcObjectBoxTest& ObjectBoxTest) const
|
||||
{
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsVisible(mCurrentStep))
|
||||
Piece->BoxTest(ObjectBoxTest);
|
||||
@@ -5944,7 +5944,7 @@ void Project::BoxTest(lcObjectBoxTest& ObjectBoxTest) const
|
||||
|
||||
for (int CameraIdx = 0; CameraIdx < mCameras.GetSize(); CameraIdx++)
|
||||
{
|
||||
Camera* Camera = mCameras[CameraIdx];
|
||||
lcCamera* Camera = mCameras[CameraIdx];
|
||||
|
||||
if (Camera != ObjectBoxTest.ViewCamera && Camera->IsVisible())
|
||||
Camera->BoxTest(ObjectBoxTest);
|
||||
@@ -6100,11 +6100,11 @@ lcMatrix44 Project::GetRelativeRotation() const
|
||||
{
|
||||
if ((m_nSnap & LC_DRAW_GLOBAL_SNAP) == 0)
|
||||
{
|
||||
Object* Focus = GetFocusObject();
|
||||
lcObject* Focus = GetFocusObject();
|
||||
|
||||
if ((Focus != NULL) && Focus->IsPiece())
|
||||
{
|
||||
lcMatrix44 WorldMatrix = ((Piece*)Focus)->mModelWorld;
|
||||
lcMatrix44 WorldMatrix = ((lcPiece*)Focus)->mModelWorld;
|
||||
WorldMatrix.SetTranslation(lcVector3(0.0f, 0.0f, 0.0f));
|
||||
return WorldMatrix;
|
||||
}
|
||||
@@ -6201,11 +6201,11 @@ bool Project::RotateSelectedObjects(lcVector3& Delta, lcVector3& Remainder, bool
|
||||
lcVector3 pos;
|
||||
lcVector4 rot;
|
||||
int nSel = 0;
|
||||
Piece *pFocus = NULL;
|
||||
lcPiece *pFocus = NULL;
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -6256,7 +6256,7 @@ bool Project::RotateSelectedObjects(lcVector3& Delta, lcVector3& Remainder, bool
|
||||
if (pFocus != NULL)
|
||||
{
|
||||
lcVector4 Rot;
|
||||
Rot = ((Piece*)pFocus)->mRotation;
|
||||
Rot = ((lcPiece*)pFocus)->mRotation;
|
||||
|
||||
WorldToFocusQuaternion = lcQuaternionFromAxisAngle(lcVector4(Rot[0], Rot[1], Rot[2], -Rot[3] * LC_DTOR));
|
||||
FocusToWorldQuaternion = lcQuaternionFromAxisAngle(lcVector4(Rot[0], Rot[1], Rot[2], Rot[3] * LC_DTOR));
|
||||
@@ -6266,7 +6266,7 @@ bool Project::RotateSelectedObjects(lcVector3& Delta, lcVector3& Remainder, bool
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (!Piece->IsSelected())
|
||||
continue;
|
||||
@@ -6350,11 +6350,11 @@ void Project::TransformSelectedObjects(LC_TRANSFORM_TYPE Type, const lcVector3&
|
||||
float bs[6] = { 10000, 10000, 10000, -10000, -10000, -10000 };
|
||||
lcVector3 Center;
|
||||
int nSel = 0;
|
||||
Piece* pFocus = NULL;
|
||||
lcPiece* pFocus = NULL;
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -6375,7 +6375,7 @@ void Project::TransformSelectedObjects(LC_TRANSFORM_TYPE Type, const lcVector3&
|
||||
|
||||
for (int CameraIdx = 0; CameraIdx < mCameras.GetSize(); CameraIdx++)
|
||||
{
|
||||
Camera* pCamera = mCameras[CameraIdx];
|
||||
lcCamera* pCamera = mCameras[CameraIdx];
|
||||
|
||||
if (pCamera->IsSelected())
|
||||
{
|
||||
@@ -6386,7 +6386,7 @@ void Project::TransformSelectedObjects(LC_TRANSFORM_TYPE Type, const lcVector3&
|
||||
|
||||
for (int LightIdx = 0; LightIdx < mLights.GetSize(); LightIdx++)
|
||||
{
|
||||
Light* pLight = mLights[LightIdx];
|
||||
lcLight* pLight = mLights[LightIdx];
|
||||
|
||||
if (pLight->IsSelected())
|
||||
{
|
||||
@@ -6397,7 +6397,7 @@ void Project::TransformSelectedObjects(LC_TRANSFORM_TYPE Type, const lcVector3&
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -6456,7 +6456,7 @@ void Project::TransformSelectedObjects(LC_TRANSFORM_TYPE Type, const lcVector3&
|
||||
|
||||
for (int PieceIdx = 0; PieceIdx < mPieces.GetSize(); PieceIdx++)
|
||||
{
|
||||
Piece* Piece = mPieces[PieceIdx];
|
||||
lcPiece* Piece = mPieces[PieceIdx];
|
||||
|
||||
if (Piece->IsSelected())
|
||||
{
|
||||
@@ -6488,7 +6488,7 @@ void Project::TransformSelectedObjects(LC_TRANSFORM_TYPE Type, const lcVector3&
|
||||
}
|
||||
}
|
||||
|
||||
void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Value)
|
||||
void Project::ModifyObject(lcObject* Object, lcObjectProperty Property, void* Value)
|
||||
{
|
||||
const char* CheckPointString = NULL;
|
||||
|
||||
@@ -6497,7 +6497,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_PIECE_PROPERTY_POSITION:
|
||||
{
|
||||
const lcVector3& Position = *(lcVector3*)Value;
|
||||
Piece* Part = (Piece*)Object;
|
||||
lcPiece* Part = (lcPiece*)Object;
|
||||
|
||||
if (Part->mPosition != Position)
|
||||
{
|
||||
@@ -6511,7 +6511,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_PIECE_PROPERTY_ROTATION:
|
||||
{
|
||||
const lcVector4& Rotation = *(lcVector4*)Value;
|
||||
Piece* Part = (Piece*)Object;
|
||||
lcPiece* Part = (lcPiece*)Object;
|
||||
|
||||
if (Rotation != Part->mRotation)
|
||||
{
|
||||
@@ -6525,7 +6525,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_PIECE_PROPERTY_SHOW:
|
||||
{
|
||||
lcStep Step = *(lcStep*)Value;
|
||||
Piece* Part = (Piece*)Object;
|
||||
lcPiece* Part = (lcPiece*)Object;
|
||||
|
||||
if (Step != Part->GetStepShow())
|
||||
{
|
||||
@@ -6540,7 +6540,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_PIECE_PROPERTY_HIDE:
|
||||
{
|
||||
lcStep Step = *(lcuint32*)Value;
|
||||
Piece* Part = (Piece*)Object;
|
||||
lcPiece* Part = (lcPiece*)Object;
|
||||
|
||||
if (Step != Part->GetStepHide())
|
||||
{
|
||||
@@ -6553,7 +6553,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_PIECE_PROPERTY_COLOR:
|
||||
{
|
||||
int ColorIndex = *(int*)Value;
|
||||
Piece* Part = (Piece*)Object;
|
||||
lcPiece* Part = (lcPiece*)Object;
|
||||
|
||||
if (ColorIndex != Part->mColorIndex)
|
||||
{
|
||||
@@ -6565,7 +6565,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
|
||||
case LC_PIECE_PROPERTY_ID:
|
||||
{
|
||||
Piece* Part = (Piece*)Object;
|
||||
lcPiece* Part = (lcPiece*)Object;
|
||||
PieceInfo* Info = (PieceInfo*)Value;
|
||||
|
||||
if (Info != Part->mPieceInfo)
|
||||
@@ -6581,7 +6581,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_CAMERA_PROPERTY_POSITION:
|
||||
{
|
||||
const lcVector3& Position = *(lcVector3*)Value;
|
||||
Camera* camera = (Camera*)Object;
|
||||
lcCamera* camera = (lcCamera*)Object;
|
||||
|
||||
if (camera->mPosition != Position)
|
||||
{
|
||||
@@ -6595,7 +6595,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_CAMERA_PROPERTY_TARGET:
|
||||
{
|
||||
const lcVector3& TargetPosition = *(lcVector3*)Value;
|
||||
Camera* camera = (Camera*)Object;
|
||||
lcCamera* camera = (lcCamera*)Object;
|
||||
|
||||
if (camera->mTargetPosition != TargetPosition)
|
||||
{
|
||||
@@ -6609,7 +6609,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_CAMERA_PROPERTY_UPVECTOR:
|
||||
{
|
||||
const lcVector3& Up = *(lcVector3*)Value;
|
||||
Camera* camera = (Camera*)Object;
|
||||
lcCamera* camera = (lcCamera*)Object;
|
||||
|
||||
if (camera->mUpVector != Up)
|
||||
{
|
||||
@@ -6623,7 +6623,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_CAMERA_PROPERTY_ORTHO:
|
||||
{
|
||||
bool Ortho = *(bool*)Value;
|
||||
Camera* camera = (Camera*)Object;
|
||||
lcCamera* camera = (lcCamera*)Object;
|
||||
|
||||
if (camera->IsOrtho() != Ortho)
|
||||
{
|
||||
@@ -6637,7 +6637,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_CAMERA_PROPERTY_FOV:
|
||||
{
|
||||
float FOV = *(float*)Value;
|
||||
Camera* camera = (Camera*)Object;
|
||||
lcCamera* camera = (lcCamera*)Object;
|
||||
|
||||
if (camera->m_fovy != FOV)
|
||||
{
|
||||
@@ -6651,7 +6651,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_CAMERA_PROPERTY_NEAR:
|
||||
{
|
||||
float Near = *(float*)Value;
|
||||
Camera* camera = (Camera*)Object;
|
||||
lcCamera* camera = (lcCamera*)Object;
|
||||
|
||||
if (camera->m_zNear != Near)
|
||||
{
|
||||
@@ -6665,7 +6665,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_CAMERA_PROPERTY_FAR:
|
||||
{
|
||||
float Far = *(float*)Value;
|
||||
Camera* camera = (Camera*)Object;
|
||||
lcCamera* camera = (lcCamera*)Object;
|
||||
|
||||
if (camera->m_zFar != Far)
|
||||
{
|
||||
@@ -6679,7 +6679,7 @@ void Project::ModifyObject(Object* Object, lcObjectProperty Property, void* Valu
|
||||
case LC_CAMERA_PROPERTY_NAME:
|
||||
{
|
||||
const char* Name = (const char*)Value;
|
||||
Camera* camera = (Camera*)Object;
|
||||
lcCamera* camera = (lcCamera*)Object;
|
||||
|
||||
if (strcmp(camera->m_strName, Name))
|
||||
{
|
||||
@@ -6874,7 +6874,7 @@ void Project::EraserToolClicked(lcObject* Object)
|
||||
switch (Object->GetType())
|
||||
{
|
||||
case LC_OBJECT_PIECE:
|
||||
mPieces.Remove((Piece*)Object);
|
||||
mPieces.Remove((lcPiece*)Object);
|
||||
RemoveEmptyGroups();
|
||||
break;
|
||||
|
||||
@@ -6884,20 +6884,20 @@ void Project::EraserToolClicked(lcObject* Object)
|
||||
for (int ViewIdx = 0; ViewIdx < Views.GetSize(); ViewIdx++)
|
||||
{
|
||||
View* View = Views[ViewIdx];
|
||||
Camera* Camera = View->mCamera;
|
||||
lcCamera* Camera = View->mCamera;
|
||||
|
||||
if (Camera == Object)
|
||||
View->SetCamera(Camera, true);
|
||||
}
|
||||
|
||||
mCameras.Remove((Camera*)Object);
|
||||
mCameras.Remove((lcCamera*)Object);
|
||||
|
||||
gMainWindow->UpdateCameraMenu();
|
||||
}
|
||||
break;
|
||||
|
||||
case LC_OBJECT_LIGHT:
|
||||
mLights.Remove((Light*)Object);
|
||||
mLights.Remove((lcLight*)Object);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -125,7 +125,7 @@ public:
|
||||
void BoxTest(lcObjectBoxTest& ObjectBoxTest) const;
|
||||
|
||||
void FocusOrDeselectObject(const lcObjectSection& ObjectSection);
|
||||
void ClearSelectionAndSetFocus(Object* Object, lcuint32 Section);
|
||||
void ClearSelectionAndSetFocus(lcObject* Object, lcuint32 Section);
|
||||
void ClearSelectionAndSetFocus(const lcObjectSection& ObjectSection)
|
||||
{
|
||||
ClearSelectionAndSetFocus(ObjectSection.Object, ObjectSection.Section);
|
||||
@@ -201,11 +201,11 @@ public:
|
||||
bool GetSelectionCenter(lcVector3& Center) const;
|
||||
lcVector3 GetFocusOrSelectionCenter() const;
|
||||
bool GetFocusPosition(lcVector3& Position) const;
|
||||
Object* GetFocusObject() const;
|
||||
lcObject* GetFocusObject() const;
|
||||
bool AnyObjectsSelected(bool PiecesOnly) const;
|
||||
lcGroup* AddGroup(lcGroup* Parent);
|
||||
void TransformSelectedObjects(LC_TRANSFORM_TYPE Type, const lcVector3& Transform);
|
||||
void ModifyObject(Object* Object, lcObjectProperty Property, void* Value);
|
||||
void ModifyObject(lcObject* Object, lcObjectProperty Property, void* Value);
|
||||
void ZoomActiveView(int Amount);
|
||||
|
||||
Terrain* m_pTerrain;
|
||||
@@ -221,9 +221,9 @@ protected:
|
||||
void CheckPoint(const char* Description);
|
||||
|
||||
bool RemoveSelectedObjects();
|
||||
void GetPieceInsertPosition(Piece* OffsetPiece, lcVector3& Position, lcVector4& Rotation);
|
||||
void GetPieceInsertPosition(lcPiece* OffsetPiece, lcVector3& Position, lcVector4& Rotation);
|
||||
void SelectAndFocusNone(bool bFocusOnly);
|
||||
void SelectGroup(Group* TopGroup, bool Select);
|
||||
void SelectGroup(lcGroup* TopGroup, bool Select);
|
||||
|
||||
void CalculateStep();
|
||||
static int InstanceOfName(const String& existingString, const String& candidateString, String& baseNameOut );
|
||||
|
||||
+2
-2
@@ -571,7 +571,7 @@ void Terrain::Tesselate()
|
||||
}
|
||||
}
|
||||
|
||||
void Terrain::Render(Camera* pCam, float aspect)
|
||||
void Terrain::Render(lcCamera* pCam, float aspect)
|
||||
{
|
||||
if (m_nOptions & LC_TERRAIN_FLAT)
|
||||
{
|
||||
@@ -676,7 +676,7 @@ ty = (th*eye[1])/(2*pCam->m_zFar);
|
||||
}
|
||||
}
|
||||
|
||||
void Terrain::FindVisiblePatches(Camera* pCam, float aspect)
|
||||
void Terrain::FindVisiblePatches(lcCamera* pCam, float aspect)
|
||||
{
|
||||
// Get camera position information.
|
||||
const lcVector3& eye = pCam->mPosition;
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ public:
|
||||
Terrain& operator=(const Terrain& source);
|
||||
|
||||
void LoadTexture();
|
||||
void Render(Camera* pCam, float aspect);
|
||||
void Render(lcCamera* pCam, float aspect);
|
||||
void LoadDefaults(bool bLinear);
|
||||
void SetSize(float uSize, float vSize);
|
||||
void GetSize(float *uSize, float *vSize);
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
protected:
|
||||
void FreeMemory();
|
||||
void FindVisiblePatches(Camera* pCam, float aspect);
|
||||
void FindVisiblePatches(lcCamera* pCam, float aspect);
|
||||
|
||||
float** m_pControl;
|
||||
TerrainPatch** m_Patches;
|
||||
|
||||
+6
-6
@@ -33,28 +33,28 @@ View::~View()
|
||||
delete mCamera;
|
||||
}
|
||||
|
||||
void View::SetCamera(Camera* camera, bool ForceCopy)
|
||||
void View::SetCamera(lcCamera* Camera, bool ForceCopy)
|
||||
{
|
||||
if (camera->IsSimple() || ForceCopy)
|
||||
if (Camera->IsSimple() || ForceCopy)
|
||||
{
|
||||
if (!mCamera || !mCamera->IsSimple())
|
||||
mCamera = new Camera(true);
|
||||
mCamera = new lcCamera(true);
|
||||
|
||||
mCamera->CopyPosition(camera);
|
||||
mCamera->CopyPosition(Camera);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mCamera && mCamera->IsSimple())
|
||||
delete mCamera;
|
||||
|
||||
mCamera = camera;
|
||||
mCamera = Camera;
|
||||
}
|
||||
}
|
||||
|
||||
void View::SetDefaultCamera()
|
||||
{
|
||||
if (!mCamera || !mCamera->IsSimple())
|
||||
mCamera = new Camera(true);
|
||||
mCamera = new lcCamera(true);
|
||||
|
||||
mCamera->SetViewpoint(LC_VIEWPOINT_HOME, 1, false);
|
||||
}
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ public:
|
||||
void BeginPieceDrag();
|
||||
void EndPieceDrag(bool Accept);
|
||||
|
||||
void SetCamera(Camera* camera, bool ForceCopy);
|
||||
void SetCamera(lcCamera* camera, bool ForceCopy);
|
||||
void SetDefaultCamera();
|
||||
lcMatrix44 GetProjectionMatrix() const;
|
||||
LC_CURSOR_TYPE GetCursor() const;
|
||||
|
||||
@@ -47,8 +47,8 @@ void lcQEditGroupsDialog::on_newGroup_clicked()
|
||||
if (!currentItem)
|
||||
currentItem = ui->treeWidget->invisibleRootItem();
|
||||
|
||||
Group *parentGroup = (Group*)currentItem->data(0, GroupRole).value<uintptr_t>();
|
||||
Group *newGroup = lcGetActiveProject()->AddGroup(parentGroup);
|
||||
lcGroup *parentGroup = (lcGroup*)currentItem->data(0, GroupRole).value<uintptr_t>();
|
||||
lcGroup *newGroup = lcGetActiveProject()->AddGroup(parentGroup);
|
||||
options->GroupParents.Add(NULL);
|
||||
|
||||
QTreeWidgetItem *groupItem = new QTreeWidgetItem(currentItem, QStringList(newGroup->m_strName));
|
||||
@@ -93,7 +93,7 @@ void lcQEditGroupsDialog::timerEvent(QTimerEvent *event)
|
||||
m_editableDoubleClicked = false;
|
||||
}
|
||||
|
||||
void lcQEditGroupsDialog::updateParents(QTreeWidgetItem *parentItem, Group *parentGroup)
|
||||
void lcQEditGroupsDialog::updateParents(QTreeWidgetItem *parentItem, lcGroup *parentGroup)
|
||||
{
|
||||
Project *project = lcGetActiveProject();
|
||||
const lcArray<lcPiece*>& pieces = project->GetPieces();
|
||||
@@ -103,7 +103,7 @@ void lcQEditGroupsDialog::updateParents(QTreeWidgetItem *parentItem, Group *pare
|
||||
{
|
||||
QTreeWidgetItem *childItem = parentItem->child(childIndex);
|
||||
|
||||
Piece *itemPiece = (Piece*)childItem->data(0, PieceRole).value<uintptr_t>();
|
||||
lcPiece *itemPiece = (lcPiece*)childItem->data(0, PieceRole).value<uintptr_t>();
|
||||
|
||||
if (itemPiece)
|
||||
{
|
||||
@@ -113,7 +113,7 @@ void lcQEditGroupsDialog::updateParents(QTreeWidgetItem *parentItem, Group *pare
|
||||
}
|
||||
else
|
||||
{
|
||||
Group *itemGroup = (Group*)childItem->data(0, GroupRole).value<uintptr_t>();
|
||||
lcGroup *itemGroup = (lcGroup*)childItem->data(0, GroupRole).value<uintptr_t>();
|
||||
|
||||
strncpy(itemGroup->m_strName, childItem->text(0).toLocal8Bit(), sizeof(itemGroup->m_strName));
|
||||
itemGroup->m_strName[sizeof(itemGroup->m_strName) - 1] = 0;
|
||||
@@ -134,7 +134,7 @@ void lcQEditGroupsDialog::updateParents(QTreeWidgetItem *parentItem, Group *pare
|
||||
}
|
||||
}
|
||||
|
||||
void lcQEditGroupsDialog::addChildren(QTreeWidgetItem *parentItem, Group *parentGroup)
|
||||
void lcQEditGroupsDialog::addChildren(QTreeWidgetItem *parentItem, lcGroup *parentGroup)
|
||||
{
|
||||
Project *project = lcGetActiveProject();
|
||||
const lcArray<lcPiece*>& pieces = project->GetPieces();
|
||||
@@ -156,7 +156,7 @@ void lcQEditGroupsDialog::addChildren(QTreeWidgetItem *parentItem, Group *parent
|
||||
|
||||
for (int pieceIndex = 0; pieceIndex < pieces.GetSize(); pieceIndex++)
|
||||
{
|
||||
Piece *piece = pieces[pieceIndex];
|
||||
lcPiece *piece = pieces[pieceIndex];
|
||||
|
||||
if (piece->GetGroup() != parentGroup)
|
||||
continue;
|
||||
|
||||
@@ -33,8 +33,8 @@ public slots:
|
||||
private:
|
||||
Ui::lcQEditGroupsDialog *ui;
|
||||
|
||||
void updateParents(QTreeWidgetItem *parentItem, Group *parentGroup);
|
||||
void addChildren(QTreeWidgetItem *parentItem, Group *parentGroup);
|
||||
void updateParents(QTreeWidgetItem *parentItem, lcGroup *parentGroup);
|
||||
void addChildren(QTreeWidgetItem *parentItem, lcGroup *parentGroup);
|
||||
|
||||
void timerEvent(QTimerEvent *event);
|
||||
|
||||
|
||||
@@ -851,7 +851,7 @@ void lcQMainWindow::print(QPrinter *printer)
|
||||
{
|
||||
lcuint8* imageBuffer = (lcuint8*)malloc(stepWidth * stepHeight * 4);
|
||||
|
||||
Camera* camera = view.mCamera;
|
||||
lcCamera* camera = view.mCamera;
|
||||
camera->StartTiledRendering(tileWidth, tileHeight, stepWidth, stepHeight, aspectRatio);
|
||||
do
|
||||
{
|
||||
@@ -1051,7 +1051,7 @@ void lcQMainWindow::toggleFullScreen()
|
||||
showFullScreen();
|
||||
}
|
||||
|
||||
void lcQMainWindow::updateFocusObject(Object *focus)
|
||||
void lcQMainWindow::updateFocusObject(lcObject *focus)
|
||||
{
|
||||
propertiesWidget->updateFocusObject(focus);
|
||||
|
||||
@@ -1065,7 +1065,7 @@ void lcQMainWindow::updateFocusObject(Object *focus)
|
||||
statusPositionLabel->setText(label);
|
||||
}
|
||||
|
||||
void lcQMainWindow::updateSelectedObjects(int flags, int selectedCount, Object* focus)
|
||||
void lcQMainWindow::updateSelectedObjects(int flags, int selectedCount, lcObject* focus)
|
||||
{
|
||||
actions[LC_EDIT_CUT]->setEnabled(flags & (LC_SEL_PIECE | LC_SEL_CAMERA | LC_SEL_LIGHT));
|
||||
actions[LC_EDIT_COPY]->setEnabled(flags & (LC_SEL_PIECE | LC_SEL_CAMERA | LC_SEL_LIGHT));
|
||||
@@ -1095,7 +1095,7 @@ void lcQMainWindow::updateSelectedObjects(int flags, int selectedCount, Object*
|
||||
if ((selectedCount == 1) && (focus != NULL))
|
||||
{
|
||||
if (focus->IsPiece())
|
||||
message = QString("%1 (ID: %2)").arg(focus->GetName(), ((Piece*)focus)->mPieceInfo->m_strName);
|
||||
message = QString("%1 (ID: %2)").arg(focus->GetName(), ((lcPiece*)focus)->mPieceInfo->m_strName);
|
||||
else
|
||||
message = focus->GetName();
|
||||
}
|
||||
@@ -1108,9 +1108,9 @@ void lcQMainWindow::updateSelectedObjects(int flags, int selectedCount, Object*
|
||||
|
||||
if ((focus != NULL) && focus->IsPiece())
|
||||
{
|
||||
message.append(QString(" - %1 (ID: %2)").arg(focus->GetName(), ((Piece*)focus)->mPieceInfo->m_strName));
|
||||
message.append(QString(" - %1 (ID: %2)").arg(focus->GetName(), ((lcPiece*)focus)->mPieceInfo->m_strName));
|
||||
|
||||
const Group* pGroup = ((Piece*)focus)->GetGroup();
|
||||
const lcGroup* pGroup = ((lcPiece*)focus)->GetGroup();
|
||||
if ((pGroup != NULL) && pGroup->m_strName[0])
|
||||
message.append(QString(" in group '%1'").arg(pGroup->m_strName));
|
||||
}
|
||||
@@ -1227,8 +1227,8 @@ void lcQMainWindow::updateTransformType(int newType)
|
||||
|
||||
void lcQMainWindow::updateCameraMenu()
|
||||
{
|
||||
const lcArray<Camera*>& cameras = lcGetActiveProject()->GetCameras();
|
||||
Camera* currentCamera = gMainWindow->GetActiveView()->mCamera;
|
||||
const lcArray<lcCamera*>& cameras = lcGetActiveProject()->GetCameras();
|
||||
lcCamera* currentCamera = gMainWindow->GetActiveView()->mCamera;
|
||||
int actionIdx, currentIndex = -1;
|
||||
|
||||
for (actionIdx = LC_VIEW_CAMERA_FIRST; actionIdx <= LC_VIEW_CAMERA_LAST; actionIdx++)
|
||||
|
||||
+2
-2
@@ -30,8 +30,8 @@ public:
|
||||
void togglePrintPreview();
|
||||
void toggleFullScreen();
|
||||
|
||||
void updateFocusObject(Object *focus);
|
||||
void updateSelectedObjects(int flags, int selectedCount, Object* focus);
|
||||
void updateFocusObject(lcObject *focus);
|
||||
void updateSelectedObjects(int flags, int selectedCount, lcObject* focus);
|
||||
void updateAction(int newAction);
|
||||
void updatePaste(bool enabled);
|
||||
void updateCurrentStep();
|
||||
|
||||
@@ -353,7 +353,7 @@ void lcQPropertiesTree::mousePressEvent(QMouseEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
void lcQPropertiesTree::updateFocusObject(Object *newFocusObject)
|
||||
void lcQPropertiesTree::updateFocusObject(lcObject *newFocusObject)
|
||||
{
|
||||
if (!newFocusObject)
|
||||
{
|
||||
@@ -518,7 +518,7 @@ void lcQPropertiesTree::slotReturnPressed()
|
||||
|
||||
if (focusObject->GetType() == LC_OBJECT_PIECE)
|
||||
{
|
||||
Piece *part = (Piece*)focusObject;
|
||||
lcPiece *part = (lcPiece*)focusObject;
|
||||
|
||||
if (item == partPositionX || item == partPositionY || item == partPositionZ)
|
||||
{
|
||||
@@ -568,7 +568,7 @@ void lcQPropertiesTree::slotReturnPressed()
|
||||
}
|
||||
else if (focusObject->GetType() == LC_OBJECT_CAMERA)
|
||||
{
|
||||
Camera *camera = (Camera*)focusObject;
|
||||
lcCamera *camera = (lcCamera*)focusObject;
|
||||
|
||||
if (item == cameraPositionX || item == cameraPositionY || item == cameraPositionZ)
|
||||
{
|
||||
@@ -672,7 +672,7 @@ void lcQPropertiesTree::slotSetValue(int value)
|
||||
void lcQPropertiesTree::slotColorButtonClicked()
|
||||
{
|
||||
QWidget *parent = (QWidget*)sender();
|
||||
Piece *part = (Piece*)focusObject;
|
||||
lcPiece *part = (lcPiece*)focusObject;
|
||||
|
||||
lcQColorPickerPopup *popup = new lcQColorPickerPopup(parent, part->mColorIndex);
|
||||
connect(popup, SIGNAL(selected(int)), SLOT(slotSetValue(int)));
|
||||
@@ -758,7 +758,7 @@ void lcQPropertiesTree::setEmpty()
|
||||
cameraName = NULL;
|
||||
}
|
||||
|
||||
void lcQPropertiesTree::setPart(Object *newFocusObject)
|
||||
void lcQPropertiesTree::setPart(lcObject *newFocusObject)
|
||||
{
|
||||
if (!focusObject || focusObject->GetType() != LC_OBJECT_PIECE)
|
||||
{
|
||||
@@ -784,7 +784,7 @@ void lcQPropertiesTree::setPart(Object *newFocusObject)
|
||||
}
|
||||
|
||||
focusObject = newFocusObject;
|
||||
Piece *part = (Piece*)focusObject;
|
||||
lcPiece *part = (lcPiece*)focusObject;
|
||||
|
||||
lcVector3 position = part->mPosition;
|
||||
lcGetActiveProject()->ConvertToUserUnits(position);
|
||||
@@ -832,7 +832,7 @@ void lcQPropertiesTree::setPart(Object *newFocusObject)
|
||||
partID->setData(0, PropertyValueRole, qVariantFromValue((void*)part->mPieceInfo));
|
||||
}
|
||||
|
||||
void lcQPropertiesTree::setCamera(Object *newFocusObject)
|
||||
void lcQPropertiesTree::setCamera(lcObject *newFocusObject)
|
||||
{
|
||||
if (!focusObject || focusObject->GetType() != LC_OBJECT_CAMERA)
|
||||
{
|
||||
@@ -862,7 +862,7 @@ void lcQPropertiesTree::setCamera(Object *newFocusObject)
|
||||
}
|
||||
|
||||
focusObject = newFocusObject;
|
||||
Camera *camera = (Camera*)focusObject;
|
||||
lcCamera *camera = (lcCamera*)focusObject;
|
||||
|
||||
lcVector3 position = camera->mPosition;
|
||||
lcGetActiveProject()->ConvertToUserUnits(position);
|
||||
@@ -907,7 +907,7 @@ void lcQPropertiesTree::setCamera(Object *newFocusObject)
|
||||
cameraName->setData(0, PropertyValueRole, qVariantFromValue((void*)camera->GetName()));
|
||||
}
|
||||
|
||||
void lcQPropertiesTree::setLight(Object *newFocusObject)
|
||||
void lcQPropertiesTree::setLight(lcObject *newFocusObject)
|
||||
{
|
||||
// todo: light properties
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
return itemFromIndex(index);
|
||||
}
|
||||
|
||||
void updateFocusObject(Object *newFocusObject);
|
||||
void updateFocusObject(lcObject *newFocusObject);
|
||||
|
||||
QWidget *createEditor(QWidget *parent, QTreeWidgetItem *item) const;
|
||||
bool lastColumn(int column) const;
|
||||
@@ -55,13 +55,13 @@ protected:
|
||||
QTreeWidgetItem *addProperty(QTreeWidgetItem *parent, const QString& label, PropertyType propertyType);
|
||||
|
||||
void setEmpty();
|
||||
void setPart(Object *newFocusObject);
|
||||
void setCamera(Object *newFocusObject);
|
||||
void setLight(Object *newFocusObject);
|
||||
void setPart(lcObject *newFocusObject);
|
||||
void setCamera(lcObject *newFocusObject);
|
||||
void setLight(lcObject *newFocusObject);
|
||||
|
||||
void getPartProperties(lcPartProperties *properties);
|
||||
|
||||
Object *focusObject;
|
||||
lcObject *focusObject;
|
||||
|
||||
lcQPropertiesTreeDelegate *m_delegate;
|
||||
QIcon m_expandIcon;
|
||||
|
||||
@@ -146,7 +146,7 @@ void lcQSelectDialog::saveSelection(QTreeWidgetItem *parentItem)
|
||||
}
|
||||
}
|
||||
|
||||
void lcQSelectDialog::addChildren(QTreeWidgetItem *parentItem, Group *parentGroup)
|
||||
void lcQSelectDialog::addChildren(QTreeWidgetItem *parentItem, lcGroup *parentGroup)
|
||||
{
|
||||
Project *project = lcGetActiveProject();
|
||||
int numObjects = 0;
|
||||
|
||||
@@ -36,7 +36,7 @@ private:
|
||||
void setSelection(QTreeWidgetItem *parentItem, bool selected);
|
||||
void loadSelection(QTreeWidgetItem *parentItem);
|
||||
void saveSelection(QTreeWidgetItem *parentItem);
|
||||
void addChildren(QTreeWidgetItem *parentItem, Group *parentGroup);
|
||||
void addChildren(QTreeWidgetItem *parentItem, lcGroup *parentGroup);
|
||||
};
|
||||
|
||||
#endif // _LC_QSELECTDIALOG_H_
|
||||
|
||||
+2
-2
@@ -468,7 +468,7 @@ void lcMainWindow::ToggleFullScreen()
|
||||
window->toggleFullScreen();
|
||||
}
|
||||
|
||||
void lcMainWindow::UpdateFocusObject(Object* Focus)
|
||||
void lcMainWindow::UpdateFocusObject(lcObject* Focus)
|
||||
{
|
||||
lcQMainWindow* window = (lcQMainWindow*)mHandle;
|
||||
|
||||
@@ -476,7 +476,7 @@ void lcMainWindow::UpdateFocusObject(Object* Focus)
|
||||
window->updateFocusObject(Focus);
|
||||
}
|
||||
|
||||
void lcMainWindow::UpdateSelectedObjects(int Flags, int SelectedCount, Object* Focus)
|
||||
void lcMainWindow::UpdateSelectedObjects(int Flags, int SelectedCount, lcObject* Focus)
|
||||
{
|
||||
lcQMainWindow* window = (lcQMainWindow*)mHandle;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user