Choreonoid  1.8
Public Types | Public Member Functions | Protected Member Functions | List of all members
cnoid::Camera Class Reference

#include <Camera.h>

Inheritance diagram for cnoid::Camera:
cnoid::Device cnoid::DeviceState cnoid::ClonableReferenced cnoid::Referenced cnoid::RangeCamera

Public Types

enum  ImageType { NO_IMAGE, COLOR_IMAGE, GRAYSCALE_IMAGE }
 
enum  LensType { NORMAL_LENS, FISHEYE_LENS, DUAL_FISHEYE_LENS }
 

Public Member Functions

 Camera ()
 
 Camera (const Camera &org, bool copyStateOnly=false)
 
virtual const char * typeName () const override
 
void copyStateFrom (const Camera &other)
 
virtual void copyStateFrom (const DeviceState &other) override
 
virtual DeviceStatecloneState () const override
 
virtual void forEachActualType (std::function< bool(const std::type_info &type)> func) override
 
virtual void clearState () override
 
void setImageStateClonable (bool on)
 
bool isImageStateClonable () const
 
ImageType imageType () const
 
void setImageType (ImageType type)
 
LensType lensType () const
 
void setLensType (LensType type)
 
virtual bool on () const override
 
virtual void on (bool on) override
 
double nearClipDistance () const
 
void setNearClipDistance (double d)
 
double farClipDistance () const
 
void setFarClipDistance (double d)
 
double fieldOfView () const
 
void setFieldOfView (double f)
 
void setResolution (int x, int y)
 
void setResolutionX (int x)
 
void setResolutionY (int y)
 
int resolutionX () const
 
int resolutionY () const
 
void setFrameRate (double r)
 
double frameRate () const
 
const Imageimage () const
 
const ImageconstImage () const
 
Imageimage ()
 
ImagenewImage ()
 
std::shared_ptr< const ImagesharedImage () const
 
void setImage (std::shared_ptr< Image > &image)
 
void clearImage ()
 
double delay () const
 
void setDelay (double time)
 
virtual int stateSize () const override
 
virtual const double * readState (const double *buf) override
 
virtual double * writeState (double *out_buf) const override
 
bool readSpecifications (const Mapping *info)
 
bool writeSpecifications (Mapping *info) const
 
- Public Member Functions inherited from cnoid::Device
virtual ~Device ()
 
Deviceclone () const
 
Deviceclone (CloneMap &cloneMap) const
 
virtual bool copyFrom (const Device *other)
 
void setIndex (int index)
 
void setId (int id)
 
void setName (const std::string &name)
 
void setLink (Link *link)
 
bool hasStateOnly () const
 
int index () const
 
int id () const
 
const std::string & name () const
 
const Linklink () const
 
Linklink ()
 
const Bodybody () const
 
Bodybody ()
 
Isometry3T_local ()
 
const Isometry3T_local () const
 
const Isometry3localPosition () const
 
template<class Scalar , int Mode, int Options>
void setLocalPosition (const Eigen::Transform< Scalar, 3, Mode, Options > &T)
 
Isometry3::ConstLinearPart R_local () const
 
Isometry3::LinearPart R_local ()
 
Isometry3::ConstLinearPart localRotation () const
 
template<typename Derived >
void setLocalRotation (const Eigen::MatrixBase< Derived > &R)
 
Isometry3::ConstTranslationPart p_local () const
 
Isometry3::TranslationPart p_local ()
 
Isometry3::ConstTranslationPart localTranslation () const
 
template<typename Derived >
void setLocalTranslation (const Eigen::MatrixBase< Derived > &p)
 
SignalProxy< void()> sigStateChanged ()
 
void notifyStateChange ()
 
SignalProxy< void(double time)> sigTimeChanged ()
 
void notifyTimeChange (double time)
 
const Isometry3T_local_org () const
 
void setLocalAttitude (const Isometry3 &Ta)
 
double cycle () const
 
void setCycle (double msec)
 
- Public Member Functions inherited from cnoid::DeviceState
virtual ~DeviceState ()
 
- Public Member Functions inherited from cnoid::Referenced
virtual ~Referenced ()
 

Protected Member Functions

virtual ReferenceddoClone (CloneMap *cloneMap) const override
 
- Protected Member Functions inherited from cnoid::Device
 Device ()
 
 Device (const Device &org, bool copyStateOnly=false)
 
void copySpecFrom (const Device *other)
 
- Protected Member Functions inherited from cnoid::DeviceState
 DeviceState ()
 
 DeviceState (const DeviceState &)
 
- Protected Member Functions inherited from cnoid::Referenced
 Referenced ()
 
 Referenced (const Referenced &)
 
int refCount () const
 

Member Enumeration Documentation

◆ ImageType

Enumerator
NO_IMAGE 
COLOR_IMAGE 
GRAYSCALE_IMAGE 

◆ LensType

Enumerator
NORMAL_LENS 
FISHEYE_LENS 
DUAL_FISHEYE_LENS 

Constructor & Destructor Documentation

◆ Camera() [1/2]

Camera::Camera ( )

◆ Camera() [2/2]

Camera::Camera ( const Camera org,
bool  copyStateOnly = false 
)

Member Function Documentation

◆ clearImage()

void Camera::clearImage ( )

◆ clearState()

void Camera::clearState ( )
overridevirtual

Reimplemented from cnoid::Device.

Reimplemented in cnoid::RangeCamera.

◆ cloneState()

DeviceState * Camera::cloneState ( ) const
overridevirtual

Implements cnoid::DeviceState.

Reimplemented in cnoid::RangeCamera.

◆ constImage()

const Image& cnoid::Camera::constImage ( ) const
inline

◆ copyStateFrom() [1/2]

void Camera::copyStateFrom ( const Camera other)

◆ copyStateFrom() [2/2]

void Camera::copyStateFrom ( const DeviceState other)
overridevirtual

Implements cnoid::DeviceState.

Reimplemented in cnoid::RangeCamera.

◆ delay()

double cnoid::Camera::delay ( ) const
inline

Time [s] consumed in shooting the current image

◆ doClone()

Referenced * Camera::doClone ( CloneMap cloneMap) const
overrideprotectedvirtual

Implements cnoid::ClonableReferenced.

Reimplemented in cnoid::RangeCamera.

◆ farClipDistance()

double cnoid::Camera::farClipDistance ( ) const
inline

◆ fieldOfView()

double cnoid::Camera::fieldOfView ( ) const
inline

◆ forEachActualType()

void Camera::forEachActualType ( std::function< bool(const std::type_info &type)>  func)
overridevirtual

Reimplemented from cnoid::Device.

Reimplemented in cnoid::RangeCamera.

◆ frameRate()

double cnoid::Camera::frameRate ( ) const
inline

◆ image() [1/2]

Image& cnoid::Camera::image ( )

◆ image() [2/2]

Image & Camera::image ( ) const

◆ imageType()

ImageType cnoid::Camera::imageType ( ) const
inline

◆ isImageStateClonable()

bool cnoid::Camera::isImageStateClonable ( ) const
inline

◆ lensType()

LensType cnoid::Camera::lensType ( ) const
inline

◆ nearClipDistance()

double cnoid::Camera::nearClipDistance ( ) const
inline

◆ newImage()

Image & Camera::newImage ( )

◆ on() [1/2]

bool Camera::on ( ) const
overridevirtual

Reimplemented from cnoid::Device.

◆ on() [2/2]

void Camera::on ( bool  on)
overridevirtual

Reimplemented from cnoid::Device.

◆ readSpecifications()

bool Camera::readSpecifications ( const Mapping info)

◆ readState()

const double * Camera::readState ( const double *  buf)
overridevirtual
Returns
The position in the buf after reading. The value is used when the super class's readState is called by the inherited class.

Implements cnoid::DeviceState.

◆ resolutionX()

int cnoid::Camera::resolutionX ( ) const
inline

◆ resolutionY()

int cnoid::Camera::resolutionY ( ) const
inline

◆ setDelay()

void cnoid::Camera::setDelay ( double  time)
inline

◆ setFarClipDistance()

void cnoid::Camera::setFarClipDistance ( double  d)
inline

◆ setFieldOfView()

void cnoid::Camera::setFieldOfView ( double  f)
inline

◆ setFrameRate()

void cnoid::Camera::setFrameRate ( double  r)
inline

◆ setImage()

void Camera::setImage ( std::shared_ptr< Image > &  image)

Move semantics. If the use_count() of the given shared image pointer is one, the data is moved to the Camera object and the ownership of the given pointer is released. Otherwise, the data is copied.

◆ setImageStateClonable()

void cnoid::Camera::setImageStateClonable ( bool  on)
inline

◆ setImageType()

void cnoid::Camera::setImageType ( ImageType  type)
inline

◆ setLensType()

void cnoid::Camera::setLensType ( LensType  type)
inline

◆ setNearClipDistance()

void cnoid::Camera::setNearClipDistance ( double  d)
inline

◆ setResolution()

void cnoid::Camera::setResolution ( int  x,
int  y 
)
inline

◆ setResolutionX()

void cnoid::Camera::setResolutionX ( int  x)
inline

◆ setResolutionY()

void cnoid::Camera::setResolutionY ( int  y)
inline

◆ sharedImage()

std::shared_ptr<const Image> cnoid::Camera::sharedImage ( ) const
inline

◆ stateSize()

int Camera::stateSize ( ) const
overridevirtual

Size of the double-precision floating numbers for representing the state.

Implements cnoid::DeviceState.

◆ typeName()

const char * Camera::typeName ( ) const
overridevirtual

Implements cnoid::DeviceState.

Reimplemented in cnoid::RangeCamera.

◆ writeSpecifications()

bool Camera::writeSpecifications ( Mapping info) const

◆ writeState()

double * Camera::writeState ( double *  out_buf) const
overridevirtual
Returns
The position in the buf after reading. The value is used when the super class's readState is called by the inherited class.

Implements cnoid::DeviceState.


The documentation for this class was generated from the following files: