struct CCL::ICamera3D

Overview

3D camera interface. More…

#include <iscene3d.h>

struct ICamera3D: public CCL::ISceneNode3D
{
    // methods

    virtual tresult CCL_API lookAt (
        PointF3DRef p,
        PointF3DRef upVector = SceneConstants::kWorldUpVector
    ) = 0;

    virtual float CCL_API getFieldOfViewAngle () const = 0;
    virtual tresult CCL_API setFieldOfViewAngle (float angle) = 0;
    virtual Ray3D CCL_API getCameraRay (PointFRef position) const = 0;
    DECLARE_STRINGID_MEMBER (kFieldOfViewAngle);
};

Inherited Members

public:
    // enums

    enum NodeFlags;
    enum NodeType;

    // methods

    virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0;
    virtual unsigned int CCL_API retain () = 0;
    virtual unsigned int CCL_API release () = 0;
    virtual NodeType CCL_API getNodeType () const = 0;
    virtual UIDRef CCL_API getNodeClassID () const = 0;
    virtual int CCL_API getNodeFlags () const = 0;
    virtual StringID CCL_API getNodeName () const = 0;
    virtual void CCL_API setNodeName (StringID name) = 0;
    virtual void CCL_API setNodeData (VariantRef data) = 0;
    virtual VariantRef CCL_API getNodeData () const = 0;
    virtual PointF3DRef CCL_API getPosition () const = 0;
    virtual tresult CCL_API setPosition (PointF3DRef p) = 0;
    virtual tresult CCL_API setPositionX (float x) = 0;
    virtual tresult CCL_API setPositionY (float y) = 0;
    virtual tresult CCL_API setPositionZ (float z) = 0;
    virtual float CCL_API getYawAngle () const = 0;
    virtual tresult CCL_API setYawAngle (float angle) = 0;
    virtual float CCL_API getPitchAngle () const = 0;
    virtual tresult CCL_API setPitchAngle (float angle) = 0;
    virtual float CCL_API getRollAngle () const = 0;
    virtual tresult CCL_API setRollAngle (float angle) = 0;
    virtual float CCL_API getScaleX () const = 0;
    virtual tresult CCL_API setScaleX (float factor) = 0;
    virtual float CCL_API getScaleY () const = 0;
    virtual tresult CCL_API setScaleY (float factor) = 0;
    virtual float CCL_API getScaleZ () const = 0;
    virtual tresult CCL_API setScaleZ (float factor) = 0;
    virtual Transform3DRef CCL_API getWorldTransform () const = 0;
    virtual Transform3DRef CCL_API getInverseWorldTransform () const = 0;
    virtual void CCL_API setWorldTransform (Transform3DRef transform) = 0;
    virtual IScene3D*CCL_API getRootNode () = 0;
    virtual ISceneNode3D*CCL_API getParentNode () = 0;
    virtual ISceneChildren3D*CCL_API getChildren () = 0;
    virtual ISceneConstraints3D*CCL_API getConstraints () = 0;

    virtual tresult CCL_API addAnimation (
        StringID propertyId,
        const IAnimation* animation
    ) = 0;

    virtual tresult CCL_API removeAnimation (StringID propertyId) = 0;
    virtual tresult CCL_API enableHitTesting (tbool state) = 0;
    virtual tbool CCL_API isHitTestingEnabled () const = 0;

    virtual ISceneNode3D*CCL_API findIntersectingNode (
        Ray3DRef ray,
        float tolerance = 0.f,
        int flags = 0
    ) const = 0;

    DECLARE_STRINGID_MEMBER (kName);

Detailed Documentation

3D camera interface.

Methods

virtual tresult CCL_API lookAt (
    PointF3DRef p,
    PointF3DRef upVector = SceneConstants::kWorldUpVector
) = 0

Set the camera orientation, so that it looks at a given point.

virtual float CCL_API getFieldOfViewAngle () const = 0

Get angle for field of view in degrees.

virtual tresult CCL_API setFieldOfViewAngle (float angle) = 0

Set angle for field of view in degrees.

virtual Ray3D CCL_API getCameraRay (PointFRef position) const = 0

Get a ray in world space pointing from a normalized 2D coordinate (range 0 to 1) into the scene.