aboutsummaryrefslogtreecommitdiffstats
path: root/meowpp/gra/WatchBall.h
diff options
context:
space:
mode:
Diffstat (limited to 'meowpp/gra/WatchBall.h')
-rw-r--r--meowpp/gra/WatchBall.h30
1 files changed, 14 insertions, 16 deletions
diff --git a/meowpp/gra/WatchBall.h b/meowpp/gra/WatchBall.h
index 8bccf7f..8bc99d0 100644
--- a/meowpp/gra/WatchBall.h
+++ b/meowpp/gra/WatchBall.h
@@ -29,12 +29,11 @@ private:
Myself() {
}
- ~Myself() {
+
+ Myself(Myself const& b): cameras_(b.cameras_), offset_(b.offset_) {
}
- Myself& copyFrom(Myself const& b) {
- cameras_ = b.cameras_;
- offset_ = b. offset_;
- return *this;
+
+ ~Myself() {
}
};
@@ -84,7 +83,7 @@ public:
/*!
* @brief 取得 cameras
*/
- Cameras const& cameras() const {
+ Cameras cameras() const {
return self->cameras_;
}
@@ -98,7 +97,7 @@ public:
/*!
* @brief 設定 camera
*/
- Cameras const& cameras(Cameras const& c) {
+ Cameras cameras(Cameras const& c) {
self()->cameras_ = c;
return cameras();
}
@@ -106,21 +105,21 @@ public:
/*!
* @brief 取得第i個camera
*/
- Camera<Pixel> const& camera(size_t i) const {
+ Camera<Pixel> camera(size_t i) const {
return cameras()[i];
}
/*!
* @brief 取得第i個camera (non-constant reference)
*/
- Camera<Pixel>& camera(size_t i) {
+ Camera<Pixel>& cameraGet(size_t i) {
return cameras()[i];
}
/*!
* @brief 設定第i個camera
*/
- Camera<Pixel> const& camera(size_t i, Camera<Pixel> const& c) {
+ Camera<Pixel> camera(size_t i, Camera<Pixel> const& c) {
cameras()[i] = c;
return camera(i);
}
@@ -128,21 +127,21 @@ public:
/*!
* @brief 取得offset
*/
- Vector3D<double> const& offset() const {
+ Vector3D<double> offset() const {
return self->offset_;
}
/*!
* @brief 取得offset (non-constant reference)
*/
- Vector3D<double>& offset() {
+ Vector3D<double>& offsetGet() {
return self()->offset_;
}
/*!
* @brief 設定offset
*/
- Vector3D<double> const& offset(Vector3D<double> const& ofs) {
+ Vector3D<double> offset(Vector3D<double> const& ofs) {
self()->offset_ = ofs;
return offset();
}
@@ -228,7 +227,7 @@ public:
* @return this
*/
ObjBase* copyFrom(ObjBase const* b) {
- return &(copyFrom(*(WatchBall*)b));
+ return &(copyFrom(*(WatchBall const*)b));
}
/*! @brief 回傳class的type
@@ -236,8 +235,7 @@ public:
* @return \c char \c const\c * 形式的typename
*/
char const* ctype() const{
- static char const* ptr = typeid(*this).name();
- return ptr;
+ return typeid(*this).name();
}
/*! @brief 回傳class的type