Go to the documentation of this file.
6 #ifndef CNOID_BODY_CAMERA_H
7 #define CNOID_BODY_CAMERA_H
10 #include <cnoid/Image>
12 #include "exportdecl.h"
24 virtual const char* typeName()
const override;
25 void copyStateFrom(
const Camera& other);
26 virtual void copyStateFrom(
const DeviceState& other)
override;
28 virtual void forEachActualType(std::function<
bool(
const std::type_info& type)> func)
override;
29 virtual void clearState()
override;
43 virtual bool on()
const override;
44 virtual void on(
bool on)
override;
51 #ifdef CNOID_BACKWARD_COMPATIBILITY
52 double nearDistance()
const {
return nearClipDistance_; }
53 void setNearDistance(
double d) { nearClipDistance_ = d; }
54 double farDistance()
const {
return farClipDistance_; }
55 void setFarDistance(
double d) { farClipDistance_ = d; }
62 resolutionX_ = x; resolutionY_ = y;
73 const Image& image()
const;
78 std::shared_ptr<const Image>
sharedImage()
const {
return image_; }
85 void setImage(std::shared_ptr<Image>& image);
92 double delay()
const {
return delay_; }
95 virtual int stateSize()
const override;
96 virtual const double* readState(
const double* buf)
override;
97 virtual double* writeState(
double* out_buf)
const override;
99 bool readSpecifications(
const Mapping* info);
100 bool writeSpecifications(
Mapping* info)
const;
107 bool isImageStateClonable_;
108 ImageType imageType_;
112 double nearClipDistance_;
113 double farClipDistance_;
117 std::shared_ptr<Image> image_;
119 void copyCameraStateFrom(
const Camera& other);
ref_ptr< Camera > CameraPtr
Definition: Camera.h:122
Definition: ValueTree.h:253
int resolutionY() const
Definition: Camera.h:68
double nearClipDistance() const
Definition: Camera.h:46
ImageType imageType() const
Definition: Camera.h:37
void setResolution(int x, int y)
Definition: Camera.h:61
double delay() const
Definition: Camera.h:92
bool isImageStateClonable() const
Definition: Camera.h:32
const Image & constImage() const
Definition: Camera.h:74
void setResolutionX(int x)
Definition: Camera.h:64
Definition: Referenced.h:103
void setFarClipDistance(double d)
Definition: Camera.h:49
void setNearClipDistance(double d)
Definition: Camera.h:47
int resolutionX() const
Definition: Camera.h:67
Definition: AbstractSceneLoader.h:11
Definition: CloneMap.h:13
void setImageStateClonable(bool on)
Definition: Camera.h:31
@ NO_IMAGE
Definition: Camera.h:34
void setResolutionY(int y)
Definition: Camera.h:65
std::shared_ptr< const Image > sharedImage() const
Definition: Camera.h:78
LensType lensType() const
Definition: Camera.h:40
Definition: Referenced.h:54
ImageType
Definition: Camera.h:34
void setDelay(double time)
Definition: Camera.h:93
double farClipDistance() const
Definition: Camera.h:48
void setImageType(ImageType type)
Definition: Camera.h:38
double fieldOfView() const
Definition: Camera.h:58
void setFieldOfView(double f)
Definition: Camera.h:59
void setLensType(LensType type)
Definition: Camera.h:41
@ NORMAL_LENS
Definition: Camera.h:35
double frameRate() const
Definition: Camera.h:71
void setFrameRate(double r)
Definition: Camera.h:70
LensType
Definition: Camera.h:35